...Malayan Law Journal Reports/1986/Volume 1/PUBLIC PROSECUTOR v PARAM CUMARASWAMY - [1986] 1 MLJ 512 - 3 January 1986 6 pages [1986] 1 MLJ 512 PUBLIC PROSECUTOR v PARAM CUMARASWAMY OCJ KUALA LUMPUR CHAN J FEDERAL TERRITORY CRIMINAL TRIAL NO 39 OF 1985 3 January 1986 Criminal Law and Procedure -- Charge of sedition -- Close of prosecution case -- Whether prima facie case made out -- Sedition Act, 1948, ss. 3(1) & 4(1) -- Criminal Procedure Code (F.M.S. Cap. 6), s. 180 -- Federal Constitution, art. 10 1986 1 MLJ 512 at 513 In this case the respondent was charged with uttering seditious words, an offence under the Sedition Act, 1948. At the close of the prosecution case, counsel submitted that there was no case to answer. Held: (1) all that is required at the close of the prosecution case is for the prosecution to discharge their evidential burden by adducing sufficient evidence to raise a prima facie case against the accused. At that stage, a trial judge should not consider whether or not a case has been proved beyond a reasonable doubt against the accused. If no evidence is called for the defence, then, and then only, the tribunal of fact must decide whether the prosecution has succeeded in discharging the persuasive burden by proving its case beyond a reasonable doubt; (2) in this case the prosecution has discharged their evidential burden by adducing evidence of primary facts. The accused must therefore be called to enter on his defence. ...
Words: 4723 - Pages: 19
...“If you know the enemy yourself, you need not fear the result of hindered battles, If you know yourself but not the enemy, for every victory gained, you will also suffer defeat, If you know neither the enemy nor yourself, you will succumb in every battle”. -Sun Tzu On night 17-18 November around 2200 hrs, a heavy snow storm was leashed in the battle zone for nearly two hours. After the snow storm, visibility improved to 600 meters. At 0200 hrs, LP ahead of 8 Platoon observed a large body of Chinese soldiers swarming through the gullies at a distance of about 700-800 meters moving from the pass. Lance Naik Brij Lal the LP commander ran back to Platoon Headquarters to in inform this unusual development. He, with his Section Commander Hukam Chand and one LMG were rushed as reinforcement to the post. By then the Chinese had advanced with in firing range of small arms from the post. The LP fired a pre-determined red Verey Light signal along with long bursts of LMG fire, warning the C Company to ‘stand to’ in their dug out positions. Similarly, 7 Platoon’s LP on the forward slopes also saw Chinese forming up and the entire C Company was alerted. Maj Shaitan Singh immediately contacted his sub-unit commanders on the radio communication who confirmed that all ranks were ready in their battle positions. Since the paucity of troops had caused wide gaps in 7 and 9 Platoon localities, he also ordered 9 Platoon to send a patrol to ascertain the situation. The patrol confirmed massive Chinese...
Words: 1605 - Pages: 7
...Create a shape with a specific width
and height
. * @param width The width
of this shape. * @param height The height
of this shape. */ protected Shape(int width, int height) { this.width = width; this.height = height; canvas = new boolean[height][width]; } /** * Set a pixel * @param row The row
of the pixel. * @param column The column
of the pixel. */ protected void setPixel(int row, int column) { if(row >=0 && row < height && column >=0 && column < width) canvas[row][column] = true; } /** * Clear a pixel * @param row The row
of the pixel. * @param column The column
of the pixel. */ protected void clearPixel(int row, int column) { if(row >=0 && row < height && column >=0 && column < width) canvas[row][column] = false; } /** * Get the area of this shape. Area is the number of pixel set in this * @return The area. */ public int getArea() { int area = 0;
shape.
for(boolean [] row: canvas) for(boolean pixel: row) if(pixel) ++area; } return area;
/* (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { String drawing = ""; for(boolean [] row: canvas) { if(drawing.length() > 0) // Cross platform newline drawing = drawing + System.lineSeparator(); for(boolean pixel: row) { drawing = drawing + (pixel?"*":" "); } } return drawing;
}
/** * Union this shape with another shape. * @param s The shape to union with * @return A new shape after the operation */ public...
Words: 704 - Pages: 3
...PAYROLL REGISTER ANDREW H WILSON CHARTER SCHOOL - N342 CHECK DATE 10/18/2013 PERIOD BEGIN 09/30/2013 PERIOD END 10/13/2013 02/11/2014 PAGE 1 EMPLOYEE NAME EMP ID S S NO. RATE HOURS GROSS EARNINGS FEDERAL EIC OASDI MEDICARE STATE SDI LOCAL OTHER TAXES DEDUCTS NET PAY CHECK NO AARON, TRAZARRA 123 E E E E XXX-XX-XXXX 5 SALARY 2P MEDICAL INS D2 DENTAL INS ED HB1-APPROPRIATI 26 S10/S99 0.00 1894.32 1980.77 1230.77 -72.54 -13.91 750.00 30.97 0.00 ADMIN ADMIN ADMIN ADMIN 117.45 27.47 D D 0.00 0.00 0.00 0.00 175.89 1718.43 5.35 1713.08 0.00 DIRDEP A1 CRITICAL ILLNE C1 CHECKING 1 -------------------------------------------------------------------------------------------------------------------------- BAILEY, SHANTRICE S 1 E E E E E XXX-XX-XXXX 5 SALARY A2 AD&D/CANCER D2 DENTAL INS ED HB1-APPROPRIATI V2 POP EE VISION 26 M99/M99 0.00 3004.75 3057.69 2307.69 -18.68 -26.53 750.00 -7.73 0.00 0.00 ADMIN ADMIN ADMIN ADMIN ADMIN 186.29 43.57 D D D 0.00 0.00 0.00 0.00 229.86 2774.89 1307.09 1450.00 17.80 0.00 DIRDEP C1 CHECKING 1 C2 CHECKING 2 D1 DISABILITY -------------------------------------------------------------------------------------------------------------------------- BRISCOE, RONICKA H 7 E E E E E E XXX-XX-XXXX 5 SALARY D2 DENTAL INS ED HB1-APPROPRIATI I2 NY WHOLE LIFE I K1 EE 401K V2 POP EE VISION 26 M1/M1 0.00 3514.88 3634.61 2884.61 -26.53 750.00 -63.25 -28.85 -1.10 ...
Words: 10077 - Pages: 41
...Programming project 3 Task Title: Implementation of basic command-line interface to GraphApplication Task Description: Implement classes that will instantiate a graph editor. The system should accept various kinds of objects from user by given commands, and respond to these commands by creating node objects, creating arc objects, displaying them or deleting them. Implement the following classes: 1. GraphApplication class that will implement command line interface and interact with the user: This class needs to implement the following commands in its run() method: a. quit – exits the application b. nodes - lists the nodes in the graph c. arcs – lists the arcs in the graph these commands do not need index or parameters d. node - this command requires object for which the node will be created e. dir-arc – this command requires two objects that have nodes and relation name and makes a directed arc between them f. undir-arc – this command requires two objects that are added to nodes and relation name and makes non-directed (symmetric) arc between them these commands can take any object, but for now we will use strings g. printout, delete – these commands require an index or name for the object to be shown or deleted if delete takes two arguments it deletes the corresponding arc, of it gets only one, it deletes a node, if printout takes one argument it prints a node, if it takes two arguments it prints the fact that...
Words: 2276 - Pages: 10
...PRÁCTICA 8A Problema de cobertura de conjuntos, Winston página 478, ejemplo 5, formato1. ENUNCIADO: Hay seis ciudades (ciudades 1-6) en el condado de Kilroy. El condado debe determinar en qué lugar construir estaciones de bomberos. El condado quiere construir una mínima cantidad de estaciones de bomberos para asegurar que por lo menos una estación esté dentro de 15 minutos (tiempo de viaje) de cada ciudad. En la tabla 1 se muestran los tiempos requeridos (en minutos) para viajar entre las ciudades del condado de Kilroy. Formule un PE que dirá a Kilroy cuántas estaciones de bomberos habría que construirse y en dónde. Tabla 1: tiempo requerido para viajar entre ciudades en el condado de Kilroy DE | HACIA | | Ciudad 1 | Ciudad 2 | Ciudad 3 | Ciudad 4 | Ciudad 5 | Ciudad 6 | Ciudad 1 | 0 | 10 | 20 | 30 | 30 | 20 | Ciudad 2 | 10 | 0 | 25 | 35 | 20 | 10 | Ciudad 3 | 20 | 25 | 0 | 15 | 30 | 20 | Ciudad 4 | 30 | 35 | 15 | 0 | 15 | 25 | Ciudad 5 | 30 | 20 | 30 | 15 | 0 | 14 | Ciudad 6 | 20 | 10 | 20 | 25 | 14 | 0 | Tabla 2: ciudades dentro de 15 minutos de una ciudad dada Ciudad 1 | 1, 2 | Ciudad 2 | 1, 2, 6 | Ciudad 3 | 3, 4 | Ciudad 4 | 3, 4, 5 | Ciudad 5 | 4, 5, 6 | Ciudad 6 | 2, 5, 6 | La tabla 2 muestra la relación de localidades que pueden comunicarse con cada ciudad respectivamente en 15 minutos o menos. Formulación matemática: Para cada ciudad se debe determinar si se construye una estación de bomberos o no. Así, definimos...
Words: 2124 - Pages: 9
...Effective Modern C++ Topics include: ■■ The pros and cons of braced initialization, noexcept specifications, perfect forwarding, and smart pointer make functions ■■ The relationships among std::move, std::forward, rvalue references, and universal references ■■ Techniques for writing clear, correct, effective lambda expressions ■■ How std::atomic differs from volatile, how each should be used, and how they relate to C++'s concurrency API ■■ How best practices in "old" C++ programming (i.e., C++98) require revision for software development in modern C++ After the C++ “ I learnedlearned basics, I then how to use C++ in production code from Meyers' series of Effective C++ books. Effective Modern C++ is the most important how-to book for advice on key guidelines, styles, and idioms to use modern C++ effectively and well. Don't own it yet? Buy this one. Now. ” —Herb Sutter Chair of ISO C++ Standards Committee and C++ Software Architect at Microsoft Effective Modern C++ Coming to grips with C++11 and C++14 is more than a matter of familiarizing yourself with the features they introduce (e.g., auto type declarations, move semantics, lambda expressions, and concurrency support). The challenge is learning to use those features effectively—so that your software is correct, efficient, maintainable, and portable. That’s where this practical book comes in. It describes how to write truly great software using C++11...
Words: 8814 - Pages: 36
...find_max() function given below: /** Finds the largest value in array elements x[start] through x[last]. pre: first <= last. @param x Array whose largest value is found @param start First subscript in range @param last Last subscript in range @return The largest value of x[start] through x[last] */ 1. int find_max(int x[], int start, int last) { 2. if (start > last) 3. throw invalid_argument("Empty range"); 4. int max_so_far = 0; 5. for (int i = start; i < last; i++) { 6. if (x[i] > max_so_far) 7. max_so_far = i; 8. } 9. return max_so_far; 10.} ------------------------------------------------- The function will take 3 arguments, an array, starting value and last value and calculates the maximum value and return from where the function has been called. This code does not work properly. In order to understand the working of the code, output statements should be added into the code. The output statements that will be needed in the above function should be inside for loop and after the lines 5, 7 and 9. After including the diagnostic statements, the code can be given as: /** Finds the largest value in array elements x[start] through x[last]. pre: first <= last. @param x Array whose largest value is found @param start First subscript in range @param last Last subscript in range @return The largest value of x[start] through x[last] */ int find_max(int x[], int start, int last) { ...
Words: 463 - Pages: 2
... 1. Value: declared without any modifiers 2. Ref: ref modifier 3. Out: out modifier 4. Param: declared with the params modifier REF&OUT: Advantage: method can change multiple variables Disadvantage: they allow multiple methods to have access to the same data Parameter array: Local array declared within the method header by using the keyword params. Only one param keyboard is permitted in a method declaration Week 3 Overloading: Involves using one term to indicate diverse meanings When you overload a c# method, you can write multiple methods with a shared name. The compiler understands your meaning based on the arguments you use with the methods Methods are overloaded correctly when they have the same identifier but difference parameter lists Overloaded only means that you have more than one method signature Ex: DisplayWithBorder (int) and DisplayWithBorder (string) Overload resolution: determines which method to execute when a method call could execute multiple overloaded methods Applicable methods: a set of methods that can accept a call with a specific list of arguments Betterness rules: that determine which method version to call Ambiguous methods: a situation which the compiler cannot tell which method to use. Occurs when you overload a method ex simplemethod (inum, inum); // error! Call is ambiguous Optional parameter: only value params can be given default values. All optional parameters in a list must follow all mandatory parameters....
Words: 301 - Pages: 2
...Mathematical Optimization: Models, Methods and Applications Final Assignment 06-11-2015 Rasmus pages / 13.137 characters (including spaces) | Part 1 General about part 1 The purpose with this part is to analyze a Single-Sourcing Problem (SSP). A Single-Sourcing Problem of course both has benefits and risks, but I will discuss that furthermore through the assignment. During the assignment I will try to discuss and comment on everything that I do. My code and the answers I receive from www.neos-server.org can be seen in my appendices. (i) In the first question in part 1, I am asked to solve the SSP using the data in Figure 1. We have 4 facilities and 30 customers. In Figure 1 the demand of each customer is also given, and of course I will have to satisfy this. Therefore this will become one of my constraints. It is also known that each facility has a capacity, and of course this will become a constraint as well. Because it is a SSP problem, we are also given the information that each customer has to be served by exactly one facility. When a facility delivers one unit to a customer it faces a cost. The purpose with the first question is to minimize the cost that the facility faces delivering the units. I will now show what the problem looks like: Minimizexi=1mj=1nai,j dj xi,j subject to j=1ndj xi,j≤ci , i=1,…,m i=1m xi,j=1 , j=1,…,n x∈0,1, i=1,…,m , j=1,…, n Now I have formulated the problem, and I will now use a Mixed Integer Linear Programming solver...
Words: 5806 - Pages: 24
...Dalhousie university | Usemore Soap Company | Supply Chain 5-Year Plan | | Eric Noel | 12/5/2010 | Abstract The Usemore soap company currently has 4 plants and 10 warehouses in its distribution network. In response to forecasted demands in 5 years, Usemore is considering building 2 new plants and 6 new warehouses. The problem is modeled as a linear program with objective to minimize cost. However, the model must be formulated as piecewise linear in order to account for the non-linear warehousing costs. The recommended course of action for Usemore is to build 1 new plant, shut down 5 of the existing public warehouses, and open 5 of the new warehouses. Table of Contents Abstract ii 1. Introduction 1 2. Current Situation 2 2.1 Problem Statement 2 2.2 Problem Data 2 3. Proposed Model 2 3.1 Explanation 2 3.2 Formulation 2 4. Solution 4 4.1 Plants 4 4.2 Warehouses 4 4.3 Average Inbound and Outbound Distances 5 5. Discussion 5 6. Conclusion 5 7. Bibliography 5 1. Introduction The Usemore soap company currently has 4 plants and 10 warehouses within its distribution network. In response to forecasted demands in 5 years, Usemore is considering building 2 new plants and 6 new warehouses. The problem was solved using a linear programming approach utilizing a GLPK (GNU MathProg) formulation. In addition to this report, the following files were required to solve the problem: * Usemore.mod : GLPK model * Plants.csv : Model plants...
Words: 1969 - Pages: 8
...private String askName() { return JOptionPane.showInputDialog("Enter your name.");//Ask for salesperson's name } private double askAmountEarnedLastMonth() { boolean isValidAmount; String userInput; do { userInput = JOptionPane.showInputDialog("How much did you earn last month?"); //Ask for last month's sales foor the salesperson userInput = userInput; isValidAmount = isValidAmount(userInput); } while (!isValidAmount); return Double.parseDouble(userInput); } /** * Checks if user input is valid * Amount must be a number between 0 and 500,000 inclusive * @param s * @return boolean */ private boolean isValidAmount(String s) { boolean valid = false; double amount; try { amount =...
Words: 537 - Pages: 3
...Asset and Liability Management model 1. Deterministic Model ...................................................................... 1 1.1. 1.2. 1.3. 1.4. 1.5. Conceptualisation ........................................................................... 2 Data modelling................................................................................. 3 Algebraic model .............................................................................. 4 Implementation................................................................................ 5 Solution ............................................................................................ 6 Problem .......................................................................................... 10 Algebraic formulation ................................................................... 11 AMPL formulation ......................................................................... 11 Solutions ........................................................................................ 13 Algebraic formulation ................................................................... 18 SAMPL formulation ....................................................................... 18 Solutions ........................................................................................ 20 Stochastic information ................................................................. 22 Solution .................................................................
Words: 3991 - Pages: 16
...program accepts user input as a string, and then makes the appropriate data conversion. using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; namespace CIS247_WEEK1_iLAB_JOE { class Program { /// <summary> /// Name: User input's name - converted to string. /// Age: User input's age - converted to interger. /// Gas Mileage: User input's car gas mileage - converted to double. /// </summary> private string name; private int age; private double gasMileage; /// <summary> /// Main Function to Control Function Calling and Flow. /// </summary> /// <param name="args"></param> static void Main(string[] args) { //Create a program object and new instance. Program objProgram = new Program(); //Display basic information using DisplayApplicationInformation function. objProgram.DisplayApplicationInformation(); objProgram.DisplayDivider("Start Program"); Console.WriteLine(); objProgram.DisplayDivider("Get Name"); objProgram.name = objProgram.GetInput("Your Name"); Console.WriteLine("Your Name is: {0}", objProgram.name); Console.WriteLine(); objProgram.DisplayDivider("Get Age"); objProgram.age =Convert.ToInt32 ( objProgram.GetInput("Your...
Words: 381 - Pages: 2
... /* if buffer have items, remove items from buffer */ *outData = buffer[(counter-1)]; counter--; /* decrease the buffer counter */ return 0; /* return 0 if remove item successful */ } else { return -1; /* return error if insert failure or buffer full */ } } void *producer_thread(void *param); /* define producer method */ void *consumer_thread(void *param); /* define condumer method */ void *producer_thread(void *param) { /* declaration of item */ buffer_item inData; while(1) { //sleep(1); int stime = rand() / SleepDivisor; sleep(stime); sem_wait(&empty); /* acquire semaphore empty lock */ pthread_mutex_lock(&mutex); /* acquire semaphore mutex lock */ inData = (rand()%BUFFER_SIZE); if(insert_item(inData)) { fprintf(stderr, " producer_thread condition error \n"); } else { printf("producer inserted item %d to buffer at position %d\n",buffer[counter-1],(counter-1)); } pthread_mutex_unlock(&mutex); /* release the semaphore mutex lock */ sem_post(&full); } } void *consumer_thread(void *param) { buffer_item outData; while(1) { //sleep(1); int stime = rand() / SleepDivisor; sleep(stime); sem_wait(&full); /* acquire semaphore full lock */ pthread_mutex_lock(&mutex); /* acquire semaphore mutex lock */ if(remove_item(&outData)) { fprintf(stderr, "consumer_thread condition...
Words: 532 - Pages: 3