text:
Q: Segmentation fault while using malloc As an exercise I am trying to work on a Binary search tree!
I have created the code and it seems to run, but when I try to add a customer it crashes. After debugging the code I get a segmentation fault in line 82, where I try to allocate memory to root... Researching for a while I see that it is something related to memory, but can't figure what is going on with my code... Any suggestions about what is causing this failure when trying to allocate memory?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_STRING 50

void flush();

struct customer {
    char *name;
    char *address;
    char *email;
};

struct double_linked_list {
    struct customer *data;
    struct double_linked_list *previous;
    struct double_linked_list *next;
};

struct double_linked_list *customers_head = 0;

struct BST_node {
    struct double_linked_list *data;
    struct BST_node *left;
    struct BST_node *right;
};

struct BST_node *BST_email_root = 0;

struct BST_node *BST_find_customer(struct BST_node *root, char *email) {
    if (root == NULL)
        return NULL;
    if (strcmp(email, root->data->data->email) == 0)
        return root;
    else {
        if (strcmp(email, root->data->data->email) == -1)
            return BST_find_customer(root->left, email);
        else
            return BST_find_customer(root->right, email);
    }
}

void find_customer() {
    char email[MAX_STRING];
    struct double_linked_list *l;
    struct BST_node *b;

    printf("Give the email of the customer (up to %d characters) : ", MAX_STRING - 1);
    gets(email);

    b = BST_find_customer(BST_email_root, email);
    if (b == 0)
        printf("There is no customer with this email.\n");
    else {
        l = b->data;
        printf("Customer found! \n");
        printf("Name    : %s\n", l->data->name);
        printf("Address : %s\n", l->data->address);
        printf("Email   : %s\n", l->data->email);
    }
}

struct BST_node *new_BST_node(struct BST_node *root, struct double_linked_list *l) {
    if (root == NULL);
    {
        root = (struct BST_node *)malloc(sizeof(struct BST_node));
        if (root == NULL) {
            printf("Out of Memory!");
            exit(1);
        }
        root->data = l;
        root->left = NULL;
        root->right = NULL;
    }

    if (strcmp(l->data->email, root->data->data->email) == -1)
        root->left = new_BST_node(root->left, l);
    else
        root->right = new_BST_node(root->right, l);
    return root;
};

struct double_linked_list *new_customer() {
    char name[MAX_STRING], address[MAX_STRING], email[MAX_STRING];
    struct BST_node *b;
    struct double_linked_list *l;
    struct customer *c;

    printf("\nADDING NEW CUSTOMER\n=\n\n");
    printf("Give name (up to %d characters): ", MAX_STRING - 1);
    gets(name);

    printf("Give address (up to %d characters): ", MAX_STRING - 1);
    gets(address);

    printf("Give email (up to %d characters): ", MAX_STRING - 1);
    gets(email);

    b = BST_find_customer(BST_email_root, email);
    if (b) {
        printf("Duplicate email. Customer aborted.\n");
        return 0;
    }

    c = (struct customer *)malloc(sizeof(struct customer));
    if (c == 0) {
        printf("Not enough memory.\n");
        return 0;
    }

    c->name = strdup(name); // check for memory allocation problem
    if (c->name == 0)
        return 0;
    c->address = strdup(address);   // check for memory allocation problem
    if (c->address == 0)
        return 0;
    c->email = strdup(email);   // check for memory allocation problem
    if (c->email == 0)
        return 0;

    l = (struct double_linked_list*)malloc(sizeof(struct double_linked_list));
    if (l == 0) {
        printf("Not enough memory.\n");
        free(c->name);
        free(c->address);
        free(c->email);
        free(c);
        return 0;
    }

    l->data = c;
    l->previous = 0;
    l->next = customers_head;

    if (customers_head)
        customers_head->previous = l;

    customers_head = l;

    BST_email_root = new_BST_node(BST_email_root, l);

    return l;
}

void displaymenu() {
    printf("\n\n");
    printf("1. New customer\n");
    printf("2. Find customer using email\n");
    printf("0. Exit\n\n");
    printf("Give a choice (0-6) : ");
}

void flush() {
    char ch;
    while ((ch = getchar()) != '\n' && ch != EOF);
}

int main() {
    int choice;
    do {
        displaymenu();
        scanf("%d", &choice);
        flush();
        switch (choice) {
          case 1:
            new_customer();
            break;
          case 2:
            find_customer();
            break;
        }
    } while (choice != 0);

    return 0;
}

Codeblocks debugger gives the following information
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\debug\
Adding source dir: C:\debug\
Adding file: C:\debug\bin\Debug\debug.exe
Changing directory to: C:/debug/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Users\baskon\AppData\Local\Microsoft\WindowsApps
Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/debug/bin/Debug/debug.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Child process PID: 5908
Program received signal SIGSEGV, Segmentation fault.
In ?? () ()
9  0x00401480 in new_BST_node (root=0x0, l=0xbe0ec8) at C:\debug\main.c:82
C:\debug\main.c:82:1907:beg:0x401480
At C:\debug\main.c:82
9  0x00401480 in new_BST_node (root=0x0, l=0xbe0ec8) at C:\debug\main.c:82
C:\debug\main.c:82:1907:beg:0x401480
The call stack is the following

A: There are multiple problems in your code:

*

*You have a classic bug here:
struct BST_node *new_BST_node(struct BST_node *root, struct double_linked_list *l) {
if (root == NULL);
{
    root = (struct BST_node *)malloc(sizeof(struct BST_node));

The ; at the end of the if statement line is parsed as an empty statement. The subsequent block, introduced by the { will always be executed.
You can avoid this kind of silly bug by always using braces for your compound statements and placing them on the same line as the beginning of the statement, not on the next line.  This is close to the original K&R style used by the creators of the C language more than 40 years ago.

*The type for variable ch in function flush should be int to allow proper distinction of all values returned by getc(): all values of unsigned char plus the special value EOF:
 void flush(void) {
    int ch;
    while ((ch = getchar()) != EOF && ch != '\n') {
        continue;
    }
}

Note that you should make the empty statement more explicit as I did above, to avoid confusion and bugs such as the previous one.

*You should not use the obsolete unsafe function gets():  Use fgets() and strip the trailing newline with strcspn().

*When comparing strings with strcmp(), you should only rely on the sign of the return value. In functions BST_find_customer() and new_BST_node(), you compare with -1: this is unreliable. Use if (strcmp(email, root->data->data->email) < 0) instead.

*In function new_BST_node(), You do not return root when you create a new node in the tree.  Here is a corrected version:
struct BST_node *new_BST_node(struct BST_node *root, struct double_linked_list *l) {
    if (root == NULL) {
        root = malloc(sizeof(*root));
        if (root == NULL) {
            printf("Out of Memory!");
            exit(1);
        }
        root->data = l;
        root->left = NULL;
        root->right = NULL;
        return root;
    }

    if (strcmp(l->data->email, root->data->data->email) < 0) {
        root->left = new_BST_node(root->left, l);
    } else {
        root->right = new_BST_node(root->right, l);
    }
    return root;
}

Note that this is causing your bug as you probably have an infinite recursion here.

*Finally a couple pieces of advice:

*

*use NULL instead of 0 when comparing pointers to the null pointer. It is more readable.

*avoid naming a variable l as this name is graphically too close to 1 with the fixed pitch fonts used in programming environments.  Sometimes it is almost indistinguishable.

A: Ok, so after testing everything i found out what is wrong however i can't figure out why.. Any Suggestions??
I think that strcmp returns values of either 0 or -1 or 1.
But there was the problem, if i didn't define exactly if strcmp ==1 or if strcmp ==-1 ...i had an infinite loop as it seems (i used a printf command to see what is going on, and i discovered the bug..)
By changing
struct BST_node *new_BST_node(struct BST_node *root, struct double_linked_list *l)
{
if (root==NULL)
    {
    root = (struct BST_node *) malloc (sizeof(struct BST_node ));
    if (root==NULL)
        {
        printf("Out of Memory!");
        exit(1);
        }
    root->data=l;
    root->left=NULL;
    root->right=NULL;
    }

    if (strcmp(l->data->email, root->data->data->email) == -1)
        root->left =new_BST_node(root->left,l);
    else
        root->right =new_BST_node(root->right,l);

    return root;
};

to
struct BST_node *new_BST_node(struct BST_node *root, struct double_linked_list *l)
    {
    if (root==NULL)
        {
        root= (struct BST_node *)malloc(sizeof(struct BST_node ));
        if (root==NULL)
            {
            printf("Out of Memory!");
            exit(1);
            }

        root->data=l;
        root->left=NULL;
        root->right=NULL;
        }

    if ((strcmp(l->data->email, root->data->data->email))==-1)
                root->left =new_BST_node(root->left,l);
    else if ((strcmp(l->data->email, root->data->data->email)) ==1)
        root->right =new_BST_node(root->right,l);

    return root;
};

everything works fine..
But why didnt the other code work? I am pretty sure it is the same...


Click below to "like" the Herrin Chamber of Commerce on Facebook to see featured businesses, contests, updates, and more!
© 2013 Herrin Chamber of Commerce. All Rights Reserved.
Design by Rikki Rogers Graphics Design. Developed by Megabytes.


text:
Categories Tea assortment Chinese Tea Pu Erh Tea & Hei Cha Xiao Liao Fu 90's
Xiao Liao Fu 90's
Product no.: NL-PUERH-1711
(Select entry) 50g 25g Newsletter Set
In September, we introduced a shu/shou cha, which was produced using a method developed in the 70s (wo due). Then in October, we sent you a hand-crafted Pu Erh, which technique for post-fermentation was used based on the Hong Kong method - "Hong Kong storage" or "wet storage".
With this month's tea, we would like to explore the boundaries of Pu Erh and to open up into a wider field of « Hei Cha ». Hei Cha (which is generally translated as dark teas) is a mysterious family that includes other teas. Among the most famous are: Liu Bao Cha, produced in the Chinese province of Guangxi, or Liu An, produced in the region of Anhui. But the boundaries between these teas are not always strict or obvious, especially in the Golden Triangle from which the Pu Erh originates. It is not uncommon to find post-fermented tea with only little information in regards of its origin and exact process of maturation, which also seems to borrow from this or that family of dark tea.
According to him, this is a loose Pu Erh produced in Northern Vietnam in the 60s. The name remained since and is now referring to all the teas produced during this period of time, which leaves have the same specific aspect and the same taste character.
This month's tea, which we named Xiao Liao Fu (literally little Liao Fu, referring to the Liao Fu San Cha of the 1960s), a loose tea discovered and made famous in the 90's by Teng Shih Hai (a Taiwanese expert of ancient teas), is an example of these mysterious dark teas produced on the far reach of China. Looking at the appearance of the leaves, there is a very reminiscent of the Liao Fu San Cha, which was produced in Northern Vietnam, hence we categorize it as a traditional tea produced outside China. In the aspects of its taste, this is without doubt a tea produced in the 90s.
Year of production: 90's (very possible)
Newsletter-Set Content: 14g
Browse these categories as well: Pu Erh Tea & Hei Cha, Pu Erh Stories

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: Forced harmonic oscillator with two springs Consider a vertical system of two springs in series, with a mass(50 g) between them. From below the system is driven by a vibration generator. The setup is shown here, but the picture is taken while the mass was moving, and therefore the mass is not in the equilibrium position:

I expected the system to act close to a system of springs coupled in series, but it does not. For instance, there is a big difference in resonance frequency between a setup with the spring with elastic constant $K_1=15\:\mathrm{N}/\mathrm{m}$(m=3.876 g) on top and the one with $K_2=5\:\mathrm{N}/\mathrm{m}$(m=3.070 g) below, and the setup where these two springs change place.
EDIT: The results are shown under:

Why is this? In the equilibrium position the two springs are not streched equally. Is that the reason?

A: The Lagrangian of the system is, $$L = \frac{1}{2}m\dot{x_1}^2 - \frac{1}{2}k_1(l_1 - l_0+x_1)^2-\frac{1}{2}k_2(l_2-l_0+x_2-x_1)^2+mgx_1$$
Here, $x_1$ is the downward distance from the equilibrium position of the mass, $x_2$ is the downward distance from the midpoint of the driving oscillator, $k_1$ and $k_2$ are spring constants of the top and bottom springs respectively, $l_0$ is the unstretched length of both springs, $l_1$ and $l_2$ are stretched lengths at equilibrium of the top and bottom springs respectively. The condition for equilibrium, when the driving force is not applied, is  $$k_1(l_1-l_0) = k_2(l_2-l_0)+mg$$ We can take $x_2=a\ cos(\omega t)$ for the driving oscillation and then the equation of motion for the mass from Euler-Lagrange equation would be, $$m\ddot{x_1}+(k_1+k_2)x_1-ak_2cos(\omega t) = 0$$ Solving this equation, we can get the amplitude of the driven oscillation to be, $$A=\frac{ak_2}{k_1+k_2-m\omega^2}$$ As a result, the resonant frequency should be the same for both setups with springs interchanged as $\omega_r=\sqrt{(k_1+k_2)/m}$. The proportion between the resonant frequencies in your setups should be $\omega_{r(5,5)}:\omega_{r(5,15)}:\omega_{r(15,15)}=1:\sqrt{2}:\sqrt{3}$ which is apparent in your results. However, based on theoretical calculations the resonant frequencies should be the same for setups with just the springs interchanged.
Now, in this calculation damping is ignored while in all real systems damping is inevitable. The presence of damping is also the reason you are not getting an infinite amplitude at resonance. For a damping factor $\gamma$, the resonant frequency will be $$\omega_r = \sqrt{\frac{k_1+k_2}{m} - \frac{\gamma^2}{2}}$$
If the damping is not same for both the springs, then the resonant frequencies might not match within a certain limit. I would suggest you to check for any possible source of damping in this setup that might significantly affect the resonant frequency.

A: Comments to the question:

*

*Technically, the two springs are connected in parallel rather than in series since the equivalent spring constant is $$k_{\rm eq}~=~k_1+k_2.$$
(If the two springs had been truly in series, then $k_{\rm eq}=\frac{k_1k_2}{k_1+k_2}.$)

*For spring masses $m_1,m_2\ll m$ much smaller than the weight $m$, the effective mass is
$$m_{\rm eff}~:=~\frac{k_{\rm eq}}{\omega^2}~\approx~ m+ \frac{m_1+m_2}{3}, $$ where $\omega=2\pi f$ is the resonance frequency.

*Amusingly, gravity $g$ does theoretically not enter. The resonance frequency $\omega$ should in principle be the same for a horizontal oscillation, although for practical reasons, it may be difficult to test experimentally a horizontal oscillation without introducing additional friction.

redpajama_set_name: RedPajamaStackExchange


Funeral services for Mrs. Beatrice C. Burke, 61, 1504 Sycamore School Rd., Ft. Worth, who died Oct. 20 in Tijuana, Mexico, will be held 2 p.m. Thursday in Turrentine-Jackson-Morrow chapel with Rev. Wayne Hillburn and Rev. Bill Bowers officiating. Interment will be in Mt. Olive Cemetery.


text:
<#
	.SYNOPSIS
		Add VMWare systems to specified ConfigMgr collection

	.DESCRIPTION
		This script will query the VMware server for a list of machines. It will then query Configuration Manager to verify which of those machines are present. Finally, it adds the list of machines to a collection, which is assigned to a specific distribution point.

	.PARAMETER ServerCollection
		List of servers in Configuration Manager to compare with the list of servers from VMWare.

	.PARAMETER ConfigMgrSiteCode
		Three letter Configuration Manager site code

	.PARAMETER DistributionPointCollection
		Name of the collection containing a list of systems on the

	.PARAMETER VMWareServer
		Name of the VMWare server

	.PARAMETER ConfigMgrModule
		UNC path including file name of the configuration manager module

	.PARAMETER ConfigMgrServer
		FQDN of SCCM Server

	.PARAMETER ConfigMgrSiteDescription
		Description of the ConfigMgr Server

	.NOTES
		===========================================================================
		Created with: 	SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.142
		Created on:   	5/11/2020 9:50 AM
		Created by:   	Mick Pletcher
		Filename:     	VMWareConfigMgr.ps1
		===========================================================================
#>
[CmdletBinding()]
param
(
	[ValidateNotNullOrEmpty()]
	[string]$AllServersCollection = '',
	[ValidateNotNullOrEmpty()]
	[string]$ConfigMgrSiteCode = '',
	[ValidateNotNullOrEmpty()]
	[string]$DistributionPointCollection = '',
	[ValidateNotNullOrEmpty()]
	[string]$VMWareServer = '',
	[ValidateNotNullOrEmpty()]
	[string]$ConfigMgrModule = '',
	[ValidateNotNullOrEmpty()]
	[string]$ConfigMgrServer = '',
	[ValidateNotNullOrEmpty()]
	[string]$ConfigMgrSiteDescription = ''
)

#Import PowerCLI module
Import-Module -Name VMWare.PowerCLI -ErrorAction SilentlyContinue | Out-Null
#Collection ID of the collection containing a list of all servers
$CollectionID = (Get-WmiObject -Namespace ("root\SMS\site_" + $ConfigMgrSiteCode) -Query ("select * from SMS_Collection Where SMS_Collection.Name=" + [char]39 + $AllServersCollection + [char]39) -ComputerName PRODCM).MemberClassName
#Retrieve the list of all servers
$MEMCMServerList = Get-WmiObject -Namespace ("root\SMS\site_" + $ConfigMgrSiteCode) -Query "select * FROM $CollectionID" -ComputerName PRODCM | Sort-Object -Property Name
#Establish a connection with teh VMWare server
Connect-VIServer -Server $VMWareServer | Out-Null
$VerifiedServers = @()
#Get the list of servers from the VMWare server that are also in Configuration Manager
(Get-VM).Name | Sort-Object | ForEach-Object {
	If ($_ -in $MEMCMServerList.Name) {
		$VerifiedServers += $_
	}
}
#CollectionID of the collection containing a list of all servers in VMWare
$CollectionID = (Get-WmiObject -Namespace ("root\SMS\site_" + $ConfigMgrSiteCode) -Query ("select * from SMS_Collection Where SMS_Collection.Name=" + [char]39 + $DistributionPointCollection + [char]39) -ComputerName PRODCM).MemberClassName
#Retrieve list of all servers in VMWare ConfigMgr collection
$MEMCMServerList = Get-WmiObject -Namespace ("root\SMS\site_" + $ConfigMgrSiteCode) -Query "select * FROM $CollectionID" -ComputerName PRODCM | Sort-Object -Property Name
$MissingSystems = @()
#Retrieve the list of servers that are not in the ConfigMgr collection
$VerifiedServers | ForEach-Object {
	If ($_ -notin $MEMCMServerList.Name) {
		$MissingSystems += $_
	}
}
If ($MissingSystems -ne $null) {
	#Import ConfigMgr PowerShell Module
	Import-Module -Name $ConfigMgrModule -Force
	#Map drive to ConfigMgr server
	New-PSDrive -Name $ConfigMgrSiteCode -PSProvider 'AdminUI.PS.Provider\CMSite' -Root $ConfigMgrServer -Description $ConfigMgrSiteDescription | Out-Null
	#Change current directory to ConfigMgr mapped drive
	Set-Location -Path ($ConfigMgrSiteCode + ':')
	#Add missing systems to the specified collection
	$MissingSystems | ForEach-Object {
		Add-CMDeviceCollectionDirectMembershipRule -CollectionName $DistributionPointCollection -ResourceID (Get-CMDevice -Name $_).ResourceID
	}
}

redpajama_set_name: RedPajamaGithub


allis 45 cone crusher manual - privilegeresorts. allis 45 cone crusher manual - coal-crusher. To read more about Allis Chalmers cone crushers and to see some available used Allis Chalmers cone crushers please go .
allis chalmer cone crusher 9 45 grinding mill equipment 9-45 cone crusher sand washing machine allis chalmers 6 36 cone crusher for sale crusher machine company give you the all-round service Used allis chalmer cone crusher 9 45 allis chalmer cone Allis-Chalmers ore crusher price.
trituradora de roca allis chalmers 24x15 - chufamix. serie 1200 allis chalmers trituradora de mand237bula. 1914 manual de allis chalmers roca crusher ... trituradora de cono allis chalmer 9 45.
Jul 02, 2018· o amp m manual for cone crushers gcpa.ino amp m of stone crusher mowasahhospital. stone crushers amp soil tillersemwindiain. Telesmiths D Series Cone. Contact Us. Hand operated rock crusher, re-crushing to a smaller size, single . ... allis chalmers crusher manual XINHAI.
svedala arbra jaw crusher user manual allis 45 cone crusher manual - beltconveyers.. allis chalmers cone crusher manuals – Crusher Business Plan. . svedala crusher and screen book pdf. Get Price And Support Online. BDI Crusher Wear Parts.
allis chalmer jaw crusher specifications allis 45 cone crusher manual allis chalmers model 45 rock crusher . Check price>> hydrocone crusher specification villagecrafts.co.in. Allis-Chalmers sales literature Spec sheet model 36, 45 and 500 Hydrocone cone crusher Allis 4000 Hydrocone Crusher Specs allis chalmers 222 cone .
allis chalmers rock crusher manual -, allis gyratory crusher manuals, allis chalmers portable crusher 7,5 45 specs allis chalmers hydrocone crusher manual Rockone / Portable 48 Gyradisc Cone Crusher .
Equipment » allis chalmers 222 cone crusher manuals. allis chalmers 222 cone crusher manuals. The Auctioneer Sale Results. Sale Results We send out the sale results notifications in the form of a newsletter within 14 days of the sale taking place. Please follow the link below to register for this service.


Our Social Media Plan Layout is the perfect template for social media marketing demonstrations and social network presentations. Prepare a powerful social media plan to display metrics using pie graphs that are easy for your audience to understand. The Social Media Plan Layout includes fourteen fully editable slides – easily change colors, text, and photos to suit your personal needs and style. Featuring a 16:9 screen layout, this presentation can be instantly downloaded as a PowerPoint PPT file and edited from your computer, with the option to export to PDF, JPG, and more.


0398359 CARB ASSY., Lower, 200TX, CX. Not Shown Refer to Part Number Stamped on Side Cover Plate When Replacing Internal Parts.
0398360 CARB ASSY., Upper, 200TX, CX. Not Shown Refer to Part Number Stamped on Side Cover Plate When Replacing Internal Parts.
0433562 CARB ASSY., Upper, 185, 200STL, 225. Not Shown Refer to Part Number Stamped on Side Cover Plate When Replacing Internal Parts.
0433563 CARB ASSY., Lower, 185, 200STL, 225. Not Shown Refer to Part Number Stamped on Side Cover Plate When Replacing Internal Parts.


Including those no-opinion affirmances, the Federal Circuit has found the patent to be invalid in more than ninety percent of its decisions. The court's precedential opinions, however, tell a different story: nearly a quarter of them favor the patentee by rejecting challenges to patent validity. This difference is due largely to one remarkable fact: Although the court has issued over fifty Rule 36 affirmances finding the asserted patent to be invalid, it has not issued a single Rule 36 affirmance when finding in favor of a patentee. Rather, it has written an opinion in every one of those cases.
As a result, the Federal Circuit's precedential opinions provide an inaccurate picture of how disputes over patentable subject matter are actually resolved. Those opinions suggest that any given patent has a decent chance of surviving an eligibility challenge at the Federal Circuit. But, in reality, very few patents do. Our findings suggest that, by saying nothing, a court can indeed affect substantive law, or at least the perception of it. This has interesting implications both for the on-going debate over the legality of Rule 36 and, more broadly, for understanding the differences between the law on the books and the actual experience of litigants.
Paul Gugliuzza & Mark A. Lemley, Can a Court Change the Law by Saying Nothing?, 71 Vanderbilt Law Review 765 (2018).


text:
RHTLaw Taylor Wessing
ASEAN Plus Group
The Interlex Group
Waste and Water
Real Estate & Infrastructure
Tech., Media & Comms
Corporate and Capital Markets
Founder Senior Consultant
Senior Counsels
Commissioners for Oaths
Registered Foreign Lawyers
Cases/Deals
Innovative and dynamic law firm with offices in Singapore, Hong Kong and Vietnam
Strong local knowledge across 16 jurisdictions in Asia
As a member of Taylor Wessing, we have access to more than 30 offices across the globe.
We pride ourselves as a law firm that delivers international capabilities, locally.
With a focus on the food & beverage sector, our clients comprise producers, owners and operators of restaurants and eateries.
We represent educational institutions, public & private educational bodies, as well as advice board of governors, trustees and board of directors on governance issues.
As the demand for energy and resources rise, environmental concerns are increasingly coming to the fore. We provide practical commercial advice to address such needs.
Singapore's strategic location in the heart of Asia attracts global investors. Our nation's growing economic landscape, stable political structure and sound legal and tax policies are conducive factors contributing to Singapore's position as a leading financial hub.
We provide bespoke and comprehensive legal services to individuals, families, international private banks and fiduciary groups, with particular expertise advising entrepreneurs and business owners.
Healthcare & Life Sciences is one of the most innovative and complex industries. We can assist and provide solutions at different stages of the business life cycle, from discovery and development through to patent litigation.
We act for residential, commercial and industrial property developers, multinational and local corporates, public listed and private real estate companies, statutory boards, corporate and individual investors.
Technology, Media & Communications
With technology interconnecting businesses across borders seamlessly, we keep ourselves updated on legislative and industry developments to add value to our clients.
An innovative, vibrant and international law firm with access to more than 1,700 legal professionals across 41 offices globally.
Clients of RHTLaw Taylor Wessing can expect intelligent and innovative legal and business solutions from a team that is attuned to the nuances of working in Asia, with the added perspective and expertise of an international firm.
RHTLaw Taylor Wessing partners included in Singapore's top 20 most influential legal minds aged 40 and under
Awards Latest News News
RHTLaw Taylor Wessing's Technology, Media & Communications Industry Group ranked for the 6th year running in Chambers and Partners Asia Pacific 2020
Awards Latest News
RHTLaw Taylor Wessing announces appointment of Acting Head of Financial Services (Regulatory) Practice
Highlights of The RigHT Team Forward Event
RHT Rajan Menon Foundation Charity Golf 2019
RHT Rajan Menon Foundation
Healthcare Life Sciences
Erwan Barre
We have been working with the same teams for more than ten years and they are always just a phone call away for guidance and advice. The team has exceeded expectations, meeting very tight datelines and working through nights, weekends and holidays.
"The success of the concurrent AGM in both countries would not have been made possible without the support of our legal adviser RHTLaw Taylor Wessing LLP"...
"I have worked with Amanda Chen, Partner (Foreign Lawyer) at RHTLaw Taylor Wessing, on various transactions since 2011 and many of these transactions were of cross-border nature"...
"The business units under Goldbell Corporation Pte Ltd engaged RHTLaw Taylor Wessing to do debt recovery tasks. Vernon Voon, Partner at the Firm, has a wealth of knowledge..."
"Partnering with a professional and competent legal practice such as RHTLaw Taylor Wessing has been a phenomenally satisfying experience. The team exhibited outstanding coordination..."
"We have engaged RHTLaw Taylor Wessing for its professional services since its inception in 2011. Following its alliance with Taylor Wessing, we continued to instruct the firm in various"…
Our Success. Our Responsibility
The passion to play our part as good corporate citizens led to the establishment of RHT Rajan Menon Foundation, a Singapore registered charity and Grant-making Philanthropic Organisation in Singapore.
The Foundation enables us to carry out our philanthropic activities in a structured and more sustainable manner that is focused, hands-on and meaningful.
RHTLaw Taylor Wessing LLP (UEN No. T11LL0786A) is registered in Singapore under the Limited Liability Partnerships Act (Chapter 163A) with limited liability.
RHTLaw Taylor Wessing LLP is a Singapore law practice registered as a limited liability law partnership in Singapore ("The LLP"). It is a member of Taylor Wessing, a Swiss Verein, the other members of which are separate legal entities and separately registered law practices in particular jurisdictions. The LLP is solely a Singapore law practice and is not an affiliate, branch or subsidiary of any of the other member firms of Taylor Wessing. Taylor Wessing Verein does not itself provide legal or other services.
A list of all Partners and their professional qualifications may be inspected at our main office at 9 Raffles Place #29-01 Republic Plaza Tower 1 Singapore 048619
© 2019 RHTLaw Taylor Wessing LLP
I consent to receive relevant marketing communications and event invitations from RHTLaw Taylorwessing professional practices topics. I understand that I can amend my preferences and unsubscribe at any time from each email I receive.
I have read and agree to the privacy statement
Aviation e-Brochure
RHTLaw Taylor Wessing Building & Construction Law Update (Jan-Apr 2019)
Capital Markets e-Brochure
Corporate e-brochure
Intellectual Property & Technology e-Brochure
Litigation & Dispute Resolution e-Brochure
Financial Services e-Brochure
Real Estate e-Brochure
This website uses 'cookies' to give you the best and most relevant experience. By continuing to browse the site, you are agreeing to our use of cookies. Please read our privacy policy for more details.


Julia Donaldson's well-loved story has recently been translated into the Shetland dialect by Laureen Johnson. The Shetland Gruffalo will be launched at the Shetland Library, in the old Library building, on Saturday 24th October. From 2 - 4 pm, books will be on sale. Laureen will do readings at 2.30 and 3.30 pm, and will be on hand to sign books at any time during the afternoon.


We are profoundly distressed by the introduction of a bill in New York State today that would ease restrictions in state law on late-term abortion and runs the serious risk of broadly expanding abortion access at all stages of gestation. This legislation would add a broad and undefined "health" exception for late-term abortion and would repeal the portion of the penal law that governs abortion policy, opening the door for non-doctors to perform abortions and potentially decriminalizing even forced or coerced abortions. In addition, we find the conscience protection in the bill to be vague and insufficient, and we are concerned about the religious liberty of our health facilities.
Instead of expanding abortion and making abortions even more prevalent, we would like to protect both the woman and the child in the womb. In New York, where one in every three pregnancies ends in abortion (and upwards of 6 in 10 in certain communities), it is clear that we as a state have lost sight of that child's dignity. We pledge all our efforts to defeat this proposal. We call on all pro-life New Yorkers to stand together with us and with all the leadership in Albany who share our conviction that we have no need for such a bill to become law. We need instead to enhance and promote the life and dignity of all human beings from the moment of conception until the moment of natural death.


South Asia's largest hospitality company, the Indian Hotels Company Limited, has signed a management contract for two hotels in Goa, adding 506 rooms to its pipeline. The company will take over the management of the legendary 207 key Cidade de Goa which will form a part of the new SeleQtions portfolio – a named collection of hotels and resorts with a distinct character. An additional 299 rooms which are under construction, will be added to the same complex under the Taj brand scheduled to open by the end of this year.
Both the hotels will be located at the same site at Vainguinim beach in the vicinity of Dona Paula in Goa. Cidade de Goa, designed by Charles Correa with its distinctive old-world charm, often known as one of Goa's best kept secrets will be the first hotel to join IHCL's SeleQtion's portfolio as of April 2019. The Taj branded 299 room hotel will have a contemporary design with floor to ceiling glass windows offering superb sea views. The hotel will boast of extensive conferencing facilities with the largest convention hall in Goa, measuring approximately 1200 square meters. It will have several dining options including an all-day diner, speciality restaurants and bars. It is slated to open in early 2020.
Goa is home to six existing IHCL branded hotels with another three under development, offering something unique for every traveller.


When asked about how to reduce the environmental impact of agriculture, many people will think of organic food as an answer. But there are other solutions to implement first, which are cheaper and better for your health.
When asked about how to reduce the environmental impact of agriculture, many people will think of organic food as an answer. It reduces global warming by not using natural gas to make fertilizers (plus other environmental advantages, such as maintaining soil quality and biodiversity). But tractors still emit CO2, cattle and rice still generate methane (and the lot still consumes water), so it is an improvement rather than a silver bullet.
The key health advantage of organic food is that it has no pesticides (the long-term health consequences of which are unclear), which is especially important with fruit and vegetables that are eaten raw with their skins (which are rich in vitamins and minerals). A recent study also found more antioxidants in organic food (but not everybody agrees that this matters so much, see e.g. Harvard's "Antioxidants: Beyond the Hype"). The environmental benefits exist (even though I cannot quantify them), the health benefits exist (especially for raw fruit and vegetables) but organic food is more expensive.
Since agriculture is mostly about food, another possible way of reducing the environmental impact of agriculture is simply eating less (not starving, simply not overeating). Obesity is on the rise and reducing food intake by, say, 10% will reduce the environmental impact by 10% (and the cost of one's food by 10% as well), on top of curbing obesity. Putting an end to the "supersize" phenomenon is better for the environment and for health, and cheaper.
One can also consume less meat, especially beef (milk and eggs are produced more efficiently and therefore have less impact). In the US, beef production uses corn and soybeans that could otherwise be used for humans; in South America, beef directly or indirectly causes deforestation. In rich countries people consume far enough proteins already and reducing meat intake will help to reduce the intake of cholesterol and saturated fats. Again, this is about switching from too much to enough, not stopping eating meat altogether. Since meat is expensive, consuming less also saves money. Like consuming less food, consuming less meat (i.e. consuming enough instead of too much, not turning vegetarian) is better for the environment and for health, and cheaper. Also, while milk is typically our main source of calcium (a mineral we genuinely need), "it's not clear, though, that we need as much calcium as is generally recommended [moreover] high intake can increase the risk of prostate cancer and possibly ovarian cancer", so we should probably consume less milk as well.
A fourth possibility (quite compatible with the other three) is to waste less. Any food that consumers waste had to be produced (with all the environmental consequences) and had to be bought (thus costing money). Wasting less is better for the environment and cheaper (but of course has no impact on health).
Of these four possibilities (not an exhaustive list),1 three have clear health benefits (wasting less does not) and three save money (organic food costs more). Organic food, often touted as healthier, mostly benefits people who are already fairly healthy and who feed themselves fairly well2 — someone obese or with diabetes or atherosclerosis (clogged arteries) will benefit only marginally by switching to eating too much (organic) food, eating cloyingly sweet (organic) food or (organic) food full of salt and saturated fatty acids. The priority should thus be eating a sufficient and balanced diet, of the right quantity and quality, without wasting. Once we get all this right, we can certainly switch to organic food.
If wheat is not harvested because harvesting would cost more than the wheat is worth then some wheat is lost (however, not harvesting during years of overproduction because it would be uneconomical only puts a limit on the overproduction — this has a bigger impact on statistics of waste than on hunger). Likewise, food is wasted if an apple is discarded because it is too small or ugly, or when stale bread is thrown away. The basic idea of wasting food is simple, quantification less so.
One often hears that 30% or 40% of food is wasted. I don't know if such numbers are reliable (the bigger the number the more media exposure the report will get, so there can be a clear bias). In any case, they miss an important point: we should waste less food quantitatively but also qualitatively. Back in the days, inedible leftovers would be fed to pigs or chickens; as much food is lost from human consumption this way, but it is not lost as much. Today, peels, leftovers, etc. can be composted; again, not as good as eating them but not as bad as throwing them away (especially if they end up in a landfill, where they produce methane and warm the planet). If all the food being thrown away were fed to animals or composted, then as much food would be wasted as today, but it would not be wasted nearly as much.
It is often mentioned that producing 1 kg of meat protein requires feeding 2–10 kg of plant protein to the animals. Meat is thus quite wasteful (beef more so than chicken). If meat consumption were divided by two for instance, instead of having 100 g of meat protein, one would have 50 g of meat protein plus 100–500 g of plant protein — quite a lot more food!
Yet this argument assumes that the feed is edible by humans. In fact, cows raised in pastures in mountains or in lowlands where no crop would grow do not take land away from food production for humans. Turning 10 kg of grass into 1 kg of meat does not waste 9 kg of food, rather it creates 1 kg of food. (Also see the last chapter in Vaclav Smil's "Should we eat meat?".) I would like to see people who disagree with this argument eat the grass themselves.
But purposefully wasteful production is not limited to meat: if a low-yielding (but perhaps better-tasting) cultivar is chosen instead of a higher-yielding one, is food not also wasted? A good example is wine: a plot of land where 1000 liters of wine could be produced in fact yields half as much because of the use of a grape variety that has more appeal to wine drinkers. This is not very different from selecting the best grapes to improve quality and discarding the inferior half (which clearly qualifies as wasting half the harvest).
And what if the yield is kept artificially low because techniques that could raise it (e.g. fertilizers or pesticides) are not used? In both cases less food gets eaten than could be (just like with meat). So, is organic agriculture on the wrong side of the fence, in eschewing productivity?
1 And then there is everything else. Unhealthy food is neither intrinsically better nor intrinsically worse for the planet. While corn syrup is a spearhead of (sweet) processed food, it is merely processed corn (and if processing is evil in itself so should be fruit juice or pasta). In Europe, the Common Agricultural Policy (CAP) subsidizes the production of oil and sugar rather than fruit and vegetables. These problems deserve to be tackled in their own right, even if they have no major environmental impact.
2 Also see B. Parmentier, "Manger tous et bien": "le pain complet et les pains fantaisie au seigle ou autres céréales sont bien meilleurs, la différence (en termes de bénéfices santé) entre le pain complet et le pain blanc étant sans commune mesure avec celle existant entre le pain « normal » et le pain « bio »." (p. 239).


text:
/*
 * $Id:$
 */

/*

Copyright (c) 2000-2016 Board of Trustees of Leland Stanford Jr. University,
all rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
STANFORD UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of Stanford University shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Stanford University.

 */

package org.lockss.plugin.medknow;

import java.net.URL;
import java.util.*;

import org.apache.commons.lang.StringUtils;
import org.lockss.config.Configuration;
import org.lockss.daemon.*;
import org.lockss.plugin.*;
import org.lockss.plugin.base.BaseCachedUrlSet;
import org.lockss.plugin.definable.*;
import org.lockss.state.AuState;
import org.lockss.test.*;
import org.lockss.util.*;

//
// This plugin test framework is set up to run the same tests in two variants - CLOCKSS and GLN
// without having to actually duplicate any of the written tests
//
public class TestMedknowArchivalUnit extends LockssPluginTestCase {
  private MockLockssDaemon theDaemon;
  static final String BASE_URL_KEY = ConfigParamDescr.BASE_URL.getKey();
  static final String ISSN_KEY = ConfigParamDescr.JOURNAL_ISSN.getKey();
  static final String VOL_KEY = ConfigParamDescr.VOLUME_NAME.getKey();
  static final String YEAR_KEY = ConfigParamDescr.YEAR.getKey();
  static final String ROOT_URL = "http://www.jrnl.com/"; //this is not a real url

  private static final Logger log = Logger.getLogger(TestMedknowArchivalUnit.class);

  static final String PLUGIN_ID = "org.lockss.plugin.medknow.MedknowPlugin";
  static final String PluginName = "Medknow Publications";

  public void setUp() throws Exception {
    super.setUp();
    setUpDiskSpace();
    theDaemon = getMockLockssDaemon();
    theDaemon.getHashService();
  }

  public void tearDown() throws Exception {
    super.tearDown();
  }

  private DefinableArchivalUnit makeAu(URL url, int volume, String issn, int year)
      throws Exception {

    Properties props = new Properties();
    props.setProperty(VOL_KEY, Integer.toString(volume));
    props.setProperty(ISSN_KEY, issn);
    props.setProperty(YEAR_KEY, Integer.toString(year));
    if (url != null) {
      props.setProperty(BASE_URL_KEY, url.toString());
    }
    Configuration config = ConfigurationUtil.fromProps(props);

    DefinablePlugin ap = new DefinablePlugin();
    ap.initPlugin(getMockLockssDaemon(),
        PLUGIN_ID);
    DefinableArchivalUnit au = (DefinableArchivalUnit)ap.createAu(config);
    return au;
  }

  public void testConstructNullUrl() throws Exception {
    try {
      makeAu(null, 1, "1111-1111", 2011);
      fail("Should have thrown ArchivalUnit.ConfigurationException");
    } catch (ArchivalUnit.ConfigurationException e) {
    }
  }

  //
  // Test the crawl rules
  //
  public void testShouldCacheProperPages() throws Exception {
    URL base = new URL(ROOT_URL);
    ArchivalUnit ABAu = makeAu(base, 123, "1234-5678", 2011);
    theDaemon.getLockssRepository(ABAu);
    theDaemon.getNodeManager(ABAu);
    BaseCachedUrlSet cus = new BaseCachedUrlSet(ABAu,
        new RangeCachedUrlSetSpec(base.toString()));

    //permission page
    shouldCacheTest(ROOT_URL+"lockss.txt", true, ABAu, cus);
    // images (etc.)
    shouldCacheTest(ROOT_URL+"foo/bar/baz/qux.js", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"foo/bar/baz/qux.jpg", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"foo/bar/baz/qux.jpeg", true, ABAu, cus);
    // but not off the main host
    //http://www.medknow.com/journals/images/aim.gif
    shouldCacheTest("http://www.medknow.com/"+"foo/bar/baz/qux.gif", false, ABAu, cus);

    // manifest page for a volume
    //http://www.jpgmonline.com/backissues.asp
    shouldCacheTest(ROOT_URL+"backissues.asp", true, ABAu, cus);
    // toc page for an issue
    // www.jpgmonline.com/showbackIssue.asp?issn=0022-3859;year=2013;volume=59;issue=3
    shouldCacheTest(ROOT_URL+"showbackIssue.asp?issn=1234-5678;year=2011;volume=123;issue=7", true, ABAu, cus);
    // even if there is extra stuff that gets normalized off
    shouldCacheTest(ROOT_URL+"showbackIssue.asp?issn=1234-5678;year=2011;volume=123;issue=7;month=March-May", true, ABAu, cus);

    // individual article page - abstract, full-text html and pdf
    // http://www.jpgmonline.com/article.asp?issn=0022-3859;year=2013;volume=59;issue=4;spage=306;epage=308;aulast=Pandey;type=2
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=2", true, ABAu, cus);
    // but not the epub or other types offered
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=3", false, ABAu, cus);
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=4", false, ABAu, cus);
    shouldCacheTest(ROOT_URL+"article.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=5", false, ABAu, cus);

    // citation landing page -- with or without type; we should normalize this to only one landing page (abstract)
    //http://www.jpgmonline.com/citation.asp?issn=0022-3859;year=2013;volume=59;issue=2;spage=93;epage=97;aulast=Kole;type=0;aid=jpgm_2013_59_2_93_113811
    //http://www.jpgmonline.com/citation.asp?issn=0022-3859;year=2013;volume=59;issue=2;spage=93;epage=97;aulast=Kole;aid=jpgm_2013_59_2_93_113811
    shouldCacheTest(ROOT_URL+"citation.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;aid=jpgm_2013_59_2_93_113811", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citation.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citation.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0", true, ABAu, cus);

    // citation - get this type
    //http://www.jpgmonline.com/citeman.asp?issn=0022-3859;year=2013;volume=59;issue=2;spage=93;epage=97;aulast=Kole;type=0;aid=jpgm_2013_59_2_93_113811;t=5
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;aid=jpgm_2013_59_2_93_113811;t=2", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;t=2", true, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;t=2", true, ABAu, cus);

    // but not this type
    //http://www.jpgmonline.com/citeman.asp?issn=0022-3859;year=2013;volume=59;issue=2;spage=93;epage=97;aulast=Kole;type=0;aid=jpgm_2013_59_2_93_113811;t=0
    // the "aid part is allowed but normalized off
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;t=1", false, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;t=5", false, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;t=3", false, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;t=3", false, ABAu, cus);
    shouldCacheTest(ROOT_URL+"citeman.asp?issn=1234-5678;year=2011;volume=123;issue=7;spage=306;epage=308;aulast=Pandey;type=0;aid=foo;t=3", false, ABAu, cus);

    // and get tables and images for the article
    //http://www.jpgmonline.com/viewimage.asp?img=jpgm_2013_59_2_93_113811_t3.jpg
    shouldCacheTest(ROOT_URL+"viewimage.asp?img=jpgm_2013_59_2_93_113811_t3.jpg", true, ABAu, cus);
  }

  //http://www.jpgmonline.com/article.asp?issn=0022-3859;year=2014;volume=60;issue=3;spage=239;epage=240;aulast=Phani;type=2
  public void testShouldCacheRealPages() throws Exception {
    URL base = new URL("http://www.jpgmonline.com/");
    ArchivalUnit ABAu = makeAu(base, 60, "0022-3859", 2014);
    theDaemon.getLockssRepository(ABAu);
    theDaemon.getNodeManager(ABAu);
    BaseCachedUrlSet cus = new BaseCachedUrlSet(ABAu,
        new RangeCachedUrlSetSpec(base.toString()));

    //pdf
    shouldCacheTest("http://www.jpgmonline.com/article.asp?issn=0022-3859;year=2014;volume=60;issue=4;spage=355;epage=356;aulast=Jagannathan",
        true, ABAu, cus);
    shouldCacheTest("http://www.jpgmonline.com/article.asp?issn=0022-3859;year=2014;volume=60;issue=4;spage=355;epage=356;aulast=Jagannathan;type=2",
        true, ABAu, cus);
    //redirects to this:
    shouldCacheTest("http://www.jpgmonline.com/downloadpdf.asp?issn=0022-3859;year=2014;volume=60;issue=4;spage=355;epage=356;aulast=Jagannathan;type=2",
        true,ABAu, cus);
    shouldCacheTest("http://www.jpgmonline.com/article.asp?issn=0022-3859;year=2014;volume=60;issue=3;spage=239;epage=240;aulast=Phani;type=2",
        true, ABAu, cus);

  }

  private void shouldCacheTest(String url, boolean shouldCache,
      ArchivalUnit au, CachedUrlSet cus) {
    assertEquals(shouldCache, au.shouldBeCached(url));
  }

  public void testStartUrlConstruction() throws Exception {
    URL url = new URL(ROOT_URL);

    // 4 digit
    String expected = ROOT_URL+"backissues.asp";
    String perm = ROOT_URL+"lockss.txt";
    DefinableArchivalUnit ABAu = makeAu(url, 123, "1234-5555", 2009);
    assertEquals(ListUtil.list(expected), ABAu.getStartUrls());
    assertEquals(ListUtil.list(perm), ABAu.getPermissionUrls());
  }

  public void testGetName() throws Exception {
    DefinableArchivalUnit au =
        makeAu(new URL("http://www.ajrnl.com/"), 33, "1234-5678", 2009);
    assertEquals(PluginName + ", Base URL http://www.ajrnl.com/, Issn 1234-5678, Year 2009, Volume 33", au.getName());
  }

  //<string>"^%s(article|downloadpdf)\.asp\?issn=%s;year=%d;volume=%s.*;aulast=[^;]*(;type=2)?$", base_url, journal_issn, year, volume_name</string>

  public void testSubstancePatterns() throws Exception {
    URL base = new URL("http://www.ajrnl.com/");
    int volume = 33;
    String issn = "1234-5678";
    int year = 2014;
    ArchivalUnit au = makeAu(base, volume, issn, year);

    assertSubstanceUrl("http://www.ajrnl.com/article.asp?issn=1234-5678;year=2014;volume=33;issue=4;spage=355;epage=356;aulast=Jagannathan;type=2",
        au);
    assertSubstanceUrl("http://www.ajrnl.com/article.asp?issn=1234-5678;year=2014;volume=33;issue=4;spage=355;epage=356;aulast=;type=2",
        au);
    assertSubstanceUrl("http://www.ajrnl.com/article.asp?issn=1234-5678;year=2014;volume=33;issue=4;spage=355;epage=356;aulast=",
        au);
    //redirects to this:
    assertSubstanceUrl("http://www.ajrnl.com/downloadpdf.asp?issn=1234-5678;year=2014;volume=33;issue=4;spage=355;epage=356;aulast=Jagannathan;type=2",
        au);
    assertSubstanceUrl("http://www.ajrnl.com/article.asp?issn=1234-5678;year=2014;volume=33;issue=3;spage=239;epage=240;aulast=Phani;type=2",
        au);
    assertNotSubstanceUrl("http://www.ajrnl.com/article.asp?issn=1234-5678;year=2014;volume=66;issue=4;spage=355;epage=356;aulast=Jagannathan;type=2",
        au);
    assertNotSubstanceUrl("http://www.ajrnl.com/downloadpdf.asp?issn=1234-1234;year=2014;volume=33;issue=4;spage=355;epage=356;aulast=Jagannathan;type=2",
        au);
    assertNotSubstanceUrl("http://www.ajrnl.com/article.asp?issn=1234-5678;year=2009;volume=33;issue=3;spage=239;epage=240;aulast=Phani;type=2",
        au);

  }

}


text:
6,721,369 is an odd composite number composed of two prime numbers multiplied together.
What does the number 6721369 look like?
This visualization shows the relationship between its 2 prime factors (large circles) and 4 divisors.
6721369 is an odd composite number. It is composed of two distinct prime numbers multiplied together. It has a total of four divisors.
Prime factorization of 6721369:
89 × 75521
See below for interesting mathematical facts about the number 6721369 from the Numbermatics database.
Names of 6721369
Cardinal: 6721369 can be written as Six million, seven hundred twenty-one thousand, three hundred sixty-nine.
Scientific notation: 6.721369 × 106
Factors of 6721369
Sum of prime factors: 75610
Divisors of 6721369
1 89 75521 6721369
Sum of all divisors σ(n): 6796980
Sum of proper divisors (its aliquot sum) s(n): 75611
6721369 is a deficient number, because the sum of its proper divisors (75611) is less than itself. Its deficiency is 6645758
Bases of 6721369
Binary: 110011010001111010110012
Hexadecimal: 0x668F59
Base-36: 4028P
Squares and roots of 6721369
6721369 squared (67213692) is 45176801234161
6721369 cubed (67213693) is 303649951334451486409
The square root of 6721369 is 2592.5603175241
The cube root of 6721369 is 188.7205728725
How big is 6721369?
6,721,369 seconds is equal to 11 weeks, 19 hours, 2 minutes, 49 seconds.
To count from 1 to 6,721,369 would take you about sixteen weeks!
A cube with a volume of 6721369 cubic inches would be around 15.7 feet tall.
Recreational maths with 6721369
6721369 backwards is 9631276
The sum of 6721369's digits is 34
Number 6721369 - Facts about the integer
[url=https://numbermatics.com/n/6721369/]Number 6721369 - Facts about the integer[/url]
"Number 6721369 - Facts about the integer". Numbermatics.com. 2022. Web. 17 January 2022.
Numbermatics. (2022). Number 6721369 - Facts about the integer. Retrieved 17 January 2022, from https://numbermatics.com/n/6721369/
Numbermatics. 2022. "Number 6721369 - Facts about the integer". https://numbermatics.com/n/6721369/
The information we have on file for 6721369 includes mathematical data and numerical statistics calculated using standard algorithms and methods. We are adding more all the time. If there are any features you would like to see, please contact us. Information provided for educational use, intellectual curiosity and fun!
Keywords: Divisors of 6721369, math, Factors of 6721369, curriculum, school, college, exams, university, Prime factorization of 6721369, STEM, science, technology, engineering, physics, economics, calculator, six million, seven hundred twenty-one thousand, three hundred sixty-nine.