content
stringlengths
7
2.61M
/** * * @author Rodrigo Vieira */ public class Menu { public static void menuPrincipal() { System.out.println("SISTEMA CRUD PESSOA/ALUNO"); System.out.println("1 - Criar pessoa ou aluno"); System.out.println("2 - Mostrar todas as pessoas e alunos"); System.out.println("3 - Atualizar dados de uma pessoa ou aluno"); System.out.println("4 - Deletar uma pessoa ou aluno"); System.out.println("0 - Para sair"); } public static void limparTela() { System.out.print("\n"); } public static void executaOpcao(int opcao, Scanner sc) { switch(opcao){ case 0: System.out.println("\nEncerrando..."); break; case 1: cadastrar(); break; case 2: mostrar(); break; case 3: atualizar(); break; case 4: remover(); break; default: System.out.println("\nOpcão inválida, tente novamente."); limparTela(); } } }
Ketogenic diet reduces cytochrome c release and cellular apoptosis following traumatic brain injury in juvenile rats. Ketone bodies have been shown to be favorable alternative metabolic substrates and are protective under neuropathologies. At the same time, cytochrome c release has been reported following traumatic brain injury (TBI) and precipitates apoptosis via the mitochondrial pathway. The present study investigated the effects of a ketogenic diet (KD) on TBI. TBI was produced using the Feeney weight-drop model and the animals were fed either normal diet (ND) or KD. Brain edema was estimated by wet/dry weight ratio; cytochrome c was detected by Western blotting; cellular apoptosis in the penumbra area was examined by terminal deoxynucleotidyl transferase-mediated dUTP nick end labeling (TUNEL) and active caspase-3 immunohistochemical staining. The results show that brain edema, cytochrome c release, and cellular apoptosis were induced after TBI and that KD reduced these changes dramatically. These findings suggest that KD has potential therapeutic benefit in TBI.
Robust Principal Component Analysis for Power Transformed Compositional Data Geochemical surveys collect sediment or rock samples, measure the concentration of chemical elements, and report these typically either in weight percent or in parts per million (ppm). There are usually a large number of elements measured and the distributions are often skewed, containing many potential outliers. We present a new robust principal component analysis (PCA) method for geochemical survey data, that involves first transforming the compositional data onto a manifold using a relative power transformation. A flexible set of moment assumptions are made which take the special geometry of the manifold into account. The Kent distribution moment structure arises as a special case when the chosen manifold is the hypersphere. We derive simple moment and robust estimators (RO) of the parameters which are also applicable in high-dimensional settings. The resulting PCA based on these estimators is done in the tangent space and is related to the power transformation method used in correspondence analysis. To illustrate, we analyze major oxide data from the National Geochemical Survey of Australia. When compared with the traditional approach in the literature based on the centered log-ratio transformation, the new PCA method is shown to be more successful at dimension reduction and gives interpretable results.
Members of Royal Northern Sinfonia at St Michael's Church, Alnwick, for the 2017 Christmas by Candlelight concert. The Royal Northern Sinfonia brings its Christmas by Candlelight concerts back to the region’s churches this month. The tour, which is back by popular demand, begins at St Michael’s Church in Alnwick on Thursday, December 6. The orchestra of Sage Gateshead will perform a festive programme in beautiful candlelit surroundings. The tour also includes All Saints Church in Rothbury on December 7, St George’s Church in Cullercoats on December 8, and Hexham Abbey on December 11, among others in Sunderland, Durham and Carlisle. The concerts start at 7.30pm, and will include Vivaldi’s Winter from The Four Seasons. Tickets for Baroque Christmas by Candlelight are £15 for adults and £5 for under 18s, and can be booked via Sage Gateshead’s website. Tickets can be collected from the venues on the evening. Programme 1 (Alnwick, Darlington, Stockton, Carlisle, Sunderland) - Kyra Humphreys, director; Steve Hudson, oboe; Richard Martin, trumpet; Royal Northern Sinfonia. Tartini Trumpet Concerto in D major; Dvorak Nocturne in B major Op.40; Vivaldi Il Riposo per il S.S. Natale; Suk Meditation on the Old Czech Chorale Saint Wenceslas Op.53a; Cimarosa Oboe Concerto in C minor; Vivaldi Winter from ‘Four Seasons’ Op.8 No.4; Suk Serenade for strings in E flat major. Programme 2 (Durham, Rothbury, Cullercoats, Hexham) - Tristan Gurney, director; Amy Yule, flute; Stephen Reay, bassoon; Royal Northern Sinfonia. Mozart Serenade No.13 in G major ‘Eine Kleine Nachtmusik’; Vivaldi Bassoon Concerto in A minor; Chopin Nocturne Op.37 No.2 in G; Vivaldi Flute Concerto Op.10 No.2 ‘La notte’; Vivaldi Winter from ‘Four Seasons’ Op.8 No.4; Borodin String Quartet No.2 in D major.
/*Returns the elemental composition */ /*of the speciesi (mdim is num of elements) */ void CKNCF(int * mdim, int * iwrk, double * rwrk, int * ncf) { int id; int kd = (*mdim); for (id = 0; id < 5 * 39; ++ id) { ncf[id] = 0; } ncf[ 0 * kd + 0 ] = 2; ncf[ 1 * kd + 1 ] = 1; ncf[ 2 * kd + 2 ] = 1; ncf[ 3 * kd + 3 ] = 2; ncf[ 4 * kd + 3 ] = 1; ncf[ 4 * kd + 2 ] = 1; ncf[ 5 * kd + 3 ] = 1; ncf[ 6 * kd + 2 ] = 2; ncf[ 7 * kd + 2 ] = 2; ncf[ 7 * kd + 3 ] = 1; ncf[ 8 * kd + 2 ] = 1; ncf[ 8 * kd + 3 ] = 2; ncf[ 9 * kd + 2 ] = 2; ncf[ 9 * kd + 3 ] = 2; ncf[ 10 * kd + 4 ] = 1; ncf[ 10 * kd + 3 ] = 1; ncf[ 11 * kd + 4 ] = 1; ncf[ 11 * kd + 3 ] = 2; ncf[ 12 * kd + 2 ] = 1; ncf[ 12 * kd + 4 ] = 1; ncf[ 12 * kd + 3 ] = 1; ncf[ 13 * kd + 2 ] = 2; ncf[ 13 * kd + 4 ] = 1; ncf[ 13 * kd + 3 ] = 1; ncf[ 14 * kd + 4 ] = 1; ncf[ 14 * kd + 2 ] = 4; ncf[ 15 * kd + 4 ] = 1; ncf[ 15 * kd + 2 ] = 3; ncf[ 16 * kd + 4 ] = 1; ncf[ 16 * kd + 2 ] = 2; ncf[ 17 * kd + 4 ] = 1; ncf[ 17 * kd + 2 ] = 2; ncf[ 18 * kd + 4 ] = 2; ncf[ 18 * kd + 2 ] = 4; ncf[ 19 * kd + 4 ] = 1; ncf[ 19 * kd + 2 ] = 3; ncf[ 19 * kd + 3 ] = 1; ncf[ 20 * kd + 4 ] = 2; ncf[ 20 * kd + 2 ] = 5; ncf[ 21 * kd + 4 ] = 2; ncf[ 21 * kd + 2 ] = 6; ncf[ 22 * kd + 4 ] = 1; ncf[ 22 * kd + 2 ] = 1; ncf[ 23 * kd + 4 ] = 2; ncf[ 23 * kd + 2 ] = 2; ncf[ 24 * kd + 4 ] = 2; ncf[ 24 * kd + 2 ] = 3; ncf[ 25 * kd + 3 ] = 1; ncf[ 25 * kd + 2 ] = 3; ncf[ 25 * kd + 4 ] = 2; ncf[ 26 * kd + 4 ] = 2; ncf[ 26 * kd + 2 ] = 4; ncf[ 26 * kd + 3 ] = 1; ncf[ 27 * kd + 4 ] = 2; ncf[ 27 * kd + 2 ] = 2; ncf[ 27 * kd + 3 ] = 1; ncf[ 28 * kd + 2 ] = 1; ncf[ 28 * kd + 4 ] = 2; ncf[ 28 * kd + 3 ] = 1; ncf[ 29 * kd + 4 ] = 2; ncf[ 29 * kd + 2 ] = 1; ncf[ 30 * kd + 4 ] = 1; ncf[ 30 * kd + 2 ] = 3; ncf[ 30 * kd + 3 ] = 1; ncf[ 31 * kd + 4 ] = 1; ncf[ 31 * kd + 2 ] = 4; ncf[ 31 * kd + 3 ] = 1; ncf[ 32 * kd + 4 ] = 3; ncf[ 32 * kd + 2 ] = 4; ncf[ 33 * kd + 4 ] = 3; ncf[ 33 * kd + 2 ] = 3; ncf[ 34 * kd + 4 ] = 3; ncf[ 34 * kd + 2 ] = 5; ncf[ 35 * kd + 4 ] = 3; ncf[ 35 * kd + 2 ] = 6; ncf[ 36 * kd + 4 ] = 3; ncf[ 36 * kd + 2 ] = 8; ncf[ 37 * kd + 4 ] = 3; ncf[ 37 * kd + 2 ] = 7; ncf[ 38 * kd + 4 ] = 3; ncf[ 38 * kd + 2 ] = 7; }
package game; import launcher.Handler; import launcher.Tiles; public class Camera { private float xOffset, yOffset; private Handler handler; public Camera(Handler handler,float xOffset, float yOffset) { this.xOffset = xOffset; this.yOffset = yOffset; this.handler = handler; } public void noWhitespace() { if (xOffset < 0) { xOffset = 0; }else if(xOffset > handler.getWorlds().getWidth() * Tiles.TILEWIDTH - handler.getWidth()) { xOffset = handler.getWorlds().getWidth() * Tiles.TILEWIDTH - handler.getWidth(); } if(yOffset < 0) { yOffset = 0; } else if (yOffset > handler.getWorlds().getHeight() * Tiles.TILEHEIGHT - handler.getHeight()) { yOffset = handler.getWorlds().getHeight() * Tiles.TILEHEIGHT - handler.getHeight(); } } public void centerOnEntity(Entity e) { xOffset = e.getX() - handler.getWidth() /2 + e.getWidth() /2; yOffset = e.getY() - handler.getHeight() /2 + e.getHeight() /2; noWhitespace(); } public void move(float xAmt, float yAmt) { xOffset += xAmt; yOffset += yAmt; noWhitespace(); } public float getyOffset() { return yOffset; } public void setyOffset(float yOffset) { this.yOffset = yOffset; } public float getxOffset() { return xOffset; } public void setxOffset(float xOffset) { this.xOffset = xOffset; } }
This new varied cast of Dancing with the Stars dancers includes celebrity contestants from all over the spectrum – from NASCAR legend Michael Waltrip to YouTube sensation Bethany Mota. Click through to get to know them a little better. Season 19 debuted September 15 on ABC.
Relationship between patient response in ovarian and breast cancer and platinum drug-DNA adduct formation. Nucleated blood cell DNA samples from ovarian (n = 27) and breast (n = 25) cancer patients receiving either cis-diamminedichloroplatinum II (cisplatin) and/or diamminecyclobutanecarboxylatoplatinum II were examined for the presence of platinum drug bound to DNA during several cycles of therapy. Platinum-DNA adducts were quantitated by cisplatin-DNA enzyme-linked immunosorbent assay (ELISA) and atomic absorbance spectroscopy, techniques that measure either a fraction of the intrastrand cis-diammineplatinum-d(ApG) and -d(GpG) adducts (ELISA) or the total platinum bound to DNA (atomic absorbance spectroscopy), respectively. For either the complete study, or for samples obtained during the early cycles, individuals with progressive disease had severalfold lower overall cisplatin-DNA ELISA-measurable adduct levels than the individuals with more favorable clinical responses (complete response, partial response, or stable disease), who were grouped together and termed nonprogressive disease. In the case of the ovarian cancer patients, who experienced a 59% rate of complete and partial response, the correlation of high adduct values with disease response was statistically significant by the Wilcoxon rank-sum test (P = 0.028). In contrast, the breast cancer patients achieved only an 11.5% rate of complete and partial response, and the correlation of high adduct formation with disease response was not statistically significant. Levels of total DNA-bound platinum, measured by atomic absorbance spectroscopy, showed no correlation with disease response for either cancer by any analysis. The study supports previous observations demonstrating a consistent correlation between high cisplatin-DNA ELISA measurements and positive clinical outcome in ovarian cancer patients.(ABSTRACT TRUNCATED AT 250 WORDS)
<reponame>HussainGhazaly/Selenium-Framework<gh_stars>0 package workingwithelement; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.Select; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class TestHTML5Canvas { public WebDriver driver ; @BeforeClass public void setup() { System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir")+"\\Sources\\geckodriver.exe"); driver = new FirefoxDriver() ; driver.manage().window().maximize(); driver.navigate().to("http://cookbook.seleniumacademy.com/html5canvasdraw.html"); } @Test public void testHTMLCanvas() throws InterruptedException, IOException { WebElement drawlist = driver.findElement(By.id("dtool")); WebElement canvas = driver.findElement(By.id("imageTemp")); Select drawTool = new Select(drawlist); drawTool.selectByValue("pencil"); Actions builder = new Actions(driver); builder.clickAndHold(canvas).moveByOffset(10,50).moveByOffset(50,10).moveByOffset(-10,-50).moveByOffset(-50, -10).release().perform(); Thread.sleep(3000); File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(scrFile, new File ("./ScreenShots/canvas.png")); } @AfterClass public void turndown () { driver.quit(); } }
<reponame>ArjanSchouten/tako-server from flask_testing import TestCase from mongoengine import connect from takoapp import TakoApp class BaseTest(TestCase): @classmethod def setUpClass(cls): connect('mongoenginetest', host='mongomock://localhost') def create_app(self): # Create an app without spawning a real server so we can execute fake requests app = TakoApp() app.register_routes() app.app.config['TESTING'] = True return app.app
import * as vscode from 'vscode'; import { DevToolsExtensionContext } from '../devToolsExtensionContext'; import { RuleSetEditor } from './ruleSetEditor'; export class RuleSetEditorProvider implements vscode.CustomTextEditorProvider { protected _devToolsContext: DevToolsExtensionContext; constructor(devToolsContext: DevToolsExtensionContext) { this._devToolsContext = devToolsContext; } public async resolveCustomTextEditor(document: vscode.TextDocument, webviewPanel: vscode.WebviewPanel, token: vscode.CancellationToken): Promise<void> { let editor: RuleSetEditor = new RuleSetEditor(this._devToolsContext); editor.resolveCustomTextEditor(document, webviewPanel); } }
This invention relates to a device for feeding thread or yarn into a winding or traversing device in a winding machine. More particularly, the invention relates to an assembly having a traversing device and an associated spool forming a thread package or a plurality of traversing devices and spools arranged in an axial sequence. A particular type of housing configuration is used in combination with the winding machine. Thread is fed to the spool of a winding machine from a supply device by means of a traversing device having a reciprocating thread guide. An insert slot is open at one end and extends along the length of the winding machine. At the start of winding, an end of the thread is fed along the insert slot. The spool may be driven by a spindle or by a friction roller which abuts the periphery of the spool or the periphery of the package of thread wound thereon. Known winding machines are often made with two or more spools disposed in axial sequence on a mandrel. The mandrel is of an expanding type and it is possible to form two or more independent thread packages on the spools disposed therealong. Difficulties frequently arise in the fast and reliable handling of two threads coming from a supply device for starting the winding on the axially disposed spool. That is, it is difficult to have one thread go to one thread tube and the other to the adjacent thread tube without the threads interfering with each other. Since the threads are supplied continuously and at considerable speed, they cannot be dealt with manually. A suction gun providing a suction air stream is often used to grip and manipulate threse threads. The two threads hang relatively close to each other in these guns. Consequently, the separate feeding of the threads to the winding and traversing device is extremely difficult and tedious. Attempts have already been made to prevent the threads from going to the same tube. A guide member has been disposed in the insert slot longitudinally of the mandrel and extending over the length of the first and leading spool. The guide member is used to keep the two threads separate during the insertion process. The guide member comprises a bar disposed in the insert slot above the transversing device. At its other end, the guide bar is bent back toward the rear traversing device to guide the second thread to the rear traversing device. Such a guide member has been found inadequate. Through the guide bar, a step is formed at the end for guiding the second thread. The thread must be inserted quite rapidly when fed to the winding machine. The step in the guide bar causes the thread to be engaged directly by the thread feeder of the rear traversing device. That is, the step results in the thread not being taken up by the reserve winding device located behind the step in order to produce a reserve winding. The absence of a reserve winding during thread winding is unpleasant and disturbing due to the fact that automatic passage of the thread from one thread spool to another cannot be effected during removal of the thread into the processing machine. The working processes thus suffer an interruption resulting in a waste of time and money. The operation of winding machines is generally well known as exemplified by U.S. Pat. Nos. 3,836,087, 3,884,426, 3,908,917, 3,908,919 and 3,960,336. These patents can be referred to for seeing how the various known elements such as traversing mechanisms, sensing elements, switches and reserve winding devices operate with respect to each other.
It is a distinct honor and a special privilege to be here this evening and to serve as the keynote speaker at the grand opening of this new Center for the Rule of Law. The foundation of this center is firmly based not just on bedrock and concrete, but on the very ideals and vision of the United States Military Academy. As such, this Center will stand through the ages as a living testament to West Point’s grand tradition of molding the next generation of America’s leaders, and to those leaders’ unwavering commitment to the fundamental principle of the rule of law. As Americans, we all bear a special responsibility to both uphold and promote the rule of law. This sacred responsibility springs from our unique place in history, and it is the animating force of our heritage – and of our destiny – as a nation. The founding documents of our democracy – the Declaration of Independence and the United States Constitution – established for the first time in the world’s long history a government not of men, but of laws. To a world governed by kings and emperors, dukes and czars, our founding fathers breathed life into an idea which caused common men to rejoice and despots to tremble. And it is the force and majesty of this idea that created the most powerful nation on earth. As it was at our founding, so it is today – our strength derives from the sinews of those historic documents and from the enlightened principle of the rule of law that they have so nobly enshrined in our national ethos. For more than two centuries, the rule of law has served as the shining torch that has illuminated our path through our nation’s darkest days. To be sure, at times its light has flickered and waned. But always the flame has brightly flared anew and boldly marked our way once more. Indeed, the brilliant light of that torch has guided us to the forefront of international movements for human rights, for the lawful treatment of dissidents, and for free and open societies. Indeed, our country is at its best when it has provided the beacon light of the rule of law for all the world to see. It is a remarkable fact that nowhere is the rule of law more honored than here in the hallowed halls of West Point, the premier training ground for our nation’s warriors. West Point is perhaps the only institution of higher learning where undergraduate students are required to take a class in constitutional law. That fact may seem unusual to some, but it is in keeping with the revered traditions of our military. From its earliest days, the rule of law has been its code of honor. After winning the Battle of Trenton on Christmas of 1776, General George Washington ordered that captive British soldiers were to be treated with humanity, regardless of how colonial soldiers captured in battle might be treated. And in the present day, American military leaders have remained at the vanguard of those calling for the application of the rule of law on battlefields, in detention centers, and at negotiating tables. There are some today who argue that as the most powerful military force on earth, international laws will only hinder our efforts and endanger our strength. But I reject the very premise of that argument. Even before the first Geneva conventions were signed, the United States long advocated for international laws and organizations to govern the conduct of all nations, recognizing that our strength as a country is amplified – not diminished – when we expand the sphere of the rule of law across the globe. And the military has long led our nation in its respect for the rule of law. When our soldiers go into battle, they do so under strict codes regulating their conduct under the laws of war. We train them rigorously and enforce compliance through the Uniform Code of Military Justice, a standard for military law that serves as an exemplar to the world of what is best about America. Our nation’s military is also home to the Judge Advocate General Corps, a team of lawyers long admired for their zealous representation of their clients, but whose integrity and courage has been demonstrated anew in recent years. History has often shown that it is during the throes of battle that the rule of law is most easily abandoned. But the JAG Corps has proven time and again that their commitment to duty never wavers. In our current struggle against international terrorism, when others surrendered faithful obedience to the law to the circumstances of the time, it was the brave men and women in the JAG Corps who stood up against the tides, many times risking their careers to do so. We all can learn from their example. Of course, our nation has not always been immune to the impulse to sacrifice the timeless principles of the rule of law to the transient fears of the moment. Even presidents like Abraham Lincoln and Franklin Delano Roosevelt have sometimes erred under the pressures of war. So great are the demands to keep the country safe, so unrelenting the stress of the moment, that our nation’s leaders have sometimes forgotten that the rule of law protects us not just from our enemies, but also from our own worst instincts. During World War II, fearful of Japanese infiltration of the West Coast, President Roosevelt confined nearly 120,000 people of Japanese descent to internment camps for three years without a single hearing or finding of fact. Two-thirds of those held without cause were American citizens, yet the Supreme Court upheld the constitutionality of Roosevelt’s internment order – proving that presidents are not the only leaders susceptible to grave errors during the heat of war. The court’s decision in Korematsu is inarguably one of the darkest moments in American constitutional history. But the strength of our nation has always been our ability to correct course, because while presidents change and governments change, the Constitution endures. And so it is today, at the beginning of a new presidency, as we face a world filled with danger, that we must once again chart a course rooted in the rule of law and grounded in both the powers and the limitations it prescribes. Now, that should not be a controversial statement. And yet, there are those who equate a stated intention to apply the rule of law in a national security context with softness or naïveté. I could not disagree more. Underneath the lofty pronouncements made by leaders must lay real principles that will unerringly chart our course as policymakers – principles that we will hold dear not just when we face the easy decisions, but also when we face the hard ones. Every day as Attorney General, I make decisions that guide the actions of more than 100,000 employees of the Department of Justice and that affect the lives of millions of Americans. Many of those decisions will never be known to the public or to the press, because even as we usher in a new period of openness and transparency, many national security decisions must by necessity be made in a manner that protects our ability to gather intelligence, investigate threats and execute wars. But a need to act behind closed doors does not grant a license to pursue policies, and to take actions, that cannot withstand the disinfecting power of sunlight. In fact, it is in those moments – the moments when no one is watching – when we must be most vigilant in relying on the rule of law to govern our conduct. With every decision I make, I ask myself two questions. Will it stand up to scrutiny by the courts, and will it stand up to scrutiny by the American people. Only if I can answer both questions affirmatively do I know that my choice is the right one. None of this is to say that I will shy away from the hard – and hard-hitting – decisions I must make, and the tough – and tough-minded – actions I must take to protect the American people. I know the seriousness of the threat we still face. I see it firsthand every morning when I review intelligence gathered from around the globe during the previous twenty-four hours. As a member of the president’s national security team, I know we must do everything legally within our power to protect the American people – and we will. But we will not sacrifice our values or trample on our Constitution under the false premise that it is the only way to protect our national security. Discarding the very values that have made us the greatest nation on earth will not make us stronger – it will make us weaker and tear at the very fibers of who we are. There simply is no tension between an effective fight against those who have sworn to do us harm, and a respect for the most honored civil liberties that have made us who we are. Our work on this front has already begun. On his third day in office, President Obama issued an Executive Order directing the closure of the Guantanamo Bay Detention Facility and directing that I lead a task force of Cabinet officials to make determinations for the disposition of each detainee currently housed there. This task will not be easy. On the contrary, it is indisputably the most daunting challenge I face as Attorney General. There are some detainees who we will likely conclude no longer pose a threat to the United States and can be released or transferred to the custody of other countries. There are others who we will decide to prosecute in federal court. But a third category of detainees poses a harder question – much harder. If a detainee is too dangerous to release, yet there are insurmountable obstacles to prosecuting him in federal court, what shall we do? Some of the brightest minds in our nation are working to answer that question and to address the ramifications that each potential answer presents. But though we do not yet know the answer, I pledge that the ultimate solution will be one that is grounded in our Constitution, based on congressional enactments, in compliance with international laws of war, and consistent with the rule of law. In my office at the Department of Justice, I am reminded of these principles every day. There is a tradition at the Department that each Attorney General chooses which portraits of prior Attorneys General to place on the walls of his office. Many fine men and one remarkable woman have held this position before me, and as I decided which portraits to choose, I did so fully mindful of the special duties of the office and the charge given me by the president who appointed me and the people’s representatives who confirmed me. One of the portraits I chose was that of former Attorney General and Supreme Court Justice Robert Jackson, a man who authored perhaps the most important court opinion on presidential power in the last century. Though only a concurring opinion, Jackson’s outline in the Youngstown case of three situations in which presidential powers fluctuate remains the gold standard to this day for defining the extent to which the president can operate consistent with the rule of law. Jackson’s standards are as informative today as they were prescient fifty-seven years ago. One of my other predecessors whose portrait graces my conference room is Elliot Richardson, the Attorney General under President Nixon who resigned rather than fire the special prosecutor who was investigating the president. His painting serves as a reminder to me that I serve the American people first and foremost, and that all of us who do so owe our allegiance only to them and to the law. Richardson was given a choice no Attorney General should be forced to make. Asked to execute a presidential order that, while technically legal, violated both every standard of independence and the spirit of the law, he chose to resign instead. Richardson’s story is a constant reminder that for the rule of law to mean anything, for it to be more than a hollow refrain bellowed before the microphones but quietly subverted in the muffled corridors of power, it must be upheld by men and women of firm character who are committed to its faithful application. May it ever be so in the United States of America. In closing, let me note that nearly 50 years ago, General Douglas MacArthur stood here at West Point, bowed with age but still proud of mien, and delivered one of the greatest speeches of American history. The General intoned to the assembled cadets the immortal words, "Duty, honor, country." MacArthur noted that this code of the United States Military Academy "embraces the highest moral laws and will stand the test of any ethics or philosophies ever promulgated for the uplift of mankind. Its requirements are for the things that are right, and its restraints are from the things that are wrong." General MacArthur’s words could also serve as one of the most succinct and apt definitions of the rule of law itself. To follow the dictates of the rule of law, we must be committed to the endless struggle of ensuring that, as we promulgate and implement national policy, we require of ourselves that which is right, and restrain ourselves from that which is wrong. To be sure, none of us makes the correct decision every time. We are all fallible human beings with our own inherent frailties, buffeted by the tides of public opinion and general alarm. But if we endeavor to ceaselessly follow the rule of law – if we let strict obedience to its principles serve as our only guide – then we can ultimately lay down the reins of power knowing that we have faithfully fulfilled the immense responsibility with which we have been charged. And that, in the final analysis, is the greatest duty we can perform on behalf of the American people. Read the Opposing Views debate, "Is Torture Ever Justified?"
def Cost(job): return GetSchedulerOptions(job.configuration).costs[job.comparison_mode]
The effects of slope and branch structure on the locomotion of a specialized arboreal colubrid snake (Boiga irregularis). The surfaces in arboreal habitats have variable diameters, slopes, and branching structure that pose functional challenges for animal locomotion. Nevertheless, many lineages of snakes have independently evolved arboreality. We tested the effects of arboreal habitat structure on the locomotion of a highly arboreal species, the brown tree snake (Boiga irregularis), moving on seven diameters (0.6-21cm) of cylinders oriented at three slopes (0°, 45°, 90°) and with or without pegs. Intermediate diameters of horizontal cylinders maximized speed, and some of the large-diameter cylinders without pegs were impassable when they were inclined. With increased slope the snakes were slower, and they changed from using lateral undulation with sliding contact and balancing to concertina locomotion with periodic static gripping. The presence of pegs increased the speeds of the brown tree snakes and resulted in them only using lateral undulation. Surface diameter, slope, and the occurrence of pegs also had widespread significant effects on the kinematics of the brown tree snakes. Overall, compared to anatomically less specialized corn snakes, brown tree snakes use more lateral undulation, are usually much faster, and are able to move on a wider variety of surfaces. Unlike some of the trade-offs found previously between two less specialized species of snakes with different stoutness when they used modes of arboreal locomotion that involved either balancing or gripping, the slender-bodied brown tree snakes excel at both. Hence, this species may not only be a "jack of all trades" but also a master of many.
A Silicon Valley startup working on self-driving delivery vehicles on Monday announced nearly a billion dollars in fresh funding from the SoftBank Vision Fund. The $940 million in financing from SoftBank brought the total amount of funding raised by Nuro to more than $1 billion, with investors including Greylock Partners and Gaorong Capital, according to the company. The move comes amid surging interest in robotic delivery from a range of companies from small startups to retail giant Amazon. "We've spent the last two and a half years building an amazing team, launching our first unmanned service, working with incredible partners and creating technology to fundamentally improve our daily lives," Nuro co-founder Dave Ferguson said in a release. "This partnership gives us the opportunity to take the next step in realizing our vision for local commerce and the broad application of our technology." Last year, Nuro -- which includes team members who came from Google, Waymo, Apple, Uber, Tesla, and General Motors -- began testing its boxy, driverless delivery vehicles in Arizona in a partnership with the large grocery store chain Kroger. The service lets people place online orders and have them delivered by the robotic vehicles, which operate independently by are followed to make sure all goes to plan. "Nuro's world-class team has successfully scaled their self-driving technology out of the lab and into the streets," SoftBank Investment Advisers managing partner Michael Ronen said in the release. Nuro planned to use the funding to expand its delivery service to new locations, increase its fleet of vehicles, and make new alliances. The SoftBank fund, led by Japanese entrepreneur Masayoshi Son, has set a goal of investing at least $100 billion promising new technologies.
import { SecretsManager } from 'aws-sdk'; import { snakeCase } from 'lodash'; import { stripIndent } from 'common-tags'; export type ReadAwsSecretStringForStageOptions = { stage?: string; secretsManager?: SecretsManager; }; const defaultSecretsManager = new SecretsManager(); /** * Reads a secret from AWS Secrets Manager by its friendly name. * * The full secret name should follow the convention `stage/secretName`. * * The secret names passed to this function should not be prefixed * with the stage name. For example, if the stored secret name is * `production/github/accessToken`, the secret name passed to this * function should be just `github/accessToken`. * * The stage is automatically read from the `stage` option * or from `process.env.STAGE` and prepended to the secret name * before it's fetched. * * Note: this function only supports secrets stored as strings. It does not support * binary secrets. * * @param secretName The friendly name of the secret, i.e. `github/accessToken`, * without the stage prefix. */ export const readAwsSecretStringForStage = async ( secretName: string, { stage = process.env.STAGE || 'local', secretsManager = defaultSecretsManager, }: ReadAwsSecretStringForStageOptions = {}, ) => { const fallbackEnvVariableName = snakeCase(secretName).toUpperCase(); const fallback = process.env[fallbackEnvVariableName]; if (process.env.NODE_ENV !== 'production' && stage === 'local') { if (fallback === undefined) { console.warn(stripIndent` [WARN] Could not find a fallback value for AWS Secret "${secretName}". If you want to test functionality that depends on this secret locally, provide a value for this secret as an environment variable named "${fallbackEnvVariableName}". `); console.warn('\n'); } return fallback; } const response = await secretsManager .getSecretValue({ SecretId: `${stage}/${secretName}`, }) .promise(); return response.SecretString || fallback; };
4. Hip Hop Showcase: Nappy Roots will headline this concert, which happens from 4 to 10 p.m. It will be the last band on the bill at 9 p.m. 5. Coleman Country Concert with Easton Corbin: The country concert starts at 3:45 p.m., and Corbin will headline it starting at 8:30 p.m. It’s on the Kennedy Plaza stage. How is it? Big G’s mango tea is almost the antithesis of the semi-tasteless fruit-flavored teas at Panera Bread. It’s almost sickeningly sweet, and it comes in a massive plastic deli container. For the money, you get lots of tea, but that quantity of sugar will likely leave your stomach churning afterward.
/** * All the layer implementation extends this class, and this class is a proxy * between the layer client and implementation. * @author javaito */ public abstract class Layer implements LayerInterface { private final String implName; private final boolean stateful; private final SynchronizedCountOperation invocationMean; private final SynchronizedCountOperation executionTimeMean; private final SynchronizedCountOperation errorMean; /** * This is the end point for all the layers constructor. * @param implName Implementation name. * @param stateful Stateful status. */ public Layer(String implName, boolean stateful) { this.implName = implName; this.stateful = stateful; this.invocationMean = new SynchronizedCountOperation( SynchronizedCountOperation.getMeanOperation(), 1000L); this.executionTimeMean = new SynchronizedCountOperation( SynchronizedCountOperation.getMeanOperation(), 1000L); this.errorMean = new SynchronizedCountOperation( SynchronizedCountOperation.getMeanOperation(), 1000L); Agents.register(new LayerAgent(this)); } public Layer(String implName) { this(implName, true); } public Layer(boolean stateful) { this(null, stateful); } public Layer(){ this(null, true); } /** * Return the layer implementation name. * @return Layer implementation name. */ @Override public String getImplName() { return implName; } /** * Return if the layer is stateful or not. * @return Stateful */ @Override public final boolean isStateful() { return stateful; } /** * Returns true if the layer implementations is a instanceof plugin or false in the otherwise. * @return Plugin status. */ @Override public final boolean isPlugin() { return PluginLayer.class.isAssignableFrom(getClass()); } /** * Return the string set with all the aliases for this implementation. * @return Aliases for this implementation. */ public Set<String> getAliases() { return null; } /** * This method return true if the layer instance is overwritable for other instance * whit the same name. * @return True if the layer is overwritable or false in the otherwise. */ public boolean isOverwritable() { return true; } /** * This method must be override to add restrictions over particular * implementations of the layers. * @return Access object. */ protected Access checkAccess(){ return Access.GRANTED; } /** * Delegation method to get some layer implementation. * @param layerClass Layer implementation class. * @param implName Layer implementation name. * @param <L> Expected layer implementation class. * @return Layer implementation. */ protected final <L extends LayerInterface> L getLayer(Class<? extends L> layerClass, String implName) { return Layers.get(layerClass, implName); } /** * Return the layer proxy of the layer or null by default. * @return Layer proxy instance. */ public LayerProxy getProxy() { return new LayerProxy() { @Override public ProxyInterceptor onBeforeInvoke(Method method, Object... params) {return null;} @Override public void onAfterInvoke(Method method, Object result, Object... params) {} }; } /** * Verify if the current thread is working between the normal parameters. * @throws Throwable Any throwable throws for some check method. */ private void analyzeThread() throws Throwable { ServiceThread.checkInterruptedThread(); ServiceThread.checkAllocatedMemory(); ServiceThread.checkExecutionTime(); } /** * This method intercepts the call to layer implementation and * save some information about the thread behavior. * @param proxy Object to be called. * @param method Method to be called. * @param args Method to invoke the method. * @return Return the value returned for the proxy method. * @throws Throwable Throw all the generated exceptions. */ @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result; if (!(Thread.currentThread() instanceof ServiceThread)) { //If the current thread is not a service thread instance then //this method is called again but using a service thread with a guest session. result = Service.call(()-> { try { return invoke(proxy, method, args); } catch (Throwable throwable) { throw new RuntimeException(throwable); } }, ServiceSession.getGuestSession()); } else { //Add one into the executions counter. invocationMean.add(1); //Store the start time of the execution. Long startTime = System.currentTimeMillis(); try { analyzeThread(); Access access = checkAccess(); if (access == null) { throw new HCJFSecurityException("Access null"); } if (!access.granted) { if (access.message != null && access.getThrowable() != null) { throw new HCJFSecurityException(access.getMessage(), access.getThrowable()); } else if (access.getMessage() != null) { throw new HCJFSecurityException(access.getMessage()); } else if (access.getThrowable() != null) { throw new HCJFSecurityException("Empty message", access.getThrowable()); } } ServiceThread serviceThread = (ServiceThread) Thread.currentThread(); serviceThread.putLayer(new ServiceSession.LayerStackElement( getClass(), getImplName(), isPlugin(), isStateful())); if (!method.getDeclaringClass().equals(LayerInterface.class)) { Method implementationMethod = getTarget().getClass().getMethod(method.getName(), method.getParameterTypes()); for (Permission permission : implementationMethod.getDeclaredAnnotationsByType(Permission.class)) { SecurityPermissions.checkPermission(getTarget().getClass(), permission.value()); } } try { Object[] newArgs = AdaptableLayer.class.isAssignableFrom(getClass()) ? ((AdaptableLayer)this).adaptArguments(method, args) : args; LayerProxy.ProxyInterceptor interceptor = getProxy().onBeforeInvoke(method, newArgs); if (interceptor == null || !interceptor.isCached()) { result = method.invoke(getTarget(), newArgs); } else { result = interceptor.getResult(); } getProxy().onAfterInvoke(method, result, newArgs); } catch (Throwable throwable) { //Add one to the error mean counter. errorMean.add(1); throw throwable; } finally { if (serviceThread != null) { serviceThread.removeLayer(); } } } finally { //Add the invocation time int the layer counter. executionTimeMean.add(System.currentTimeMillis() - startTime); } } return result; } /** * This method return the invocation target. * @return Invocation target. */ protected Object getTarget() { return this; } /** * Return the session associated to the execution thread. * @return Service session. */ protected final ServiceSession getSession() { return ((ServiceThread)Thread.currentThread()).getSession(); } /** * This class represents the access resume of the layer. */ public final static class Access { private static final Access GRANTED = new Access(true); private final boolean granted; private final String message; private final Throwable throwable; public Access(boolean granted, String message, Throwable throwable) { this.granted = granted; this.message = message; this.throwable = throwable; } public Access(boolean granted, String message) { this(granted, message, null); } public Access(boolean granted) { this(granted, null, null); } /** * It returns true if access has been granted and false otherwise. * @return Granted resume. */ public boolean isGranted() { return granted; } /** * Return a message associated to the granted resume. * @return Message. */ public String getMessage() { return message; } /** * Return the throwable associated to the granted resume. * @return Throwable. */ public Throwable getThrowable() { return throwable; } } public interface LayerAgentMBean { String getLayerName(); Double getInvocationMean(); Double getErrorMean(); Double getExecutionTimeMean(); } public static final class LayerAgent extends Agent implements LayerAgentMBean { private static final String PACKAGE_NAME = Layer.class.getPackageName(); private static final String NAME_TEMPLATE = "%s$%s"; private final Layer layer; public LayerAgent(Layer layer) { super(String.format(NAME_TEMPLATE, layer.getClass().getSimpleName(), layer.getImplName()), PACKAGE_NAME); this.layer = layer; } @Override public String getLayerName() { return layer.getImplName(); } @Override public Double getInvocationMean() { return layer.invocationMean.getCurrentValue(); } @Override public Double getErrorMean() { return layer.errorMean.getCurrentValue(); } @Override public Double getExecutionTimeMean() { return layer.executionTimeMean.getCurrentValue(); } } }
Minimizing Knowledge Scepticism Resourcing Students through Media and Information Literacy Globally connected and commodified digital means of communication offer a wealth of information across age-bands and across formal and informal sites of learning, yet few students obtain systematic training in transforming this information to knowledge that is tailored to their level of understanding and to the settings of learning. This gap between access to unsorted and often unsolicited information across boundaries of space, learning and generation and training in the formation of valid knowledge poses a threat to democratic societies that are based on informed citizens joint debate and decision-making. This article addresses the gap between students information access and their knowledge formation and discusses the challenges and possible solutions with empirical focus on the transition between upper-secondary and tertiary education. Globally connected social network sites (social media) are key information sources for many students. Owing to their commodified, algorithmic and non-transparent character, these sites offer little guidance in terms of validation and verification of claims. I propose Media and Information Literacy (MIL) as an important means of minimizing the gap between information access and sound knowledge formation. This is because MIL goes beyond training of access to digital technologies and information search and retrieval. It also trains skills in applying communication technologies for validation, critique and knowledge production. I discuss the challenges posed to education to apply (MIL) as a key pathway to minimizing the gap in order to advance public value and societal resilience and suggest that educational systems shift their focus from teaching to learning in tandem with more inclusive approaches to where learning takes place. in most philosophical systems. In the global north, the uneven process of modernization from the eighteenth century on sets up an opposition between secular veracity or fact and religious faith or belief. This opposition serves to relegate the basis of doubt to the private realm of faith and simultaneously minimize the grounds for public traditions of scepticism. Yet, today, this division between private doubt and public scepticism seems to be blurring. Scepticism about what can be known and who can be trusted is fast becoming a global phenomenon that is shared by people in public and impacting their decisions and actions in daily life. Is President Trump right in claiming that the turnout for his inauguration ceremony in 2017 is bigger than Obama's in 2009? Should my baby get a vaccination? Does the radiation of mobile phones cause cancer? This type of scepticism I will term knowledge scepticism. It is not a concept encompassing a denial of truth itself, nor of reality as encountered and experienced. Hence, the concept does not capture conspiracy theorists, staunch cryptozoologists (in search of, for example, abominable snowmen) or believers in telepathy or UFOs. As noted, it is rather a default denunciation of public trust and of empirical knowledge within particular domains or themes and, importantly, this mundane scepticism is publicly shared. While it is impossible to fully determine, whether we live in an era of 'postfactual relativism' (van ) where knowledge scepticism is on the increase, the concept certainly stands in opposition to knowledge imparted by institutions such as schools and universities. They feed on and foster knowledge formation through argumentation, validation and critique of claims. My contention is this: the gap between knowledge scepticism and educational knowledge formation is accelerated by trends towards knowledge diversification, yet these trends are also to be taken seriously as catalysts in closing the gap. In what follows, that contention is underpinned by arguments in two steps. First, I explore why knowledge scepticism flourishes today, focusing on trends towards knowledge diversification. Such an exploration provides insights that are necessary to make the second step. Here, I analyse how educational institutions may minimize, if not close, the gap between knowledge scepticism and their time-honoured educational ideals of knowledge formation. Based on existing literature, I propose media and information literacy (MIL) as an important means of minimization. To study and minimize the gap is important because the educational ideals have reality effects in terms of scientific validity and public trust. If these forms of validity and trust diminish, many practical interactions and inventions become unfeasible. On a grander canvas, it is vital for democratic societies to minimize the gap because these societies are based on informed citizens with the requisite resources to make sound decisions for themselves and society and with a willingness to debate issues of public interest. Why Knowledge Scepticism Flourishes More people than ever before receive some sort of formal education today and get access to tools for systematic knowledge formation. At the same time, educational institutions no longer hold a privilege to model what counts as valid knowledge. The same is seen with other institutional gatekeepers of knowledge formation such as the church, legacy media corporations (newspapers, broadcasters) and publishers of non-fiction, including encyclopaedias and teaching materials. The institutional loci of knowledge formation are being diversified, and we are far from having an elite exercising their power to select and certify knowledge claims. This diversification may facilitate more democratic knowledge formation, challenging social and cultural privilege. But it also fundamentally blurs which knowledge institutions people can trust and hold accountable for their practices. The trend towards institutional diversification of knowledge production is accompanied by a global commodification of knowledge dissemination and use. In academia, this is seen, for example, in journal publishers' introduction of gold open access where often steep page charges and access barriers serve to widen inequities of professional knowledge. In the wider educational sector, online learning resources and platforms are increasingly provided by a handful of global software companies. While publishers of print materials are also part of a commercial publishing tradition, the new players operate across the public life of school and the private lives of educators and students because the players can transfer data and user access across platforms without users' knowledge. For example, when Google for Education delivers the software system GSuite for education to schools, students, irrespective of age, can also log on to Google-owned Blogger and YouTube, unless local school authorities interfere. The educational commodification is part of a wider process of knowledge dissemination that one may term 'evidence-light'. In much public discourse, not least on social media, independent knowledge brokers, such as academics, vie for the attention of audiences with experts from communication agencies, marketing companies and consultancies. In many fields, academic knowledge becomes just one voice among a choir of other contenders. Even people trained to understand the difference between personal claims and opinions and professional evidence-based arguments do not necessarily trust evidence over opinion. For example, a study in the USA found no correlation between knowledge of science and belief in an array of pseudoscientific claims (Goode 2002). Since the 1990s, trends towards institutional diversification of knowledge production and commodification of knowledge dissemination have been greatly accelerated by global networks of digital communication, for example platforms such as Facebook, search engines such as Google and digital infrastructures such as the World Wide Web. Together, they serve to hugely increase both the production, distribution, use and storage of information as digital data. Individual knowledge production based on this information and its near-instant distribution hold significant democratic potentials as demonstrated in everything from mobilization of social movements (Coban 2016) to depression support groups (). Yet, such democratic potentials are to be realized within systems of concentrated ownership of the digital networks. These networks have the power to gather, select and prioritize data and information without being subject to transparent public S58 Kirsten Drotner control. Currently, two models of control operate on a global scale: a model of state control as seen in China and a model of corporate control by a few mega players as seen in the USA (van ). Under these conditions, how do people generate and share knowledge? Largely as a personal option and obstacle rather than a public good. Selecting and transforming distributed bits of information to relevant knowledge becomes a paramount individual task. Very few people understand how their data are used, and how they can protect their privacy and rights of expression online. Even fewer are in a position to exercise regulatory powers to curb state surveillance or corporate algorithmic logics. So, a default approach is to trust what other individuals seem to favour online as illustrated through likes, recommendations and reviews, but without knowing how and why these responses appear. There is no evidence to support that such an approach leads to filter bubbles; that is, algorithmic biases in information search. Nor is there sustained evidence documenting alleged echo chambers online; that is, interaction only with like-minded groups thus reinforcing, rather than challenging, existing political values (). Rather, the occlusion of online accountability, the distribution of trust and the individualization of knowledge formation lead many people to doubt or disband with established criteria of knowledge assessment. Hence, knowledge scepticism is the result of default options rather than a decisive opposition. Taken together, institutional diversification, commodification and a dramatic, if uneven, take-up of globally connected digital communication are key catalysts in the flourishing of knowledge scepticism, thus widening the gap described above between that scepticism and formal educational knowledge formation. The educational sector is keen to close the gap, and it is joined by stakeholders such as legacy media corporations, scientific societies and NGOs. Across the various players, two 'closing' approaches stand out. One approach is to counter knowledge scepticism by professional advancement of the general public's knowledge through the application of (more) effective communication to people. The other approach is to counter knowledge scepticism by fostering people's own knowledge resources by communication with and by people. Professional Communication to People This approach to counter knowledge scepticism can be defined as a translational approach, by which is meant a translation of valid knowledge from the specialized domains of science (in the widest sense of the word) to the domain of public discourse and public opinion. Its key tradition is science communication, which took hold in the global North in the 1960s and today is a vibrant and diverse area. It is also an expanding research field with its own journals, conferences, and educational programmes. Science communication is a tradition closely related to legacy media such as newspapers, popular journals, radio and television. Audiences span the general public and groups sharing specific interests. In addition, communication of scientific output is a key source of policy advice (), an aspect that is less relevant in the current context. In principle, the concept covers all academic disciplines, while in reality the focus in mainly on science, technology, engineering and mathematics (Guenther and Joubert 2017). Most science communicators are journalists whose professional training makes them focus on what is novel, unexpected or conflictual. So science communicators will mostly report on scientific results, not least those results that are tangible (innovations), surprising or contentious. The aims of communication have changed somewhat over the years. Early on, the aim was to enhance what was seen as the public's general lack of knowledge by having professionals impart correct and valid knowledge. This so-called deficit model of communication (Bucchi and Trench 2014) has since been supplemented by a greater focus on popular understanding of science. Here, the aim is to have professionals impact people's motivations and attitudes towards scientific themes. Science centres, festivals and guided tours are all established means to advance popular understanding of science by activating a wide range of senses and modes of interaction. Yet, the mode of communication is still mainly determined and directed by professionals towards the public. Much scientific evidence is counter-intuitiveit takes a leap of the imagination to understand the dynamics of the solar systemand so much effort is spent on imparting unlikely, but accurate, hard evidence, even if the means of doing so involves more than reading and reasoning. More recently, popular understanding of science combines communication of facts or results with initiatives to help motivate individuals to engage with scientific processes. This combination is popular with science museums, natural history museums and other sites, whose semi-formal learning is often directed at students of school age. Intermittently, action-based initiatives spring up, such as the March for Science, which started on Earth Day, 22 April 2017. With the aim to advance evidence-based policymaking in the common interest, the initiative has spread to many cities around the world. Perhaps, the recent focus on scientific processes and their entanglements with contextual factors is seen most clearly in the actions taken against fake news online. In the research literature, the phenomenon is termed misinformation (Waisbord 2015), by which is meant that the epistemic conditions of information veracity and factual knowledge become a source of doubt. Misinformation challenges established traditions of context-free science communication without providing audiences with the requisite resources to assess how particular communicative, political or personal contexts impact on the validity and truthfulness of the claims made. Thus, misinformation may add to knowledge scepticism as a default stance. A range of initiatives have been taken to combat disinformation. Fact-checking websites have sprung up, such as PolitiFact and PunditFact, where people can test the accuracy of political statements. In Sweden, a network, #Hurvetdudet? , started during a national election campaign in 2018 and is now backed by more than 70 organizations, including large funding bodies, trade unions and universities. It aims to advance scientific knowledge as a basis for policymaking S60 Kirsten Drotner by having participants in public debate simply ask for arguments or evidence behind claims made. The evidence is still inconclusive when it comes to documenting whether the aims are fulfilled to advance scientific knowledge, motivations or political accuracy by having professionals impart valid and correct knowledge to the public. A number of studies indicate that much depends on the theme, the professionals and their modes of address and, not surprisingly, on people's prior values and personal networks (;Fischhoff 2019). These are important insights to all who want to minimize the gap between knowledge scepticism and educational knowledge formation. For while science communication is but one key approach to minimize that gap, its definition of valid knowledge and its model of communication are widely shared. It is therefore in order to explore whether alternative approaches may deliver better. Communication With and By People As a starting point of exploration, one may ask what the basic elements are in the formation of educational knowledge. Depending on the level and mode of education, it is important that students learn how to acquire and exercise types of knowledge that include systematic investigation: search and validation of existing knowledge, argumentation and critique of claims. Here, the ability to reason through argumentation offers itself as a key element. As is well-known from moral philosophy (Toulmin 2003(Toulmin [1958), argumentation is basically a practice of underpinning normative claims by solid documentation. To recognize and express an argument is a fundamental aspect of democratic deliberation and decision-making, and hence it resonates with the aims of education in democratic societies to foster rounded character formation as a social practice. Naturally, argumentation is also a basic foundation of valid scientific evidence across scientific disciplines. Depending on age, socio-cultural background and educational level, students come with varying training in how to distinguish between claims-making and solid documentation. So, an immediate answer to curb knowledge scepticism would be to merely train students in argumentation across all subjects. In a manner of speaking, to replace everyday knowledge scepticism by scientific scepticism as a method of enquiry, where all claims undergo rational questioning. Yet, this choice would be to underestimate how contextual factors impact learning and, importantly, to disregard why knowledge scepticism flourishes as noted above. Instead, my proposition is to apply some of the same mechanisms that make knowledge scepticism flourish as catalysts to foster valid knowledge formation. Knowledge scepticism is underpinned by hugely popular digital modes of communication such as social network sites that, to the untrained eye, seem immediate, networked, dialogic and relevant to one's everyday life. These features can be used to train communicative distinctions of substance: between genres, means of expression and modes of addressincluding attention to (lack of) arguments. In addition, the training can usefully mime the dialogic and networked nature of communication, which many students find relevant and appealing. Such an approach implies that students, rather than being objects of one-way communication as in the tradition of science communication, become subjects of communication as producers, critics and designers. MIL is an umbrella term for training multimodal communication competencies in a digitized, networked era with students and by students themselves. MIL goes beyond training literacy in relation to particular areas (e.g. science literacy), particular communication technologies (e.g. print literacy, computer literacy) or particular aspects of communication (e.g. information literacy). Rather, MIL 'empowers citizens to understand the functions of media and other information providers, to critically evaluate their content, and to make informed decisions as users and producers of information and media content' (UNESCO n.d.). According to this definition, all types of media technologies are contextualized means of communication. This implies that teaching focuses on the shaping and sharing, the critical assessment and safe archiving of content. Content may be text, words, numbers, images or sound, all of which are semiotic tools through which users articulate meaning. Importantly, a focus on communication invites a dialogic understanding of media and a student-centred approach to teaching. The MIL concept deviates from more prevalent technology-driven teaching that defines digital media as neutral infrastructures with no impact on the type of knowledge they convey. Such teaching will focus on students' access to, search and retrieval of a plethora of information or be attuned to human-computer interaction and digital design. MIL is an important means of minimizing the gap between educational knowledge formation and knowledge scepticism. This is because it builds on, rather than debunks, most students' attraction to digital media as networked modes of communication. It is also because it acknowledges that students are not digital natives (Prensky 2001) but need systematic training to achieve literacy. Furthermore, MIL is important because its training involves critical and contextualized assessment of knowledge in different domains. Here, the difference between claims-making and argumentation is key, but also validation of sources (who speaks, in whose interest, from which institution). Last, but not least, MIL is important because it fosters students' own modes of expression as social practices that involve not merely having a voice but also listening to others with whom one may disagree. Training MIL With and By Students: What is the Evidence? Existing training in MIL is uneven and subject to competing discourses on technological upskilling with a focus on coding and design of digital infrastructures (). For Europe, perhaps the most comprehensive picture can be gleaned from a large-scale, comparative study, EU Kids Online. It reveals that about a quarter of children aged 9-16 reach what the authors term 'the most advanced and creative step' on the 'ladder of opportunities', which includes S62 Kirsten Drotner filesharing, blogging and visiting chatrooms (, 14). So, in terms of the dimensions inherent in MIL, training students in the basic skills of access and validation of information is more prevalent than the more advanced dimensions of analysis, critique and production. One might surmise that this situation is mostly the case for primary and lowersecondary education and that older students might demonstrate a better proficiency. Limiting my documentation to a Danish context, this does not seem to be the case. Studies demonstrate that students at upper-secondary and the first years of tertiary education find it difficult to distinguish between claims and documentation, are uncertain about locating existing knowledge about issues of relevance for them, and are often at a loss about producing valid documentation themselves (;Drejer 2018). Academic streams of upper-secondary education as well as tertiary education require that students in their written exams demonstrate skills of documentation as well as location and referencing of valid knowledge sources. Not surprisingly, a number of initiatives are underway to solidify these dimensions of MIL. A study encompassing nine Danish upper-secondary schools, 1000 students and about 50 teachers found that a key pathway to quality improvement is to make students' documentation of systematic information search a more important part when grading assignments. In addition, students need easier access to validated knowledge databases (and not in English only) so as to avoid Google, YouTube and unsolicited digital sources as key reference points (Grnning and Mortensen 2018). When it comes to the key dimension of critical analysis, including argumentation, the situation is no brighter. Many students have difficulties acquiring this training, and many institutions have difficulties in providing this trainingor, at least offering formats that students find relevant and useful (Hagstrm 2005;Wingate 2012;Widhiyanto 2017). Training with students, and not merely of students, seems to be an important way forward. Such an approach includes that teachers acknowledge students' everyday modes of communication and their knowledge formation beyond school as immediate reference points (). This acknowledgement also means taking students' knowledge scepticism seriously as a mode of understanding, even if educators reject its substance. Without analytical training grounded in students' own understanding, education in argumentation and critical thinking may result in just another form of rote learning. Relating educational knowledge to other types of knowledge formation is a useful starting point if educators want to counter knowledge scepticism. But to have a long-term effect such a relation needs to be combined with contextualized MIL training that reaches beyond students' existing knowledge horizons. For example, most students (and many educators) fail to understand the algorithmic structure of digital search engines and platforms (if something is popular, it must be right) and their commodified nature (if something is top on the list, it must be important, even if it is wrong). To avoid individual shaming, students need to be made aware of structures underlying the large platform operators whose business models feed on datamining and opaque terms of use (van ). Yet training critical analysis and solid argumentation is not enough if MIL is to minimize knowledge scepticism in the longer term. It is key to advancing students' own production skills beyond the skills most commonly trained at school: oral presentations and written assignments. Students should receive systematic training in multimodal expression to be able to counter knowledge sceptics on their own turf, so to speak: producing small videos, brief podcasts or chat entries. Yet, students' digital production skills beyond written and oral modes are the most poorly developed and understood. This situation poses a potential risk of solidifying knowledge scepticism in the digital domain, because students lack the tools necessary to express their own opinion with a view to others who may disagree. On a grander canvas, this most advanced dimension of MIL is important to foster because it is fundamental to students exercising their freedom of expression in the twenty-first century. Citizens' right to freedom of expression is a cornerstone in democratic societies. In 2016, the UN Human Rights Council updated this right to fit the twenty-first century by codifying that internet access is a basic human right and that internet access 'can be an important tool for fostering citizen and civil society participation' (Human Rights Council 2016, 4). In 1989, the Convention on the Rights of the Child extended freedom of expression across all types of media to citizens under the age of 18. Article 13 of the Convention states that children's right of expression 'shall include freedom to seek, receive and impart information and ideas of all kinds, regardless of frontiers, either orally, in writing or in print, in the form of art, or through any other media of the child's choice' (Convention 1989, n.p.). Irrespective of age, then, citizens have formal rights of expression that fit the digital age. Yet, without proper training these rights cannot be exercised. In that sense, minimizing the gap between educational knowledge and knowledge scepticism forms part of a wider, more contentious, and ultimately more decisive process.
import {AbstractPage} from './abstract-page.po'; import {ElementFinder} from 'protractor'; const component = 'my-hero-detail'; export class HeroDetailsPage extends AbstractPage { private readonly pageHeaderSelector = `${component} h2`; private readonly nameInput = `${component} input`; private readonly saveBtn = `${component} button:last-of-type`; private readonly idBox = `${component} > div > div:first-of-type`; private readonly dashboardPageLink = 'a[href^="/dashboard"]'; constructor(heroId: number) { super(); this.baseUrl = `/detail/${heroId}`; } getPageHeader(): Promise<string> { return this.getDomElement(this.pageHeaderSelector).getText() as Promise<string>; } private getNameInput(): ElementFinder { return this.getDomElement(this.nameInput); } getName(): Promise<string> { return this.getNameInput().getAttribute('value') as Promise<string>; } async getId(): Promise<number> { const text = await this.getDomElement(this.idBox).getText(); return +text.match(/\d+/)[0]; } navigateToDashboard(): Promise<void> { return this.getDomElement(this.dashboardPageLink).click() as Promise<void>; } async renameHero(newName: string): Promise<void> { const nameInput = await this.getNameInput(); await nameInput.clear(); await nameInput.sendKeys(newName); } saveChanges(): Promise<void> { return this.getDomElement(this.saveBtn).click() as Promise<void>; } }
The invention relates to pressure swing adsorption processes and more particularly to PSA processes for the production of high purity oxygen (e.g. oxygen having a purity of 90-95 vol. % O2). More particularly, the invention is directed towards particular adsorbents for use in PSA processes. The objective of this invention is to enhance the mass transfer rate of adsorbent materials, particularly those used in PSA. With a fast mass transfer rate, one can have short cycle time and low power consumption and therefore high adsorbent productivity and high process efficiency in PSA systems and processes. It has been recognized that it is possible to shorten cycle time by reducing particle size of adsorbent aggregates. This recognition has been based upon the assumption that the time needed for adsorbates to travel through the macropores of the adsorbents limits the adsorption/desorption cycle time, i.e. macropore diffusion is the rate limiting step in adsorption processes. Armond et al. (UK Pat. Appl. GB 2 091 121) disclose a superatmospheric PSA process for air separation in which short cycles ( less than 45 sec) are combined with aggregates of small diameter (0.4 mm to 3.0 mm) to reduce the process power and the size of the adsorption bed. They reported that cycle times of 15 s to 30 s and aggregate diameter of 0.5 mm to 1.2 mm are their preferred choice. Hirooka et al. (U.S. Pat. No. 5,122,164) also utilized small particles to achieve fast cycles and they devised process cycles with 6, 8 or 10 process steps to improve yield and productivity. They preferred aggregate diameter of 0.8 mm to 1.7 mm and cycle times of 50 s to 60 s. Very small adsorbent particles (0.1 mm to 0.8 mm) are necessary for the fast cycles and high pressure drop that characterize a special class of processes known as rapid pressure swing adsorption (RPSA). Typical RPSA processes have very short feed steps (often less than 1.0 s) operating at high feed velocities, include a flow suspension step following the feed step and generally have total cycle times less than 20 s (often less than 10 s). Jones et al teaches that RPSA of single adsorption bed using adsorbent aggregates of 20-120 mesh (0-84mm to 0.125 mm) is able to achieve a cycle time of less than 30 seconds (U.S. Pat. No. 4,194,892). Earls et al teach RPSA air separation using multi-bed cycles using 40 to 120 mesh (0.520 mm to 0.125 mm) aggregates and a cycle time from 0.2 to 18 seconds (U.S. Pat. No. 4,194,891). Wankat developed a methodology to scale columns according to particle diameter whereby through the use of smaller diameter, one can reduce the volume of adsorbents needed. This is referred to as xe2x80x9cintensificationxe2x80x9d of the sorption process. (P C Wankat, Ind. Eng. Chem. Res. Vol. 26, No. 8, p.1579 1987). Unfortunately,. however as the diameter of the aggregates decreases, the pressure drop across the bed increases. Further, there is increased potential for fluidization and greater difficulty in particle retention in the bed. The net effect is an undesirable increase in the energy consumption of the process. Kinetics of sorption in PSA processes has been discussed in texts such as xe2x80x9cPrinciples of Adsorption and Adsorption Processesxe2x80x9d by Ruthven, John Wiley and Son, 1984; and Gas Separation by Adsorption Processes, by Yang, Butterworth, 1987). In these discussions, the kinetic parameter of an adsorbent is defined as a function of the macropore diffusion coefficient, which in turn has been defined as a function of the porosity of the macropore. Based on these theoretical developments, Moreau et al (U.S. Pat. No. 5,672,195) concluded that an adsorbent should have a kinetic parameter A(k) of at least 0.5 sxe2x88x921 and a porosity of between 0.38 and 0.6. Moreau et al did not address the significant offsetting effects of high porosity, including the fact that increasing the porosity or intraparticle void fraction reduces the overall active adsorbent content of the particle resulting in lower particle density. This in turn increases the volume of adsorbent required for a given N2 adsorbate capacity (mol/g). The larger internal void fraction associated with increased porosity also increases the non-selective gas storage volume in the adsorbent bed and thereby decreases the separation capability, i.e reduces overall product recovery. Further, the crush strength of adsorbent particles is decreased with high porosity/low density adsorbent particles. This is a problem because adsorbent particles in the bottom of large commercial PSA beds must resist crushing under the weight of thousands of pounds of adsorbent contained in the adsorber vessel. As a means of increasing zeolite content in zeolite adsorbents it is known to convert clay into zeolite via a process known as caustic digestion. It is also known that zeolite can be produced from preformed clay bodies, and that the shape of the preformed body can be retained. Howell et al, in U.S. Pat. No. 3,119,660 disclosed a method of producing zeolite A, X and Y by forming kaolin clay into aggregates (also referred to as xe2x80x9cmassive bodiesxe2x80x9d) followed by calcination at 600-800xc2x0 C. and caustic digestion. They disclosed that this approach is particularly useful in aggregates having an increased clay content (in the range of 20 to 80%) because the greater the clay content, the more zeolite is formed cheaply. Howell et al also disclosed that inclusion of a void forming, combustible diluent substance facilitates the clay to zeolite conversion, especially when the clay content is 50% or higher. This is because while clay is a non-porous material, zeolite is microporous, and therefore void space is needed for expansion with such clay to zeolite conversion. The methodology of providing void space for volume expansion was further investigated by W. H. Flank et al (U.S. Pat. No. 4,818,508). They discovered that the rate of zeolite formation in massive bodies can be accelerated and the purity of zeolite enhanced by controlling the size of clay particles used to make the preformed bodies, together with addition of pore generating materials and inert binder. Leavitt (U.S. Pat. No. 5,074,892) states that NaX adsorbent crystals may be treated with caustic to remove soluble, non-crystalline debris and enhance cation exposure. S. M. Kuznicki et al disclosed a method to make X-type zeolite (U.S. Pat. No. 4,603,040) having a Si/A12 ratio of 2.0 (also referred to as xe2x80x9cmaximum aluminum Xxe2x80x9d). They extruded mixtures consisting of kaolin clay and 10 to 30% of a pore forming material into a preformed body. After calcining this material at 600xc2x0 C., the body was treated in an aqueous solution of NaOH and KOH. Typically such treatment converts meta kaolin into type A zeolite as well as a high purity maximum aluminum X zeolite (2.0) product. Unfortunately, in the example an aluminum zeolite X (2.0) could only be made by maintaining the treatment temperature at about 50xc2x0 C. for a period of 10 days. Thus all the prior art related to caustically digested preformed X zeolite was directed to making a massive body of high zeolite content. Further, the materials formed were high density low porosity materials (as a result of high clay content and resultant low macropore volume), even with the use of organic burn-out. The objective of this invention is to enhance the intrinsic mass transfer rate of PSA adsorbents while minimizing and/or eliminating the need for reduction in particle size. As a result, the materials of the invention can be used in PSA processes that have high adsorbent productivity and high process efficiency, short cycle times and low power consumption. The invention preferably comprises an adsorbent material having an SCRR of greater than 1.2. The invention preferably further includes a process for the separation of at least one first component from a gas mixture including said first component and a second less selectively adsorbable component using an adsorbent having an SCRR greater than 1.2. The invention preferably includes a process of making an adsorbent comprising the following steps: a) providing zeolite powder having a predetermined composition; b) mixing said powder with a binder capable of being converted to zeolite via caustic digestion, wherein said binder is added in an amount less than 20% by weight, preferably xe2x89xa615%, more preferably xe2x89xa612% of the powder/binder mixture; c) forming beads from said mixture; d) calcining said beads; e) caustically digesting said beads such that at least a portion of said binder is converted to zeolite; f) recovering said adsorbent. In further preferred embodiments, the process of making the adsorbent further comprises the steps of: g) adding a combustible fiber or particulate material to the binder/zeolite mix prior to bead forming.
<reponame>ChiedozieOkoh/coco-sh<filename>include/coconut.h<gh_stars>0 #pragma once #include <stdbool.h> #include <stdio.h> #include <string.h> #define COCO_PERROR() perror("[coco:err]") #define COCO_PERROR_MSG(msg) perror("[coco:err]:: "msg) #define COCO_ERR(msg) fprintf(stderr,"[coco:err]:: "msg) #define COCO_INFO(msg) printf("[coco:info]:: " msg) #define COND_EXEC_TOKEN "&&" #define CNSEC_EXEC_TOKEN ";" #define ASYNC_EXEC_TOKEN "&" #define DETACH_EXEC_TOKEN "&>" #define ARG_TOKEN " " #define PIPE_EXEC_TOKEN "|" #define COCO_PATH "/usr/bin/" #define COCO_PATH_LEN 10 #define ESC_RED "\x1b[1;31m" #define ESC_BLUE "\x1b[1;34m" #define ESC_YELLOW "\x1b[1;33m" #define ESC_GREEN "\x1b[1;32m" #define ESC_MAGENTA "\x1b[1;35m" #define ESC_RESET "\x1b[1;0m" #define MAX_CMD_BRANCHES 100 struct CmdSequence; typedef int(*cmd_handle)(const char**); // like str_compare but ignores leading spaces, will also check for trailing spaces // ie comparing "x\0" , "x \0" and " x \0" will all return the same result bool coco_str_compare(const char* , const char* , int); void print_prompt(void); bool coco_set_cwd(const char*); struct CmdSequence* cmd_parse(const char* const);//split a string into a CmdSequence object void cmd_destroy(struct CmdSequence**); void cmd_print(struct CmdSequence*); void cmd_execute(struct CmdSequence*);//execute a cmd with arguements bool is_exit(const char* intput); struct CmdSequence** syntax_parse(const char* const,int*); // split command chain into seperate commands //e.g syntax_parse("ls /home/ ; ls /home/joeblogs",(int*)foo); //will effectively return "ls /home/" , "ls /home/joeblogs" //the number of Cmd Sequences found will be written to the int* parameter // a pointer to the beginning of the array of CmdSequences is returned
Excitatory amino acids such as L-glutamate (Glu) and L-aspartate (Asp), are major neurotransmitters in the mammalian central nervous system. Multiple acidic amino acid receptor subtypes exist for these acid amino acid neurotransmitters. For example, these include ion channel-linked receptors mediating neuronal depolarization, named after the protypical agonists N-methyl-D-aspartate (NMDA), alpha-amino-5-methyl-4-isoxazolepropionic acid (AMPA), kainate and a putative presynaptic stimulator, L-2-amino-4-phosphonobutyrate (L-AP4). A fifth excitatory amino acid receptor is the metabotropic receptor, linked to phosphoinositide metabolism (Farooqui and Horrocks, Brain Res. Rev. 16, 171, 1991). NMDA receptors play a specialized role due to the unique properties of their linked ion channels and participate in various plastic neuronal events including initiation of long-term potentiation, which is a proposed substrate of learning and memory and the establishing of synaptic contacts during neuronal development. NMDA receptors are also involved in other processes such as the transmission of sensory information (MacDermott and Dale, Trends Neurosci. 10, 280, 1987). Apart from their important physiological roles, excitatory acidic amino acids such as NMDA are also involved in pathophysiological events in the central nervous system. Abnormally low levels of glutamic acid (Glu) can compromise normal levels of excitation and cause, for example, learning and memory deficits. Excessive levels of Glu can produce toxic effects. The term "excitotoxicity" was coined by Olney (in Hyhan W. L. [ed]: "Heritage Disorders of Amino Acids Metabolism" New York: Macmillan pp. 501-512, 1989) to describe the process by which excitatory amino acids can cause neuronal cell death. Evidence indicates that NMDA receptors exist in the peripheral tissues and that activation of these receptors may be involved in a mechanism of lung and other organ injury (Said, S. I. et al., Letters to Neuroscience, 65, 943-946, 1995). This cytotoxic process is mainly mediated by an over-stimulation of NMDA receptors and may occur in cases of cerebral stroke, cerebral ischaemia, epilepsy, Alzheimer's disease, AIDS-related dementias, traumatic brain injury and other neurodegenerative disorders (Olney, Ann. Rev. Pharmacol. Toxicol. 30: 47-71, 1990; Foster et al, in "Current and future Trends in Anticonvulsant, Anxiety and Stroke Therapy" Wiley-Liss, Inc. pp. 301-329, 1990; Rogawski and Porter, Pharmacol. Rev., 42: 223-286, 1990). The NMDA receptor comprises several binding domains that interact with each other for proper functioning and modulation of nerve cell activity. It is theorized that the NMDA receptor forms a complex acting as a receptor-linked ion channel. Essentially, the function of the receptor is to bind NMDA or the natural amino acids, Glu or Asp, and open an associated ion channel that allows the entry of sodium (Na.sup.+) and calcium (Ca.sup.2+) into the stimulated neuron as well as the exit of potassium (K.sup.+). Whereas the ion channels of other excitatory amino acid receptors (AMPA, kainate and L-AP4) are only permeable to Na.sup.+ and K.sup.+, the NMDA receptor channel is also permeable to Ca.sup.2+. This feature may be of importance for the proposed role of this receptor in both short and long-term plasticity such as learning, memory and neuropathology. Intracellular Ca.sup.2+ is responsible for the regulation of a large variety of cellular activities (Farooqui and Horrocks, Brain Res. Rev. 16, 171; 1991). An overstimulation of brain NMDA receptors, observed in cases of anoxia, ischaemia and hypoglycemia, results in a build-up of the concentration of Ca++ in stimulated neurons and a cascade of intracellular events (activation of phospholipases [PLA.sub.2, PLC], lipases, proteases and endonucleases) that lead to neuronal cell death (Farooqui and Horrocks, Brain Res. Rev. 16, 171; 1991). There is therefore a need for compounds which can bind or antagonize the NMDA receptor complex or otherwise protect neurons against excitatory amino acid receptor-induced degeneration.
A 'smirking' gunman who shot a student dead was tattooed only two days later with a teardrop design that signified he was a killer, a court heard yesterday. Kiaran Stapleton, 21, who appeared in court amid heavy security charged with the murder of Anuj Bidve, was told by shop staff that the tattoo suggested the wearer had killed someone, a jury was told. Stapleton has already pleaded guilty to the manslaughter of Mr Bidve on Boxing Day last year on the grounds of diminished responsibility but that admission has been rejected by lawyers. Mr Bidve’s parents, Subhash and Yogini, travelled from their home in Pune, India, to Manchester Crown Court for the start of the trial. The jury heard Indian-born Mr Bidve, 23, had been in the UK since September 2011, when he enrolled on a postgraduate micro-electronics course at Lancaster University. He decided to go to Manchester with friends for the Boxing Day sales instead of returning home for the holidays. The group of five women and four men had set off from their hotel sometime after midnight and were using a GPS phone to guide them. They were walking through Ordsall, Salford, towards Manchester city centre when they saw two men. Mr Cummings said as they got closer one of the men crossed the road and approached them, asking the time. He said: ‘One of the group answered that it was 1.30am. ‘With no warning, the male produced a gun, put it to the head of Anuj Bidve, and fired a shot. ‘He immediately fell to the ground, fatally injured. Stapleton and his friend, Ryan Holden, allegedly fled into the housing estate where they lived, and showered and discarded their clothes. During the investigation, police seized CCTV footage from a nearby garage which showed Stapleton walking towards the scene of the shooting with Holden. Holden was arrested at his home in Ordsall 48 hours after the shooting and initially refused to speak to police, saying he feared for the safety of his family. But he decided to give a statement after receiving assurances that they would receive police protection. He said Stapleton had been in a long-term relationship with his cousin, Chelsea Holden, and they had had a child together but had split up in 2011. The court heard Stapleton had been out with Holden earlier on Christmas Day and was fine until he was told his ex-girlfriend had slept with another man when he had been living with her. The pair became aware of Mr Bidve and his friends as they walked home, Mr Cummings said. He added: ‘They could see they were not local. They were dark skinned and not dressed like Salford people. ‘They seemed to be having a laugh. As they drew almost level with this group, Stapleton said to Holden “Wait here a minute.” He then walked across the road. ‘(Holden) couldn’t hear anything that was said but he saw Stapleton raise his arm and make a gesture as though he was asking the time. Mr Cummings said: ‘He also heard a lot of screaming and then Stapleton ran back towards him, shouting “Run!” but he was already running. Holden did not know Stapleton had a gun before he heard the shot, Mr Cummings added. Stapleton was arrested in the early hours of December 29. When he appeared before magistrates the next morning he gave his name as ‘Psycho Stapleton’. Mr Cummings said: ‘The prosecution do not accept this is a case of manslaughter and we seek a conviction for murder.
<reponame>heinsm/qira def do_loop_analysis(blocks): #blocks = blocks[0:0x30] arr = [] bb = [] ab = [] realblocks = [] realtrace = [] idx = 0 for i in range(len(blocks)): h = hex(blocks[i]['start']) + "-" + hex(blocks[i]['end']) if h not in arr: realblocks.append({'start': blocks[i]['start'], 'end': blocks[i]['end'], 'idx': idx}) idx += 1 arr.append(h) realtrace.append(arr.index(h)) bb.append(arr.index(h)) ab.append(i) loops = [] # write this n^2 then make it fast did_update = True while did_update: did_update = False for i in range(len(bb)): for j in range(1,i): # something must run 3 times to make it a loop if bb[i:i+j] == bb[i+j:i+j*2] and bb[i:i+j] == bb[i+j*2:i+j*3]: loopcnt = 1 while bb[i+j*loopcnt:i+j*(loopcnt+1)] == bb[i:i+j]: loopcnt += 1 #print "loop",bb[i:i+j],"@",i,"with count",loopcnt # document the loop loop = {"clstart":blocks[ab[i]]['clstart'], "clendone":blocks[ab[i+j-1]]['clend'], "clend":blocks[ab[i+j*loopcnt]]['clend'], "blockstart":ab[i], "blockend":ab[i]+j-1, "count": loopcnt} # remove the loop from the blocks bb = bb[0:i] + bb[i:i+j] + bb[i+j*loopcnt:] ab = ab[0:i] + ab[i:i+j] + ab[i+j*loopcnt:] print loop loops.append(loop) did_update = True break if did_update: break ret = [] for i in ab: t = blocks[i] t["blockidx"] = i ret.append(t) return (ret, loops, realblocks, realtrace)
<reponame>AshishLohana/ga-learner-dsmp-repo # -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file # Code starts here df=pd.read_csv(path) X=df.drop(['customerID','Churn'],axis=1) y=df.iloc[:,-1] X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.3,random_state=0) # -------------- import numpy as np from sklearn.preprocessing import LabelEncoder # Code starts here X_train['TotalCharges'].replace(" ",np.NaN,inplace=True) X_test['TotalCharges'].replace(" ",np.NaN,inplace=True) X_train['TotalCharges']=X_train['TotalCharges'].astype('float') X_test['TotalCharges']=X_test['TotalCharges'].astype('float') X_train['TotalCharges']=X_train['TotalCharges'].fillna(X_train['TotalCharges'].mean()) X_test['TotalCharges']=X_test['TotalCharges'].fillna(X_test['TotalCharges'].mean()) print(X_train.isnull().sum()) le=LabelEncoder() cat_col=X_train.select_dtypes(include=['object']).columns for col in cat_col: le.fit(X_train[col]) X_train[col]=le.transform(X_train[col]) X_test[col]=le.transform(X_test[col]) y_train = y_train.replace(to_replace = ['No', 'Yes'], value = [0, 1]) y_test = y_test.replace(to_replace = ['No', 'Yes'], value = [0, 1]) # -------------- from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import accuracy_score,classification_report,confusion_matrix # Code starts here print("Looking at label encoding for X Train: " ,X_train.head()) print("Looking at label encoding for X_test: " ,X_test.head()) print("Looking at label encoding for y_train: " ,y_train) print("Looking at label encoding for y_test: " ,y_test) ada_model=AdaBoostClassifier(random_state=0) ada_model.fit(X_train,y_train) y_pred=ada_model.predict(X_test) ada_score=accuracy_score(y_test,y_pred) ada_cm = confusion_matrix(y_test,y_pred) ada_cr= classification_report(y_test,y_pred) print("ada Accuracy: ",ada_score) print("confusion_matrix: ",ada_cm) print("classification_report: ",ada_cr) # -------------- from xgboost import XGBClassifier from sklearn.model_selection import GridSearchCV #Parameter list parameters={'learning_rate':[0.1,0.15,0.2,0.25,0.3],'max_depth':range(1,3)} # Code starts here xgb_model=XGBClassifier(random_state=0) xgb_model.fit(X_train,y_train) y_pred=xgb_model.predict(X_test) xgb_score=accuracy_score(y_test,y_pred) xgb_cm=confusion_matrix(y_test,y_pred) xgb_cr=classification_report(y_test,y_pred) print("XGBoost Accuracy: ",xgb_score) print("XGBoost confusion_matrix: ",xgb_cm) print("XGBoost classification_report: ",xgb_cr) clf_model=GridSearchCV(estimator=xgb_model,param_grid=parameters) clf_model.fit(X_train,y_train) y_pred=clf_model.predict(X_test) clf_score=accuracy_score(y_test,y_pred) clf_cm=confusion_matrix(y_test,y_pred) clf_cr=classification_report(y_test,y_pred) print("New Accuracy: ",clf_score) print("New Confusion Matrix",clf_cm) print("New Classification Report",clf_cr)
<gh_stars>1-10 # -*- coding: utf-8 -*- from pprint import pprint import unittest from gilded_rose import Item, GildedRose def test_golden_master(): items = [ Item(name="+5 Dexterity Vest", sell_in=10, quality=20), Item(name="Aged Brie", sell_in=2, quality=0), Item(name="Elixir of the Mongoose", sell_in=5, quality=7), Item(name="Sulfuras, Hand of Ragnaros", sell_in=0, quality=80), Item(name="Sulfuras, Hand of Ragnaros", sell_in=-1, quality=80), Item( name="Backstage passes to a TAFKAL80ETC concert", sell_in=15, quality=20 ), Item( name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=49 ), Item( name="Backstage passes to a TAFKAL80ETC concert", sell_in=5, quality=49 ), Item(name="Conjured Mana Cake", sell_in=3, quality=6), # <-- :O ] results = [[f"({item})" for item in items]] days = 30 for day in range(days): GildedRose(items).update_quality() results.append([f"({item})" for item in items]) expected_results = [ [ "(+5 Dexterity Vest, 10, 20)", "(Aged Brie, 2, 0)", "(Elixir of the Mongoose, 5, 7)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 15, 20)", "(Backstage passes to a TAFKAL80ETC concert, 10, 49)", "(Backstage passes to a TAFKAL80ETC concert, 5, 49)", "(Conjured Mana Cake, 3, 6)", ], [ "(+5 Dexterity Vest, 9, 19)", "(Aged Brie, 1, 1)", "(Elixir of the Mongoose, 4, 6)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 14, 21)", "(Backstage passes to a TAFKAL80ETC concert, 9, 50)", "(Backstage passes to a TAFKAL80ETC concert, 4, 50)", "(Conjured Mana Cake, 2, 5)", ], [ "(+5 Dexterity Vest, 8, 18)", "(Aged Brie, 0, 2)", "(Elixir of the Mongoose, 3, 5)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 13, 22)", "(Backstage passes to a TAFKAL80ETC concert, 8, 50)", "(Backstage passes to a TAFKAL80ETC concert, 3, 50)", "(Conjured Mana Cake, 1, 4)", ], [ "(+5 Dexterity Vest, 7, 17)", "(Aged Brie, -1, 4)", "(Elixir of the Mongoose, 2, 4)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 12, 23)", "(Backstage passes to a TAFKAL80ETC concert, 7, 50)", "(Backstage passes to a TAFKAL80ETC concert, 2, 50)", "(Conjured Mana Cake, 0, 3)", ], [ "(+5 Dexterity Vest, 6, 16)", "(Aged Brie, -2, 6)", "(Elixir of the Mongoose, 1, 3)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 11, 24)", "(Backstage passes to a TAFKAL80ETC concert, 6, 50)", "(Backstage passes to a TAFKAL80ETC concert, 1, 50)", "(Conjured Mana Cake, -1, 1)", ], [ "(+5 Dexterity Vest, 5, 15)", "(Aged Brie, -3, 8)", "(Elixir of the Mongoose, 0, 2)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 10, 25)", "(Backstage passes to a TAFKAL80ETC concert, 5, 50)", "(Backstage passes to a TAFKAL80ETC concert, 0, 50)", "(Conjured Mana Cake, -2, 0)", ], [ "(+5 Dexterity Vest, 4, 14)", "(Aged Brie, -4, 10)", "(Elixir of the Mongoose, -1, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 9, 27)", "(Backstage passes to a TAFKAL80ETC concert, 4, 50)", "(Backstage passes to a TAFKAL80ETC concert, -1, 0)", "(Conjured Mana Cake, -3, 0)", ], [ "(+5 Dexterity Vest, 3, 13)", "(Aged Brie, -5, 12)", "(Elixir of the Mongoose, -2, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 8, 29)", "(Backstage passes to a TAFKAL80ETC concert, 3, 50)", "(Backstage passes to a TAFKAL80ETC concert, -2, 0)", "(Conjured Mana Cake, -4, 0)", ], [ "(+5 Dexterity Vest, 2, 12)", "(Aged Brie, -6, 14)", "(Elixir of the Mongoose, -3, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 7, 31)", "(Backstage passes to a TAFKAL80ETC concert, 2, 50)", "(Backstage passes to a TAFKAL80ETC concert, -3, 0)", "(Conjured Mana Cake, -5, 0)", ], [ "(+5 Dexterity Vest, 1, 11)", "(Aged Brie, -7, 16)", "(Elixir of the Mongoose, -4, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 6, 33)", "(Backstage passes to a TAFKAL80ETC concert, 1, 50)", "(Backstage passes to a TAFKAL80ETC concert, -4, 0)", "(Conjured Mana Cake, -6, 0)", ], [ "(+5 Dexterity Vest, 0, 10)", "(Aged Brie, -8, 18)", "(Elixir of the Mongoose, -5, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 5, 35)", "(Backstage passes to a TAFKAL80ETC concert, 0, 50)", "(Backstage passes to a TAFKAL80ETC concert, -5, 0)", "(Conjured Mana Cake, -7, 0)", ], [ "(+5 Dexterity Vest, -1, 8)", "(Aged Brie, -9, 20)", "(Elixir of the Mongoose, -6, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 4, 38)", "(Backstage passes to a TAFKAL80ETC concert, -1, 0)", "(Backstage passes to a TAFKAL80ETC concert, -6, 0)", "(Conjured Mana Cake, -8, 0)", ], [ "(+5 Dexterity Vest, -2, 6)", "(Aged Brie, -10, 22)", "(Elixir of the Mongoose, -7, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 3, 41)", "(Backstage passes to a TAFKAL80ETC concert, -2, 0)", "(Backstage passes to a TAFKAL80ETC concert, -7, 0)", "(Conjured Mana Cake, -9, 0)", ], [ "(+5 Dexterity Vest, -3, 4)", "(Aged Brie, -11, 24)", "(Elixir of the Mongoose, -8, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 2, 44)", "(Backstage passes to a TAFKAL80ETC concert, -3, 0)", "(Backstage passes to a TAFKAL80ETC concert, -8, 0)", "(Conjured Mana Cake, -10, 0)", ], [ "(+5 Dexterity Vest, -4, 2)", "(Aged Brie, -12, 26)", "(Elixir of the Mongoose, -9, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 1, 47)", "(Backstage passes to a TAFKAL80ETC concert, -4, 0)", "(Backstage passes to a TAFKAL80ETC concert, -9, 0)", "(Conjured Mana Cake, -11, 0)", ], [ "(+5 Dexterity Vest, -5, 0)", "(Aged Brie, -13, 28)", "(Elixir of the Mongoose, -10, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, 0, 50)", "(Backstage passes to a TAFKAL80ETC concert, -5, 0)", "(Backstage passes to a TAFKAL80ETC concert, -10, 0)", "(Conjured Mana Cake, -12, 0)", ], [ "(+5 Dexterity Vest, -6, 0)", "(Aged Brie, -14, 30)", "(Elixir of the Mongoose, -11, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -1, 0)", "(Backstage passes to a TAFKAL80ETC concert, -6, 0)", "(Backstage passes to a TAFKAL80ETC concert, -11, 0)", "(Conjured Mana Cake, -13, 0)", ], [ "(+5 Dexterity Vest, -7, 0)", "(Aged Brie, -15, 32)", "(Elixir of the Mongoose, -12, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -2, 0)", "(Backstage passes to a TAFKAL80ETC concert, -7, 0)", "(Backstage passes to a TAFKAL80ETC concert, -12, 0)", "(Conjured Mana Cake, -14, 0)", ], [ "(+5 Dexterity Vest, -8, 0)", "(Aged Brie, -16, 34)", "(Elixir of the Mongoose, -13, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -3, 0)", "(Backstage passes to a TAFKAL80ETC concert, -8, 0)", "(Backstage passes to a TAFKAL80ETC concert, -13, 0)", "(Conjured Mana Cake, -15, 0)", ], [ "(+5 Dexterity Vest, -9, 0)", "(Aged Brie, -17, 36)", "(Elixir of the Mongoose, -14, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -4, 0)", "(Backstage passes to a TAFKAL80ETC concert, -9, 0)", "(Backstage passes to a TAFKAL80ETC concert, -14, 0)", "(Conjured Mana Cake, -16, 0)", ], [ "(+5 Dexterity Vest, -10, 0)", "(Aged Brie, -18, 38)", "(Elixir of the Mongoose, -15, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -5, 0)", "(Backstage passes to a TAFKAL80ETC concert, -10, 0)", "(Backstage passes to a TAFKAL80ETC concert, -15, 0)", "(Conjured Mana Cake, -17, 0)", ], [ "(+5 Dexterity Vest, -11, 0)", "(Aged Brie, -19, 40)", "(Elixir of the Mongoose, -16, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -6, 0)", "(Backstage passes to a TAFKAL80ETC concert, -11, 0)", "(Backstage passes to a TAFKAL80ETC concert, -16, 0)", "(Conjured Mana Cake, -18, 0)", ], [ "(+5 Dexterity Vest, -12, 0)", "(Aged Brie, -20, 42)", "(Elixir of the Mongoose, -17, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -7, 0)", "(Backstage passes to a TAFKAL80ETC concert, -12, 0)", "(Backstage passes to a TAFKAL80ETC concert, -17, 0)", "(Conjured Mana Cake, -19, 0)", ], [ "(+5 Dexterity Vest, -13, 0)", "(Aged Brie, -21, 44)", "(Elixir of the Mongoose, -18, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -8, 0)", "(Backstage passes to a TAFKAL80ETC concert, -13, 0)", "(Backstage passes to a TAFKAL80ETC concert, -18, 0)", "(Conjured Mana Cake, -20, 0)", ], [ "(+5 Dexterity Vest, -14, 0)", "(Aged Brie, -22, 46)", "(Elixir of the Mongoose, -19, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -9, 0)", "(Backstage passes to a TAFKAL80ETC concert, -14, 0)", "(Backstage passes to a TAFKAL80ETC concert, -19, 0)", "(Conjured Mana Cake, -21, 0)", ], [ "(+5 Dexterity Vest, -15, 0)", "(Aged Brie, -23, 48)", "(Elixir of the Mongoose, -20, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -10, 0)", "(Backstage passes to a TAFKAL80ETC concert, -15, 0)", "(Backstage passes to a TAFKAL80ETC concert, -20, 0)", "(Conjured Mana Cake, -22, 0)", ], [ "(+5 Dexterity Vest, -16, 0)", "(Aged Brie, -24, 50)", "(Elixir of the Mongoose, -21, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -11, 0)", "(Backstage passes to a TAFKAL80ETC concert, -16, 0)", "(Backstage passes to a TAFKAL80ETC concert, -21, 0)", "(Conjured Mana Cake, -23, 0)", ], [ "(+5 Dexterity Vest, -17, 0)", "(Aged Brie, -25, 50)", "(Elixir of the Mongoose, -22, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -12, 0)", "(Backstage passes to a TAFKAL80ETC concert, -17, 0)", "(Backstage passes to a TAFKAL80ETC concert, -22, 0)", "(Conjured Mana Cake, -24, 0)", ], [ "(+5 Dexterity Vest, -18, 0)", "(Aged Brie, -26, 50)", "(Elixir of the Mongoose, -23, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -13, 0)", "(Backstage passes to a TAFKAL80ETC concert, -18, 0)", "(Backstage passes to a TAFKAL80ETC concert, -23, 0)", "(Conjured Mana Cake, -25, 0)", ], [ "(+5 Dexterity Vest, -19, 0)", "(Aged Brie, -27, 50)", "(Elixir of the Mongoose, -24, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -14, 0)", "(Backstage passes to a TAFKAL80ETC concert, -19, 0)", "(Backstage passes to a TAFKAL80ETC concert, -24, 0)", "(Conjured Mana Cake, -26, 0)", ], [ "(+5 Dexterity Vest, -20, 0)", "(Aged Brie, -28, 50)", "(Elixir of the Mongoose, -25, 0)", "(Sulfuras, Hand of Ragnaros, 0, 80)", "(Sulfuras, Hand of Ragnaros, -1, 80)", "(Backstage passes to a TAFKAL80ETC concert, -15, 0)", "(Backstage passes to a TAFKAL80ETC concert, -20, 0)", "(Backstage passes to a TAFKAL80ETC concert, -25, 0)", "(Conjured Mana Cake, -27, 0)", ], ] assert results == expected_results
Molecular content of nascent soot: Family characterization using two-step laser desorption laser ionization mass spectrometry✩ Molecules constituting nascent soot particles have been analyzed by two-step laser desorption laser ionization mass spectrometry. Three samples have been collected from a slightly sooting ethylene/air premixed flame with the aim to investigate soot composition in the transition from nucleated to just-grown soot particles. Sampling locations have been selected based on the evolution of the particle size distribution along the flame axis. The mass spectrometric results point to a strong evolution of the molecular composition. Just-nucleated soot is rich in polycyclic aromatic hydrocarbons (PAHs) dominated by medium sizes from 18 to 40 carbon atoms but containing sizes as large as 90 carbon atoms. Most abundant PAHs are in the form of peri-condensed structures. The presence of a large fraction of odd numbered carbon species shows that pentagonal cycles are a common feature of the detected population. Increasing the distance from the burner outlet, i.e., the particle residence time in flame, leads to an evolution of the chemical composition of this population with a major contribution of carbon clusters including also fullerenes up to about 160 carbon atoms. Our data support a scenario in which large PAHs containing pentagonal rings evolve very efficiently upon thermal processing by a series of dehydrogenation and isomerization processes to form fullerenes. This chemistry happens in the early steps of soot growth showing that carbonization is already active at this stage. © 2020 The Authors. Published by Elsevier Inc. on behalf of The Combustion Institute. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/) Introduction Soot nucleation and early growth in flames has been subject of intense discussion for a long time. The elusive nature of the soot formation mechanism is due to the complexity of the involved chemical and physical processes; these include high-temperature pyrolysis and gasphase oxidation chemistry, polycyclic aromatic hydrocarbon (PAH) formation, particle nucleation followed by particle growth through coagulation/coalescence and heterogeneous surface reactions. Particle agglomeration, in addition to carbonization/dehydrogenation and oxidation reactions, further contributes to the final shape and structure of the generated particles. As a result, soot particles evolve in flames by changing size, chemical composition and structural order. The term nascent soot refers to the soot particles during the early stages of the formation process, which includes just-nucleated (incipient) to just-grown soot particles. In a laminar premixed flame of an aliphatic hydrocarbon, soot nucleates right after the flame front, resulting in the formation of a unimodal particle size distribution (PSD) with a maximum number density for particles of 2-3 nm. Once formed, incipient soot undergoes size growth via coagulation/coalescence processes and surface chemical reactions with gas-phase molecules. This next step results in the formation of a second, and larger in size, particle mode whose mean diameter increases as a function of residence time. During the growing/aging process in flame, soot is known to carbonize, thus resulting in a lowering of H/C ratio down to the very low value of 0.1 typically associated to mature soot. Mass spectrometry techniques (in situ and ex situ) have contributed significantly to our understanding of the chemistry involved in soot formation and growth. Laser desorption/ionization (LDI) techniques, particularly sensitive to PAHs, succeeded to give a comprehensive view of the soot molecular composition during the transition from gaseous phase to solid particles. In order to follow the evolution of the molecular constituents of the particles during the early stages of particle transformation, we have performed two-step laser desorption laser ionization mass spectrometry (L2MS) of the nascent soot particles collected from a slightly sooting ethylene/air laminar premixed flame. The study is aimed at shedding light on the molecular content and its variation with evolving chemical and physical conditions. Flame and soot sampling Soot particles were sampled from an ethylene/air laminar premixed flame stabilized on a McKenna burner. The cold gas velocity was set to 9.8 cm/s (STP) and the carbon to oxygen (C/O) ratio was 0.67. The particle sampling system for on-line and off-line soot analysis has been described in earlier works. Briefly, soot was sampled from the flame through an orifice (diameter 0.2 mm, thickness 0.5 mm) in a tubular dilution probe (outer diameter 1 cm), positioned horizontally in the flame. The sampled mixture was immediately diluted with N 2 to quench chemical reactions and minimize particle aggregation. For the off-line analysis, a stainless-steel aerosol filter holder containing a 25 mm pure silver membrane filter (Millipore-AG4502550) was positioned on-line downstream of the dilution tubular probe for soot nanoparticles collection. Mass spectrometry analysis AROMA (Aromatic Research of Organics with Molecular Analyzer) is an experimental setup that combines laser desorption ionization techniques (LDI) to a segmented linear quadrupole ion trap connected to an orthogonal time of flight mass spectrometer (LQIT-oTOF). A sketch of the AROMA system (Fig. S1) as well as detailed experimental conditions and performances are reported in the supplementary materials. Mass spectrometry data and chemical analysis tools for all the studied samples are made publicly available in the AROMA database: http://aroma.irap.omp. AROMA was successfully used to characterize, with high sensitivity (down to attomole), PAHs molecular distribution in the Murchison meteorite. Recently, we have shown the ability of AROMA to track the chemical evolution of carbonaceous molecules involved in the formation of cosmic dust analogues produced from a carbon vapor (C, C 2 ) and in the presence of H 2 or C 2 H 2. For this work, particles collected on the filter have been analyzed using the well-established and optimized two-step laser mass spectrometry (L2MS) scheme. In this scheme, desorption and ionization are clearly separated and optimized in time and space and performed with two different pulsed (5 ns of pulse duration) lasers. During the desorption step, an infrared laser (Nd:YAG at 1064 nm) is focused on the sample with a spot size of 300 m producing a fluence of desorption E d 150 mJ/cm 2. As discussed in the supplementary materials, these conditions ensure thermal desorption avoiding ablation and chemistry in the plume. This implies that the detected molecules come from the surface of the particles with contribution from their volume if these particles consist of loosely bound components. Ionization is performed by intercepting perpendicularly the expanding plume of the desorbed molecules using an ultraviolet laser (fourth harmonic of an Nd:YAG at 266 nm). This scheme presents a high selectivity and sensitivity for species that can undergo (1+1) resonance-enhanced multiphoton ionization (REMPI) such as PAHs and fullerenes. The used laser ionization fluence is E i =16 mJ/cm 2. Results and discussion The evolution of the particle size distributions in number concentrations for the flame herein investigated, measured along the flame at different burner-to-probe separation distances (Z), has been reported in Ref. (Fig. 1). In the present work three different conditions, i.e., different Z, have been selected for soot sampling and characterization via L2MS-TOF, namely 8, 10 and 14 mm, whose corresponding size distributions in volume are reported in Fig. S2 in the supplementary materials. The PSD in volume develops from a single mode with the most abundant particles having a size of 3.5 nm at Z 8 mm, to a bimodal size distribution where in addition to such incipient particle mode a larger mode made of justgrown soot particles with mobility diameter in the range of 5-15 nm is present at Z 10 mm, and finally to a condition in which most of the mass is in the second mode with a maximum corresponding to particles with mobility diameter of approximatively 20 nm at Z 14 mm. It is worth noticing that for this last condition, the PSD is bimodal if plotted in number, with a first particle mode centered at approximatively 2.4 nm (roughly as the ones measured at 8 and 10 mm). However, this mode is not observable in Fig. S2 because of the very low mass of such particles. The mass spectra of the three soot samples are reported in Fig. 1 for the 100-2000 m/z range. Three different inset zoom graphs are also sketched with different mass ranges. Molecular mass for the incipient soot particles (Z 8 mm) spans over all the studied range, with the most intense peaks falling in the 200-700 m/z range with a mean weighted mass of m/z 447. Several early studies have led to the observations that nascent soot particles are mainly composed by PAHs of moderate size (about the size of ovalene), a result which is also consistent with other previous mass spectrometric investigations in similar flame conditions. Although, the measurements herein presented are in good agreement with these previous observations, they indicate slightly larger value of the mean molecular mass distribution of the aromatic constituents (C 36 on average); a result however in closer agreement with the recent LD-MS investigation of soot reported by Jacobson et al.. The PAH distribution obtained in our study spans a large size range with detected species up to about 90 carbon atoms. In addition, peaks corresponding to PAHs having an odd number of carbon atoms from C 9 to C 91 are measured, some with a strong intensity (e.g., C 19 H 11, C 21 H 11, C 23 H 11 ). The mass spectrum for soot collected at Z 14 mm exhibits significant differences. The PAH distribution is shifted to lower mass with a mean at m/z 300 compared to m/z 447 at Z 8 mm. In addition, a series of peaks attributed to pure carbon species (C x ) clearly appears. In the low mass range they are found for each carbon atom numbers, e.g., C 9, C 10, C 11 up to C 21. This is followed by a jump to C 30 from which a series starts separated by 2C up to C 160. The most intense peaks are found for C 60 (m/z 720), C 50, C 52 and C 70, which suggests that they correspond to fullerenes. C clusters have been reported by Dobbins et al. for high heights above the burner, using LDI in single step with a 266 nm-laser and an irradiance of 1-20 MW/cm 2. Homann, has detected fullerenes in premixed low-pressure flames by on line analysis. The author reported that the formation of fullerenes relative to soot can be so low that these species can only be detected with the most sensitive analytical techniques. Our L2MS technique uses a REMPI scheme, which provides very high sensitivity and was also the one used in Homann's experiments. Our detection is not surprising from this point of view. In addition, we report an evolution with increasing Z both in chemical complexity and in molecular families. The data at position Z 10 mm show an intermediate case in which carbon clusters start to be representative in the mass spectrum. We note that Jacobson et al. could not observe these species, possibly pointing to different sampled flame conditions. It is worth to note, that the overall intensity of the mass spectra lowers as Z increases. This factor is respectively 1.8 and 3.5 for Z 10 and 14 mm compared to Z 8 mm. This likely reflects a change in the molecular components of the particles, which results in a lower production of molecules upon laser desorption as also noticed in our previous study. In addition, a number of 684, 591 and 463 species have been identified for Z 8, 10 and 14 mm Europe PMC Funders Author Manuscripts Europe PMC Funders Author Manuscripts respectively, which shows that the molecular diversity is changing as well. We will discuss in the following that the probed molecules have been subject to processing which favors the most stable species such as fullerenes. Some chemical species with one or two oxygen atoms have been observed for samples at Z 8 and Z 10 mm. In each sample about 20 peaks of molecules containing oxygen are identified with an average m/z precision <0.01 (see Table S4). The total ion signal from oxygenated compounds represents 1% from the total ion signal at Z 8 and 3% at Z 10 mm. This low level is consistent with LDI-MS measurements of soot extracted from a diffusion flame. One has to be careful though not to translate this number into an abundance ratio due to the bias of our technique. We note though that evidences of few atomic oxygen percentages in nascent soot were observed by photoemission experiments. In order to obtain a more in-depth evaluation of the aromaticity of the molecular constituents of the nascent soot particles we performed the double bond equivalent (DBE) analysis of the species on the bases of the measured mass spectra. The DBE value is defined by DBE C# -H#/2 N#/2 1 with C#, H# and N#, the numbers of C, H and N atoms inside the molecules. It is representative of the unsaturation level of the molecules and thus corresponds to a direct measure of their aromaticity. More details about DBE are provided in the supplementary materials. Colored map plots presenting the calculated DBE/C# values as a function of C# are reported in Fig. 2 for the three samples. The color scale is the relative intensity (normalized to the highest peak in the spectrum) of each species in the mass spectrum. At Z 8 mm, the DBE/C# values are mainly distributed below the planar aromatic limit line (green line), based on the classification of petroleum components. For a given number of C atoms, a quite narrow distribution of H atoms is measured with a relevant fraction of aromatic molecules having a molecular structure with a number of H-atoms larger than that corresponding to the most peri-condensed structure (magenta line). Still all species stay close to this line, which shows that their structures are compact and do not contain much aliphatic bonds. This statement is strictly valid for PAHs containing 6-membered rings only. Indeed, the introduction of 5-membered rings increases the unsaturation. For instance, the formula C 24 H 12 can correspond to the most peri-condensed structure coronene, but also to a less compact structure with 2 pentagonal rings as imaged by Commodo et al.. Our results differ from those of earlier studies that concluded about the importance of aliphatic components in the PAH population but is consistent with the more recent study of Jacobson et al.. The DBE/C# values, corresponding to the chemical composition of just-grown soot particles at Z 14 mm, mainly stand above the planar aromatic limit showing an increase of the degree of unsaturation and even the formation of structures with very low hydrogen content. Another important change in the molecular composition between Z 14 and Z 8 mm concerns the highest mass range. From C# 50 and above, 326, 185 and 59 species are detected at Z 8, 10 and 14 mm, respectively. These large species are exclusively fullerenes at Z 14 mm, but none of them are fullerenes at Z 8 mm. The DBE method allows us to segregate the derived molecular formulas into families. We consider the value of DBE/C# 0.9 as the limit of planar aromatics as defined in Ref.. DBE/C# values below 0.9 correspond to aromatic species with less condensed structures, including potential cross-linked aromatics, and/or the presence of aliphatic CH bonds. DBE/C# values above 0.9 and below 1 correspond to less hydrogenated species that we call HC clusters. In addition, we consider a family of C clusters for C#<30 and fullerenes for C# 30 (Table 1). Our results show that molecular constituents associated with soot particles change in the passage from the first particle mode at 3.5 nm to the second mode at 9 nm (see Fig. S2). The analysis in molecular families suggests a transition in the population from PAHs to HC clusters and even to fullerenes along the flame (Fig. 3). Indeed, when just-grown soot particles are formed, i.e., Z 14 mm, the few large molecules (C# 50) detached from the particles are found in fullerenes indicating that soot transformation is accompanied by a strong dehydrogenation process of large carbonaceous molecules. To further explore the molecular family change across the particle growing process we have analyzed in more details the DBE/C# vs C# at Z 8 mm and 14 mm as reported in Fig. S3. At Z 8 mm, the dominant PAH species contain C# 20-24 (see Fig. 2) and a typical number of hydrogens of 10 or 12, which points to a dominant population of compact structures and structures with a few pentagonal rings as discussed above for C 24 H 12. As C# increases in the PAH species, the number of hydrogens only slightly increases reaching a maximum of 20 for species larger than 40 carbons. This leads to a growth scheme by a global C 2 /C 2 H addition, which can be obtained by C 2 H 2 /C 2 H addition and hydrogen removal as postulated in the HACA mechanism. The formation of species with an odd number of C atoms is expected to arise from reactivity with oxygen and also addition of C/CH as suggested in. These processes can form pentagonal cycles at the periphery of PAHs. An analysis of the odd-numbered species was performed amongst the population of planar aromatics (DBE/C# 0.9). At Z 8 mm, the odd C number species represent 49% of the peak numbers of which 67% are odd H containing species. The latter number is significantly larger than the total of 48% for these species in the sample. This is consistent with odd C containing PAH species with odd H number corresponding to radicals. The delocalization of the charge in these ions further contributes to their stability. These odd-numbered structures can include both species with pentagonal ring(s) and some made solely of six-membered rings. At Z 14 mm, the odd hydrogen-containing species sum up to 48% of all the intensity but up to 70% when only odd C containing species (44% of the population) are considered. These numbers appear to be consistent with the value at Z 8 mm suggesting that radicals constitute a significant fraction of the molecular population. Concerning the even C number species, mildly dehydrogenated species are observed at Z 8 mm. For instance, the intensity of C 24 H 10 is significant (0.45 that of C 24 H 12 ) The presence of less hydrogenated species is confirmed also for large PAHs (see Fig. S3). For instance, for C# 42, the most compact peri-condensed structure would correspond to circumpyrene Pure PAHs are expected to exhibit only minor fragmentation during the analysis with AROMA. We therefore consider that these species which contain less hydrogens are intrinsic to the sample and not formed in our analysis. The addition of C 2 can form pentagonal cycles mainly leading to acenaphthylene-type compounds, which can also be found in dehydrogenated form (1,2-dehydro-acenaphthylene; C 12 H 6 ). In the Z 8 mm sample the ratio C 12 H 6 /C 12 H 8 is equal to 2.3. This might be an explanation for the large intensity of species with mild dehydrogenation (typically 2H below the H number of the most compact peri-condensed structures). The presence of pentagonal rings inside the carbon structure is also expected. C 20 H 10, which would correspond to the bowl-shaped coran-nulene molecule, has a similar peak intensity as C 20 H 12, which would correspond to the full six-membered rings. Therefore, the observed population with low hydrogen content likely reveals the formation of species containing an increasing number of pentagonal cycles. Structures containing several pentagonal cycles are predicted to be the most abundant structures at high temperatures in thermodynamic equilibrium (e.g. C 30 H 10 with 6 pentagonal rings and 5 hexagonal rings as predicted by ). These pentagonal structures induce some strain that can be release by closing the structure towards fullerenes. The formation of fullerenes in flames was earlier modeled with a gas-phase chemical network taking into account competition between growth and destruction reactions. These involved the formation of pentagonal cycles by chemical reactivity as well as by thermal isomerization at the flame temperatures. Homann suggested that the chemistry can proceed via the formation of aromers. Interestingly, our molecular analysis from just nucleated to the just-grown soot, allows us to isolate two regimes. One in which there is a rich chemistry of PAHs leading to the formation of large PAHs containing pentagonal cycles. Another one in which "carbonization" with a significant hydrogen loss seems to govern the chemical evolution of the large carbonaceous molecules. It is interesting to note that for C#≥50, fullerenes are observed at Z = 14 mm but neither PAHs nor HC clusters.For C#<50, a much larger diversity of species are present with HC clusters spanning all possible H numbers. The transition from PAHs to fullerenes is an interesting topic in astrochemistry that leads to experimental and modeling work. Bern et al. have evaluated in their photochemical model, the possibility to convert C 66 H 20 (i.e. circumovalene) into C 60 fullerene upon irradiation by ultraviolet photons. In this scenario, the formation of pentagonal cycles is expected after that PAH has lost all its hydrogen atoms and the carbon cluster rearranges to fold into a fullerene structure, while loosing C 2 until it reaches the most stable fullerene structure of C 60. Although the authors concluded about the viability of such a scenario in astrophysical environments, it relies on reaction rates which are poorly constrained especially the ones concerning the folding process for which there is no experimental data. From this study we can however keep the idea of a precursor "PAH-like" population evolving towards fullerenes by energetic processing. In the oxidative environment of flames, the formation of pentagonal cycles during the chemistry of formation of PAHs can favor the formation of fullerene precursors. Further dehydrogenation and isomerization processes associated to carbonization would then be the key step controlling the transition towards fullerenes. It is striking that a simple calculation using Fig. 3 suggests that this process is very efficient. From Z 8 mm to Z 10 mm, 1.2 10 5 (arbitrary units) large PAHs have been converted into up to 7 10 3 HC clusters and 1. 6 10 4 fullerenes. An additional stock of 8.3 10 4 is available from Z 10 mm to Z 14 mm which would lead proportionally to up to 5 10 3 HC clusters and 1.1 10 4 fullerenes. Assuming a similar detection efficiency for both large HC clusters and fullerenes, we conclude that all these produced HC clusters have been converted into fullerenes. The exact fraction of large PAHs that were converted into fullerenes is difficult to assign because of the unknown relative detection efficiency between both populations. Even without considering the detailed numbers, our work suggests that large PAHs are converted into large HC clusters which efficiently produce fullerenes. Conclusions The molecular constituents of soot have been analyzed using two-step laser desorption laser ionization mass spectrometry in the transition zone from incipient to just-grown soot particles. Fullerenes only appear in the last stage, which implies that they are not involved in soot nucleation. From the analysis of the obtained mass spectra, we came to the following conclusions: Molecular constituents of incipient/just-nucleated soot (particles at Z 8 mm) are mostly planar aromatics, not only peri-condensed but also in the form of less compact structures (more H atoms with respect to the most peri-condensed PAHs) and of structures containing pentagonal cycles (same number of H atoms or less with respect to the most peri-condensed PAHs). A large number of radicals are also detected among these aromatic molecules mainly in the form of odd C# with odd H# corresponding to radicals.; Just-grown soot particles (Z 14 mm) contain a population of H-poorer molecules (less than 49 C#), with a similar fraction of the population in radicals than for incipient soot. From sizes 50 C# and above, only fullerenes are observed; The evolution of the molecular families within the nascent soot particle zone suggests an efficient conversion of the large PAH population into fullerenes involving intermediate large HC clusters with very fast evolution. This is consistent with a carbonization scheme in which thermal processing induces a series of dehydrogenation and isomerization processes to form the fullerenes. Supplementary Material Refer to Web version on PubMed Central for supplementary material. Evolution of the family composition as a function of Z derived from a DBE analysis of the mass spectra in Fig. 1. Sum of relative peak intensities and mean mass (m/z) weighted by peak intensities in parenthesis.
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software * Foundation. See file COPYING. * */ #ifndef CEPH_OSD_KSTORE_H #define CEPH_OSD_KSTORE_H #include "acconfig.h" #include <unistd.h> #include <atomic> #include <mutex> #include <condition_variable> #include "include/ceph_assert.h" #include "include/unordered_map.h" #include "common/Finisher.h" #include "common/Throttle.h" #include "common/WorkQueue.h" #include "os/ObjectStore.h" #include "common/perf_counters.h" #include "os/fs/FS.h" #include "kv/KeyValueDB.h" #include "kstore_types.h" #include "boost/intrusive/list.hpp" enum { l_kstore_first = 832430, l_kstore_state_prepare_lat, l_kstore_state_kv_queued_lat, l_kstore_state_kv_done_lat, l_kstore_state_finishing_lat, l_kstore_state_done_lat, l_kstore_last }; class KStore : public ObjectStore { // ----------------------------------------------------- // types public: struct TransContext; /// an in-memory object struct Onode { CephContext* cct; std::atomic_int nref; ///< reference count ghobject_t oid; std::string key; ///< key under PREFIX_OBJ where we are stored boost::intrusive::list_member_hook<> lru_item; kstore_onode_t onode; ///< metadata stored as value in kv store bool dirty; // ??? bool exists; std::mutex flush_lock; ///< protect flush_txns std::condition_variable flush_cond; ///< wait here for unapplied txns std::set<TransContext*> flush_txns; ///< committing txns uint64_t tail_offset; ceph::buffer::list tail_bl; std::map<uint64_t,ceph::buffer::list> pending_stripes; ///< unwritten stripes Onode(CephContext* cct, const ghobject_t& o, const std::string& k) : cct(cct), nref(0), oid(o), key(k), dirty(false), exists(false), tail_offset(0) { } void flush(); void get() { ++nref; } void put() { if (--nref == 0) delete this; } void clear_tail() { tail_offset = 0; tail_bl.clear(); } void clear_pending_stripes() { pending_stripes.clear(); } }; typedef boost::intrusive_ptr<Onode> OnodeRef; struct OnodeHashLRU { CephContext* cct; typedef boost::intrusive::list< Onode, boost::intrusive::member_hook< Onode, boost::intrusive::list_member_hook<>, &Onode::lru_item> > lru_list_t; std::mutex lock; ceph::unordered_map<ghobject_t,OnodeRef> onode_map; ///< forward lookups lru_list_t lru; ///< lru OnodeHashLRU(CephContext* cct) : cct(cct) {} void add(const ghobject_t& oid, OnodeRef o); void _touch(OnodeRef o); OnodeRef lookup(const ghobject_t& o); void rename(const ghobject_t& old_oid, const ghobject_t& new_oid); void clear(); bool get_next(const ghobject_t& after, std::pair<ghobject_t,OnodeRef> *next); int trim(int max=-1); }; class OpSequencer; typedef boost::intrusive_ptr<OpSequencer> OpSequencerRef; struct Collection : public CollectionImpl { KStore *store; kstore_cnode_t cnode; ceph::shared_mutex lock = ceph::make_shared_mutex("KStore::Collection::lock", true, false); OpSequencerRef osr; // cache onodes on a per-collection basis to avoid lock // contention. OnodeHashLRU onode_map; OnodeRef get_onode(const ghobject_t& oid, bool create); bool contains(const ghobject_t& oid) { if (cid.is_meta()) return oid.hobj.pool == -1; spg_t spgid; if (cid.is_pg(&spgid)) return spgid.pgid.contains(cnode.bits, oid) && oid.shard_id == spgid.shard; return false; } void flush() override; bool flush_commit(Context *c) override; private: FRIEND_MAKE_REF(Collection); Collection(KStore *ns, coll_t c); }; using CollectionRef = ceph::ref_t<Collection>; class OmapIteratorImpl : public ObjectMap::ObjectMapIteratorImpl { CollectionRef c; OnodeRef o; KeyValueDB::Iterator it; std::string head, tail; public: OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it); int seek_to_first() override; int upper_bound(const std::string &after) override; int lower_bound(const std::string &to) override; bool valid() override; int next() override; std::string key() override; ceph::buffer::list value() override; int status() override { return 0; } }; struct TransContext { typedef enum { STATE_PREPARE, STATE_AIO_WAIT, STATE_IO_DONE, STATE_KV_QUEUED, STATE_KV_COMMITTING, STATE_KV_DONE, STATE_FINISHING, STATE_DONE, } state_t; state_t state; const char *get_state_name() { switch (state) { case STATE_PREPARE: return "prepare"; case STATE_AIO_WAIT: return "aio_wait"; case STATE_IO_DONE: return "io_done"; case STATE_KV_QUEUED: return "kv_queued"; case STATE_KV_COMMITTING: return "kv_committing"; case STATE_KV_DONE: return "kv_done"; case STATE_FINISHING: return "finishing"; case STATE_DONE: return "done"; } return "???"; } void log_state_latency(PerfCounters *logger, int state) { utime_t lat, now = ceph_clock_now(); lat = now - start; logger->tinc(state, lat); start = now; } CollectionRef ch; OpSequencerRef osr; boost::intrusive::list_member_hook<> sequencer_item; uint64_t ops, bytes; std::set<OnodeRef> onodes; ///< these onodes need to be updated/written KeyValueDB::Transaction t; ///< then we will commit this Context *oncommit; ///< signal on commit Context *onreadable; ///< signal on readable Context *onreadable_sync; ///< signal on readable std::list<Context*> oncommits; ///< more commit completions std::list<CollectionRef> removed_collections; ///< colls we removed CollectionRef first_collection; ///< first referenced collection utime_t start; explicit TransContext(OpSequencer *o) : state(STATE_PREPARE), osr(o), ops(0), bytes(0), oncommit(NULL), onreadable(NULL), onreadable_sync(NULL), start(ceph_clock_now()){ //cout << "txc new " << this << std::endl; } ~TransContext() { //cout << "txc del " << this << std::endl; } void write_onode(OnodeRef &o) { onodes.insert(o); } }; class OpSequencer : public RefCountedObject { public: std::mutex qlock; std::condition_variable qcond; typedef boost::intrusive::list< TransContext, boost::intrusive::member_hook< TransContext, boost::intrusive::list_member_hook<>, &TransContext::sequencer_item> > q_list_t; q_list_t q; ///< transactions ~OpSequencer() { ceph_assert(q.empty()); } void queue_new(TransContext *txc) { std::lock_guard<std::mutex> l(qlock); q.push_back(*txc); } void flush() { std::unique_lock<std::mutex> l(qlock); while (!q.empty()) qcond.wait(l); } bool flush_commit(Context *c) { std::lock_guard<std::mutex> l(qlock); if (q.empty()) { return true; } TransContext *txc = &q.back(); if (txc->state >= TransContext::STATE_KV_DONE) { return true; } ceph_assert(txc->state < TransContext::STATE_KV_DONE); txc->oncommits.push_back(c); return false; } }; struct KVSyncThread : public Thread { KStore *store; explicit KVSyncThread(KStore *s) : store(s) {} void *entry() override { store->_kv_sync_thread(); return NULL; } }; // -------------------------------------------------------- // members private: KeyValueDB *db; uuid_d fsid; std::string basedir; int path_fd; ///< open handle to $path int fsid_fd; ///< open handle (locked) to $path/fsid bool mounted; /// rwlock to protect coll_map ceph::shared_mutex coll_lock = ceph::make_shared_mutex("KStore::coll_lock"); ceph::unordered_map<coll_t, CollectionRef> coll_map; std::map<coll_t,CollectionRef> new_coll_map; std::mutex nid_lock; uint64_t nid_last; uint64_t nid_max; Throttle throttle_ops, throttle_bytes; ///< submit to commit Finisher finisher; KVSyncThread kv_sync_thread; std::mutex kv_lock; std::condition_variable kv_cond, kv_sync_cond; bool kv_stop; std::deque<TransContext*> kv_queue, kv_committing; //Logger *logger; PerfCounters *logger; std::mutex reap_lock; std::list<CollectionRef> removed_collections; // -------------------------------------------------------- // private methods void _init_logger(); void _shutdown_logger(); int _open_path(); void _close_path(); int _open_fsid(bool create); int _lock_fsid(); int _read_fsid(uuid_d *f); int _write_fsid(); void _close_fsid(); int _open_db(bool create); void _close_db(); int _open_collections(int *errors=0); void _close_collections(); int _open_super_meta(); CollectionRef _get_collection(coll_t cid); void _queue_reap_collection(CollectionRef& c); void _reap_collections(); void _assign_nid(TransContext *txc, OnodeRef o); void _dump_onode(OnodeRef o); TransContext *_txc_create(OpSequencer *osr); void _txc_release(TransContext *txc, uint64_t offset, uint64_t length); void _txc_add_transaction(TransContext *txc, Transaction *t); void _txc_finalize(OpSequencer *osr, TransContext *txc); void _txc_state_proc(TransContext *txc); void _txc_finish_kv(TransContext *txc); void _txc_finish(TransContext *txc); void _osr_reap_done(OpSequencer *osr); void _kv_sync_thread(); void _kv_stop() { { std::lock_guard<std::mutex> l(kv_lock); kv_stop = true; kv_cond.notify_all(); } kv_sync_thread.join(); kv_stop = false; } void _do_read_stripe(OnodeRef o, uint64_t offset, ceph::buffer::list *pbl, bool do_cache); void _do_write_stripe(TransContext *txc, OnodeRef o, uint64_t offset, ceph::buffer::list& bl); void _do_remove_stripe(TransContext *txc, OnodeRef o, uint64_t offset); int _collection_list( Collection *c, const ghobject_t& start, const ghobject_t& end, int max, std::vector<ghobject_t> *ls, ghobject_t *next); public: KStore(CephContext *cct, const std::string& path); ~KStore() override; std::string get_type() override { return "kstore"; } bool needs_journal() override { return false; }; bool wants_journal() override { return false; }; bool allows_journal() override { return false; }; static int get_block_device_fsid(const std::string& path, uuid_d *fsid); bool test_mount_in_use() override; int mount() override; int umount() override; void _sync(); int fsck(bool deep) override; int validate_hobject_key(const hobject_t &obj) const override { return 0; } unsigned get_max_attr_name_length() override { return 256; // arbitrary; there is no real limit internally } int mkfs() override; int mkjournal() override { return 0; } void dump_perf_counters(ceph::Formatter *f) override { f->open_object_section("perf_counters"); logger->dump_formatted(f, false, false); f->close_section(); } void get_db_statistics(ceph::Formatter *f) override { db->get_statistics(f); } int statfs(struct store_statfs_t *buf, osd_alert_list_t* alerts = nullptr) override; int pool_statfs(uint64_t pool_id, struct store_statfs_t *buf, bool *per_pool_omap) override; CollectionHandle open_collection(const coll_t& c) override; CollectionHandle create_new_collection(const coll_t& c) override; void set_collection_commit_queue(const coll_t& cid, ContextQueue *commit_queue) override { } using ObjectStore::exists; bool exists(CollectionHandle& c, const ghobject_t& oid) override; using ObjectStore::stat; int stat( CollectionHandle& c, const ghobject_t& oid, struct stat *st, bool allow_eio = false) override; // struct stat? int set_collection_opts( CollectionHandle& c, const pool_opts_t& opts) override; using ObjectStore::read; int read( CollectionHandle& c, const ghobject_t& oid, uint64_t offset, size_t len, ceph::buffer::list& bl, uint32_t op_flags = 0) override; int _do_read( OnodeRef o, uint64_t offset, size_t len, ceph::buffer::list& bl, bool do_cache, uint32_t op_flags = 0); using ObjectStore::fiemap; int fiemap(CollectionHandle& c, const ghobject_t& oid, uint64_t offset, size_t len, std::map<uint64_t, uint64_t>& destmap) override; int fiemap(CollectionHandle& c, const ghobject_t& oid, uint64_t offset, size_t len, ceph::buffer::list& outbl) override; using ObjectStore::getattr; int getattr(CollectionHandle& c, const ghobject_t& oid, const char *name, ceph::buffer::ptr& value) override; using ObjectStore::getattrs; int getattrs(CollectionHandle& c, const ghobject_t& oid, std::map<std::string,ceph::buffer::ptr,std::less<>>& aset) override; int list_collections(std::vector<coll_t>& ls) override; bool collection_exists(const coll_t& c) override; int collection_empty(CollectionHandle& c, bool *empty) override; int collection_bits(CollectionHandle& c) override; int collection_list( CollectionHandle &c, const ghobject_t& start, const ghobject_t& end, int max, std::vector<ghobject_t> *ls, ghobject_t *next) override; using ObjectStore::omap_get; int omap_get( CollectionHandle& c, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap ceph::buffer::list *header, ///< [out] omap header std::map<std::string, ceph::buffer::list> *out /// < [out] Key to value std::map ) override; using ObjectStore::omap_get_header; /// Get omap header int omap_get_header( CollectionHandle& c, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap ceph::buffer::list *header, ///< [out] omap header bool allow_eio = false ///< [in] don't assert on eio ) override; using ObjectStore::omap_get_keys; /// Get keys defined on oid int omap_get_keys( CollectionHandle& c, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap std::set<std::string> *keys ///< [out] Keys defined on oid ) override; using ObjectStore::omap_get_values; /// Get key values int omap_get_values( CollectionHandle& c, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap const std::set<std::string> &keys, ///< [in] Keys to get std::map<std::string, ceph::buffer::list> *out ///< [out] Returned keys and values ) override; using ObjectStore::omap_check_keys; /// Filters keys into out which are defined on oid int omap_check_keys( CollectionHandle& c, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap const std::set<std::string> &keys, ///< [in] Keys to check std::set<std::string> *out ///< [out] Subset of keys defined on oid ) override; using ObjectStore::get_omap_iterator; ObjectMap::ObjectMapIterator get_omap_iterator( CollectionHandle& c, ///< [in] collection const ghobject_t &oid ///< [in] object ) override; void set_fsid(uuid_d u) override { fsid = u; } uuid_d get_fsid() override { return fsid; } uint64_t estimate_objects_overhead(uint64_t num_objects) override { return num_objects * 300; //assuming per-object overhead is 300 bytes } objectstore_perf_stat_t get_cur_stats() override { return objectstore_perf_stat_t(); } const PerfCounters* get_perf_counters() const override { return logger; } int queue_transactions( CollectionHandle& ch, std::vector<Transaction>& tls, TrackedOpRef op = TrackedOpRef(), ThreadPool::TPHandle *handle = NULL) override; void compact () override { ceph_assert(db); db->compact(); } private: // -------------------------------------------------------- // write ops int _write(TransContext *txc, CollectionRef& c, OnodeRef& o, uint64_t offset, size_t len, ceph::buffer::list& bl, uint32_t fadvise_flags); int _do_write(TransContext *txc, OnodeRef o, uint64_t offset, uint64_t length, ceph::buffer::list& bl, uint32_t fadvise_flags); int _touch(TransContext *txc, CollectionRef& c, OnodeRef& o); int _zero(TransContext *txc, CollectionRef& c, OnodeRef& o, uint64_t offset, size_t len); int _do_truncate(TransContext *txc, OnodeRef o, uint64_t offset); int _truncate(TransContext *txc, CollectionRef& c, OnodeRef& o, uint64_t offset); int _remove(TransContext *txc, CollectionRef& c, OnodeRef& o); int _do_remove(TransContext *txc, OnodeRef o); int _setattr(TransContext *txc, CollectionRef& c, OnodeRef& o, const std::string& name, ceph::buffer::ptr& val); int _setattrs(TransContext *txc, CollectionRef& c, OnodeRef& o, const std::map<std::string,ceph::buffer::ptr>& aset); int _rmattr(TransContext *txc, CollectionRef& c, OnodeRef& o, const std::string& name); int _rmattrs(TransContext *txc, CollectionRef& c, OnodeRef& o); void _do_omap_clear(TransContext *txc, uint64_t id); int _omap_clear(TransContext *txc, CollectionRef& c, OnodeRef& o); int _omap_setkeys(TransContext *txc, CollectionRef& c, OnodeRef& o, ceph::buffer::list& bl); int _omap_setheader(TransContext *txc, CollectionRef& c, OnodeRef& o, ceph::buffer::list& header); int _omap_rmkeys(TransContext *txc, CollectionRef& c, OnodeRef& o, const ceph::buffer::list& bl); int _omap_rmkey_range(TransContext *txc, CollectionRef& c, OnodeRef& o, const std::string& first, const std::string& last); int _setallochint(TransContext *txc, CollectionRef& c, OnodeRef& o, uint64_t expected_object_size, uint64_t expected_write_size, uint32_t flags); int _clone(TransContext *txc, CollectionRef& c, OnodeRef& oldo, OnodeRef& newo); int _clone_range(TransContext *txc, CollectionRef& c, OnodeRef& oldo, OnodeRef& newo, uint64_t srcoff, uint64_t length, uint64_t dstoff); int _rename(TransContext *txc, CollectionRef& c, OnodeRef& oldo, OnodeRef& newo, const ghobject_t& new_oid); int _create_collection(TransContext *txc, coll_t cid, unsigned bits, CollectionRef *c); int _remove_collection(TransContext *txc, coll_t cid, CollectionRef *c); int _split_collection(TransContext *txc, CollectionRef& c, CollectionRef& d, unsigned bits, int rem); int _merge_collection(TransContext *txc, CollectionRef *c, CollectionRef& d, unsigned bits); }; static inline void intrusive_ptr_add_ref(KStore::Onode *o) { o->get(); } static inline void intrusive_ptr_release(KStore::Onode *o) { o->put(); } static inline void intrusive_ptr_add_ref(KStore::OpSequencer *o) { o->get(); } static inline void intrusive_ptr_release(KStore::OpSequencer *o) { o->put(); } #endif
Adopted Pedagogies: Nahua Incorporation of European Music and Theater in Colonial Mexico City In 1519 Spanish conquistadors arrived on the shores of Mesoamerica under the leadership of Hernando Corts. Following the defeat of Mexico-Tenochtidan, the Aztec capital, Corts requested that members of the Franciscan order be sent from Spain to lead the conversion effort. In 1523 the first three Franciscans arrived, among them fray Pedro de Gante. One year later another 12 Franciscans made the journey. They established themselves in the southeastern portion of Mexico-Tenochtitlan, and under their direction Nahua laborers built the principal Franciscan religious compound, San Francisco, and the first indigenous chapel in New Spain, San Josef de los Naturales. Together this friary and chapel served as the main point of interaction for Franciscan conversion efforts within the altepetl, ethnic state, of Mexico-Tenochtidan. In the courtyard of San Francisco, next to the indigenous chapel, fray Pedro established an indigenous school aimed at the indoctrination of the Nahua peoples of Mexico-Tenochtitlan and other outlying altepetl. Although its students were primarily members of indigenous nobility, other promising Nahuas received an education there as well.
<filename>Registers.h<gh_stars>0 // // Created by 1912m on 16/06/2021. // #ifndef HW5_REGISTERS_H #define HW5_REGISTERS_H #include <string> using std::string; class Registers { public: unsigned int current; Registers(); string GetNewRegister(); }; #endif //HW5_REGISTERS_H
<filename>mall-address-list/src/main/java/com/mall/address/list/service/AddressService.java package com.mall.address.list.service; import com.mall.common.pojo.Address; import com.mall.common.pojo.City; import com.mall.common.pojo.Province; import com.mall.common.pojo.Region; import java.util.List; public interface AddressService { public List<Address> getAllListByMemberId(String memberId);//根据前台用户ID查询该用户所有地址信息 public int deleteByIdAndMemberId(String memberId);//根据前台用户ID删除该用户的一条地址信息 public int insertAddress(Address address);//添加一条地址信息 public boolean updateAddress(Address address); // 更新地址信息 public boolean updateAddressStatus(String addressId,int defaultStatus,String memberId);//用户更改地址为默认 public String selectAddressIdByDefaultStatus(int defaultStatus,String memberId);//查询用户的默认地址 public List<Province> listProvince(); // 查询所有的省份 public List<City> listCityByProvince(String provinceId); // 根据省份id查询城市 public List<Region> listRegionByCity(String cityId); // 根据城市id查区 public Province getProvince(String provinceId); // 根据省份id查省份信息 public City getCity(String cityId); // 根据城市id查询城市信息 public Region getRegion(String regionId); // 根据区id查询区信息 public List<Address> getAddressByAddressId(String addressId); }
A new two-dimensional analytical model for short-channel Tri-material gate-stack SOI MOSFETs Based on the exact solution of the two-dimensional Poisson equation, a new analytical behavior model consisting of the two-dimensional potential and threshold voltage for the short-channel tri-material gate-stack SOI MOSFETpsilas is developed. The model is verified by its good agreement with the numerical simulation of the device simulator MEDICI. The model not only offers physical insight into the device physics but also provides guidance for the basic design of the device.
<reponame>cccaaannn/homeworks<filename>3-python/introduction_to_python/hw3/playlist.py from Song import Song class Playlist(): def __init__(self, name, purpose): self.__name = name self.__purpose = purpose self.__length = 0 self.__song_list = [] def get_song(self, i): return self.__song_list[i] def get_num_songs(self): return len(self.__song_list) def get_name(self): return self.__name def get_length(self): return self.__length def get_purpose(self): return self.__purpose def add_song(self, song): self.__song_list.append(song) self.__length += song.get_duration() def bubbleSort(self): l = len(self.__song_list) for i in range(l): for j in range(0, l-i-1): if(self.__song_list[j].get_duration() < self.__song_list[j+1].get_duration()): self.__song_list[j], self.__song_list[j+1] = self.__song_list[j+1], self.__song_list[j] def sort_playlist(self): return self.__song_list.sort() def Binary_search(self, l, r, duration): if r >= l: middle = l + (r - l)//2 if self.__song_list[middle].get_duration() == duration: return middle # continue with left elif self.__song_list[middle].get_duration() < duration: return self.Binary_search(l, middle-1, duration) # continue with right else: return self.Binary_search(middle+1, r, duration) else: return -1 def __repr__(self): __songs = "" for song in self.__song_list: __songs += str(song) return __songs
Multi-channel synthetic aperture radar in Europe After decades of success for the classical single-channel SAR operating in various frequency bands, the next generation spaceborne SAR takes shape through the use of multiple (simultaneous) channels for information generation. Multiple azimuth phase centres offer enhanced capabilities and significant performance improvements with respect to single channel SARs. For instance the classical conflict between swath width and resolution can be overcome, allowing wide-swath systems providing high resolution to become reality. Improvements in imaging capability by factors of 5 to 10 are realistic. In addition multiple channels can be exploited as well for single pass interferometric applications which open new classes of environmental and surveillance applications of SAR systems. The paper gives an overview of ongoing developments funded by the European Space Agency (ESA) in the field of next generation multi-channel spaceborne missions. National programs are not presented.
True confession: As I type this, a brand new Kawasaki Ninja ZX-6R press loaner is collecting dust in my garage. Also true: When I watched the above video of said Ninja tackling the Isle of Man TT course, I was smitten with an extra layer of longing for unrestrained speed. Driving those roads last year offered new insight into the insanity of maneuvering those mountain roads at breakneck speeds, and the thought of doing so two wheels only heightens my respect for the men and machines that take on the challenge. Kawasaki's video, as self-serving as it may be, appears to make two statements: First, the ZX-6R is a potent bit of kit, just as worthy of the Mountain Course as many full-blown literbikes. The second message may be less direct, but is arguably more relevant to street riders like you and I: You don't need a thousand cc's to make minced meat of a canyon road or a race track. You need tons of talent, perhaps even just a sliver of the mad skills exhibited by James Hillier while attacking those famously unforgiving roads at ridiculous lean angles on a 636cc sportbike. I won't be riding my local roads quite so mercilessly when I eventually swing a leg over that Ninja. But knowing that it harbors the potential to tear up tarmac with such ferocity certainly fuels its desirability.
Determination of fresnel zones by traveltime inversion Seismic wave propagation in the high-frequency range is usually described by (zero-order ) ray theory. Its validity conditions are extensively investigated, e.g., by Kravtsov and Orlov. For finite frequenties a ray can only be viewed as a mathematical concept. There is a ( frequency-dependent) region in its vicinity that influences the wavefield received at the end of the ray. This region is the so-called (first) Fresnel volume of the ray. Any cross-section through it is a Fresnel zone. (Gelchinsky, 1985; Cerveny and Soares, 1992; Knapp, 1991). In other words, the Fresnel volume is the envelope of all Fresnel zones along the ray. For seismic stratigraphic modeling, usually the Fresnel zone at the reflector is of interest, so as to know which part of it contributes to the reflected field. Fresnel zones are computed very efficiently by forward dynamic ray tracing through a known velocity model (Cerveny and Soares, 1992). However, exploration geophysicists involved in a stratigraphic analysis would prefer to know the Fresnel zone of a reflecting interface without knowing the details of the reflector overburden, i.e., they are interested in solving an inverse problem. For a plane layered Barth model, it is possible to solve this inverse problem (i e., to calculate the Fresnel zone directly from measured traveltimes, e.g., Erom the rms-velocity).
Donor stem cellderived paroxysmal nocturnal hemoglobinuria after umbilical cord blood transplantation Donor cellderived hematological disorder (DCHD) is a rare complication of allogeneic hematopoietic stem cell transplantation (HSCT). The number of reports of DCHD has been increasing in the last decade, which likely reflects the growing number of HSCTs and the improved ability to identify the donor cell origin. Paroxysmal nocturnal hemoglobinuria (PNH) is an acquired hematological disorder arising in the context of clonal expansion of hematopoietic stem cells harboring a somatic mutation in phosphatidylinositol glycan anchor biosynthesis, class A. We report here a patient with adult Tcell leukemia/lymphoma, who developed PNH 7 years after umbilical cord blood transplantation. The patient has maintained complete remission with fulldonor chimerism after HSCT. Thus, PNH was derived from stem cells of donor origin. The immature immune environment in the recipient after cord blood transplantation might have contributed to the rapid clonal expansion for neonatal stem cells in cord blood to develop typical symptomatic PNH in a short period. To the best of our knowledge, this is the first report in the literature of a case of PNH that developed in donor stem cells after HSCT.
// MimeType returns the content type of the Object if // known, or "" if not func (o *Object) MimeType(ctx context.Context) string { err := o.readEntryAndSetMetadata(ctx) if err != nil { return "" } return o.file.ContentType }
Collective Self-Esteem Data from Four Ethnic Groups Collective self-esteem data were collected from 365 White, Black, Asian, and Hispanic undergraduates. Analyses of variance and intercorrelation matrixes were computed for each component of the scale. Asian and Hispanic groups showed higher scores on the Identity subscale than did the White and Black groups. In general the subscales were highly intercorrelated with the exception of the Identity component. Researchers should focus on the Identity component given its variation across groups and greater independence from the other subscales.
CALGARY – Canada Post is looking into what they’re calling a mailbox mishap. Residents in the northeast neighbourhood of Taradale say they found a community mailbox left wide open around 4:30 p.m. on Thursday. Witnesses say the mailbox, which backs onto Tararidge Close N.E., was full of mail at the time. Concerned residents called Canada Post and police. Canada Post says they activated an emergency response, and were on scene to fix the problem in about two hours. However, shortly after the mailbox was shut, officials with Canada Post received a second complaint that the mailbox was left open again. Canada Post visited the area to close the mailbox for a second time around 10:30 p.m. Residents say they have no way of knowing whether or not any mail or parcels were stolen. They also have no idea if their personal information was compromised. Canada Post says they will not be notifying residents of the incident, because all the mail appeared to be intact and there was no apparent vandalism to the box. They are speaking with mail carriers from the area, but say they expect the box was left open by mistake.
package com.cc; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.cc.view.SloopView; public class HenCoderCavansActivity extends AppCompatActivity { private SloopView mSloopView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mSloopView = new SloopView(this); setContentView(mSloopView); } }
<gh_stars>10-100  #define _WIN32_DCOM #include "LWMICoreManager.h" #include <assert.h> #include <stdlib.h> #include <Windows.h> #include <WbemIdl.h> #include <comdef.h> #pragma comment(lib, "WbemUuid.lib") #include <comutil.h> #pragma comment(lib, "comsuppw.lib") #define LSAFE_RELEASE(p) do{if (p){p->Release(); p = 0;}}while(0) #define LSAFE_DELARRAY(p) do{if (p){delete[] p; p = 0;}}while(0) #define LSAFE_DELETE(p) do{if (p){delete p; p = 0;}}while(0) namespace LWMI { /// @brief COM初始化类 /// 只支持单线程 class LInitCom { public: LInitCom() { this->bSuccess = false; // CoInitialize调用后返回S_FALSE或S_OK后都需调用CoUninitialize // CoInitialize调用后返回RPC_E_CHANGE_MODE, 表明当前线程已被初始化(且和当前模式不同),不需要调用CoUninitialize HRESULT hr = CoInitialize(NULL); if (hr == S_OK || hr == S_FALSE) { this->bSuccess = true; } else { this->bSuccess = false; } } ~LInitCom() { if (this->bSuccess) { CoUninitialize(); } } private: bool bSuccess; ///< 标识是否初始化成功 }; LWMICoreManager::LWMICoreManager() { m_pWbemLocator = NULL; m_pWbemServices = NULL; m_pEnumObject = NULL; m_pObjectArray = NULL; m_objectCount = 0; m_pWbemRefresher = NULL; m_pWbemConfigRefresher = NULL; m_pRefreshAbleObjectArray = NULL; m_pInitComObject = new LInitCom(); } LWMICoreManager::~LWMICoreManager() { this->BaseCleanUp(); LSAFE_DELETE(m_pInitComObject); } bool LWMICoreManager::BaseInit(const wchar_t* pNamespace) { bool bRet = false; HRESULT hr; this->BaseCleanUp(); if (pNamespace == NULL) { bRet = false; goto SAFE_EXIT; } hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&m_pWbemLocator); if (FAILED(hr)) { bRet = false; goto SAFE_EXIT; } hr = m_pWbemLocator->ConnectServer(_bstr_t(pNamespace), NULL, NULL, NULL, 0, NULL, NULL, &m_pWbemServices); if (FAILED(hr)) { bRet = false; goto SAFE_EXIT; } hr = CoSetProxyBlanket(m_pWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE); if (FAILED(hr)) { bRet = false; goto SAFE_EXIT; } hr = CoCreateInstance(CLSID_WbemRefresher, NULL, CLSCTX_INPROC_SERVER, IID_IWbemRefresher, (LPVOID*)&m_pWbemRefresher); if (FAILED(hr)) { bRet = false; goto SAFE_EXIT; } hr = m_pWbemRefresher->QueryInterface(IID_IWbemConfigureRefresher, (LPVOID*)&m_pWbemConfigRefresher); if (FAILED(hr)) { bRet = false; goto SAFE_EXIT; } bRet = true; SAFE_EXIT: if (!bRet) { this->BaseCleanUp(); } return bRet; } bool LWMICoreManager::WQLQuery(const wchar_t* pQuery) { if (pQuery == NULL || m_pWbemServices == NULL) return false; for (int i = 0; i < m_objectCount; i ++) { LSAFE_RELEASE(m_pObjectArray[i]); } LSAFE_DELARRAY(m_pObjectArray); LSAFE_RELEASE(m_pEnumObject); m_objectCount = 0; HRESULT hr = m_pWbemServices->ExecQuery(_bstr_t(L"WQL"), _bstr_t(pQuery), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &m_pEnumObject); if (FAILED(hr)) return false; int maxSize = 5; m_pObjectArray = new IWbemClassObject*[maxSize]; ZeroMemory(m_pObjectArray, maxSize * sizeof(IWbemClassObject*)); ULONG uReturn = 0; while(true) { if (m_objectCount >= maxSize) { IWbemClassObject** pTempArray = new IWbemClassObject*[maxSize * 2]; ZeroMemory(pTempArray, maxSize * 2 * sizeof(IWbemClassObject*)); memcpy(pTempArray, m_pObjectArray, maxSize * sizeof(IWbemClassObject*)); LSAFE_DELARRAY(m_pObjectArray); m_pObjectArray = pTempArray; pTempArray = NULL; maxSize = maxSize * 2; } hr = m_pEnumObject->Next(WBEM_INFINITE, 1, &m_pObjectArray[m_objectCount], &uReturn); if(0 == uReturn) { break; } m_objectCount++; } if (m_objectCount > 0) { m_pRefreshAbleObjectArray = new IWbemClassObject*[m_objectCount]; } for (int i = 0; i < m_objectCount; i++) { m_pRefreshAbleObjectArray[i] = NULL; long lid; HRESULT hr = m_pWbemConfigRefresher->AddObjectByTemplate( m_pWbemServices, m_pObjectArray[i], 0, NULL, &(m_pRefreshAbleObjectArray[i]), &lid); } return true; } int LWMICoreManager::GetObjectsCount() { return m_objectCount; } bool LWMICoreManager::GetStringProperty(int objectIndex, const wchar_t* pPropertyName, wstring& strProperty) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex < 0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } strProperty.clear(); if (m_pObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; strProperty.assign(vtProp.bstrVal); SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetStringPropertyRefreshed(int objectIndex, const wchar_t* pPropertyName, wstring& strProperty) { strProperty.clear(); bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex < 0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pWbemRefresher == NULL) { bRet = false; goto SAFE_EXIT; } hr = m_pWbemRefresher->Refresh(WBEM_FLAG_REFRESH_AUTO_RECONNECT); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if (m_pRefreshAbleObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pRefreshAbleObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; strProperty.assign(vtProp.bstrVal); SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT8Property(int objectIndex, const wchar_t* pPropertyName, LBYTE& ui8Property) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; ui8Property = vtProp.bVal; SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT8ArrayProperty(int objectIndex, const wchar_t* pPropertyName, vector<unsigned char>& arrayProperty) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; arrayProperty.clear(); arrayProperty.resize(vtProp.parray->rgsabound->cElements); for (long i = 0; i < (long)arrayProperty.size(); i++) { SafeArrayGetElement(vtProp.parray, &i, &arrayProperty[i]); } SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT16Property(int objectIndex, const wchar_t* pPropertyName, LUINT16& ui16Property) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; ui16Property = vtProp.uiVal; SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT16PropertyRefreshed(int objectIndex, const wchar_t* pPropertyName, LUINT16& ui16Property) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pWbemRefresher == NULL) { bRet = false; goto SAFE_EXIT; } hr = m_pWbemRefresher->Refresh(WBEM_FLAG_REFRESH_AUTO_RECONNECT); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if (m_pRefreshAbleObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pRefreshAbleObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; ui16Property = vtProp.uiVal; SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT32Property(int objectIndex, const wchar_t* pPropertyName, LUINT& uiProperty) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; uiProperty = vtProp.uintVal; SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT32PropertyRefreshed(int objectIndex, const wchar_t* pPropertyName, LUINT& uiProperty) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pWbemRefresher == NULL) { bRet = false; goto SAFE_EXIT; } hr = m_pWbemRefresher->Refresh(WBEM_FLAG_REFRESH_AUTO_RECONNECT); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if (m_pRefreshAbleObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pRefreshAbleObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } bRet = true; uiProperty = vtProp.uintVal; SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT64Property(int objectIndex, const wchar_t* pPropertyName, LUINT64& ui64Property) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } /* 64位整数以字符串的方式保存在VARIANT中 */ bRet = true; ui64Property = _wcstoui64(vtProp.bstrVal, L'\0', 0); SAFE_EXIT: VariantClear(&vtProp); return bRet; } bool LWMICoreManager::GetUINT64PropertyRefreshed(int objectIndex, const wchar_t* pPropertyName, LUINT64& ui64Property) { bool bRet = false; VARIANT vtProp; HRESULT hr; if(objectIndex <0 || objectIndex >= m_objectCount) { bRet = false; goto SAFE_EXIT; } if (pPropertyName == NULL) { bRet = false; goto SAFE_EXIT; } if (m_pWbemRefresher == NULL) { bRet = false; goto SAFE_EXIT; } hr = m_pWbemRefresher->Refresh(WBEM_FLAG_REFRESH_AUTO_RECONNECT); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if (m_pRefreshAbleObjectArray[objectIndex] == NULL) { bRet = false; goto SAFE_EXIT; } VariantInit(&vtProp); hr = m_pRefreshAbleObjectArray[objectIndex]->Get(pPropertyName, 0, &vtProp, 0, 0); if (hr != WBEM_S_NO_ERROR) { bRet = false; goto SAFE_EXIT; } if(vtProp.vt == VT_EMPTY||vtProp.vt == VT_NULL) { bRet = false; goto SAFE_EXIT; } /* 64位整数以字符串的方式保存在VARIANT中 */ bRet = true; ui64Property = _wcstoui64(vtProp.bstrVal, L'\0', 0); SAFE_EXIT: VariantClear(&vtProp); return bRet; } void LWMICoreManager::BaseCleanUp() { for (int i = 0; i < m_objectCount; i ++) { LSAFE_RELEASE(m_pObjectArray[i]); LSAFE_RELEASE(m_pRefreshAbleObjectArray[i]); } m_objectCount = 0; LSAFE_DELARRAY(m_pObjectArray); LSAFE_DELARRAY(m_pRefreshAbleObjectArray); LSAFE_RELEASE(m_pEnumObject); LSAFE_RELEASE(m_pWbemServices); LSAFE_RELEASE(m_pWbemLocator); LSAFE_RELEASE(m_pWbemConfigRefresher); LSAFE_RELEASE(m_pWbemRefresher); } }
The IP war: apocalypse or revolution? In the Foundation series, Asimov predicted a 1,000 years of darkness following the fall of the galactic empire. In the book Noir, K.W Jeter describes a world where IP is the ultimate war. Combine them together and you have likely scenario No. 1.The Internet era enabled communication and information exchange on a global scale. But it also opened the door to copyright infringement on a global scale. Music, books, movies, software, games, speeches, research papers - everything is now fair game. The only protection the movie studios ever had was bandwidth - and it is quickly evaporating due to faster network connectivity via broadband and smarter downloading technologies such as BitTorrent.Intellectual property, copyrights and the like are the key to a democratic, free-market civilization and greed is a prime mover - so if all is 'free' and we have a 'constitutional right' to 'share' - where is the future of innovation and creativity?This paper will describe the current state of the great IP war (early stages of border unrest and some commando activity), outline potential futures, and make some suggestions as to how to help direct the world toward a reasonable future.In each case, we will cover the business, legal, and social implications of the scenario and we will discuss the various ways the computing industry can help to influence the future outcome.
/* * Copyright 2020 ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package tech.pegasys.teku.ssz.backing.type; import static java.util.Collections.emptyList; import java.util.Optional; import java.util.function.Consumer; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; import tech.pegasys.teku.ssz.backing.VectorViewRead; import tech.pegasys.teku.ssz.backing.tree.LeafNode; import tech.pegasys.teku.ssz.backing.tree.SszSuperNode; import tech.pegasys.teku.ssz.backing.tree.TreeNode; import tech.pegasys.teku.ssz.backing.tree.TreeUtil; import tech.pegasys.teku.ssz.backing.type.TypeHints.SszSuperNodeHint; import tech.pegasys.teku.ssz.backing.view.VectorViewReadImpl; import tech.pegasys.teku.ssz.sos.SSZDeserializeException; import tech.pegasys.teku.ssz.sos.SszReader; public class VectorViewType<C> extends CollectionViewType<VectorViewRead<C>> { private final boolean isListBacking; public VectorViewType(ViewType<?> elementType, long vectorLength) { this(elementType, vectorLength, false); } VectorViewType(ViewType<?> elementType, long vectorLength, boolean isListBacking) { this(elementType, vectorLength, isListBacking, TypeHints.none()); } VectorViewType( ViewType<?> elementType, long vectorLength, boolean isListBacking, TypeHints hints) { super(vectorLength, elementType, hints); this.isListBacking = isListBacking; } @Override public VectorViewRead<C> getDefault() { return createFromBackingNode(getDefaultTree()); } @Override protected TreeNode createDefaultTree() { if (isListBacking) { Optional<SszSuperNodeHint> sszSuperNodeHint = getHints().getHint(SszSuperNodeHint.class); if (sszSuperNodeHint.isPresent()) { int superNodeDepth = sszSuperNodeHint.get().getDepth(); SszSuperNode defaultSuperSszNode = new SszSuperNode(superNodeDepth, elementSszSupernodeTemplate.get(), Bytes.EMPTY); int binaryDepth = treeDepth() - superNodeDepth; return TreeUtil.createTree(emptyList(), defaultSuperSszNode, binaryDepth); } else { return TreeUtil.createDefaultTree(maxChunks(), LeafNode.EMPTY_LEAF); } } else if (getElementType().getBitsSize() == LeafNode.MAX_BIT_SIZE) { return TreeUtil.createDefaultTree(maxChunks(), getElementType().getDefaultTree()); } else { // packed vector int totalBytes = (getLength() * getElementType().getBitsSize() + 7) / 8; int lastNodeSizeBytes = totalBytes % LeafNode.MAX_BYTE_SIZE; int fullZeroNodesCount = totalBytes / LeafNode.MAX_BYTE_SIZE; Stream<TreeNode> fullZeroNodes = Stream.<TreeNode>generate(() -> LeafNode.ZERO_LEAVES[32]).limit(fullZeroNodesCount); Stream<TreeNode> lastZeroNode = lastNodeSizeBytes > 0 ? Stream.of(LeafNode.ZERO_LEAVES[lastNodeSizeBytes]) : Stream.empty(); return TreeUtil.createTree( Stream.concat(fullZeroNodes, lastZeroNode).collect(Collectors.toList())); } } @SuppressWarnings({"rawtypes", "unchecked"}) @Override public VectorViewRead<C> createFromBackingNode(TreeNode node) { return new VectorViewReadImpl(this, node); } public int getLength() { long maxLength = getMaxLength(); if (maxLength > Integer.MAX_VALUE) { throw new IllegalArgumentException("Vector size too large: " + maxLength); } return (int) maxLength; } public int getChunksCount() { long maxChunks = maxChunks(); if (maxChunks > Integer.MAX_VALUE) { throw new IllegalArgumentException("Vector size too large: " + maxChunks); } return (int) maxChunks; } @Override public boolean isFixedSize() { return getElementType().isFixedSize(); } @Override public int getVariablePartSize(TreeNode node) { return getVariablePartSize(node, getLength()); } @Override public int getFixedPartSize() { int bitsPerChild = isFixedSize() ? getElementType().getBitsSize() : SSZ_LENGTH_SIZE * 8; return (getLength() * bitsPerChild + 7) / 8; } @Override public int sszSerialize(TreeNode node, Consumer<Bytes> writer) { return sszSerializeVector(node, writer, getLength()); } @Override public TreeNode sszDeserializeTree(SszReader reader) { DeserializedData data = sszDeserializeVector(reader); if (getElementType() == BasicViewTypes.BIT_TYPE && getLength() % 8 > 0) { // for BitVector we need to check that all 'unused' bits in the last byte are 0 int usedBitCount = getLength() % 8; if (data.getLastSszByte().orElseThrow() >>> usedBitCount != 0) { throw new SSZDeserializeException("Invalid Bitvector ssz: trailing bits are not 0"); } } else { if (data.getChildrenCount() != getLength()) { throw new SSZDeserializeException("Invalid Vector ssz"); } } return data.getDataTree(); } }
def respond(obj, sender): logger.debug('respond') data = obj.serialize() sender.sendString(data)
Part-of-Speech Classification from Magnetoencephalography Data Using 1-Dimensional Convolutional Neural Network Neural decoding of speech and language refers to the extraction of information regarding the stimulus and the mental state of subjects from recordings of their brain activity while performing linguistic tasks. Recent years have seen significant progress in the decoding of speech from cortical activity. This study instead focuses on decoding linguistic information. We present a deep parallel temporal convolutional neural network (1DCNN) trained on part-of-speech (PoS) classification from magnetoencephalography (MEG) data collected during natural language reading. The network is trained on data from 15 human subjects separately, and yields above-chance accuracies on test data for all of them. The level of PoS was targeted because it offers a clean linguistic benchmark level that represents syntactic information, and abstracts away from semantic or conceptual representations. Our contribution provides a next step towards the direct decoding of linguistic information from brain activity, with potential implications for brain-computer-interface (BCI) and possibly neural prosthetics for communication.
/* CF3 Copyright (c) 2015 ishiura-lab. Released under the MIT license. https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md */ #include<stdio.h> #include<stdint.h> #include<stdlib.h> #include"test1.h" int64_t x2 = INT64_MIN; volatile int16_t x7 = -3542; int64_t x8 = -67213860999LL; volatile int32_t x12 = -1; int32_t t3 = 54831; volatile int32_t t4 = -1; int8_t x24 = INT8_MAX; uint8_t x26 = UINT8_MAX; uint8_t x27 = 1U; static uint32_t x29 = UINT32_MAX; volatile int32_t t7 = -884277370; int16_t x35 = -221; int8_t x36 = INT8_MIN; volatile int32_t t10 = 1905; uint32_t x46 = 601414U; static volatile int32_t x48 = INT32_MIN; uint64_t x50 = 197046836578931804LLU; static int32_t t12 = 1029604967; int32_t x53 = 39; int16_t x56 = INT16_MIN; int32_t t15 = 232284688; volatile int64_t x68 = 1205299145445815LL; uint16_t x81 = 38U; volatile int32_t x82 = 142; int32_t t20 = -554; static int64_t x93 = INT64_MIN; uint64_t x98 = 6565060109457786128LLU; static uint16_t x102 = 498U; int32_t t27 = -41; int32_t x124 = INT32_MIN; static volatile int64_t x126 = INT64_MAX; uint8_t x128 = 1U; uint32_t x132 = 847820U; int64_t x137 = INT64_MAX; int32_t x140 = -1; static int32_t x142 = -1; uint8_t x144 = 0U; static volatile int32_t t36 = 260747; int32_t x152 = INT32_MAX; int32_t t37 = -1; volatile uint16_t x154 = 9252U; volatile int32_t t39 = 29928982; int8_t x162 = INT8_MIN; int8_t x165 = INT8_MAX; int32_t x167 = INT32_MIN; int64_t x168 = -6653415925963379LL; int32_t t41 = 22; uint32_t x169 = 22284U; int8_t x173 = INT8_MIN; uint8_t x175 = UINT8_MAX; int8_t x180 = INT8_MIN; volatile int64_t x181 = INT64_MIN; uint16_t x184 = UINT16_MAX; volatile int64_t x189 = 13321LL; volatile int64_t x191 = INT64_MIN; int64_t x194 = INT64_MIN; uint64_t x197 = 2025103241837777917LLU; int64_t x198 = INT64_MAX; int8_t x200 = -62; int32_t t49 = 3098317; static int8_t x201 = -1; int32_t t50 = 36; uint16_t x206 = UINT16_MAX; int8_t x210 = INT8_MIN; volatile uint8_t x216 = UINT8_MAX; volatile int8_t x217 = -1; int32_t x220 = 1; int8_t x227 = 0; int32_t x229 = -184154715; static int8_t x230 = -2; int64_t x234 = -1LL; int16_t x235 = 13468; int32_t x240 = INT32_MIN; int32_t t59 = -2067859; volatile uint8_t x243 = 6U; volatile int32_t t60 = -921; volatile uint64_t x245 = 14LLU; int32_t t61 = 42248; int32_t x249 = -62181; int32_t t62 = 925; volatile int16_t x253 = 0; static int32_t x255 = INT32_MIN; volatile int32_t t63 = 387408196; static volatile int8_t x257 = INT8_MAX; static int32_t t64 = 791487; volatile uint64_t x265 = 18714056310766612LLU; int64_t x267 = INT64_MIN; int32_t t66 = -10759435; static int16_t x272 = INT16_MIN; int16_t x273 = INT16_MIN; volatile int16_t x275 = INT16_MIN; static int8_t x276 = -1; static int64_t x280 = 283004829LL; int16_t x285 = -1; uint32_t x286 = UINT32_MAX; int16_t x288 = INT16_MIN; static uint32_t x289 = 2U; volatile int8_t x292 = -56; static int8_t x294 = 0; static volatile int16_t x296 = INT16_MIN; volatile int32_t t73 = -87306; int64_t x297 = INT64_MIN; uint32_t x305 = 447144U; uint16_t x306 = UINT16_MAX; static uint64_t x309 = 24417177731808306LLU; uint32_t x311 = 102571U; volatile int16_t x314 = INT16_MIN; int64_t x316 = -1LL; int32_t t78 = -75917980; int32_t x317 = -26138; static int16_t x319 = -1; static volatile int32_t t80 = -445955; int32_t x331 = INT32_MIN; int8_t x339 = INT8_MIN; int64_t x348 = INT64_MIN; uint32_t x351 = 2021110U; uint32_t x352 = 127689693U; volatile int32_t t87 = -1033189671; uint8_t x353 = 0U; static int32_t x357 = -1; int32_t x358 = INT32_MIN; int16_t x359 = -4; volatile int32_t x364 = INT32_MIN; static volatile int64_t x365 = INT64_MIN; int16_t x366 = -255; static int64_t x373 = -1LL; volatile int32_t t93 = 1; uint8_t x380 = UINT8_MAX; int16_t x381 = INT16_MIN; volatile int64_t x386 = INT64_MAX; uint16_t x392 = 9229U; int64_t x397 = -1LL; static volatile int32_t t99 = 2516; int32_t x413 = 21; static uint8_t x414 = 64U; volatile int32_t t104 = -977740266; volatile int64_t x425 = INT64_MIN; static int8_t x427 = INT8_MAX; int8_t x428 = -1; volatile int8_t x434 = 0; uint16_t x442 = UINT16_MAX; volatile int16_t x446 = -879; volatile uint16_t x452 = 463U; uint32_t x454 = UINT32_MAX; int8_t x460 = 1; int32_t t114 = 1; volatile int32_t t115 = 117486359; volatile int32_t x476 = 1; int32_t t119 = 55; uint8_t x483 = 2U; uint64_t x490 = UINT64_MAX; int32_t x492 = 1; uint64_t x494 = 890625869484LLU; static uint64_t x496 = UINT64_MAX; volatile uint16_t x501 = 6U; int32_t t126 = 15; int8_t x512 = 0; volatile int16_t x514 = INT16_MIN; volatile int64_t x518 = INT64_MAX; uint64_t x520 = 0LLU; volatile int32_t t130 = 681; uint16_t x525 = 127U; static int16_t x526 = INT16_MAX; static int64_t x532 = INT64_MIN; volatile int32_t t132 = -2; volatile int16_t x533 = -852; int64_t x537 = INT64_MAX; static uint16_t x547 = UINT16_MAX; uint16_t x550 = 15249U; static int16_t x556 = -1; int16_t x557 = INT16_MIN; static uint32_t x558 = 9U; volatile int32_t t141 = -564069482; int16_t x570 = 3550; int16_t x576 = INT16_MIN; volatile int32_t t143 = 0; volatile int16_t x579 = 39; static int32_t t144 = -7728328; static int8_t x583 = INT8_MAX; static int8_t x584 = -1; volatile int32_t t145 = -264966634; uint8_t x594 = UINT8_MAX; static volatile int32_t t148 = -765099; volatile uint8_t x608 = UINT8_MAX; int8_t x609 = -23; static volatile int32_t t152 = 8760; static int32_t x613 = INT32_MIN; volatile int64_t x617 = 61650186049091845LL; static volatile uint64_t x618 = 23401732488250LLU; int32_t t154 = 8; static int64_t x624 = -1LL; int64_t x639 = INT64_MIN; int64_t x642 = 983348683941LL; static int64_t x647 = -1133999555661798033LL; uint32_t x651 = UINT32_MAX; volatile int32_t x652 = 333782659; int32_t x655 = -1; int32_t x656 = -881; int8_t x659 = INT8_MAX; int16_t x668 = INT16_MIN; uint8_t x670 = UINT8_MAX; volatile int32_t t167 = -9; int16_t x674 = INT16_MIN; int64_t x675 = INT64_MAX; volatile int16_t x678 = INT16_MIN; int8_t x681 = -1; uint16_t x691 = 5U; volatile int8_t x692 = 0; static int32_t t172 = -13168; static volatile int64_t x694 = INT64_MAX; uint64_t x698 = 618683202623775LLU; uint32_t x711 = UINT32_MAX; volatile int8_t x717 = -1; int8_t x720 = INT8_MAX; static int64_t x723 = 463923186797773215LL; int32_t t182 = 17037740; uint64_t x736 = 3LLU; volatile int32_t t183 = 2037; uint32_t x737 = 49941U; uint32_t x742 = UINT32_MAX; static volatile int16_t x756 = INT16_MIN; uint32_t x768 = 405075U; uint8_t x769 = 24U; int64_t x770 = -1LL; volatile int32_t t194 = -32735431; int8_t x784 = INT8_MAX; int32_t x788 = 70; int8_t x791 = INT8_MAX; static volatile int16_t x799 = INT16_MAX; void f0(void) { int16_t x1 = INT16_MAX; static uint32_t x3 = UINT32_MAX; static volatile uint64_t x4 = UINT64_MAX; int32_t t0 = 39191609; t0 = (x1==((x2&x3)^x4)); if (t0 != 0) { NG(); } else { ; } } void f1(void) { static int8_t x5 = INT8_MAX; uint64_t x6 = 140320706LLU; volatile int32_t t1 = 102; t1 = (x5==((x6&x7)^x8)); if (t1 != 0) { NG(); } else { ; } } void f2(void) { int16_t x9 = 6; volatile int64_t x10 = -1LL; uint8_t x11 = 20U; int32_t t2 = -31743; t2 = (x9==((x10&x11)^x12)); if (t2 != 0) { NG(); } else { ; } } void f3(void) { static int8_t x13 = 0; volatile int16_t x14 = INT16_MIN; uint16_t x15 = 7U; uint8_t x16 = 12U; t3 = (x13==((x14&x15)^x16)); if (t3 != 0) { NG(); } else { ; } } void f4(void) { static int16_t x17 = -1; int32_t x18 = INT32_MIN; int16_t x19 = INT16_MIN; int32_t x20 = INT32_MAX; t4 = (x17==((x18&x19)^x20)); if (t4 != 1) { NG(); } else { ; } } void f5(void) { volatile uint32_t x21 = 1339U; int16_t x22 = INT16_MAX; volatile uint64_t x23 = 2261332471800943LLU; static int32_t t5 = -7522964; t5 = (x21==((x22&x23)^x24)); if (t5 != 0) { NG(); } else { ; } } void f6(void) { static uint32_t x25 = 20U; uint16_t x28 = 506U; int32_t t6 = 0; t6 = (x25==((x26&x27)^x28)); if (t6 != 0) { NG(); } else { ; } } void f7(void) { int64_t x30 = INT64_MIN; volatile int16_t x31 = INT16_MAX; int32_t x32 = INT32_MAX; t7 = (x29==((x30&x31)^x32)); if (t7 != 0) { NG(); } else { ; } } void f8(void) { uint64_t x33 = 35523949703359742LLU; static volatile int32_t x34 = INT32_MAX; volatile int32_t t8 = 31; t8 = (x33==((x34&x35)^x36)); if (t8 != 0) { NG(); } else { ; } } void f9(void) { volatile int8_t x37 = INT8_MIN; int32_t x38 = -43; static int32_t x39 = 1; static int8_t x40 = 2; volatile int32_t t9 = -103; t9 = (x37==((x38&x39)^x40)); if (t9 != 0) { NG(); } else { ; } } void f10(void) { int32_t x41 = INT32_MIN; int8_t x42 = INT8_MIN; int16_t x43 = 1999; volatile uint32_t x44 = 2723U; t10 = (x41==((x42&x43)^x44)); if (t10 != 0) { NG(); } else { ; } } void f11(void) { uint16_t x45 = 1052U; int64_t x47 = -1LL; static volatile int32_t t11 = 21023; t11 = (x45==((x46&x47)^x48)); if (t11 != 0) { NG(); } else { ; } } void f12(void) { static int64_t x49 = -1LL; int8_t x51 = 23; volatile int32_t x52 = -1; t12 = (x49==((x50&x51)^x52)); if (t12 != 0) { NG(); } else { ; } } void f13(void) { static int64_t x54 = INT64_MIN; uint32_t x55 = 202222812U; volatile int32_t t13 = 1035271; t13 = (x53==((x54&x55)^x56)); if (t13 != 0) { NG(); } else { ; } } void f14(void) { int8_t x57 = INT8_MIN; int16_t x58 = INT16_MIN; uint32_t x59 = 64696U; int16_t x60 = INT16_MIN; static int32_t t14 = 36; t14 = (x57==((x58&x59)^x60)); if (t14 != 0) { NG(); } else { ; } } void f15(void) { volatile uint32_t x61 = 572143U; static volatile int64_t x62 = -1LL; int64_t x63 = INT64_MAX; int16_t x64 = INT16_MAX; t15 = (x61==((x62&x63)^x64)); if (t15 != 0) { NG(); } else { ; } } void f16(void) { static int32_t x65 = INT32_MAX; uint8_t x66 = 21U; int64_t x67 = 20998972134LL; static volatile int32_t t16 = -32; t16 = (x65==((x66&x67)^x68)); if (t16 != 0) { NG(); } else { ; } } void f17(void) { int64_t x69 = INT64_MAX; int64_t x70 = 1LL; int32_t x71 = 185046; uint32_t x72 = UINT32_MAX; int32_t t17 = -3299; t17 = (x69==((x70&x71)^x72)); if (t17 != 0) { NG(); } else { ; } } void f18(void) { volatile int8_t x73 = -27; uint64_t x74 = 1838LLU; uint64_t x75 = 3714996LLU; static uint64_t x76 = 2684LLU; int32_t t18 = 3079788; t18 = (x73==((x74&x75)^x76)); if (t18 != 0) { NG(); } else { ; } } void f19(void) { volatile uint16_t x77 = UINT16_MAX; volatile uint32_t x78 = 94054U; static int8_t x79 = INT8_MIN; uint32_t x80 = 584U; volatile int32_t t19 = -10; t19 = (x77==((x78&x79)^x80)); if (t19 != 0) { NG(); } else { ; } } void f20(void) { int16_t x83 = -25; int16_t x84 = -1; t20 = (x81==((x82&x83)^x84)); if (t20 != 0) { NG(); } else { ; } } void f21(void) { int32_t x85 = -246; int32_t x86 = INT32_MIN; static int8_t x87 = INT8_MIN; volatile uint8_t x88 = 0U; int32_t t21 = 50; t21 = (x85==((x86&x87)^x88)); if (t21 != 0) { NG(); } else { ; } } void f22(void) { volatile uint16_t x89 = 6667U; int16_t x90 = INT16_MAX; static int8_t x91 = INT8_MIN; volatile int16_t x92 = INT16_MAX; volatile int32_t t22 = 1; t22 = (x89==((x90&x91)^x92)); if (t22 != 0) { NG(); } else { ; } } void f23(void) { int16_t x94 = INT16_MIN; int32_t x95 = -462298466; static int64_t x96 = INT64_MIN; int32_t t23 = 52941; t23 = (x93==((x94&x95)^x96)); if (t23 != 0) { NG(); } else { ; } } void f24(void) { static uint16_t x97 = 11U; int8_t x99 = -1; int8_t x100 = INT8_MIN; volatile int32_t t24 = 835327584; t24 = (x97==((x98&x99)^x100)); if (t24 != 0) { NG(); } else { ; } } void f25(void) { int8_t x101 = 59; int8_t x103 = INT8_MAX; int64_t x104 = INT64_MIN; volatile int32_t t25 = 42531147; t25 = (x101==((x102&x103)^x104)); if (t25 != 0) { NG(); } else { ; } } void f26(void) { volatile uint32_t x105 = UINT32_MAX; static volatile int16_t x106 = 203; int16_t x107 = -1; static uint32_t x108 = UINT32_MAX; volatile int32_t t26 = -76168; t26 = (x105==((x106&x107)^x108)); if (t26 != 0) { NG(); } else { ; } } void f27(void) { volatile int64_t x109 = 59LL; int8_t x110 = INT8_MAX; static int32_t x111 = 0; uint64_t x112 = 384663857325220653LLU; t27 = (x109==((x110&x111)^x112)); if (t27 != 0) { NG(); } else { ; } } void f28(void) { int32_t x113 = INT32_MIN; int64_t x114 = INT64_MIN; static volatile uint64_t x115 = UINT64_MAX; int16_t x116 = 0; static volatile int32_t t28 = -336167; t28 = (x113==((x114&x115)^x116)); if (t28 != 0) { NG(); } else { ; } } void f29(void) { int16_t x117 = 0; int32_t x118 = -1; static uint8_t x119 = UINT8_MAX; uint16_t x120 = 5U; static int32_t t29 = 1057665; t29 = (x117==((x118&x119)^x120)); if (t29 != 0) { NG(); } else { ; } } void f30(void) { volatile int64_t x121 = -52315119065540349LL; uint64_t x122 = UINT64_MAX; int16_t x123 = -1; volatile int32_t t30 = 81; t30 = (x121==((x122&x123)^x124)); if (t30 != 0) { NG(); } else { ; } } void f31(void) { int32_t x125 = INT32_MIN; uint8_t x127 = 11U; volatile int32_t t31 = -21847; t31 = (x125==((x126&x127)^x128)); if (t31 != 0) { NG(); } else { ; } } void f32(void) { int8_t x129 = -1; static uint64_t x130 = 231LLU; int16_t x131 = -10; int32_t t32 = -26746; t32 = (x129==((x130&x131)^x132)); if (t32 != 0) { NG(); } else { ; } } void f33(void) { static uint8_t x133 = UINT8_MAX; static uint16_t x134 = UINT16_MAX; int8_t x135 = INT8_MAX; volatile int32_t x136 = INT32_MIN; volatile int32_t t33 = -423228; t33 = (x133==((x134&x135)^x136)); if (t33 != 0) { NG(); } else { ; } } void f34(void) { uint8_t x138 = 1U; uint8_t x139 = 17U; static volatile int32_t t34 = 51103575; t34 = (x137==((x138&x139)^x140)); if (t34 != 0) { NG(); } else { ; } } void f35(void) { uint32_t x141 = 43U; int8_t x143 = INT8_MIN; volatile int32_t t35 = 3; t35 = (x141==((x142&x143)^x144)); if (t35 != 0) { NG(); } else { ; } } void f36(void) { volatile int64_t x145 = INT64_MIN; int32_t x146 = -164687988; static volatile uint64_t x147 = 2264807240768263342LLU; int64_t x148 = 1092407LL; t36 = (x145==((x146&x147)^x148)); if (t36 != 0) { NG(); } else { ; } } void f37(void) { static int64_t x149 = INT64_MIN; int64_t x150 = INT64_MAX; int64_t x151 = 120334LL; t37 = (x149==((x150&x151)^x152)); if (t37 != 0) { NG(); } else { ; } } void f38(void) { static int8_t x153 = INT8_MIN; int64_t x155 = INT64_MIN; int8_t x156 = INT8_MIN; volatile int32_t t38 = -450274; t38 = (x153==((x154&x155)^x156)); if (t38 != 1) { NG(); } else { ; } } void f39(void) { uint64_t x157 = 116632602LLU; static volatile int8_t x158 = INT8_MIN; volatile uint8_t x159 = 60U; uint64_t x160 = 16632661LLU; t39 = (x157==((x158&x159)^x160)); if (t39 != 0) { NG(); } else { ; } } void f40(void) { static int16_t x161 = 49; static volatile int8_t x163 = INT8_MAX; static volatile uint32_t x164 = 2U; static int32_t t40 = -4015507; t40 = (x161==((x162&x163)^x164)); if (t40 != 0) { NG(); } else { ; } } void f41(void) { int64_t x166 = -12214499LL; t41 = (x165==((x166&x167)^x168)); if (t41 != 0) { NG(); } else { ; } } void f42(void) { int16_t x170 = -1; volatile int8_t x171 = INT8_MIN; uint64_t x172 = 551642634176LLU; volatile int32_t t42 = 20704; t42 = (x169==((x170&x171)^x172)); if (t42 != 0) { NG(); } else { ; } } void f43(void) { uint64_t x174 = UINT64_MAX; static uint8_t x176 = 15U; volatile int32_t t43 = 1; t43 = (x173==((x174&x175)^x176)); if (t43 != 0) { NG(); } else { ; } } void f44(void) { int64_t x177 = -1LL; int8_t x178 = INT8_MIN; volatile int8_t x179 = -1; int32_t t44 = -3; t44 = (x177==((x178&x179)^x180)); if (t44 != 0) { NG(); } else { ; } } void f45(void) { static uint32_t x182 = 451U; int32_t x183 = -1; volatile int32_t t45 = -3097; t45 = (x181==((x182&x183)^x184)); if (t45 != 0) { NG(); } else { ; } } void f46(void) { uint64_t x185 = 64845917837LLU; uint16_t x186 = 14146U; int64_t x187 = -90556LL; int16_t x188 = 1; volatile int32_t t46 = 11557; t46 = (x185==((x186&x187)^x188)); if (t46 != 0) { NG(); } else { ; } } void f47(void) { int64_t x190 = 0LL; int32_t x192 = INT32_MIN; static volatile int32_t t47 = -101; t47 = (x189==((x190&x191)^x192)); if (t47 != 0) { NG(); } else { ; } } void f48(void) { volatile int16_t x193 = 1; uint64_t x195 = UINT64_MAX; int16_t x196 = -1; volatile int32_t t48 = -79880; t48 = (x193==((x194&x195)^x196)); if (t48 != 0) { NG(); } else { ; } } void f49(void) { int64_t x199 = -1LL; t49 = (x197==((x198&x199)^x200)); if (t49 != 0) { NG(); } else { ; } } void f50(void) { int32_t x202 = INT32_MIN; uint16_t x203 = 1U; int8_t x204 = INT8_MAX; t50 = (x201==((x202&x203)^x204)); if (t50 != 0) { NG(); } else { ; } } void f51(void) { int64_t x205 = INT64_MAX; static volatile int32_t x207 = -20484891; int64_t x208 = 14855309158198164LL; volatile int32_t t51 = 171987; t51 = (x205==((x206&x207)^x208)); if (t51 != 0) { NG(); } else { ; } } void f52(void) { volatile int64_t x209 = INT64_MAX; uint16_t x211 = 3U; int32_t x212 = 102449; static int32_t t52 = -702292; t52 = (x209==((x210&x211)^x212)); if (t52 != 0) { NG(); } else { ; } } void f53(void) { volatile int8_t x213 = INT8_MIN; volatile int32_t x214 = INT32_MAX; static int64_t x215 = -1LL; volatile int32_t t53 = -450358; t53 = (x213==((x214&x215)^x216)); if (t53 != 0) { NG(); } else { ; } } void f54(void) { volatile uint64_t x218 = 974340840747LLU; int8_t x219 = 31; static int32_t t54 = 1899772; t54 = (x217==((x218&x219)^x220)); if (t54 != 0) { NG(); } else { ; } } void f55(void) { static volatile uint8_t x221 = 0U; int64_t x222 = 53233LL; int16_t x223 = 0; static uint8_t x224 = UINT8_MAX; static int32_t t55 = 6; t55 = (x221==((x222&x223)^x224)); if (t55 != 0) { NG(); } else { ; } } void f56(void) { int32_t x225 = INT32_MIN; static int8_t x226 = INT8_MAX; int64_t x228 = INT64_MAX; int32_t t56 = 926130; t56 = (x225==((x226&x227)^x228)); if (t56 != 0) { NG(); } else { ; } } void f57(void) { int64_t x231 = INT64_MIN; uint16_t x232 = 1521U; int32_t t57 = -1; t57 = (x229==((x230&x231)^x232)); if (t57 != 0) { NG(); } else { ; } } void f58(void) { static volatile uint8_t x233 = 56U; int64_t x236 = 52068LL; volatile int32_t t58 = 4698; t58 = (x233==((x234&x235)^x236)); if (t58 != 0) { NG(); } else { ; } } void f59(void) { int16_t x237 = 478; int16_t x238 = -1; static uint64_t x239 = 12084871279057207LLU; t59 = (x237==((x238&x239)^x240)); if (t59 != 0) { NG(); } else { ; } } void f60(void) { volatile int64_t x241 = INT64_MIN; int64_t x242 = 52621866309LL; uint16_t x244 = UINT16_MAX; t60 = (x241==((x242&x243)^x244)); if (t60 != 0) { NG(); } else { ; } } void f61(void) { static int64_t x246 = -4259418442918737983LL; uint64_t x247 = UINT64_MAX; int16_t x248 = -1; t61 = (x245==((x246&x247)^x248)); if (t61 != 0) { NG(); } else { ; } } void f62(void) { uint64_t x250 = UINT64_MAX; static uint32_t x251 = 1089U; int32_t x252 = -5199; t62 = (x249==((x250&x251)^x252)); if (t62 != 0) { NG(); } else { ; } } void f63(void) { volatile uint32_t x254 = 154U; uint32_t x256 = UINT32_MAX; t63 = (x253==((x254&x255)^x256)); if (t63 != 0) { NG(); } else { ; } } void f64(void) { volatile int8_t x258 = -1; static int64_t x259 = INT64_MIN; volatile int64_t x260 = INT64_MIN; t64 = (x257==((x258&x259)^x260)); if (t64 != 0) { NG(); } else { ; } } void f65(void) { uint64_t x261 = UINT64_MAX; static uint8_t x262 = 2U; static volatile uint16_t x263 = UINT16_MAX; int16_t x264 = INT16_MIN; int32_t t65 = 3989; t65 = (x261==((x262&x263)^x264)); if (t65 != 0) { NG(); } else { ; } } void f66(void) { int32_t x266 = -1; volatile int64_t x268 = INT64_MIN; t66 = (x265==((x266&x267)^x268)); if (t66 != 0) { NG(); } else { ; } } void f67(void) { static int32_t x269 = -1; uint8_t x270 = 24U; int16_t x271 = INT16_MIN; volatile int32_t t67 = 174472; t67 = (x269==((x270&x271)^x272)); if (t67 != 0) { NG(); } else { ; } } void f68(void) { uint16_t x274 = 18756U; int32_t t68 = 403139; t68 = (x273==((x274&x275)^x276)); if (t68 != 0) { NG(); } else { ; } } void f69(void) { volatile uint32_t x277 = 3972243U; int64_t x278 = INT64_MIN; volatile uint16_t x279 = 1324U; int32_t t69 = -77946; t69 = (x277==((x278&x279)^x280)); if (t69 != 0) { NG(); } else { ; } } void f70(void) { volatile int8_t x281 = INT8_MIN; int16_t x282 = INT16_MAX; int32_t x283 = -1; int64_t x284 = INT64_MIN; int32_t t70 = 13; t70 = (x281==((x282&x283)^x284)); if (t70 != 0) { NG(); } else { ; } } void f71(void) { int32_t x287 = 960; volatile int32_t t71 = 10239; t71 = (x285==((x286&x287)^x288)); if (t71 != 0) { NG(); } else { ; } } void f72(void) { int8_t x290 = -1; uint32_t x291 = 386354U; volatile int32_t t72 = 629456; t72 = (x289==((x290&x291)^x292)); if (t72 != 0) { NG(); } else { ; } } void f73(void) { int32_t x293 = -163413029; uint32_t x295 = 4130U; t73 = (x293==((x294&x295)^x296)); if (t73 != 0) { NG(); } else { ; } } void f74(void) { uint8_t x298 = 97U; static int64_t x299 = INT64_MAX; int64_t x300 = INT64_MAX; int32_t t74 = -41080600; t74 = (x297==((x298&x299)^x300)); if (t74 != 0) { NG(); } else { ; } } void f75(void) { uint8_t x301 = 0U; int32_t x302 = -1; int8_t x303 = INT8_MIN; uint16_t x304 = UINT16_MAX; static int32_t t75 = -13632; t75 = (x301==((x302&x303)^x304)); if (t75 != 0) { NG(); } else { ; } } void f76(void) { int32_t x307 = INT32_MIN; volatile int32_t x308 = INT32_MAX; static int32_t t76 = -133; t76 = (x305==((x306&x307)^x308)); if (t76 != 0) { NG(); } else { ; } } void f77(void) { uint8_t x310 = 2U; int64_t x312 = -1LL; volatile int32_t t77 = -467; t77 = (x309==((x310&x311)^x312)); if (t77 != 0) { NG(); } else { ; } } void f78(void) { volatile uint8_t x313 = UINT8_MAX; uint8_t x315 = 13U; t78 = (x313==((x314&x315)^x316)); if (t78 != 0) { NG(); } else { ; } } void f79(void) { uint32_t x318 = 0U; volatile int8_t x320 = 12; int32_t t79 = -12133; t79 = (x317==((x318&x319)^x320)); if (t79 != 0) { NG(); } else { ; } } void f80(void) { uint16_t x321 = 1944U; uint64_t x322 = 16581314838213179LLU; int64_t x323 = INT64_MIN; int32_t x324 = INT32_MIN; t80 = (x321==((x322&x323)^x324)); if (t80 != 0) { NG(); } else { ; } } void f81(void) { static int64_t x325 = INT64_MAX; volatile int8_t x326 = INT8_MIN; int16_t x327 = INT16_MIN; uint16_t x328 = UINT16_MAX; static volatile int32_t t81 = 943696; t81 = (x325==((x326&x327)^x328)); if (t81 != 0) { NG(); } else { ; } } void f82(void) { volatile int16_t x329 = INT16_MIN; int64_t x330 = 5285313LL; int8_t x332 = 18; static volatile int32_t t82 = -49978128; t82 = (x329==((x330&x331)^x332)); if (t82 != 0) { NG(); } else { ; } } void f83(void) { int32_t x333 = INT32_MIN; uint16_t x334 = 2520U; int16_t x335 = -960; volatile int32_t x336 = -1; int32_t t83 = -191; t83 = (x333==((x334&x335)^x336)); if (t83 != 0) { NG(); } else { ; } } void f84(void) { int8_t x337 = 0; int8_t x338 = INT8_MIN; uint64_t x340 = 731730994375507979LLU; volatile int32_t t84 = 60568651; t84 = (x337==((x338&x339)^x340)); if (t84 != 0) { NG(); } else { ; } } void f85(void) { int8_t x341 = INT8_MAX; int32_t x342 = INT32_MIN; int16_t x343 = INT16_MAX; int16_t x344 = INT16_MAX; int32_t t85 = -3973; t85 = (x341==((x342&x343)^x344)); if (t85 != 0) { NG(); } else { ; } } void f86(void) { static int16_t x345 = INT16_MIN; volatile int32_t x346 = INT32_MIN; int32_t x347 = INT32_MAX; int32_t t86 = 238632; t86 = (x345==((x346&x347)^x348)); if (t86 != 0) { NG(); } else { ; } } void f87(void) { volatile uint16_t x349 = 25U; uint64_t x350 = 135LLU; t87 = (x349==((x350&x351)^x352)); if (t87 != 0) { NG(); } else { ; } } void f88(void) { static uint16_t x354 = UINT16_MAX; static uint16_t x355 = UINT16_MAX; int64_t x356 = 425LL; int32_t t88 = -430; t88 = (x353==((x354&x355)^x356)); if (t88 != 0) { NG(); } else { ; } } void f89(void) { int8_t x360 = -27; static int32_t t89 = -10029850; t89 = (x357==((x358&x359)^x360)); if (t89 != 0) { NG(); } else { ; } } void f90(void) { uint16_t x361 = 14272U; static uint64_t x362 = 851090LLU; uint16_t x363 = 0U; int32_t t90 = 20175715; t90 = (x361==((x362&x363)^x364)); if (t90 != 0) { NG(); } else { ; } } void f91(void) { int16_t x367 = 7175; static volatile uint64_t x368 = UINT64_MAX; int32_t t91 = 602410; t91 = (x365==((x366&x367)^x368)); if (t91 != 0) { NG(); } else { ; } } void f92(void) { int32_t x369 = 36772; int64_t x370 = -1LL; static uint16_t x371 = 4U; static int8_t x372 = INT8_MAX; volatile int32_t t92 = 244967996; t92 = (x369==((x370&x371)^x372)); if (t92 != 0) { NG(); } else { ; } } void f93(void) { static int8_t x374 = INT8_MIN; int8_t x375 = INT8_MAX; int8_t x376 = INT8_MIN; t93 = (x373==((x374&x375)^x376)); if (t93 != 0) { NG(); } else { ; } } void f94(void) { static int32_t x377 = -1; uint32_t x378 = 8U; int8_t x379 = -1; static int32_t t94 = -107; t94 = (x377==((x378&x379)^x380)); if (t94 != 0) { NG(); } else { ; } } void f95(void) { uint8_t x382 = UINT8_MAX; static int32_t x383 = -1; static volatile uint32_t x384 = 66249223U; int32_t t95 = -11; t95 = (x381==((x382&x383)^x384)); if (t95 != 0) { NG(); } else { ; } } void f96(void) { uint8_t x385 = 122U; uint8_t x387 = 23U; volatile uint16_t x388 = 5U; int32_t t96 = -54; t96 = (x385==((x386&x387)^x388)); if (t96 != 0) { NG(); } else { ; } } void f97(void) { int16_t x389 = -3271; static volatile int8_t x390 = INT8_MAX; int8_t x391 = INT8_MIN; int32_t t97 = 8335; t97 = (x389==((x390&x391)^x392)); if (t97 != 0) { NG(); } else { ; } } void f98(void) { int32_t x393 = INT32_MIN; int32_t x394 = -56868437; volatile int64_t x395 = INT64_MIN; int64_t x396 = INT64_MIN; static int32_t t98 = 12416836; t98 = (x393==((x394&x395)^x396)); if (t98 != 0) { NG(); } else { ; } } void f99(void) { int8_t x398 = 1; int64_t x399 = INT64_MIN; int32_t x400 = INT32_MAX; t99 = (x397==((x398&x399)^x400)); if (t99 != 0) { NG(); } else { ; } } void f100(void) { volatile int64_t x401 = 3563374602497LL; int64_t x402 = INT64_MIN; static int32_t x403 = INT32_MIN; int8_t x404 = INT8_MAX; int32_t t100 = -16585139; t100 = (x401==((x402&x403)^x404)); if (t100 != 0) { NG(); } else { ; } } void f101(void) { static volatile int32_t x405 = INT32_MIN; uint8_t x406 = UINT8_MAX; volatile int64_t x407 = 137692146780LL; volatile int16_t x408 = 2; volatile int32_t t101 = -58234227; t101 = (x405==((x406&x407)^x408)); if (t101 != 0) { NG(); } else { ; } } void f102(void) { int32_t x409 = INT32_MIN; uint32_t x410 = 123240416U; static uint32_t x411 = 8046U; uint32_t x412 = UINT32_MAX; volatile int32_t t102 = 39098; t102 = (x409==((x410&x411)^x412)); if (t102 != 0) { NG(); } else { ; } } void f103(void) { volatile int16_t x415 = 4; uint32_t x416 = 138176692U; int32_t t103 = 1901; t103 = (x413==((x414&x415)^x416)); if (t103 != 0) { NG(); } else { ; } } void f104(void) { uint16_t x417 = UINT16_MAX; uint16_t x418 = 81U; int8_t x419 = 1; int32_t x420 = INT32_MAX; t104 = (x417==((x418&x419)^x420)); if (t104 != 0) { NG(); } else { ; } } void f105(void) { static uint32_t x421 = UINT32_MAX; int16_t x422 = INT16_MIN; static uint8_t x423 = UINT8_MAX; static volatile int16_t x424 = 4; volatile int32_t t105 = -20; t105 = (x421==((x422&x423)^x424)); if (t105 != 0) { NG(); } else { ; } } void f106(void) { volatile int8_t x426 = 0; int32_t t106 = 4966622; t106 = (x425==((x426&x427)^x428)); if (t106 != 0) { NG(); } else { ; } } void f107(void) { int8_t x429 = -1; uint64_t x430 = 6117369484875005610LLU; int8_t x431 = 23; int64_t x432 = INT64_MAX; int32_t t107 = 2837294; t107 = (x429==((x430&x431)^x432)); if (t107 != 0) { NG(); } else { ; } } void f108(void) { int16_t x433 = INT16_MAX; int8_t x435 = INT8_MIN; uint8_t x436 = 103U; volatile int32_t t108 = -333005076; t108 = (x433==((x434&x435)^x436)); if (t108 != 0) { NG(); } else { ; } } void f109(void) { static int8_t x437 = 22; int16_t x438 = 931; static volatile int16_t x439 = 1; uint64_t x440 = 488LLU; volatile int32_t t109 = 3; t109 = (x437==((x438&x439)^x440)); if (t109 != 0) { NG(); } else { ; } } void f110(void) { static int8_t x441 = -1; uint16_t x443 = 24564U; static uint32_t x444 = UINT32_MAX; volatile int32_t t110 = 1824; t110 = (x441==((x442&x443)^x444)); if (t110 != 0) { NG(); } else { ; } } void f111(void) { int64_t x445 = -1LL; int32_t x447 = -1891626; uint8_t x448 = 5U; int32_t t111 = -5396; t111 = (x445==((x446&x447)^x448)); if (t111 != 0) { NG(); } else { ; } } void f112(void) { uint8_t x449 = UINT8_MAX; int16_t x450 = INT16_MIN; int64_t x451 = INT64_MAX; int32_t t112 = -312; t112 = (x449==((x450&x451)^x452)); if (t112 != 0) { NG(); } else { ; } } void f113(void) { static int16_t x453 = -2132; int64_t x455 = -1LL; uint16_t x456 = 11U; int32_t t113 = -1672714; t113 = (x453==((x454&x455)^x456)); if (t113 != 0) { NG(); } else { ; } } void f114(void) { int16_t x457 = INT16_MIN; int32_t x458 = -1; int8_t x459 = INT8_MAX; t114 = (x457==((x458&x459)^x460)); if (t114 != 0) { NG(); } else { ; } } void f115(void) { uint16_t x461 = 51U; int8_t x462 = INT8_MAX; int8_t x463 = INT8_MAX; int64_t x464 = INT64_MAX; t115 = (x461==((x462&x463)^x464)); if (t115 != 0) { NG(); } else { ; } } void f116(void) { static int64_t x465 = INT64_MAX; uint8_t x466 = 7U; volatile uint32_t x467 = UINT32_MAX; int32_t x468 = -89817483; int32_t t116 = -644; t116 = (x465==((x466&x467)^x468)); if (t116 != 0) { NG(); } else { ; } } void f117(void) { int16_t x469 = 89; int32_t x470 = -1; int32_t x471 = INT32_MAX; static int16_t x472 = -1; static volatile int32_t t117 = 85231; t117 = (x469==((x470&x471)^x472)); if (t117 != 0) { NG(); } else { ; } } void f118(void) { static int64_t x473 = -5382308LL; volatile uint8_t x474 = UINT8_MAX; volatile int64_t x475 = INT64_MIN; static volatile int32_t t118 = 131962; t118 = (x473==((x474&x475)^x476)); if (t118 != 0) { NG(); } else { ; } } void f119(void) { int64_t x477 = -11932557385LL; static volatile int32_t x478 = INT32_MIN; static int64_t x479 = -87849043861385134LL; int16_t x480 = -7; t119 = (x477==((x478&x479)^x480)); if (t119 != 0) { NG(); } else { ; } } void f120(void) { int64_t x481 = -20873421750LL; uint8_t x482 = 44U; int32_t x484 = -1695; int32_t t120 = 6908; t120 = (x481==((x482&x483)^x484)); if (t120 != 0) { NG(); } else { ; } } void f121(void) { int8_t x485 = INT8_MAX; int8_t x486 = 10; int16_t x487 = -1; volatile uint64_t x488 = UINT64_MAX; volatile int32_t t121 = 1014281118; t121 = (x485==((x486&x487)^x488)); if (t121 != 0) { NG(); } else { ; } } void f122(void) { uint8_t x489 = 14U; int16_t x491 = INT16_MIN; int32_t t122 = -34; t122 = (x489==((x490&x491)^x492)); if (t122 != 0) { NG(); } else { ; } } void f123(void) { uint8_t x493 = 6U; int16_t x495 = INT16_MIN; static volatile int32_t t123 = 101; t123 = (x493==((x494&x495)^x496)); if (t123 != 0) { NG(); } else { ; } } void f124(void) { static uint16_t x497 = 12U; int16_t x498 = INT16_MIN; int32_t x499 = -1; int8_t x500 = INT8_MAX; volatile int32_t t124 = 19545816; t124 = (x497==((x498&x499)^x500)); if (t124 != 0) { NG(); } else { ; } } void f125(void) { uint16_t x502 = 1261U; volatile int32_t x503 = 0; static int8_t x504 = INT8_MIN; int32_t t125 = 17353518; t125 = (x501==((x502&x503)^x504)); if (t125 != 0) { NG(); } else { ; } } void f126(void) { uint8_t x505 = 29U; uint64_t x506 = 1985694LLU; int32_t x507 = -1; uint32_t x508 = UINT32_MAX; t126 = (x505==((x506&x507)^x508)); if (t126 != 0) { NG(); } else { ; } } void f127(void) { volatile int32_t x509 = -1; int64_t x510 = INT64_MIN; int32_t x511 = INT32_MIN; static volatile int32_t t127 = -1; t127 = (x509==((x510&x511)^x512)); if (t127 != 0) { NG(); } else { ; } } void f128(void) { static int16_t x513 = -459; volatile int16_t x515 = -1; int16_t x516 = INT16_MIN; int32_t t128 = 41814; t128 = (x513==((x514&x515)^x516)); if (t128 != 0) { NG(); } else { ; } } void f129(void) { int64_t x517 = -480LL; int64_t x519 = INT64_MIN; volatile int32_t t129 = 3; t129 = (x517==((x518&x519)^x520)); if (t129 != 0) { NG(); } else { ; } } void f130(void) { uint8_t x521 = 4U; int32_t x522 = -1; int32_t x523 = -4106397; int32_t x524 = INT32_MAX; t130 = (x521==((x522&x523)^x524)); if (t130 != 0) { NG(); } else { ; } } void f131(void) { volatile uint64_t x527 = UINT64_MAX; static int32_t x528 = 33903; volatile int32_t t131 = -62; t131 = (x525==((x526&x527)^x528)); if (t131 != 0) { NG(); } else { ; } } void f132(void) { int16_t x529 = -1; static int16_t x530 = -1; volatile int32_t x531 = -11645; t132 = (x529==((x530&x531)^x532)); if (t132 != 0) { NG(); } else { ; } } void f133(void) { volatile int8_t x534 = -18; uint32_t x535 = UINT32_MAX; volatile int8_t x536 = -42; volatile int32_t t133 = 1; t133 = (x533==((x534&x535)^x536)); if (t133 != 0) { NG(); } else { ; } } void f134(void) { volatile uint64_t x538 = 4721007222LLU; int8_t x539 = INT8_MIN; static int8_t x540 = -13; int32_t t134 = 439145; t134 = (x537==((x538&x539)^x540)); if (t134 != 0) { NG(); } else { ; } } void f135(void) { int32_t x541 = -1; static volatile int64_t x542 = -87813271215367927LL; volatile int16_t x543 = INT16_MIN; int32_t x544 = INT32_MAX; int32_t t135 = -421249743; t135 = (x541==((x542&x543)^x544)); if (t135 != 0) { NG(); } else { ; } } void f136(void) { static int16_t x545 = INT16_MAX; static int32_t x546 = -1; int32_t x548 = INT32_MAX; int32_t t136 = -121; t136 = (x545==((x546&x547)^x548)); if (t136 != 0) { NG(); } else { ; } } void f137(void) { int64_t x549 = -1LL; int8_t x551 = INT8_MIN; int64_t x552 = INT64_MIN; int32_t t137 = 230547; t137 = (x549==((x550&x551)^x552)); if (t137 != 0) { NG(); } else { ; } } void f138(void) { int32_t x553 = INT32_MIN; uint16_t x554 = 5955U; int32_t x555 = INT32_MAX; volatile int32_t t138 = 65175; t138 = (x553==((x554&x555)^x556)); if (t138 != 0) { NG(); } else { ; } } void f139(void) { static int64_t x559 = INT64_MIN; static uint32_t x560 = 279U; volatile int32_t t139 = 0; t139 = (x557==((x558&x559)^x560)); if (t139 != 0) { NG(); } else { ; } } void f140(void) { volatile int16_t x561 = 103; int8_t x562 = 1; int16_t x563 = -1970; static volatile int16_t x564 = -900; volatile int32_t t140 = 1046286461; t140 = (x561==((x562&x563)^x564)); if (t140 != 0) { NG(); } else { ; } } void f141(void) { uint16_t x565 = 6U; static int16_t x566 = -1; static uint64_t x567 = UINT64_MAX; int64_t x568 = INT64_MIN; t141 = (x565==((x566&x567)^x568)); if (t141 != 0) { NG(); } else { ; } } void f142(void) { int32_t x569 = INT32_MIN; int64_t x571 = 5378481087715540LL; volatile uint64_t x572 = 16150376848LLU; volatile int32_t t142 = 122925; t142 = (x569==((x570&x571)^x572)); if (t142 != 0) { NG(); } else { ; } } void f143(void) { uint64_t x573 = 23991LLU; uint64_t x574 = 549632346836881825LLU; int16_t x575 = INT16_MIN; t143 = (x573==((x574&x575)^x576)); if (t143 != 0) { NG(); } else { ; } } void f144(void) { int64_t x577 = -93083077LL; int32_t x578 = 186330; uint8_t x580 = UINT8_MAX; t144 = (x577==((x578&x579)^x580)); if (t144 != 0) { NG(); } else { ; } } void f145(void) { int16_t x581 = -112; int16_t x582 = INT16_MAX; t145 = (x581==((x582&x583)^x584)); if (t145 != 0) { NG(); } else { ; } } void f146(void) { int64_t x585 = INT64_MAX; int64_t x586 = 16270857LL; uint32_t x587 = UINT32_MAX; uint16_t x588 = UINT16_MAX; int32_t t146 = 1; t146 = (x585==((x586&x587)^x588)); if (t146 != 0) { NG(); } else { ; } } void f147(void) { static volatile int8_t x589 = INT8_MIN; int16_t x590 = INT16_MAX; int8_t x591 = 0; uint16_t x592 = 1U; static volatile int32_t t147 = -606; t147 = (x589==((x590&x591)^x592)); if (t147 != 0) { NG(); } else { ; } } void f148(void) { int32_t x593 = INT32_MIN; volatile uint16_t x595 = 8072U; static int8_t x596 = -1; t148 = (x593==((x594&x595)^x596)); if (t148 != 0) { NG(); } else { ; } } void f149(void) { int64_t x597 = INT64_MAX; int64_t x598 = INT64_MIN; int32_t x599 = INT32_MIN; int8_t x600 = 29; static int32_t t149 = -82416103; t149 = (x597==((x598&x599)^x600)); if (t149 != 0) { NG(); } else { ; } } void f150(void) { int8_t x601 = INT8_MIN; uint8_t x602 = 4U; uint16_t x603 = UINT16_MAX; int32_t x604 = 1007191366; int32_t t150 = 94449145; t150 = (x601==((x602&x603)^x604)); if (t150 != 0) { NG(); } else { ; } } void f151(void) { int16_t x605 = -1; uint16_t x606 = UINT16_MAX; uint8_t x607 = 3U; int32_t t151 = -8224223; t151 = (x605==((x606&x607)^x608)); if (t151 != 0) { NG(); } else { ; } } void f152(void) { static int32_t x610 = INT32_MIN; uint16_t x611 = UINT16_MAX; static uint32_t x612 = 31823U; t152 = (x609==((x610&x611)^x612)); if (t152 != 0) { NG(); } else { ; } } void f153(void) { static int32_t x614 = INT32_MAX; uint8_t x615 = 90U; int64_t x616 = -5LL; int32_t t153 = 180386984; t153 = (x613==((x614&x615)^x616)); if (t153 != 0) { NG(); } else { ; } } void f154(void) { static uint8_t x619 = UINT8_MAX; int16_t x620 = -1; t154 = (x617==((x618&x619)^x620)); if (t154 != 0) { NG(); } else { ; } } void f155(void) { int8_t x621 = -1; static volatile int32_t x622 = INT32_MIN; int8_t x623 = INT8_MIN; static volatile int32_t t155 = -162898; t155 = (x621==((x622&x623)^x624)); if (t155 != 0) { NG(); } else { ; } } void f156(void) { volatile int32_t x625 = 134042476; uint16_t x626 = 7U; int32_t x627 = 1; int16_t x628 = INT16_MAX; int32_t t156 = 62510376; t156 = (x625==((x626&x627)^x628)); if (t156 != 0) { NG(); } else { ; } } void f157(void) { int32_t x629 = -521111; volatile uint8_t x630 = 7U; int16_t x631 = -41; int32_t x632 = INT32_MIN; int32_t t157 = -8052; t157 = (x629==((x630&x631)^x632)); if (t157 != 0) { NG(); } else { ; } } void f158(void) { int32_t x633 = -27885075; volatile int64_t x634 = -1LL; static int32_t x635 = INT32_MIN; int64_t x636 = 173085297LL; volatile int32_t t158 = 79937; t158 = (x633==((x634&x635)^x636)); if (t158 != 0) { NG(); } else { ; } } void f159(void) { volatile int8_t x637 = INT8_MIN; int32_t x638 = 134827; uint16_t x640 = 18976U; volatile int32_t t159 = 47324; t159 = (x637==((x638&x639)^x640)); if (t159 != 0) { NG(); } else { ; } } void f160(void) { int64_t x641 = -15363910525890258LL; int8_t x643 = 0; int64_t x644 = INT64_MIN; volatile int32_t t160 = -1; t160 = (x641==((x642&x643)^x644)); if (t160 != 0) { NG(); } else { ; } } void f161(void) { static int32_t x645 = 33452223; volatile int8_t x646 = INT8_MIN; uint8_t x648 = UINT8_MAX; static int32_t t161 = 288296; t161 = (x645==((x646&x647)^x648)); if (t161 != 0) { NG(); } else { ; } } void f162(void) { int16_t x649 = -1; volatile int64_t x650 = INT64_MAX; volatile int32_t t162 = 608; t162 = (x649==((x650&x651)^x652)); if (t162 != 0) { NG(); } else { ; } } void f163(void) { int32_t x653 = INT32_MIN; uint8_t x654 = 57U; int32_t t163 = 28; t163 = (x653==((x654&x655)^x656)); if (t163 != 0) { NG(); } else { ; } } void f164(void) { int32_t x657 = 6470; int32_t x658 = INT32_MAX; volatile int16_t x660 = 528; volatile int32_t t164 = 208; t164 = (x657==((x658&x659)^x660)); if (t164 != 0) { NG(); } else { ; } } void f165(void) { int32_t x661 = INT32_MIN; uint32_t x662 = 506730U; volatile int8_t x663 = 0; int64_t x664 = INT64_MAX; static int32_t t165 = -30997200; t165 = (x661==((x662&x663)^x664)); if (t165 != 0) { NG(); } else { ; } } void f166(void) { static uint8_t x665 = UINT8_MAX; int8_t x666 = 24; uint16_t x667 = UINT16_MAX; int32_t t166 = 185287447; t166 = (x665==((x666&x667)^x668)); if (t166 != 0) { NG(); } else { ; } } void f167(void) { volatile int8_t x669 = INT8_MIN; volatile int32_t x671 = -46; static int8_t x672 = 1; t167 = (x669==((x670&x671)^x672)); if (t167 != 0) { NG(); } else { ; } } void f168(void) { static int64_t x673 = INT64_MIN; uint32_t x676 = UINT32_MAX; int32_t t168 = -2316073; t168 = (x673==((x674&x675)^x676)); if (t168 != 0) { NG(); } else { ; } } void f169(void) { volatile uint8_t x677 = 2U; int64_t x679 = INT64_MIN; static int64_t x680 = INT64_MIN; int32_t t169 = -4756530; t169 = (x677==((x678&x679)^x680)); if (t169 != 0) { NG(); } else { ; } } void f170(void) { volatile uint64_t x682 = UINT64_MAX; int64_t x683 = 1LL; volatile int16_t x684 = -1; int32_t t170 = 1; t170 = (x681==((x682&x683)^x684)); if (t170 != 0) { NG(); } else { ; } } void f171(void) { volatile int8_t x685 = -1; volatile int32_t x686 = -1031653251; int16_t x687 = INT16_MAX; volatile uint8_t x688 = UINT8_MAX; volatile int32_t t171 = 1765; t171 = (x685==((x686&x687)^x688)); if (t171 != 0) { NG(); } else { ; } } void f172(void) { int64_t x689 = INT64_MIN; int16_t x690 = INT16_MAX; t172 = (x689==((x690&x691)^x692)); if (t172 != 0) { NG(); } else { ; } } void f173(void) { int32_t x693 = INT32_MIN; static volatile int64_t x695 = INT64_MIN; uint32_t x696 = 135351903U; int32_t t173 = -30; t173 = (x693==((x694&x695)^x696)); if (t173 != 0) { NG(); } else { ; } } void f174(void) { uint16_t x697 = 11154U; uint16_t x699 = 546U; int32_t x700 = INT32_MIN; int32_t t174 = -9460; t174 = (x697==((x698&x699)^x700)); if (t174 != 0) { NG(); } else { ; } } void f175(void) { static uint16_t x701 = 27U; static int32_t x702 = INT32_MIN; int32_t x703 = INT32_MAX; uint16_t x704 = 9U; volatile int32_t t175 = 1; t175 = (x701==((x702&x703)^x704)); if (t175 != 0) { NG(); } else { ; } } void f176(void) { int32_t x705 = -1; volatile uint16_t x706 = 31959U; int8_t x707 = -14; int8_t x708 = INT8_MIN; int32_t t176 = -107; t176 = (x705==((x706&x707)^x708)); if (t176 != 0) { NG(); } else { ; } } void f177(void) { uint8_t x709 = UINT8_MAX; volatile uint8_t x710 = 67U; static int16_t x712 = -116; volatile int32_t t177 = -5871; t177 = (x709==((x710&x711)^x712)); if (t177 != 0) { NG(); } else { ; } } void f178(void) { volatile int64_t x713 = 3550780491LL; static int16_t x714 = -100; volatile int32_t x715 = 191182481; static uint32_t x716 = UINT32_MAX; int32_t t178 = 3; t178 = (x713==((x714&x715)^x716)); if (t178 != 0) { NG(); } else { ; } } void f179(void) { uint32_t x718 = 20590353U; int8_t x719 = 15; int32_t t179 = 0; t179 = (x717==((x718&x719)^x720)); if (t179 != 0) { NG(); } else { ; } } void f180(void) { int64_t x721 = INT64_MIN; uint16_t x722 = 1U; static uint16_t x724 = UINT16_MAX; int32_t t180 = 338226; t180 = (x721==((x722&x723)^x724)); if (t180 != 0) { NG(); } else { ; } } void f181(void) { int32_t x725 = 258260; int64_t x726 = 198964LL; int8_t x727 = -1; int64_t x728 = 80007054506LL; static int32_t t181 = 1; t181 = (x725==((x726&x727)^x728)); if (t181 != 0) { NG(); } else { ; } } void f182(void) { static int16_t x729 = INT16_MAX; uint32_t x730 = UINT32_MAX; uint16_t x731 = 638U; int8_t x732 = 2; t182 = (x729==((x730&x731)^x732)); if (t182 != 0) { NG(); } else { ; } } void f183(void) { static volatile int16_t x733 = INT16_MIN; int32_t x734 = INT32_MIN; static uint16_t x735 = UINT16_MAX; t183 = (x733==((x734&x735)^x736)); if (t183 != 0) { NG(); } else { ; } } void f184(void) { volatile int16_t x738 = INT16_MIN; int16_t x739 = -1; int16_t x740 = INT16_MAX; int32_t t184 = -2811; t184 = (x737==((x738&x739)^x740)); if (t184 != 0) { NG(); } else { ; } } void f185(void) { int8_t x741 = -1; int8_t x743 = -1; static int32_t x744 = 305; volatile int32_t t185 = -1307370; t185 = (x741==((x742&x743)^x744)); if (t185 != 0) { NG(); } else { ; } } void f186(void) { static int32_t x745 = -1; int16_t x746 = INT16_MAX; volatile int32_t x747 = 2; uint32_t x748 = 5U; volatile int32_t t186 = -574; t186 = (x745==((x746&x747)^x748)); if (t186 != 0) { NG(); } else { ; } } void f187(void) { int64_t x749 = INT64_MIN; volatile int16_t x750 = INT16_MAX; volatile int64_t x751 = 142585492894931172LL; uint64_t x752 = 29LLU; int32_t t187 = 11; t187 = (x749==((x750&x751)^x752)); if (t187 != 0) { NG(); } else { ; } } void f188(void) { volatile int16_t x753 = INT16_MIN; int64_t x754 = INT64_MIN; volatile int8_t x755 = -1; int32_t t188 = 503862070; t188 = (x753==((x754&x755)^x756)); if (t188 != 0) { NG(); } else { ; } } void f189(void) { uint64_t x757 = 430049095892701262LLU; static int8_t x758 = INT8_MAX; int64_t x759 = INT64_MIN; volatile uint64_t x760 = 1803796LLU; volatile int32_t t189 = -85202256; t189 = (x757==((x758&x759)^x760)); if (t189 != 0) { NG(); } else { ; } } void f190(void) { uint8_t x761 = 107U; int16_t x762 = 197; int64_t x763 = INT64_MAX; int8_t x764 = INT8_MAX; static volatile int32_t t190 = -3877386; t190 = (x761==((x762&x763)^x764)); if (t190 != 0) { NG(); } else { ; } } void f191(void) { static volatile uint32_t x765 = 50817U; uint64_t x766 = 4LLU; static int16_t x767 = INT16_MIN; int32_t t191 = -1894; t191 = (x765==((x766&x767)^x768)); if (t191 != 0) { NG(); } else { ; } } void f192(void) { int64_t x771 = 926493570881707LL; static int8_t x772 = INT8_MAX; volatile int32_t t192 = -32575688; t192 = (x769==((x770&x771)^x772)); if (t192 != 0) { NG(); } else { ; } } void f193(void) { int8_t x773 = INT8_MAX; static uint64_t x774 = 7512803750LLU; int32_t x775 = INT32_MAX; static volatile int32_t x776 = INT32_MIN; volatile int32_t t193 = -12553; t193 = (x773==((x774&x775)^x776)); if (t193 != 0) { NG(); } else { ; } } void f194(void) { uint8_t x777 = 8U; uint16_t x778 = 34U; int64_t x779 = -198125752690LL; uint32_t x780 = 29070298U; t194 = (x777==((x778&x779)^x780)); if (t194 != 0) { NG(); } else { ; } } void f195(void) { volatile int16_t x781 = -1; int64_t x782 = 175470211285543585LL; volatile uint32_t x783 = 23U; int32_t t195 = -61627; t195 = (x781==((x782&x783)^x784)); if (t195 != 0) { NG(); } else { ; } } void f196(void) { int16_t x785 = 0; static uint64_t x786 = 1LLU; uint32_t x787 = UINT32_MAX; int32_t t196 = 604; t196 = (x785==((x786&x787)^x788)); if (t196 != 0) { NG(); } else { ; } } void f197(void) { volatile uint8_t x789 = UINT8_MAX; volatile uint16_t x790 = 3U; int64_t x792 = INT64_MAX; static volatile int32_t t197 = -630; t197 = (x789==((x790&x791)^x792)); if (t197 != 0) { NG(); } else { ; } } void f198(void) { int32_t x793 = -2519; volatile uint16_t x794 = UINT16_MAX; int32_t x795 = INT32_MAX; uint64_t x796 = UINT64_MAX; int32_t t198 = -361; t198 = (x793==((x794&x795)^x796)); if (t198 != 0) { NG(); } else { ; } } void f199(void) { static uint8_t x797 = 0U; volatile int8_t x798 = INT8_MIN; int8_t x800 = INT8_MIN; volatile int32_t t199 = 0; t199 = (x797==((x798&x799)^x800)); if (t199 != 0) { NG(); } else { ; } } int main(void) { f0(); f1(); f2(); f3(); f4(); f5(); f6(); f7(); f8(); f9(); f10(); f11(); f12(); f13(); f14(); f15(); f16(); f17(); f18(); f19(); f20(); f21(); f22(); f23(); f24(); f25(); f26(); f27(); f28(); f29(); f30(); f31(); f32(); f33(); f34(); f35(); f36(); f37(); f38(); f39(); f40(); f41(); f42(); f43(); f44(); f45(); f46(); f47(); f48(); f49(); f50(); f51(); f52(); f53(); f54(); f55(); f56(); f57(); f58(); f59(); f60(); f61(); f62(); f63(); f64(); f65(); f66(); f67(); f68(); f69(); f70(); f71(); f72(); f73(); f74(); f75(); f76(); f77(); f78(); f79(); f80(); f81(); f82(); f83(); f84(); f85(); f86(); f87(); f88(); f89(); f90(); f91(); f92(); f93(); f94(); f95(); f96(); f97(); f98(); f99(); f100(); f101(); f102(); f103(); f104(); f105(); f106(); f107(); f108(); f109(); f110(); f111(); f112(); f113(); f114(); f115(); f116(); f117(); f118(); f119(); f120(); f121(); f122(); f123(); f124(); f125(); f126(); f127(); f128(); f129(); f130(); f131(); f132(); f133(); f134(); f135(); f136(); f137(); f138(); f139(); f140(); f141(); f142(); f143(); f144(); f145(); f146(); f147(); f148(); f149(); f150(); f151(); f152(); f153(); f154(); f155(); f156(); f157(); f158(); f159(); f160(); f161(); f162(); f163(); f164(); f165(); f166(); f167(); f168(); f169(); f170(); f171(); f172(); f173(); f174(); f175(); f176(); f177(); f178(); f179(); f180(); f181(); f182(); f183(); f184(); f185(); f186(); f187(); f188(); f189(); f190(); f191(); f192(); f193(); f194(); f195(); f196(); f197(); f198(); f199(); return 0; }
<gh_stars>0 /* * Copyright 2016 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.thoughtworks.go.server; import com.thoughtworks.go.util.GoConstants; import com.thoughtworks.go.util.SystemEnvironment; import com.thoughtworks.go.util.ZipUtil; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.WildcardFileFilter; import org.apache.log4j.PropertyConfigurator; import java.io.File; import java.io.FileFilter; import java.io.IOException; import static org.hibernate.cfg.Environment.GENERATE_STATISTICS; /** * @understands how to run a local development mode webserver so we can develop live * Set the following before running the main method: * Working directory: <project-path>/server * VM arguments: -Xms512m -Xmx1024m -XX:PermSize=400m -Djava.awt.headless=true * classpath: Use classpath of 'development-server' */ public class DevelopmentServer { public static void main(String[] args) throws Exception { copyDbFiles(); PropertyConfigurator.configureAndWatch(DevelopmentServer.class.getClassLoader().getResource("log4j.properties").getFile()); File webApp = new File("webapp"); if (!webApp.exists()) { throw new RuntimeException("No webapp found in " + webApp.getAbsolutePath()); } copyActivatorJarToClassPath(); SystemEnvironment systemEnvironment = new SystemEnvironment(); String chosenAppServer = System.getProperty(SystemEnvironment.APP_SERVER.propertyName()); if (chosenAppServer == null || chosenAppServer.trim().isEmpty()) { systemEnvironment.set(SystemEnvironment.APP_SERVER, SystemEnvironment.JETTY9); } systemEnvironment.setProperty(GENERATE_STATISTICS, "true"); systemEnvironment.setProperty(SystemEnvironment.PARENT_LOADER_PRIORITY, "true"); systemEnvironment.setProperty(SystemEnvironment.CRUISE_SERVER_WAR_PROPERTY, webApp.getAbsolutePath()); systemEnvironment.set(SystemEnvironment.PLUGIN_LOCATION_MONITOR_INTERVAL_IN_SECONDS, 5); systemEnvironment.set(SystemEnvironment.DEFAULT_PLUGINS_ZIP, "/plugins.zip"); systemEnvironment.setProperty(GoConstants.I18N_CACHE_LIFE, "0"); //0 means reload when stale setupPeriodicGC(systemEnvironment); PropertyConfigurator.configureAndWatch("./properties/src/log4j.properties", 100L); File pluginsDist = new File("../tw-go-plugins/dist/"); if (!pluginsDist.exists()) { pluginsDist.mkdirs(); } new ZipUtil().zipFolderContents(pluginsDist, new File(classpath(), "plugins.zip")); GoServer server = new GoServer(); systemEnvironment.setProperty(GoConstants.USE_COMPRESSED_JAVASCRIPT, Boolean.toString(false)); try { server.startServer(); String hostName = systemEnvironment.getListenHost(); if(hostName == null){ hostName = "localhost"; } System.out.println("Go server dashboard started on http://" + hostName + ":" + systemEnvironment.getServerPort()); System.out.println("* credentials: \"admin\" / \"badger\""); } catch (Exception e) { System.err.println("Failed to start Go server. Exception:"); e.printStackTrace(); } } private static void setupPeriodicGC(SystemEnvironment systemEnvironment) { systemEnvironment.set(SystemEnvironment.GO_CONFIG_REPO_GC_LOOSE_OBJECT_WARNING_THRESHOLD, 100L); systemEnvironment.set(SystemEnvironment.GO_CONFIG_REPO_PERIODIC_GC, true); systemEnvironment.set(SystemEnvironment.GO_CONFIG_REPO_GC_AGGRESSIVE, true); systemEnvironment.setProperty("go.config.repo.gc.cron", "0 0/1 * 1/1 * ?"); systemEnvironment.setProperty("go.config.repo.gc.check.interval", "10000"); } private static void copyDbFiles() throws IOException { FileUtils.copyDirectoryToDirectory(new File("db/migrate/h2deltas"), new File("db/")); if (!new File("db/h2db/cruise.h2.db").exists()) { FileUtils.copyDirectoryToDirectory(new File("db/dbtemplate/h2db"), new File("db/")); } } private static void copyActivatorJarToClassPath() throws IOException { File activatorJar = new File("../plugin-infra/go-plugin-activator/target/libs/").listFiles((FileFilter) new WildcardFileFilter("go-plugin-activator-*.jar"))[0]; new SystemEnvironment().set(SystemEnvironment.PLUGIN_ACTIVATOR_JAR_PATH, "go-plugin-activator.jar"); if (activatorJar.exists()) { FileUtils.copyFile(activatorJar, new File(classpath(), "go-plugin-activator.jar")); } else { System.err.println("Could not find plugin activator jar, Plugin framework will not be loaded."); } } private static File classpath() { return new File("target/classes/main"); } }
Treatment of Symptomatic First Metatarsal Shortened by Surgery There are several complications that can result from shortening of the first metatarsal in the treatment of bunion. Metatarsalgia and recurrent deformity can be quite disabling. The surgical technique described in this brief report provides improved support of the metatarsal heads in walking while decreasing pain and enables the patient to stand for longer periods of time. The procedure is reserved for salvage of those patients with severe pain and deformity and in whom other salvage procedures have failed.
#!/usr/bin/env vpython3 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. """Downloads precompiled tools. These are checked into the repository as SHA-1 hashes (see *.sha1 files in subdirectories). Note that chrome-webrtc-resources is a Google-internal bucket, so please download and compile these tools manually if this script fails. """ import os import sys SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) sys.path.append(os.path.join(SRC_DIR, 'build')) import find_depot_tools find_depot_tools.add_depot_tools_to_path() import gclient_utils import subprocess2 def main(directories): if not directories: directories = [SCRIPT_DIR] for path in directories: cmd = [ sys.executable, os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'download_from_google_storage.py'), '--directory', '--num_threads=10', '--bucket', 'chrome-webrtc-resources', '--auto_platform', '--recursive', path, ] print('Downloading precompiled tools...') # Perform download similar to how gclient hooks execute. try: gclient_utils.CheckCallAndFilter(cmd, cwd=SRC_DIR, always_show_header=True) except (gclient_utils.Error, subprocess2.CalledProcessError) as e: print('Error: %s' % str(e)) return 2 return 0 if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
//Function to remove duplicates from sorted linked list. Node removeDuplicates(Node head) { Node left = head; Node right = head.next; left.next = null; Node newHead = left; while(right != null) { if(right.data != left.data) { left.next = right; left = left.next; right = right.next; left.next = null; continue; } right = right.next; } return newHead; }
HISTORY AND DEVELOPMENT OF LEGAL INERPRETATION IN JAPAN ON THE BASIS OF THE SO CALLED TOKYO TRIAL The International Military Tribunal for the Far East, the so called Tokyo Trial is the international trial of the war criminals who led the Japanese government and military during the Second World War. T he trial began on 3 rd of May 1946 and closed on 11 th of November 1984. Around the same time in Europe t h e Nuremberg Trial of Nazi war crimes was conducted. In both trial s the role of the interpreter was essential, for example, in the Nuremberg Tribunal the simultaneous interpreti ng in English, G e rman, French and Russian was applied. On the other hand in the Tokyo Trial, though the Japanese, the English and other languages as the Chinese were used during the trial, the position of the interpreters was not emphasized enough. T h e aim of this paper is to analyze the basic theory of interpretin g in comparison with the interpreters role in both trial s.
// Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_COUNT_BiTS_Hh_ #define DLIB_COUNT_BiTS_Hh_ #include "../algs.h" #include <climits> namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > T count_bits ( T v ) /*! requires - T is an unsigned integral type ensures - returns the number of bits in v which are set to 1. !*/ { COMPILE_TIME_ASSERT(is_unsigned_type<T>::value && sizeof(T) <= 8); // This bit of bit trickery is from: // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSet64 v = v - ((v >> 1) & (T)~(T)0/3); v = (v & (T)~(T)0/15*3) + ((v >> 2) & (T)~(T)0/15*3); v = (v + (v >> 4)) & (T)~(T)0/255*15; return (T)(v * ((T)~(T)0/255)) >> (sizeof(T) - 1) * CHAR_BIT; } // ---------------------------------------------------------------------------------------- template < typename T > T hamming_distance ( const T& a, const T& b ) /*! requires - T is an unsigned integral type ensures - returns the number of bits which differ between a and b. !*/ { return count_bits(a^b); } // ---------------------------------------------------------------------------------------- template < typename T > T hamming_distance ( const std::pair<T,T>& a, const std::pair<T,T>& b ) /*! requires - T is an unsigned integral type or a std::pair that, recursively, eventually contains unsigned integral types. ensures - returns the number of bits which differ between a and b. !*/ { return hamming_distance(a.first,b.first) + hamming_distance(a.second, b.second); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_COUNT_BiTS_Hh_
<reponame>Fribblezhu/myblog import { StyleSheet } from 'aphrodite'; export const styles = StyleSheet.create({ wrapper: { position: 'fixed', top: '12px', right: '12px', zIndex: '999999', display: 'table', }, list: { marginBottom: '12px', }, toastBase: { color: 'white', opacity: '0.9', width: '285px', height: '65px', display: 'table-cell', verticalAlign: 'middle', fontWeight: 'bold', paddingLeft: '12px', boxShadow: '0 0 5px 0 rgba(0, 0, 0, 0.25)', }, success: { backgroundColor: '#06BC5A', }, warning: { backgroundColor: '#F97A1F', }, error: { backgroundColor: '#F1432A', }, fadeOut: { visibility: 'hidden', opacity: '0', transition: 'visibility 0s .2s, opacity .2s linear', } });
// matches the input parameter controller value. public class TestStepControlledSleep implements Step { private Logger logger = LoggerFactory.getLogger(TestStepControlledSleep.class); @Override public StepResult doStep(FlightContext context) throws InterruptedException { FlightMap inputParameters = context.getInputParameters(); int stopSleepValue = inputParameters.get(MapKey.CONTROLLER_VALUE, Integer.class); while (TestPauseController.getControl() != stopSleepValue) { TimeUnit.SECONDS.sleep(1); } FlightMap workingMap = context.getWorkingMap(); workingMap.put(MapKey.RESULT, "sleep step woke up"); return StepResult.getStepResultSuccess(); } @Override public StepResult undoStep(FlightContext context) { return StepResult.getStepResultSuccess(); } }
South Korea? Trump's 'Where Are You From' Moment Enlarge this image toggle caption Jim Cole/AP Jim Cole/AP This post was updated at 2 p.m. ET Friday This week, a seemingly benign Q&A turned into an awkward cultural moment on the presidential campaign trail. Joseph Choe, a Harvard student, stood up to ask Donald Trump a question about South Korea at the No Labels Problem Solver Convention in New Hampshire on Monday. First, Trump, who likes to tout that he went to the Wharton business school at the University of Pennsylvania, remarked on Choe's choice of hoodie. "Harvard?" Trump asked. "You go to Harvard?" He does. There was some silence before Choe got the microphone. Trump started to grow impatient, urging Choe to just shout out the question. "He's choking!" Trump jabbed. Choe finally started to ask his question. "Basically, you said that South Korea takes advantage of the United States in terms of the defense spending on the Korean Peninsula," he began. "I just want to get the facts straight." Before he could finish, Trump interrupted. "Are you from South Korea?" he wondered aloud. "I'm not," Choe said. "I was born in Texas, raised in Colorado." That prompted some in the audience to laugh. He tried to go on, but wound up not getting out a question, but a statement instead. "No matter where I'm from, I like to get my facts straight," Choe said before being cut off. Choe, a 20-year-old economics major whose parents were born in Korea, told NPR after the event that one of the main reasons he went to the convention was to ask Trump a question. "I don't care who you are, whether you're the prime minister or Donald Trump, if you say something factually wrong or do something factually wrong, I'll call you out on it," Choe said. "[Trump] makes all these, like, weird accusations, whether it's toward Mexicans or women, or South Koreans; I just wanted to call him out on that." A fellow conference attendee who walked by Choe joked, "You're gonna have to show him your birth certificate, man!" Choe laughed it off. But questioning where someone is from can be loaded for Asian-Americans, said Jennifer Lee, a sociology professor at the University of California, Irvine who studies race, immigration and culture. There's an implied sense of foreignness in how Trump treated Choe, Lee said. "It seems like this innocuous question, like people are just asking your identity," Lee said, "but they're really challenging this idea of who is American, which is, at the core, an offensive question. It's this persistent perception that Asian-Americans are not American, that they are perpetual foreigners." The Trump campaign did not immediately respond to phone and email requests for comment. As far as Choe goes, he said he's not supporting Trump for president in 2016, but he wants him to know, "I'm as American as it gets."
<reponame>somenothing/supreme-chainsaw<filename>components/image.py import copy import cv2 import numpy as np hsv_dict = { '0': (np.array([0, 0, 100]), np.array([180, 30, 255])), '1': (np.array([20, 50, 80]), np.array([40, 255, 245])), '2': (np.array([100, 50, 120]), np.array([125, 255, 255])), '3': (np.array([160, 100, 100]), np.array([180, 255, 255])), '4': (np.array([125, 45, 50]), np.array([155, 255, 255])), '5': (np.array([10, 90, 100]), np.array([15, 255, 255])), '6': (np.array([50, 50, 50]), np.array([70, 255, 255])), '7': (np.array([2, 150, 80]), np.array([9, 255, 255])), '8': (np.array([0, 0, 15]), np.array([180, 255, 60])), } def resize(image, scale): """ 调整图像大小,按比例缩放 :param image: cv2图像对象 :param scale: 缩放比例 :return: 缩放后的图像 """ size = (int(image.shape[1] * scale), int(image.shape[0] * scale)) return cv2.resize(image, dsize=size) def extract_table(target_image, empty_image): """ 提取球桌边缘位置 :param target_image: 目标图像 :param empty_image: 空桌面图像 :return: 球桌边缘的坐标 """ target_size = target_image.shape[:2][::-1] # 目标图像大小,转换为(宽度, 高度) empty_image = cv2.resize(empty_image, target_size) # 空桌面大小自动缩放 # hsv范围 hsv_min = np.array([70, 150, 0]) hsv_max = np.array([90, 255, 255]) # 图片预处理 image_hsv = cv2.cvtColor(empty_image, cv2.COLOR_BGR2HSV) # 图片转换为hsv mask = cv2.inRange(image_hsv, hsv_min, hsv_max) # 设置阈值 table_image = cv2.bitwise_and(empty_image, empty_image, mask=mask) # 去除背景部分 table_blurred = cv2.GaussianBlur(table_image, (15, 15), 0) # 模糊处理 table_canny = cv2.Canny(table_blurred, 50, 50) # 边缘提取 lines = cv2.HoughLinesP(table_canny, 1.0, np.pi / 180, 100, minLineLength=500, maxLineGap=60) # 霍夫直线检测 result = [None, None, None, None] # 顺序:x1, x2, y1, y2 for line in lines: for x1, y1, x2, y2 in line: # cv2.line(target_image, (x1, y1), (x2, y2), (0, 0, 255), 2) if abs(x1 - x2) < 2 and x1 + x2 < target_size[0]: # 左侧竖直线 result[0] = int((x1 + x2) / 2) if result[0] is None or int((x1 + x2) / 2) > result[0] else result[0] if abs(x1 - x2) < 2 and x1 + x2 > target_size[0]: # 右侧竖直线 result[1] = int((x1 + x2) / 2) if result[1] is None or int((x1 + x2) / 2) < result[1] else result[1] if abs(y1 - y2) < 2 and y1 + y2 < target_size[1]: # 上方水平线 result[2] = int((y1 + y2) / 2) if result[2] is None or int((y1 + y2) / 2) > result[2] else result[2] if abs(y1 - y2) < 2 and y1 + y2 > target_size[1]: # 下方水平线 result[3] = int((y1 + y2) / 2) if result[3] is None or int((y1 + y2) / 2) < result[3] else result[3] # 如检测正常,下方语句可显示自左上至右下的对角线 # cv2.line(target_image, (result[0], result[2]), (result[1], result[3]), (0, 0, 255), 2) if None in result: print('[x错误x] 球桌边缘检测失败:%s\n位于./components/image.py' % result) return None else: print('球桌边缘检测:', result) return result def extract_ball(target_image, empty_image, table_range=None): target_size = target_image.shape[:2][::-1] # 目标图形大小,转换为(宽度, 高度) empty_image = cv2.resize(empty_image, target_size) # 将空桌面大小自动缩放 # 图片预处理 subtract_image = cv2.subtract(target_image, empty_image) # 相减 gray_image = cv2.cvtColor(subtract_image, cv2.COLOR_BGR2GRAY) # 转为灰度图像 ret, thresh = cv2.threshold(gray_image, 5, 255, cv2.THRESH_BINARY_INV) # 二值化 # 霍夫圆形检测 circles = cv2.HoughCircles(thresh, cv2.HOUGH_GRADIENT, 1, 8, param1=20, param2=12, minRadius=20, maxRadius=30) if circles is None: print('[x错误x] 台球第一次检测失败:%s\n位于./components/image.py' % circles) return None # 圆形过滤 draw_image = copy.deepcopy(target_image) if table_range is None: # 未提供过滤参数 for circle in circles[0]: x, y, r = [int(i) for i in circle] cv2.circle(draw_image, (x, y), r, (0, 0, 255), -1) print('台球检测:共找到%s个' % len(circles[0])) print('[!警告!] 不提供参考范围参数仅用于调试,考虑给函数提供参考范围参数以提高准确度!\n位于./components/image.py') return None else: filter_num = 0 filter_results = [] for circle in circles[0]: if table_range[0] < circle[0] < table_range[1] and table_range[2] < circle[1] < table_range[3]: # 圆形在球桌范围内 filter_num += 1 x, y, r = [int(i) for i in circle] filter_results.append([x, y, r]) cv2.circle(draw_image, (x, y), r, (0, 0, 255), -1) print('台球检测:共找到%s个' % filter_num) print(filter_results) # 精细圆形检测 radius = int(np.ceil(np.mean([result[2] for result in filter_results]))) # 向上取整半径平均值 print('第二次台球检测:') ball_result = {} for result in filter_results: # 裁剪图像 border = int(np.ceil(radius * 1.5)) x1, x2, y1, y2 = result[0] - border, result[0] + border, result[1] - border, result[1] + border ball_cropped = target_image[y1:y2, x1:x2] empty_cropped = empty_image[y1:y2, x1:x2] # 预处理 subtract_ball_image = cv2.subtract(ball_cropped, empty_cropped) # 相减 gray_ball_image = cv2.cvtColor(subtract_ball_image, cv2.COLOR_BGR2GRAY) # 转为灰度图像 ret_ball, thresh_ball = cv2.threshold(gray_ball_image, 8, 255, cv2.THRESH_BINARY_INV) # 二值化 # 霍夫圆形检测 circles = cv2.HoughCircles(thresh_ball, cv2.HOUGH_GRADIENT, 1, 10, param1=20, param2=10, minRadius=20, maxRadius=30) if circles is None: print('[?提示?] 第二次检测存在区域无有效圆形?\n位于./components/image.py') continue if len(circles[0]) == 1: # 只检测到一个圆形 x, y, r = [int(i) for i in circles[0][0]] position_filtered = [x, y, r] # cv2.circle(ball_cropped, (x, y), r, (0, 0, 255), 5) else: # 检测到多个圆形 ball_possible = [0, radius * 2] # 可能值,顺序为[序号, 距图中心距离] # 遍历圆形,寻找距中心最近的圆 # todo: 此段代码可能存在缺陷,可能返回最外侧的圆形而不是中间的圆形 for index, circle in enumerate(circles[0]): x, y, r = [int(i) for i in circle] horizontal_distance, vertical_distance = abs(x - radius), abs(y - radius) distance = np.sqrt(horizontal_distance ** 2 + vertical_distance ** 2) if distance < ball_possible[1]: ball_possible = [index, distance] x, y, r = [int(i) for i in circles[0][ball_possible[0]]] position_filtered = [x, y, r] # 裁剪出每个球的圆形图像 mask_circle = np.zeros(ball_cropped.shape[:2], np.uint8) # 新建蒙版 mask_circle = cv2.circle(mask_circle, (x, y), r, (255, 255, 255), -1) # 设置最大内接圆为不透明 ball_image = cv2.bitwise_and(ball_cropped, ball_cropped, mask=mask_circle) # 对每个球进行进一步检测判断球号 ball_hsv = cv2.cvtColor(ball_image, cv2.COLOR_BGR2HSV) # 图片转换为hsv cv2.imshow('ball', ball_image) color_result = {} ball_area = np.pi * (r ** 2) for num, color in hsv_dict.items(): mask = cv2.inRange(ball_hsv, color[0], color[1]) # 设置阈值 contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) # 轮廓检测 area = 0 for contour in contours: area += cv2.contourArea(contour) # 面积累加 if area > 0.1 * ball_area and color != '0': # 过滤小面积误差 color_result[num] = area elif area > 0.5 * ball_area and color == '0': color_result[num] = area color_result = sorted(color_result.items(), key=lambda kv: (kv[1], kv[0])) # 排序,取面积最大的两个 if len(color_result) > 1: if color_result[1][1] > color_result[0][1] * 5: # 如果大的面积远大于小的面积,则为主要颜色 color_result = [color_result[1]] color_result = [result[0] for result in color_result] print(color_result) # 合并结果 position_trans = np.array(position_filtered) + np.array([x1, y1, 0]) # 将局部坐标转换为全局坐标 position_trans = position_trans.tolist() if len(color_result) == 1: # 全色球 ball_result[color_result[0]] = position_trans elif len(color_result) == 2 and '0' in color_result and '8' not in color_result: # 花色球 color_result = [str(int(c) + 8) for c in color_result if c != '0'] # 计算球号 ball_result[color_result[0]] = position_trans print(ball_result) cv2.waitKey(0) return draw_image
Reinforced Topological Nano-assemblies: 2D Hexagon-Fused Wheel to 3D Prismatic Metallo-lamellar Structure with Molecular Weight of 119K Daltons. By the precisely metallo-ligand design, the advanced coordination-driven self-assembly could succeed the preparation of giant molecular weight of the metallo-architectures. However, the synthesis of single discrete high-molecular-weight (>100K Da) structure has not been demonstrated since the insurmountable synthetic challenge. Herein we present a two-dimensional wheel structure (W1) and a gigantic three-dimensional dodecagonal prism-like architecture (P1) which were generated by multicomponent self-assembly of two similar metallo-organic ligands and a core ligand with metal ions, re-spectively. The giant 2D-supra-structure W1 with six hexagonal metallacycles that fused to the central spoke-wheel was first achieved in nearly quantitative yield, then directed by introducing a meta-substituted coordination site into the key ligand, the supercharged (36 Ru2+ and 48 Cd2+ ions) double-decker prismatic structure P1 with two wheel structures W1 serve as the surfaces and twelve connectivities serve as the edges, which possesses a molecular weight up to 119498.18 Da was accomplished. The expected molecular composition and size morphology was unequivocally characterized by nuclear magnetic resonance, mass spectrometry and transmission electron microscopy investigations. The introduction of wheel structure is able to add considerable stability and complexity to the final architecture. These well-defined scaffolds were expected to play an important role in the functional materials fields, such as molecular encap-sulation and medicine sustained-release.
CD4+ T regulatory and effector cells display a similar wide range of affinities for self during autoimmune disease (BA13P.129) The affinity of a T cell receptor (TCR) from a regulatory T cell (Treg) for endogenous self peptide MHC complex is unknown. It is thought that thymic derived Tregs (nTregs) are enriched for high affinity, self-reactive TCRs as an alternative to negative selection. During experimental autoimmune encephalomyelitis (EAE), MOG self-antigen pMHC tetramers identified few ( 80% each) localized in the central nervous system (CNS) at peak EAE are in fact MOG self antigen specific. Tregs and Teffs possessed similar broad 1000 fold ranges in affinities for MOG with geometric means of 1 and 4 X 10-5 m4. In the CNS, greater than 90% of the Tregs expressed helios which was consistent with frequencies in the thymus (94%), which suggests an enrichment of nTregs in the CNS during peak EAE. Contrary to the hypothesis that nTregs arise as an alternative to negative selection due to a high affinity for self, our data show that TCR affinity of MOG specific Tregs mimics Teffs with no enrichment of high affinity cells.
package main import ( _ "api/docs" // docs is generated by Swag CLI, you have to import it. "github.com/burgesQ/gommon/log" "github.com/burgesQ/webfmwk/v4" "github.com/burgesQ/webfmwk/v4/handler" httpSwagger "github.com/swaggo/http-swagger" ) var ( version = "undef" ) // @Summary Fetch the API version // @Description Handler to fetch the api version // @Param pretty query bool false "return a pretty JSON" // @Success 200 {object} webfmwk.Response // @Produce application/json // @Router /v1/version [get] // @Tags Utils func getVersion(c webfmwk.Context) error { return c.JSONOk(webfmwk.Response{Content: version}) } // @title API // @version 1.0 // @description This is an example API GRPC. // @termsOfService https://www.youtube.com/watch?v=DLzxrzFCyOs // @contact.name <NAME> // @contact.url http://github.com/burgesQ // @contact.email <EMAIL> // @license.name GFO // @license.url https://www.youtube.com/watch?v=DLzxrzFCyOs // @host localhost:4242 // @BasePath /api func main() { log.SetLogLevel(log.LogDEBUG) s := webfmwk.InitServer( webfmwk.WithLogger(log.GetLogger()), webfmwk.SetPrefix("/api/v1"), webfmwk.CheckIsUp(), webfmwk.WithCORS(), webfmwk.WithDocHandler(httpSwagger.WrapHandler), webfmwk.WithHandlers(handler.Logging)) s.GET("/version", getVersion) s.DumpRoutes() // start asynchronously on :4242 s.Start(":4242") // ctrl+c is handled internaly defer s.WaitAndStop() }
Enhanced photoluminescence of Alq3 via patterned array silver dendritic nanostructures Various silver nanostructures, semi-ball, jungle, and dendritic, are demonstrated by an electrical deposition process. The formation of silver nanostructures with various morphologies is studied by the mechanism of the diffusion limited aggregation (DLA) model. A array pattern of silver nanostructures can be obtained when the conductive substrate was used in a uniform electrical filed. A thickness 500 nm of Alq3 thin-film was covered on the silver nanostructure by thermal evaporation method. The strongest intensity of Alq3 green emission was observed when the pattern-array dendritic silver nanostructure was covered by Alq3. It can be explained with the plasmonic coupling due to the Alq3 and dendritic nanostructure. The result can help us to further application the patterned-array silver dendritic nanostructure for advanced opto-electronic device.
/** * Update track list from formatted TOC data. * * @returns VBox status code. * @param pTrackList The track list to update. * @param iTrack The first track the TOC has data for. * @param fMSF Flag whether block addresses are in MSF or LBA format. * @param pbBuf Buffer holding the formatted TOC. * @param cbBuffer Size of the buffer. */ static int atapiTrackListUpdateFromFormattedToc(PTRACKLIST pTrackList, uint8_t iTrack, bool fMSF, const uint8_t *pbBuf, uint32_t cbBuffer) { RT_NOREF(iTrack, cbBuffer); int rc = VINF_SUCCESS; unsigned cbToc = scsiBE2H_U16(pbBuf); uint8_t iTrackFirst = pbBuf[2]; unsigned cTracks; cbToc -= 2; pbBuf += 4; AssertReturn(cbToc % 8 == 0, VERR_INVALID_PARAMETER); cTracks = cbToc / 8 + iTrackFirst; rc = atapiTrackListReallocate(pTrackList, iTrackFirst + cTracks, ATAPI_TRACK_LIST_REALLOCATE_FLAGS_DONT_CLEAR); if (RT_SUCCESS(rc)) { PTRACK pTrack = &pTrackList->paTracks[iTrackFirst]; for (unsigned i = iTrackFirst; i < cTracks; i++) { if (pbBuf[1] & 0x4) pTrack->enmMainDataForm = TRACKDATAFORM_MODE1_2048; else pTrack->enmMainDataForm = TRACKDATAFORM_CDDA; pTrack->enmSubChnDataForm = SUBCHNDATAFORM_0; if (fMSF) pTrack->iLbaStart = scsiMSF2LBA(&pbBuf[4]); else pTrack->iLbaStart = scsiBE2H_U32(&pbBuf[4]); if (pbBuf[2] != 0xaa) { int64_t iLbaNext; if (fMSF) iLbaNext = scsiMSF2LBA(&pbBuf[4+8]); else iLbaNext = scsiBE2H_U32(&pbBuf[4+8]); pTrack->cSectors = iLbaNext - pTrack->iLbaStart; } else pTrack->cSectors = 0; pTrack->fFlags &= ~TRACK_FLAGS_UNDETECTED; pbBuf += 8; pTrack++; } } return rc; }
Anabasis aretioides Coss. & Moq. phenolic compounds exhibit in vitro hypoglycemic, antioxidant and antipathogenic properties Abstract Background Based on our previous ethnobotanical survey, the non-investigated Saharan plant Anabasis aretioides Coss. & Moq., growing in the region of Errachidia, was selected for pharmacological investigation. In Moroccan traditional medicine, A. aretioides is being used for diabetes treatment. Thus, the current work aims at evaluating the antidiabetic, antioxidant, and antibacterial activities of the plant in relation to the digestive tract. Methods The different parts of the plant (aerial parts, roots, seeds) were extracted with methanol (MeOH) and screened in enzymatic assays for their inhibitory potential against -amylase and -glucosidase, as well as antioxidant and antibacterial activities. Furthermore, the phenolic compounds were analyzed using HPLC-DAD-QTOF-MS. Results The MeOH extracts of A. aretioides aerial parts, roots, and seeds, respectively, inhibited -amylase (IC50 of 3148.07 g/mL, 2440.20 g/mL, 3395.71 g/mL) and -glucosidase (IC50 of 2940.59 g/mL, 3521.81 g/mL, 3393.83 g/mL). Moreover, compared to aerial parts and seeds, the plant roots exhibited higher antioxidant capacity and a potent reducing power. In resazurin microplate assay, the plant parts displayed a minimal inhibitory concentration (MIC) ranging from 7.81 mg/mL to 31.25 mg/mL. Chemical analysis revealed 25 phenolic compounds, with chlorogenic acid as the main phenolic compound in the aerial parts, hesperidin in roots, and quercitrin in seeds. Conclusion Anabasis aretioides cited for treatment of diabetes shows promising antioxidant and antibacterial properties, as well as an ability to inhibit digestive enzyme, including -amylase and -glucosidase. Thus, our results explain in part the traditional use of this Saharan medicine and open doors for further in vivo mechanistic and functional studies.
<reponame>JamesTerm/Swerve2021 #pragma once #include <memory> #include <functional> #include "../../../Base/Base_Includes.h" #include "../../../Base/Misc.h" #include "../../../Base/Poly.h" //All rotary systems can fall into either a velocity controlled (like a shooter wheel, or drive) //or position controlled like an arm or turret, both can be open or closed loop, which can be controlled by the client //where open loop has no odometry callback. namespace Module { namespace Robot { class RotaryPosition_Internal; struct rotary_properties { //Optional: can provide good defaults to help client code to avoid managing all of them void Init(); struct Entity1D_Props { //Stuff needed for physics double m_StartingPosition; //the position used when reset position is called double m_Mass; //This can be used for the wheel diameter to work with RPS to linear conversions double m_Dimension; //Dimension- Length for linear and diameter for angular bool m_IsAngular; } entity_props; struct Ship_1D_Props { //Note there may be a difference between MAX_SPEED and MaxSpeed_Forward/MaxSpeed_Reverse, where MAX_SPEED represents the fastest speed something is capable of traveling, while // MaxSpeed_Forward/MaxSpeed_Reverse is the fastest desired speed the controller will want to manage this becomes more important in robotics where the gearing has some rotary // systems have a much faster max speed than what the desired speed would want to be. These are also handy for button controlled operations to operate at a certain desired // max speed when held down double MAX_SPEED; double MaxSpeed_Forward, MaxSpeed_Reverse; double ACCEL, BRAKE; double MaxAccelForward, MaxAccelReverse; double MinRange, MaxRange; //This is used to avoid overshoot when trying to rotate to a heading double DistanceDegradeScaler; bool UsingRange; } ship_props; struct Rotary_Props { using PolynomialEquation_forth_Props = Framework::Base::PolynomialEquation_forth_Props; double VoltageScaler; //Used to handle reversed voltage wiring //Note: EncoderToRS_Ratio is a place holder property that is implemented in the robot control //interface as needed for that control... it is not used in the rotary system code //The gear reduction used when multiplied by the encoder RPS will equal the *Rotary System's* RPS //This is typically the motor speed since this solves to apply voltage to it double EncoderToRS_Ratio; //Very similar to EncoderToRS_Ratio and is also a placeholder implemented in the robot control //to initialize the pulse count on the encoders (0 default implies 360) //While it ultimately solves the "gear reduction" it allows the script to specify the encoders specifications of the pulse count //while the EncoderToRS_Ratio can represent the actual gear reduction double EncoderPulsesPerRevolution; double PID[3]; //p,i,d double PrecisionTolerance; //Used to manage voltage override and avoid oscillation //Currently supporting 4 terms in polynomial equation PolynomialEquation_forth_Props Voltage_Terms; //Here is the curve fitting terms where 0th element is C, 1 = Cx^1, 2 = Cx^2, 3 = Cx^3 and so on... //This may be computed from stall torque and then torque at wheel (does not factor in traction) to linear in reciprocal form to avoid division //or alternatively solved empirically. Using zero disables this feature double InverseMaxAccel; //This is used to solve voltage at the acceleration level where the acceleration / max acceleration gets scaled down to voltage double InverseMaxDecel; //used for deceleration case double Positive_DeadZone; double Negative_DeadZone; //These must be in negative form double MinLimitRange, MaxLimitRange; //for position control these are the angles reset to when limit switches are triggered (only works for open loop) size_t Feedback_DiplayRow; //Choose a row for display -1 for none (Only active if __DebugLUA__ is defined) enum LoopStates { eNone, //Will never read them (ideal for systems that do not have any encoders) eOpen, //Will read them but never alter velocities eClosed, //Will attempt to match predicted velocity to actual velocity eClosed_ManualAssist //For position control this mode is also closed during manual assist } LoopState; //This should always be false once control is fully functional bool PID_Console_Dump; //This will dump the console PID info (Only active if __DebugLUA__ is defined) //Only supported in Rotary_Velocity_Control bool UseAggressiveStop; //If true, will use adverse force to assist in stopping. //Very similar to EncoderToRS_Ratio and is also a placeholder implemented in the robot control //This too is a method provided at startup to keep numbers positive bool EncoderReversed_Wheel; size_t AverageReadingsCount; //used to average readings great for latent reads or noise, but does introduce latency //Only supported in Rotary_Position_Control struct Rotary_Arm_GainAssist_Props { double PID_Up[3]; //p,i,d double PID_Down[3]; //p,i,d double InverseMaxAccel_Up; double InverseMaxDecel_Up; double InverseMaxAccel_Down; double InverseMaxDecel_Down; double SlowVelocityVoltage; //Empirically solved as the max voltage to keep load just above steady state for worst case scenario double SlowVelocity; //Rate at which the gain assist voltage gets blended out; This may be a bit more than the slow velocity used for SlowVelocityVoltage double GainAssistAngleScaler; //Convert gear ratio into the readable ratio for cos() (i.e. GearToArmRatio) double ToleranceConsecutiveCount; //In milliseconds predict what the position will be by using the potentiometers velocity to help compensate for lag double VelocityPredictUp; double VelocityPredictDown; double PulseBurstTimeMs; //Time in milliseconds for how long to enable pulse burst (if zero this is disabled) double PulseBurstRange; //Extended tolerance time to activate pulse burst bool UsePID_Up_Only; } ArmGainAssist; struct Voltage_Stall_Safety { //Note the on/off times will be shared resources of the gain assist double ErrorThreshold; //solved by observing a run without obstacle and run with obstacle finding a level as close with some room for error double OnBurstLevel; //the voltage level of the pulse size_t PulseBurstTimeOut; //specify the max number of pulses before it disengages the lock size_t StallCounterThreshold; //specify the point when to activate pulse by counting stall time cycles } VoltageStallSafety; } rotary_props; }; class RotarySystem_Position { public: RotarySystem_Position(); // \param IntanceIndex optional to help diagnose which instance is being ran // \param props needs to be final and ready during init() call, uses default if null void Init(size_t InstanceIndex, rotary_properties *props=nullptr); void ShutDown(); //Recommended units: radians or meters for linear //This allows setting the desired position //If this is angular it is always absolute, so relative can be managed by the caller //like written before where 0 is north, pi/2 east, etc. void SetPosition(double position); //Give entity a time slice to update its position void TimeSlice(double d_time_s); //set internal caching to a position, or PID variables as needed void Reset(double position = 0.0); //Output callback of new voltage to be set to output device (e.g. WPI, simulated odometry etc...) void Set_UpdateCurrentVoltage(std::function<void(double new_voltage)> callback); //provide access to the odometry for closed loops (e.g. potentiometer), use nullptr for open loops void SetOdometryVelocityCallback(std::function<double()> callback); //optional PID monitor for calibration using PID_Monitor_proto = void(double Voltage, double Position, double PredictedPosition, double CurrentVelocity, double Encoder_Velocity, double ErrorOffset); void SetExternal_PID_Monitor_Callback(std::function<PID_Monitor_proto> callback); private: std::shared_ptr<RotaryPosition_Internal> m_rotary_system; }; class RotaryVelocity_Internal; class RotarySystem_Velocity { public: RotarySystem_Velocity(); // \param IntanceIndex optional to help diagnose which instance is being ran // \param props needs to be final and ready during init() call, uses default if null void Init(size_t InstanceIndex, rotary_properties *props = nullptr); void ShutDown(); //Recommended units: radians per second //Note: For angular 0 north, pi/2 east, pi south, pi+pi/2 west, so positive gives clockwise direction void SetVelocity(double rate); //Give entity a time slice to update its position void TimeSlice(double d_time_s); //clear velocity caching, or PID variables as needed void Reset(); //Output //Output callback of new voltage to be set to output device (e.g. WPI, simulated odometry etc...) void Set_UpdateCurrentVoltage(std::function<void(double new_voltage)> callback); //provide access to the odometry for closed loops (e.g. encoder), use nullptr for open loops void SetOdometryVelocityCallback(std::function<double()> callback); //optional PID monitor for calibration using PID_Monitor_proto = void(double Voltage, double CurrentVelocity, double Encoder_Velocity, double ErrorOffset, double CalibratedScaler); void SetExternal_PID_Monitor_Callback(std::function<PID_Monitor_proto> callback); private: std::shared_ptr<RotaryVelocity_Internal> m_rotary_system; }; } }
Improving the performance of Unitary ESPRIT via pseudo-noise resampling A new pseudo-noise resampling technique is proposed to mitigate the effect of outliers in Unitary ESPRIT. This algorithm improves the performance of Unitary ESPRIT in unreliable situations, where the so-called reliability test has a failure. For this purpose, we exploit a pseudo-noise resampling of a failed Unitary ESPRIT estimator with a censored selection of "successful" resamplings recovering the nonfailed outputs of the reliability test.
<reponame>BonsaiDen/discord-bot<gh_stars>1-10 // Discord Dependencies ------------------------------------------------------- use discord::model::UserId; // External Dependencies ------------------------------------------------------ use diesel; use diesel::prelude::*; // Internal Dependencies ------------------------------------------------------ use super::super::Server; use ::bot::BotConfig; use ::effect::Effect; use ::db::models::{Greeting, NewGreeting}; use ::db::schema::greetings::dsl::{server_id, nickname as greeting_nickname}; use ::db::schema::greetings::table as greetingsTable; // Server Greeting Interface -------------------------------------------------- impl Server { pub fn get_greeting( &self, member_id: &UserId, bot_config: &BotConfig ) -> Option<Vec<&Effect>> { if let Some(member) = self.members.get(member_id) { // User specific greeting if let Some(greeting) = self._get_greeting(&member.nickname) { Some(self.map_effects( &[greeting.effect_name.to_string()], false, bot_config )) // Default greeting } else if let Some(greeting) = self._get_greeting("default") { Some(self.map_effects( &[greeting.effect_name.to_string()], false, bot_config )) } else { None } } else { None } } fn _get_greeting(&self, nickname: &str) -> Option<Greeting> { greetingsTable.filter( server_id.eq(&self.config.table_id) ).filter( greeting_nickname.eq(nickname) ).first(&self.config.connection).ok() } pub fn has_greeting(&self, nickname: &str) -> bool { greetingsTable.filter( server_id.eq(&self.config.table_id) ).filter( greeting_nickname.eq(nickname) ).count().get_result(&self.config.connection).unwrap_or(0) > 0 } pub fn add_greeting(&mut self, nickname: &str, effect_name: &str) { diesel::insert(&NewGreeting { server_id: &self.config.table_id, nickname: nickname, effect_name: effect_name }).into(greetingsTable).execute(&self.config.connection).ok(); } pub fn remove_greeting(&mut self, nickname: &str) { diesel::delete( greetingsTable.filter( server_id.eq(&self.config.table_id) ).filter( greeting_nickname.eq(nickname) ) ).execute(&self.config.connection).ok(); } pub fn list_greetings(&self) -> Vec<Greeting> { greetingsTable.filter( server_id.eq(&self.config.table_id) ).order( greeting_nickname ).load::<Greeting>(&self.config.connection).unwrap_or_else(|_| vec![]) } }
LinkedIn is a job-seeker's best friend - but only if a job-seeker uses LinkedIn's features to their advantage! I hear from battalions of job-seekers who are under the mistaken impression that simply creating a LinkedIn profile will get them a great job. That's false! LinkedIn is like a Swiss army knife. It's an incredible tool, but it doesn't do the work by itself. Watch on Forbes: Here are ten things every job-seeker should be doing on LinkedIn. Branding Themselves For The Jobs They Want The biggest personal-branding mistake most job-seekers make is to brand themselves as miscellaneous collections of experiences. When a visitor reads your LinkedIn profile, it is vital to tell them right away what kind of job you are looking for. That's why branding choices like "Multi-Skilled Strategic Leader" are the absolute worst. Bland, general branding like that doesn't tell us what you want to do in your next job. When a job-seeker's LinkedIn Summary says "I'm an experienced problem-solver and leader," we can't tell what kinds of jobs the job-seeker is qualified for. A recruiter or hiring manager will leave that job-seeker's profile page right away and look for someone else to fill a job. You have to brand yourself for the specific jobs you want, not every job you might remotely be qualified for. In your LinkedIn headline (examples: Digital Marketing Specialist; Office Manager with HR and Payroll Experience; CPA Specializing in Start-Up Tech Firms) you need to make it clear what kind of job you want. Your headline establishes the frame -- then your LinkedIn Summary fills in the details! If you don't know what kind of job you want, hiring managers and recruiters cannot help you figure it out! They don't have time, and frankly it's not their job to give you career counseling. You may be qualified for dozens or scores of jobs, but you will not look like an attractive candidate for any of those opportunities until you make the decision "What kind of job do I want?" Pick a set of job titles to focus on in your job hunt and brand yourself for those jobs -- not every job. Announcing Their 'Eligible' Status If you aren't working right now, you can add the words "Seeking New Challenge" or the acronym "ISO" (In Search Of) to your LinkedIn headline. That will tell recruiters and hiring managers you're on the market. Putting Their Best Face Forward Make sure your LinkedIn profile photo shows you the way you want to be seen. It doesn't need to be a professional portrait, but it does need to show your face clearly and present you as professionally as possible. Whatever you do, don't leave your profile without a photo! Doing so sends the message that you couldn't be bothered to get your photo taken and uploaded to your profile. Employers who see a gaping hole where your profile photo should be will wonder "What else is this person careless about?" Getting Connected Once you've got a LinkedIn profile, you need connections! Invite your former colleagues and your friends to connect with you. Try to accumulate at least 50 or 60 LinkedIn connections. The more people you're connected to, the easier-to-find your profile will be for anyone who's conducting a search on the vast LinkedIn user database. Recommending And Getting Recommended Nothing speaks more highly of you than a well-written recommendation from a former boss, colleague, vendor, customer or instructor. A great way to collect recommendations from people who know you (they must be your first-degree connections in order to recommend you) is to leave recommendations for them first. Showcasing Their Skills The Skills you list in your LinkedIn profile will tell employers and recruiters what you love to do and what you're good at. If you are a budding or established subject-matter expert in one or more topics, make sure those topics show up in your Skills listing! Showing Their Brains Working Every part of your LinkedIn profile shows the world how you think and how you communicate. Don't let people see you as a bland, boring zombie by writing your profile Summary using zombie language like "Results-oriented professional." Any joker on the street could call themselves that! You are a smart, vibrant and creative person. There is no one else on earth like you and there never will be anyone like you, either. Use your Summary to show us your human side, like this: I'm a Software Sales Engineer who is equally passionate about helping customers move their businesses to the cloud and teaching novice-to-experienced users to make the most of the products I represent. Another wonderful way to show us how you think is to use the blogging platform on LinkedIn. Try writing a blog post this week if you haven't done so already. You will draw in other people who share your interests when you start blogging for yourself. You will attract followers -- including recruiters and hiring managers who could use your help! Researching Employers LinkedIn is a magnificent tool for researching prospective employers. Start by searching on the LinkedIn user database through the Advanced Search page (click on the word Advanced next to the search bar at the top of most LinkedIn pages) and conducting a search on keywords that relate to your function and/or industry, plus your zip code. That search will turn up other LinkedIn users who have "your" keywords in their profiles and who are based within your commuting radius. Their employers may make fantastic additions to your Target Employer List. Scouting Job Opportunities Use LinkedIn's Jobs functionality to find job openings but don't apply for those jobs directly through LinkedIn, because doing that will only put your application into a Black Hole, and that is the worst place for it to be. Instead, search the LinkedIn database using the company name and the most likely job title of your hiring manager (the department manager who will be your boss in your next job) instead. Now you'll have the name and job title of a real person - the person who needs to read your Pain Letter and your Human-Voiced Resume. Enhancing Their Profiles You can upload videos, images and podcasts to your LinkedIn profile to round out your professional image -- and it will help you to do so! Customize your LinkedIn profile URL on the Edit Profile page to get a clean, crisp URL (example: http://www.linkedin.com/in/lizryan) to add to your consulting business cards, your resume and your email signature). A job search is a sales and marketing project. LinkedIn is your greatest marketing tool -- make sure you're using it to your advantage!
The Charlie Hunter Trio will perform at 7 p.m. Friday at the Ron Robinson Theater in Little Rock. Admission is $10. Hunter, a renowned guitarist who plays a modified seven-string guitar, will be accompanied by vocalist Dara Tucker and Grammy Award-winning percussionist Keita Ogawa. A native of Rhode Island, Hunter, 51, grew up in a commune in Mendocino County, Calif. He later moved to Paris and got what he considers on-the-job training by busking on the streets. He returned to San Francisco and played in Michael Franti's political rap group, the Disposable Heroes of Hiphoprisy. He has recorded 18 albums since he debuted with Charlie Hunter Trio in 1993. His most recent CD was Everybody Has a Plan Until They Get Punched in the Mouth in 2016. He has also recorded with Dionne Farris, D'Angelo, William S. Burroughs, Christian McBride, John Mayer, Frank Ocean and Snarky Puppy. Nikki Hill will perform at 9 p.m. today at White Water Tavern in Little Rock. Admission is $10. Hill, a native of Durham, N.C., released her debut album, Here's Nikki Hill, in 2013, and fully established her reputation as a blues rocker with Heavy Hearts, Hard Fists, in 2015. Silver Anchors and Or will perform at 7 p.m. Friday, with admission by donations, in a celebration of the life of Luke Hunsicker, a local artist and musician known for his work in American Princes and Sugar and the Raw, who died of brain cancer in 2010. The event is a benefit for the Lucas Clayton Hunsicker scholarship fund, which annually awards a scholarship in art or music to a graduate of Parkview High School. Kent Burnside will perform at 9 p.m. Saturday. Admission is $7. Burnside is the grandson of the late Memphis blues artist R.L. Burnside. Stephanie Smittle and Isaac Alexander will perform at 6 p.m. Sunday in a benefit for The Arkansas Nonprofit News Network. The show is open to all ages and admission is by donation. The Read Southall Band, along with opening act The Mallet Brothers Band, will perform at 8:30 p.m. today at Stickyz Rock 'n' Roll Chicken Shack in Little Rock. Admission is $10. Ryan Viser, along with opening act Pineapple Beatz and Ares, will perform at 9 p.m. Friday. Admission is $10, along with a $2 surcharge for those under age 21. Southern Avenue, along with opening act Charlotte Taylor, will perform at 9 p.m. Saturday. Tickets are $10 in advance, $12 the day of the show. The Drunken Hearts, along with opening act John Lefler, will perform at 8 p.m. Sunday. Tickets are $8 in advance, $10 the day of the show. Aaron Kamm and the One Drops will perform at 10 p.m. Friday at Four Quarter Bar in North Little Rock. Admission is $10. The "Best of Arkansas R&B," featuring Keith Savage, Dee Dee Jones, Crissy P and Jason Talbert, along with DJ Nick Hud, will perform at 9:30 p.m. today at the Rev Room in Little Rock. Admission is $15. Randall Shreve will present an encore performance of his tribute to the late Freddie Mercury of the band Queen; along with opening act John Burnette. Tickets are $15 general admission, $20 VIP or $25 for VIP tables. "Kittypalooza" will feature Four on the Floor, One Knight Stands, The Violet Hour, Liquid Kitty and Stony Ground, at 6 p.m. Sunday. Admission is free. The show will be a celebration of the life of Kitty Schulze. Chris DeClerk will perform at 5:30 p.m. and Donna Massey will perform at 9 p.m. today at Cajun's Wharf in Little Rock. Andy Tanis will perform at 5:30 p.m. and Canvas will perform at 9 p.m. Friday. Richie Johnson will perform at 5:30 p.m. and The Shame will perform at 9 p.m. Saturday. Admission is $5 after 8 p.m. Surfwax, Head Cold and The Ellie Badge will perform at 9 p.m. Friday at Maxine's in Hot Springs. Admission is $5. The Nace Brothers will perform at 9 p.m. Friday and Saturday at The Big Chill in Hot Springs. Admission is $5. Fourth generation musicians David and Jimmy Nace, based in Kansas City, Mo., lead a four-piece band that has released seven albums. The Drunken Hearts will perform at 8 p.m. today at Griffin Restaurant in El Dorado. Admission is free. Josh Love will perform at 11:30 a.m. Saturday. Admission is free. Griffin Restaurant, 101 E. Locust St., El Dorado, (870) 444-3007, eldomad.com.
<filename>src/gradingTools/comp533s19/assignment1/Assignment1Suite.java<gh_stars>0 package gradingTools.comp533s19.assignment1; import java.util.Arrays; import java.util.List; import org.junit.runner.RunWith; import org.junit.runners.Suite; import grader.basics.config.BasicStaticConfigurationUtils; import grader.basics.execution.BasicProjectExecution; import grader.basics.junit.BasicJUnitUtils; import grader.basics.project.BasicProjectIntrospection; import gradingTools.comp533s19.assignment1.testcases.OneClientReadWrite; import gradingTools.comp533s19.assignment1.testcases.OneClientReadWriteAtomic; import gradingTools.comp533s19.assignment1.testcases.OneClientReadWriteNonAtomic; import gradingTools.comp533s19.assignment1.testcases.OneClientThreadsAtomic; import gradingTools.comp533s19.assignment1.testcases.OneClientThreadsNonAtomic; import gradingTools.comp533s19.assignment1.testcases.ReadWriteUpdateOrderAtomic; import gradingTools.comp533s19.assignment1.testcases.ReadWriteUpdateOrderNonAtomic; import gradingTools.comp533s19.assignment1.testcases.ClientTagged; import gradingTools.comp533s19.assignment1.testcases.OneClientConnection; import gradingTools.comp533s19.assignment1.testcases.OneClientMessageRatioAtomic; import gradingTools.comp533s19.assignment1.testcases.OneClientMessageRatioNonAtomic; import gradingTools.comp533s19.assignment1.testcases.ServerTagged; //import gradingTools.comp533s19.assignment1.testcases; import gradingTools.comp533s19.assignment1.testcases.TwoClientConnection; import gradingTools.comp533s19.assignment1.testcases.TwoClientMessageRatioAtomic; import gradingTools.comp533s19.assignment1.testcases.TwoClientMessageRatioNonAtomic; import gradingTools.comp533s19.assignment1.testcases.TwoClientReadWriteAtomic; import gradingTools.comp533s19.assignment1.testcases.TwoClientReadWriteNonAtomic; import gradingTools.comp533s19.assignment1.testcases.TwoClientThreadsAtomic; import gradingTools.comp533s19.assignment1.testcases.TwoClientThreadsNonAtomic; import util.tags.DistributedTags; @RunWith(Suite.class) @Suite.SuiteClasses({ Assignment1OneClientSuite.class, Assignment1TwoClientSuite.class, }) public class Assignment1Suite { public static final String[] clientTags = {DistributedTags.NIO, DistributedTags.CLIENT}; public static final String[] serverTags = {DistributedTags.NIO, DistributedTags.SERVER}; public static final List<String> clientTagsList = Arrays.asList(clientTags); public static final List<String> serverTagsList = Arrays.asList(serverTags); static int processTimeOut = 45; public static int getProcessTimeOut() { return processTimeOut; } public static void setProcessTimeOut(int processTimeOut) { Assignment1Suite.processTimeOut = processTimeOut; BasicProjectExecution.setProcessTimeOut(processTimeOut); } public static void main (String[] args) { try { BasicJUnitUtils.interactiveTest(Assignment1Suite.class); } catch (Exception e) { e.printStackTrace(); } } static { BasicProjectIntrospection.setCheckAllSpecifiedTags(true); BasicStaticConfigurationUtils.setBasicCommandToDefaultEntryTagCommand(); } }
package godofjava.inner; /** * Created by LG on 2017-03-13. */ public class OuterOfInner { class Inner { private int value = 0; public int getValue() { return value; } public void setValue(int value) { this.value = value; } } }
<filename>java/src/PriorityQueue.java import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.TreeMap; public class PriorityQueue { private static final int INITIAL_CAPACITY_HIGH = 10000; private static final int INITIAL_CAPACITY_LOW = 1000; private Set<Node> nodes; private TreeMap<Integer, Set<Node>> distancesToNodes; public PriorityQueue() { nodes = new HashSet<>(INITIAL_CAPACITY_HIGH); distancesToNodes = new TreeMap<>(); } public void addNode(Node node) { nodes.add(node); node.setInPriorityQueue(true); distancesToNodes.compute(node.getDistance(), (distance, nodesWithDistance) -> { if (null == nodesWithDistance) { Set<Node> res = new HashSet<>(INITIAL_CAPACITY_LOW); res.add(node); return res; } else { nodesWithDistance.add(node); return nodesWithDistance; } }); } public void removeNode(Node node) { nodes.remove(node); int nodeDistance = node.getDistance(); Set<Node> distanceToNodes = distancesToNodes.get(nodeDistance); if (distanceToNodes.size() == 1) { node.setInPriorityQueue(false); distancesToNodes.remove(nodeDistance); distanceToNodes.clear(); } else { node.setInPriorityQueue(false); distanceToNodes.remove(node); } } public Node extractMinNode() { Map.Entry<Integer, Set<Node>> distanceToNodes = distancesToNodes.firstEntry(); Node res = distanceToNodes.getValue().iterator().next(); if (distanceToNodes.getValue().size() == 1) { distancesToNodes.remove(distanceToNodes.getKey()); distanceToNodes.getValue().clear(); } else { distanceToNodes.getValue().remove(res); } nodes.remove(res); res.setInPriorityQueue(false); return res; } public boolean isEmpty() { return nodes.isEmpty(); } }
<gh_stars>1-10 /* $NetBSD: if_le.c,v 1.21 2001/11/28 05:22:48 lukem Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME> and by <NAME> of the Numerical Aerospace * Simulation Facility, NASA Ames Research Center. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * <NAME> and <NAME>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)if_le.c 8.2 (Berkeley) 11/16/93 */ #include "opt_inet.h" #include "bpfilter.h" #include <sys/param.h> #include <sys/syslog.h> #include <sys/socket.h> #include <sys/device.h> #include <sys/reboot.h> #include <uvm/uvm_extern.h> #include <net/if.h> #include <net/if_ether.h> #include <net/if_media.h> #ifdef INET #include <netinet/in.h> #include <netinet/if_inarp.h> #endif #include <machine/cpu.h> #include <machine/nexus.h> #include <machine/scb.h> #include <dev/ic/lancereg.h> #include <dev/ic/lancevar.h> #include <dev/ic/am7990reg.h> #include <dev/ic/am7990var.h> #include "ioconf.h" #define LEVEC 0xd4 /* Interrupt vector on 3300/3400 */ struct le_softc { struct am7990_softc sc_am7990; /* Must be first */ struct evcnt sc_intrcnt; volatile u_short *sc_rap; volatile u_short *sc_rdp; }; int le_ibus_match __P((struct device *, struct cfdata *, void *)); void le_ibus_attach __P((struct device *, struct device *, void *)); void lewrcsr __P((struct lance_softc *, u_int16_t, u_int16_t)); u_int16_t lerdcsr __P((struct lance_softc *, u_int16_t)); void lance_copytobuf_gap2 __P((struct lance_softc *, void *, int, int)); void lance_copyfrombuf_gap2 __P((struct lance_softc *, void *, int, int)); void lance_zerobuf_gap2 __P((struct lance_softc *, int, int)); struct cfattach le_ibus_ca = { sizeof(struct le_softc), le_ibus_match, le_ibus_attach }; void lewrcsr(ls, port, val) struct lance_softc *ls; u_int16_t port, val; { struct le_softc *sc = (void *)ls; *sc->sc_rap = port; *sc->sc_rdp = val; } u_int16_t lerdcsr(ls, port) struct lance_softc *ls; u_int16_t port; { struct le_softc *sc = (void *)ls; *sc->sc_rap = port; return *sc->sc_rdp; } int le_ibus_match(parent, cf, aux) struct device *parent; struct cfdata *cf; void *aux; { struct bp_conf *bp = aux; if (strcmp("lance", bp->type)) return 0; return 1; } void le_ibus_attach(parent, self, aux) struct device *parent, *self; void *aux; { struct le_softc *sc = (void *)self; int *lance_addr; int i, vec, br; sc->sc_rdp = (short *)vax_map_physmem(0x20084400, 1); sc->sc_rap = sc->sc_rdp + 2; /* * Set interrupt vector, by forcing an interrupt. */ scb_vecref(0, 0); /* Clear vector ref */ *sc->sc_rap = LE_CSR0; *sc->sc_rdp = LE_C0_STOP; DELAY(100); *sc->sc_rdp = LE_C0_INIT|LE_C0_INEA; DELAY(100000); i = scb_vecref(&vec, &br); if (i == 0 || vec == 0) return; scb_vecalloc(vec, (void (*)(void *))am7990_intr, sc, SCB_ISTACK, &sc->sc_intrcnt); evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL, self->dv_xname, "intr"); printf(": vec %o ipl %x\n%s", vec, br, self->dv_xname); /* * MD functions. */ sc->sc_am7990.lsc.sc_rdcsr = lerdcsr; sc->sc_am7990.lsc.sc_wrcsr = lewrcsr; sc->sc_am7990.lsc.sc_nocarrier = NULL; sc->sc_am7990.lsc.sc_mem = (void *)uvm_km_valloc(kernel_map, (128 * 1024)); if (sc->sc_am7990.lsc.sc_mem == 0) return; ioaccess((vaddr_t)sc->sc_am7990.lsc.sc_mem, 0x20120000, (128 * 1024) >> VAX_PGSHIFT); sc->sc_am7990.lsc.sc_addr = 0; sc->sc_am7990.lsc.sc_memsize = (64 * 1024); sc->sc_am7990.lsc.sc_copytodesc = lance_copytobuf_gap2; sc->sc_am7990.lsc.sc_copyfromdesc = lance_copyfrombuf_gap2; sc->sc_am7990.lsc.sc_copytobuf = lance_copytobuf_gap2; sc->sc_am7990.lsc.sc_copyfrombuf = lance_copyfrombuf_gap2; sc->sc_am7990.lsc.sc_zerobuf = lance_zerobuf_gap2; /* * Get the ethernet address out of rom */ lance_addr = (int *)vax_map_physmem(0x20084200, 1); for (i = 0; i < 6; i++) sc->sc_am7990.lsc.sc_enaddr[i] = (u_char)lance_addr[i]; vax_unmap_physmem((vaddr_t)lance_addr, 1); bcopy(self->dv_xname, sc->sc_am7990.lsc.sc_ethercom.ec_if.if_xname, IFNAMSIZ); am7990_config(&sc->sc_am7990); } /* * gap2: two bytes of data followed by two bytes of pad. * * Buffers must be 4-byte aligned. The code doesn't worry about * doing an extra byte. */ void lance_copytobuf_gap2(sc, fromv, boff, len) struct lance_softc *sc; void *fromv; int boff; register int len; { volatile caddr_t buf = sc->sc_mem; register caddr_t from = fromv; register volatile u_int16_t *bptr; if (boff & 0x1) { /* handle unaligned first byte */ bptr = ((volatile u_int16_t *)buf) + (boff - 1); *bptr = (*from++ << 8) | (*bptr & 0xff); bptr += 2; len--; } else bptr = ((volatile u_int16_t *)buf) + boff; while (len > 1) { *bptr = (from[1] << 8) | (from[0] & 0xff); bptr += 2; from += 2; len -= 2; } if (len == 1) *bptr = (u_int16_t)*from; } void lance_copyfrombuf_gap2(sc, tov, boff, len) struct lance_softc *sc; void *tov; int boff, len; { volatile caddr_t buf = sc->sc_mem; register caddr_t to = tov; register volatile u_int16_t *bptr; register u_int16_t tmp; if (boff & 0x1) { /* handle unaligned first byte */ bptr = ((volatile u_int16_t *)buf) + (boff - 1); *to++ = (*bptr >> 8) & 0xff; bptr += 2; len--; } else bptr = ((volatile u_int16_t *)buf) + boff; while (len > 1) { tmp = *bptr; *to++ = tmp & 0xff; *to++ = (tmp >> 8) & 0xff; bptr += 2; len -= 2; } if (len == 1) *to = *bptr & 0xff; } void lance_zerobuf_gap2(sc, boff, len) struct lance_softc *sc; int boff, len; { volatile caddr_t buf = sc->sc_mem; register volatile u_int16_t *bptr; if ((unsigned)boff & 0x1) { bptr = ((volatile u_int16_t *)buf) + (boff - 1); *bptr &= 0xff; bptr += 2; len--; } else bptr = ((volatile u_int16_t *)buf) + boff; while (len > 0) { *bptr = 0; bptr += 2; len -= 2; } }
/* * MIT License * * Copyright (c) 2017-2018 nuls.io * * 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 THE * AUTHORS OR COPYRIGHT HOLDERS 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. */ package io.nuls.consensus.poc.cache; import io.nuls.cache.util.CacheMap; import io.nuls.consensus.poc.locker.Lockers; import io.nuls.core.utils.queue.service.impl.QueueService; import io.nuls.protocol.model.Transaction; import java.util.List; /** * Created by ln on 2018/4/13. */ public final class TxMemoryPool { private final static String CACHE_NAME = "tx-memory-pool"; private CacheMap<String, Transaction> container; private QueueService<String> txHashQueue; private final static String CACHE_NAME_ISOLATED = "isolated-tx-memory-pool"; private CacheMap<String, Transaction> isolatedContainer; private QueueService<String> isolatedTxHashQueue; public TxMemoryPool() { txHashQueue = new QueueService<>(); txHashQueue.createQueue(CACHE_NAME, (long) Integer.MAX_VALUE, false); container = new CacheMap<>(CACHE_NAME, 64); isolatedTxHashQueue = new QueueService<>(); isolatedTxHashQueue.createQueue(CACHE_NAME_ISOLATED, (long) Integer.MAX_VALUE, false); isolatedContainer = new CacheMap< >(CACHE_NAME_ISOLATED, 16); } public boolean add(Transaction tx, boolean isIsolated) { Lockers.TX_MEMORY_LOCK.lock(); try { //check Repeatability String hash = tx.getHash().getDigestHex(); if (isolatedContainer.containsKey(hash) || container.containsKey(hash)) { return false; } if (isIsolated) { isolatedContainer.put(hash, tx); isolatedTxHashQueue.offer(CACHE_NAME_ISOLATED, hash); } else { container.put(hash, tx); txHashQueue.offer(CACHE_NAME, hash); } return true; } finally { Lockers.TX_MEMORY_LOCK.unlock(); } } /** * Get a transaction through hash, do not remove the memory pool after obtaining * * 通过hash获取某笔交易,获取之后不移除内存池 * @param hash * @return Transaction */ public Transaction get(String hash) { Lockers.TX_MEMORY_LOCK.lock(); try { Transaction tx = container.get(hash); if (tx == null) { tx = isolatedContainer.get(hash); } return tx; } finally { Lockers.TX_MEMORY_LOCK.unlock(); } } /** * Get a transaction, the first transaction received, removed from the memory pool after acquisition * * 获取一笔交易,最先收到的交易,获取之后从内存池中移除 * @return Transaction */ public Transaction get() { Lockers.TX_MEMORY_LOCK.lock(); Transaction tx = null; try { String hash = txHashQueue.poll(CACHE_NAME); if(hash != null) { tx = container.get(hash); } else { hash = isolatedTxHashQueue.poll(CACHE_NAME_ISOLATED); if (hash != null) { tx = isolatedContainer.get(hash); } } } finally { Lockers.TX_MEMORY_LOCK.unlock(); } if(tx != null) { remove(tx.getHash().getDigestHex()); } return tx; } /** * Get a transaction, removed from the memory pool after acquisition * * 获取一笔交易,获取之后从内存池中移除 * @return Transaction */ public Transaction getAndRemove(String hash) { Transaction tx = get(hash); if(tx != null) { remove(hash); } return tx; } public List<Transaction> getAll() { return container.values(); } public List<Transaction> getAllIsolated() { return isolatedContainer.values(); } public boolean remove(String hash) { Lockers.TX_MEMORY_LOCK.lock(); try { if (container.containsKey(hash)) { container.remove(hash); txHashQueue.remove(CACHE_NAME, hash); return true; } else if (isolatedContainer.containsKey(hash)) { isolatedContainer.remove(hash); isolatedTxHashQueue.remove(CACHE_NAME_ISOLATED, hash); return true; } return false; } finally { Lockers.TX_MEMORY_LOCK.unlock(); } } public boolean exist(String hash) { return container.containsKey(hash) || isolatedContainer.containsKey(hash); } public void clear() { Lockers.TX_MEMORY_LOCK.lock(); try { txHashQueue.clear(CACHE_NAME); container.clear(); isolatedTxHashQueue.clear(CACHE_NAME_ISOLATED); isolatedContainer.clear(); } finally { Lockers.TX_MEMORY_LOCK.unlock(); } } }
A version of this article appeared in the print edition of The Daily Star on March 05, 2016, on page 2. Architect Rabih Geha can magically turn every space into a place that holds an experience. Unlike a traditional architect, Rabih's mission has always been to bring in an experience that lasts forever. After graduating with a B.A. in architecture from the American University of Beirut, Rabih traveled to Paris, where he earned a master's degree in architecture from the prestigious Ecole Nationale Superieure de Creation Industrielle. In 2006, he returned to Lebanon to open his own practice, Rabih Geha Architects. The in-demand design firm represents a young generation of architects bucking tradition in favor of a new approach. Setting aside scale, building type and proposed materials, Geha first considers a project's story. Rabih not only changed the nightlife experience but also left his imprint on Villa Badaro and many other spaces.
<filename>math/src/test/java/hexagon/math/matrix/TestMatrix4.java<gh_stars>0 package hexagon.math.matrix; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import hexagon.math.vector.Float4; public class TestMatrix4 { static Matrix4 mat1 = new Matrix4( 1.0f, 3.0f, 4.0f, 2.0f, 2.0f, 5.0f, 3.0f, 1.0f, 3.0f, 2.0f, 1.0f, 6.0f, 4.0f, 1.0f, 2.0f, 5.0f ); static Matrix4 mat2 = new Matrix4( 2.0f, 1.0f, 3.0f, 4.0f, 3.0f, 2.0f, 4.0f, 1.0f, 1.0f, 4.0f, 2.0f, 3.0f, 4.0f, 3.0f, 1.0f, 2.0f ); @Test public void testSum() { Matrix4 expected = new Matrix4( 3.0f, 4.0f, 7.0f, 6.0f, 5.0f, 7.0f, 7.0f, 2.0f, 4.0f, 6.0f, 3.0f, 9.0f, 8.0f, 4.0f, 3.0f, 7.0f ); Assertions.assertEquals(expected, mat1.plus(mat2)); } @Test public void testSumNull() { Matrix4 expected = mat1.plus(Matrix4.ZERO); Matrix4 actual = mat1.plus(null); Assertions.assertEquals(expected, actual); } @Test public void testSubtract() { Matrix4 expected = new Matrix4( -1.0f, 2.0f, 1.0f, -2.0f, -1.0f, 3.0f, -1.0f, 0.0f, 2.0f, -2.0f, -1.0f, 3.0f, 0.0f, -2.0f, 1.0f, 3.0f ); Assertions.assertEquals(expected, mat1.minus(mat2)); } @Test public void testSubtractNull() { Matrix4 expected = mat1.minus(Matrix4.ZERO); Matrix4 actual = mat1.minus(null); Assertions.assertEquals(expected, actual); } @Test public void testMultiplyScalar() { Matrix4 expected = new Matrix4( 2.0f, 6.0f, 8.0f, 4.0f, 4.0f, 10.0f, 6.0f, 2.0f, 6.0f, 4.0f, 2.0f, 12.0f, 8.0f, 2.0f, 4.0f, 10.0f ); Assertions.assertEquals(expected, mat1.multiply(2.0f)); } @Test public void testMultiplyVector() { Float4 expected = new Float4(27, 25, 34, 32); Float4 actual = mat1.multiply(new Float4(1, 2, 3, 4)); Assertions.assertEquals(expected, actual); } @Test public void testGetRow() { Assertions.assertEquals(new Float4(1.0f, 3.0f, 4.0f, 2.0f), mat1.row(0)); Assertions.assertEquals(new Float4(2.0f, 5.0f, 3.0f, 1.0f), mat1.row(1)); Assertions.assertEquals(new Float4(3.0f, 2.0f, 1.0f, 6.0f), mat1.row(2)); Assertions.assertEquals(new Float4(4.0f, 1.0f, 2.0f, 5.0f), mat1.row(3)); Assertions.assertEquals(new Float4(0.0f, 0.0f, 0.0f, 0.0f), mat1.row(5)); } @Test public void testGetColumn() { Assertions.assertEquals(new Float4(1.0f, 2.0f, 3.0f, 4.0f), mat1.column(0)); Assertions.assertEquals(new Float4(3.0f, 5.0f, 2.0f, 1.0f), mat1.column(1)); Assertions.assertEquals(new Float4(4.0f, 3.0f, 1.0f, 2.0f), mat1.column(2)); Assertions.assertEquals(new Float4(2.0f, 1.0f, 6.0f, 5.0f), mat1.column(3)); Assertions.assertEquals(new Float4(0.0f, 0.0f, 0.0f, 0.0f), mat1.column(5)); } // TODO - Test product @Test public void testProductNull() { Matrix4 m = null; Assertions.assertEquals(Matrix4.ZERO, mat1.multiply(m)); } @Test public void testTransposed() { Matrix4 expected = new Matrix4( 1.0f, 2.0f, 3.0f, 4.0f, 3.0f, 5.0f, 2.0f, 1.0f, 4.0f, 3.0f, 1.0f, 2.0f, 2.0f, 1.0f, 6.0f, 5.0f ); Assertions.assertEquals(expected, mat1.transposed()); } }
Comparison of oxidative stress & leukocyte activation in patients with severe sepsis & burn injury Background & objectives: We evaluated pro- and anti-oxidant disturbances in sepsis and non-sepsis burn patients with systemic inflammatory response syndrome (SIRS). Adhesion molecules and inflammation markers on leukocytes were also analyzed. We hypothesized that oxidative stress and leukocyte activation markers can lead to the severity of sepsis. Methods: In 28 severe sepsis and 27 acute burn injury patients blood samples were collected at admission and 4 days consecutively. Oxidative stress markers: production of reactive oxygen species (ROS), myeloperoxidase, malondialdehyde and endogenous antioxidants: plasma protein sulphydryl groups, reduced glutathione, superoxide dismutase and catalase were measured. Flow cytometry was used to determine CD11a, CD14, CD18, CD49d and CD97 adhesion molecules on leukocytes. Procalcitonin, C-reactive protein, fibrinogen, platelet count and lactate were also analyzed. Results: Pro-oxidant parameters were significantly elevated in sepsis patients at admission, ROS intensity increased in burn patients until the 5th day. Endogenous antioxidant levels except catalase showed increased levels after burn trauma compared to sepsis. Elevated granulocyte activation and suppressed lymphocyte function were found at admission and early activation of granulocytes caused by increasing activation/migration markers in sepsis. Leukocyte adhesion molecule expression confirmed the suppressed lymphocyte and monocyte function in sepsis. Interpretation & conclusions: Severe sepsis is accompanied by oxidative stress and pathological leukocyte endothelial cell interactions. The laboratory parameters used for the evaluation of sepsis and several markers of pro- and antioxidant status were different between sepsis and non-sepsis burn patients. The tendency of changes in these parameters may refer to major oxidative stress in sepsis and developing SIRS in burns.
<gh_stars>1-10 import React from "react"; import { ToastContainer } from "react-toastify"; import { AuthContextProvider } from "./contexts/AuthContext"; import { Routes } from "./routes"; function App() { return ( <AuthContextProvider> <ToastContainer /> <Routes /> </AuthContextProvider> ); } export default App;
/** * A {@link StackArrangement} for each cell in a table. * * <p>All cells must have a single associated {@link StackArrangement}. * * @author Owen Feehan */ class ArrangementIndex { private List<List<StackArrangement>> rows; private List<List<StackArrangement>> columns; /** * Create from a {@code Iterator<Extent>}. * * <p>If the iterator has no more stacks available, the table ends without processing further * entities. * * @param extents the respective sizes to arrange. * @param arrangers how to arrange each cell in the table. * @param tableSize the table size, in columns (x-dimension) and rows (y-dimension). * @param context objects for the operation. * @throws ArrangeStackException if the {@code stacks} and {@code arrangers} do not match * expectations, or otherwise an error occurs. */ public ArrangementIndex( Iterator<Extent> extents, ArrangerIndex arrangers, Extent tableSize, OperationContext context) throws ArrangeStackException { rows = new ArrayList<>(); columns = new ArrayList<>(); for (int row = 0; row < tableSize.y(); row++) { for (int column = 0; column < tableSize.x(); column++) { if (!extents.hasNext()) { // Exit early if there are no more stacks to iterate. return; } StackArrangement item = arrangers.getForCell(column, row).arrangeStacks(extents, context); List<StackArrangement> currentRows = getListOrAdd(rows, row); List<StackArrangement> currentColumns = getListOrAdd(columns, column); currentRows.add(item); currentColumns.add(item); } } } /** * Is a particular cell occupied by an image? * * @param columnIndex the column the cell lies on (zero-indexed). * @param rowIndex the row the cell lies on (zero-indexed). * @return true iff an image occupies the particular cell. */ public boolean isCellUsed(int columnIndex, int rowIndex) { if (rowIndex >= rows.size()) { return false; } else { return columnIndex < rows.get(rowIndex).size(); } } public StackArrangement get(int columnIndex, int rowIndex) { return rows.get(rowIndex).get(columnIndex); } /** * Get all {@link StackArrangement} for a particular <i>row</i> of cells. * * @param index the index of the row (zero-indexed). * @return all the {@link StackArrangement}s associated with the row. */ public Stream<StackArrangement> getRow(int index) { return rows.get(index).stream(); } /** * Get all {@link StackArrangement} for a particular <i>column</i> of cells. * * @param index the index of the column (zero-indexed). * @return all the {@link StackArrangement}s associated with the column. */ public Stream<StackArrangement> getColumn(int index) { return columns.get(index).stream(); } /** * The number of rows in the table. * * @return the number of rows. */ public int getNumberRows() { return rows.size(); } /** * The number of columns in the table. * * @return the number of columns. */ public int getNumberColumns() { return columns.size(); } private static <T> List<T> getListOrAdd(List<List<T>> list, int index) { // Assumes we will only ever call get() on an index that is one more than // than existing items, so add() is sufficient if (index >= list.size()) { List<T> current = new ArrayList<>(); list.add(current); return current; } else { return list.get(index); } } }
<gh_stars>1-10 from typing import Optional from .ring import Ring class GameException(Exception): pass class CrabGame: def __init__(self, ring: Ring[int]): self.ring = ring @staticmethod def from_string(input: str) -> "CrabGame": elements = dict[int, Ring]() mx = 0 run: Optional[Ring[int]] = None for digit in input: if digit not in ('123456789'): raise GameException("Only digits from 1-9 are allowed") value = int(digit) mx = max(mx, value) run = Ring.create(value, run) elements[value] = run if run is None: raise GameException("Empty input is not allowed") if mx != len(run): raise GameException("Input must start at 1 and be continous") return CrabGame(run.next) def run(self, rounds: int) -> "CrabGame": current = self.ring.copy() references = {ring.value: ring for ring in current} highest = len(references) # This would blow our algorithm. We need at the very least 4 numbers # (and so few would not really make sense either, but works anyway) if highest < 4: raise GameException("Need at least 4 numbers") for _ in range(rounds): pickup = current.next pickup_middle = pickup.next pickup_end = pickup_middle.next avoid = (pickup.value, pickup_middle.value, pickup_end.value) current_value = current.value dest_value = current_value - 1 if current_value != 1 else highest while dest_value in avoid: dest_value = dest_value - 1 if dest_value != 1 else highest destination = references[dest_value] current.next = pickup_end.next pickup_end.next = destination.next destination.next = pickup current = current.next return CrabGame(current) def pump_up_to(self, new_highest: int) -> "CrabGame": current = self.ring.copy() highest = len(current) if new_highest <= highest: return self run = current.prev() for value in range(highest, new_highest): run = run.append(value + 1) return CrabGame(current) def string_result(self, value: int) -> str: return str(self.ring[value])[1:] def tuple_result(self, value: int) -> tuple[int, int]: element = self.ring[value] return element.next.value, element.next.next.value def play_game(input: str, rounds: int, min_elements: int = 0) -> CrabGame: game = CrabGame.from_string(input) game.pump_up_to(min_elements) return game.run(rounds)
BEIRUT (Reuters) - Rebels shot down a Syrian government warplane with anti-aircraft fire on Wednesday in the western province of Hama, forcing its pilot to eject, a monitoring group and an insurgent media spokesman said. The pilot died after his parachute failed, the Syrian Observatory for Human Rights said. Rebels have brought down government aircraft before in Syria’s civil war but only rarely as they lack significant anti-aircraft capability. They have stepped up calls to be supplied with anti-aircraft missiles since Russia’s air force intervened on the side of President Bashar al-Assad in the conflict. The Syrian air force jet was downed in northwest Hama, near the town of Kafr Nabuda, where fighting has been raging between insurgents and government forces backed by air cover. Rebels had late on Tuesday taken over Tel Othman, a hill nearby, said the Observatory, which monitors Syria’s civil war using a network of sources on the ground. A media spokesman for a rebel group operating in the area under the banner of the Free Syrian Army said it had shot the plane down. “We targeted the (Russian-built) MiG aircraft while it was striking rebel positions on the front of Kafr Nabuda. We shot at it with our medium machine guns,” Yasser Shehadeh of the al-Wosta division told Reuters via Internet messaging. “One of the shots hit the plane, and we saw smoke coming out of it, then it crashed... near a regime-held area... we don’t know about the fate of the pilot, but he probably got killed.” Related Coverage Syrian army regains control of Aleppo supply route Insurgents shot down a helicopter near Kafr Nabuda last month. Other rebels said in June that they had shot down a MiG in southern Syria. Syrian and Russian air raids continue to target rebels in western and northwestern Syria - particularly in the embattled provinces of Hama, Homs, Idlib and Aleppo - more than a month after Moscow’s intervention.
<reponame>2e0byo/form-site from json import dump, load from pathlib import Path from bottle import post, request, route, run, static_file STATIC = Path(__file__).parent.parent / "static" DB = Path(__file__).parent.parent / "data.json" data = [] if DB.exists(): with DB.open("r") as f: data = load(f) def db_add(response: dict): data.append(response) with DB.open("w") as f: dump(data, f) @post("/form") def form(): db_add(dict(request.forms.items())) return static_file("thanks.html", root=STATIC) @route("/") def homepage(): return static_file("form.html", root=STATIC) if __name__ == "__main__": run(host="localhost", port=8225)
<reponame>WhitWaldo/service-fabric-explorer import { Component, Input, OnChanges, OnInit } from '@angular/core'; import { ApplicationUpgradeProgress } from 'src/app/Models/DataModels/Application'; import { ClusterUpgradeProgress } from 'src/app/Models/DataModels/Cluster'; import { ListSettings } from 'src/app/Models/ListSettings'; import { IEssentialListItem } from 'src/app/modules/charts/essential-health-tile/essential-health-tile.component'; import { SettingsService } from 'src/app/services/settings.service'; import { TimeUtils } from 'src/app/Utils/TimeUtils'; @Component({ selector: 'app-upgrade-info', templateUrl: './upgrade-info.component.html', styleUrls: ['./upgrade-info.component.scss'] }) export class UpgradeInfoComponent implements OnChanges, OnInit { @Input() upgradeProgress: ClusterUpgradeProgress | ApplicationUpgradeProgress; upgradeProgressUnhealthyEvaluationsListSettings: ListSettings; essentialItems: IEssentialListItem[] = []; essentialItems2: IEssentialListItem[] = []; failedUpgradeItems: IEssentialListItem[] = []; healthPolicy: IEssentialListItem[] = []; startTimeEssentialItem: IEssentialListItem; helpText = ''; link = 'https://docs.microsoft.com/azure/service-fabric/service-fabric-application-upgrade#rolling-upgrades-overview'; // When an upgrade is not in progress dont show a progress bar. // this is to avoid confusion upgradeDuration: IEssentialListItem; failed: boolean = false; manual: boolean = false; constructor(private settings: SettingsService) { } ngOnInit() { this.upgradeProgressUnhealthyEvaluationsListSettings = this.settings.getNewOrExistingUnhealthyEvaluationsListSettings('clusterUpgradeProgressUnhealthyEvaluations'); } ngOnChanges(): void { this.manual = this.upgradeProgress.raw.RollingUpgradeMode === "UnmonitoredManual"; this.failed = this.upgradeProgress.raw.FailureReason !== 'None'; if(this.failed) { this.failedUpgradeItems = [ { descriptionName: 'Failure Reason', copyTextValue: this.upgradeProgress.raw.FailureReason, displayText: this.upgradeProgress.raw.FailureReason, }, { descriptionName: 'Failure Timestamp', copyTextValue: this.upgradeProgress.raw.FailureTimestampUtc, displayText: this.upgradeProgress.raw.FailureTimestampUtc, }, ] const domainName = this.upgradeProgress.raw.UpgradeDomainProgressAtFailure.DomainName; if(domainName) { this.failedUpgradeItems.push({ descriptionName: 'Failure Domain', copyTextValue: domainName, displayText: domainName, }) } } const monitoringPolicy = this.upgradeProgress.raw?.UpgradeDescription?.MonitoringPolicy; if(monitoringPolicy) { const healthCheckRetryTimeout = TimeUtils.getDuration(monitoringPolicy.HealthCheckRetryTimeoutInMilliseconds); const healthCheckStableDuration = TimeUtils.getDuration(monitoringPolicy.HealthCheckStableDurationInMilliseconds); const healthCheckWaitDuration = TimeUtils.getDuration(monitoringPolicy.HealthCheckWaitDurationInMilliseconds); this.healthPolicy = [ { descriptionName: 'Health Check Wait Duration', copyTextValue: healthCheckWaitDuration, displayText: healthCheckWaitDuration }, { descriptionName: 'Health Check Stable Duration', copyTextValue: healthCheckStableDuration, displayText: healthCheckStableDuration }, { descriptionName: 'Health Check Retry Time Out', copyTextValue: healthCheckRetryTimeout, displayText: healthCheckRetryTimeout }, ] } let entitySpecificInformation = []; if (this.upgradeProgress instanceof ClusterUpgradeProgress) { entitySpecificInformation = [ { descriptionName: 'Code Version', copyTextValue: this.upgradeProgress.raw.CodeVersion, displayText: this.upgradeProgress.raw.CodeVersion, }, { descriptionName: 'Config Version', copyTextValue: this.upgradeProgress.raw.ConfigVersion, displayText: this.upgradeProgress.raw.ConfigVersion, } ]; const clusterHealthPolicy = this.upgradeProgress.raw?.UpgradeDescription?.ClusterHealthPolicy; if(clusterHealthPolicy) { const considerWarningAsError = clusterHealthPolicy.ConsiderWarningAsError; const maxPercentUnhealthyNodes = `${clusterHealthPolicy.MaxPercentUnhealthyNodes}%`; const maxPercentUnhealthyApps = `${clusterHealthPolicy.MaxPercentUnhealthyApplications}%`; this.healthPolicy = this.healthPolicy.concat([ { descriptionName: 'Treat Warnings As Errors', copyTextValue: considerWarningAsError.toString(), displayText: considerWarningAsError.toString() }, { descriptionName: 'Max Unhealthy Nodes %', copyTextValue: maxPercentUnhealthyNodes, displayText: maxPercentUnhealthyNodes }, { descriptionName: 'Max Unhealthy Applications %', copyTextValue: maxPercentUnhealthyApps, displayText: maxPercentUnhealthyApps }, ]) } }else if (this.upgradeProgress instanceof ApplicationUpgradeProgress) { entitySpecificInformation = [ { descriptionName: 'Target Version', copyTextValue: this.upgradeProgress.raw.TargetApplicationTypeVersion, displayText: this.upgradeProgress.raw.TargetApplicationTypeVersion, } ]; const applicationHealthPolicy = this.upgradeProgress.raw?.UpgradeDescription?.ApplicationHealthPolicy; if(applicationHealthPolicy) { const considerWarningAsError = applicationHealthPolicy.ConsiderWarningAsError; const maxPercentUnhealthyApps = `${applicationHealthPolicy.MaxPercentUnhealthyDeployedApplications}%`; this.healthPolicy = this.healthPolicy.concat([ { descriptionName: 'Treat Warnings As Errors', copyTextValue: considerWarningAsError.toString(), displayText: considerWarningAsError.toString() }, { descriptionName: 'Max Unhealthy Deployed Applications %', copyTextValue: maxPercentUnhealthyApps, displayText: maxPercentUnhealthyApps }, ]) } } this.essentialItems = entitySpecificInformation.concat([ { descriptionName: 'Upgrade State', copyTextValue: this.upgradeProgress.raw.UpgradeState, displayText: this.upgradeProgress.raw.UpgradeState, }, { descriptionName: 'Upgrade Mode', copyTextValue: this.upgradeProgress.raw.RollingUpgradeMode, displayText: this.upgradeProgress.raw.RollingUpgradeMode, } ]); this.startTimeEssentialItem = { descriptionName: 'Start Timestamp UTC', copyTextValue: this.upgradeProgress.startTimestampUtc, displayText: this.upgradeProgress.startTimestampUtc, displaySelector: true }; if (!this.upgradeProgress.isUDUpgrade && this.upgradeProgress.isUpgrading) { this.essentialItems.push({ descriptionName: 'Upgrade Type', displayText: 'Node by Node', }); } if (this.upgradeProgress.isUpgrading && this.upgradeProgress.isUDUpgrade) { this.essentialItems2 = [ { descriptionName: 'Current Upgrade Domain', copyTextValue: this.upgradeProgress.raw.CurrentUpgradeDomainProgress.DomainName, displayText: this.upgradeProgress.raw.CurrentUpgradeDomainProgress.DomainName, }, ]; this.helpText = 'Failure Action : ' + this.upgradeProgress.raw.UpgradeDescription.MonitoringPolicy.FailureAction; }else { this.upgradeDuration = { descriptionName: 'Duration', copyTextValue: this.upgradeProgress.upgradeDuration, displayText: this.upgradeProgress.upgradeDuration }; } console.log(this) } }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package net.purnama.gui.inner.home; import javax.swing.JTabbedPane; import net.purnama.gui.inner.home.util.ChangePasswordPanel; import net.purnama.gui.inner.home.util.ExportPanel; import net.purnama.gui.inner.home.util.ImportPanel; import net.purnama.gui.library.MyPanel; import net.purnama.util.GlobalFields; /** * * @author Purnama */ public class SettingHome extends MyPanel{ private final JTabbedPane tabbedpane; private final ChangePasswordPanel changepasswordpanel; private final ExportPanel exportpanel; private final ImportPanel importpanel; public SettingHome() { super(GlobalFields.PROPERTIES.getProperty("LABEL_SETTING")); tabbedpane = new JTabbedPane(); changepasswordpanel = new ChangePasswordPanel(); tabbedpane.add(changepasswordpanel, GlobalFields.PROPERTIES.getProperty("LABEL_PASSWORD")); exportpanel = new ExportPanel(); tabbedpane.add(exportpanel, GlobalFields.PROPERTIES.getProperty("LABEL_EXPORT")); importpanel = new ImportPanel(); tabbedpane.add(importpanel, GlobalFields.PROPERTIES.getProperty("LABEL_IMPORT")); add(tabbedpane); } }
<filename>client-src/src/app/consensus-builder/dataset-selector/dataset-selector.component.ts import { Component, OnInit } from '@angular/core'; import { Dataset, DatasetService } from '../../common'; @Component({ selector: 'tfe-dataset-selector', templateUrl: './dataset-selector.component.html', styleUrls: ['./dataset-selector.component.scss'] }) export class DatasetSelectorComponent implements OnInit { datasets: Dataset[] = []; constructor( private datasetService: DatasetService, ) { } ngOnInit() { this.datasetService.all().subscribe(datasets => this.datasets = datasets); } }
Third (3rd) Generation Partnership Project (3GPP) Multimedia Broadcast Multicast Service (MBMS) on Long Term Evolution (LTE) release 9 defines a unidirectional broadcast delivery service. The focus of the standard is to allow a fixed or a wired content source provider to deliver a data stream or content on a unidirectional broadcast service (MBMS broadcast) to a particular coverage area for consumption by user equipment (UE). This allows, for example, the delivery of broadcast video sessions such as sports, news, or weather alerts in a particular area. However, one of the problems with the MBMS on LTE is that the operation is limited since it does not consider the case of a mobile content source i.e., when the content source for the MBMS broadcast service is the mobile user equipment. The content source could be, for example, a police radio that is keyed for Push to talk (PTT) service. Further, in a group communication, there is a need for members of a group to be able to communicate regardless of location of the members of the group. In land mobile radio (LMR) conventional systems, a user's ability to communicate with other users (on the same RF channel) is based on the channel's coverage area. However, in case the user moves out of the channel's coverage area, the user fails to communicate with the other users in the group. In other words, the users that move outside the channel's coverage area can neither receive downlink broadcast data nor source data uplink for downlink broadcast on that channel. In order to provide similar LMR conventional operation on a broadband network, MBMS on LTE can be used. Content sourced from a UE, for example a police radio that is keyed for Push to talk (PTT) service, is delivered uplink using point-to-point unicast and then distributed downlink using MBMS broadcast that is constrained to a specific coverage area within a portion of the overall broadband network's system coverage. However there are scenarios in which users desire to participate in a group service while outside the specific coverage area for the group service. Accordingly, there is a need for a method and apparatus for extending a broadcast group service to a user equipment. Skilled artisans will appreciate that elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions of some of the elements in the figures may be exaggerated relative to other elements to help to improve understanding of embodiments of the present invention. The apparatus and method components have been represented where appropriate by conventional symbols in the drawings, showing only those specific details that are pertinent to understanding the embodiments of the present invention so as not to obscure the disclosure with details that will be readily apparent to those of ordinary skill in the art having the benefit of the description herein.
<reponame>pioug/atlassian-frontend-mirror import React from 'react'; import { IntlProvider } from 'react-intl'; import ConfigPanel from '../../src/ui/ConfigPanel'; import { ExtensionProvider, Parameters, ExtensionType, ExtensionKey, } from '@atlaskit/editor-common/extensions'; export default function ConfigPanelWithProviders({ extensionType, extensionKey, nodeKey, extensionProvider, parameters, onChange, }: { extensionType: ExtensionType; extensionKey: ExtensionKey; nodeKey: string; extensionProvider: ExtensionProvider; parameters: Parameters; onChange?: (parameters: Parameters) => void; }) { function _onChange(data: Parameters) { if (onChange) { onChange(data); } } return ( <IntlProvider locale="en"> <ConfigPanel extensionType={extensionType} extensionKey={extensionKey} nodeKey={nodeKey} extensionProvider={extensionProvider} parameters={parameters} showHeader autoSave onChange={_onChange} onCancel={() => console.log('onCancel')} /> </IntlProvider> ); }
<filename>src/components/property/detail/SectionAbout.tsx /* eslint-disable react/prop-types */ import React from 'react' import { Row, Col, Container, Card, Breadcrumb } from 'react-bootstrap' import StatusPropertyCheck from '../../../elements/StatusPropertyCheck' import { Property } from '../../../types/index.types' import LazyLoad from 'react-lazyload' import { Link } from 'react-router-dom' const SectionAbout: React.FC<Property> = ({ title, mainPicture, size, price, status, location, userId, }) => { if (!userId) return null return ( <section className='section'> <Container> <Row className='mt-3'> <Col> <Breadcrumb> <Breadcrumb.Item> <Link to='/'>Home</Link> </Breadcrumb.Item> <Breadcrumb.Item> <Link to='/property'>Property</Link> </Breadcrumb.Item> <Breadcrumb.Item active>{title}</Breadcrumb.Item> </Breadcrumb> </Col> </Row> <Row> <Col xs={12} md={7} className='mt-4'> <Card> <LazyLoad height={100} once> <Card.Img src={mainPicture} alt='gambar' width='100%' onClick={() => window.open(mainPicture, '_blank')} className='img-gallery' /> </LazyLoad> </Card> </Col> <Col className='text-wrap' xs={12} md={5}> <Card bg='light' border='light'> <Card.Body> <div className='border-bottom'> <h5 className='h4'>{title}</h5> <p className='h6'>{userId.fullName}</p> <p>{location.display}</p> </div> <h2> <span className='font-weight-light'>{size.display}</span> </h2> {/* <Badge>CICILAN</Badge> */} {/*jika pakai konsep cicilan maka akifkan badge diatas */} <h2> <span className='font-weight-light'>Rp. </span> {price} Juta </h2> <p> <StatusPropertyCheck {...status} /> </p> {/* <ul> <li>Model: perumahan</li> <li>Stok: 18 unit</li> <li>DP: 3,5 Juta / 3thn</li> <li>Cicilan: 15 ribu / hari</li> </ul> */} </Card.Body> </Card> </Col> </Row> </Container> </section> ) } export default SectionAbout
/* Copyright (c) 2014-2016 InternetWide.org and the ARPA2.net project All rights reserved. See file LICENSE for exact terms (2-clause BSD license). <NAME> <<EMAIL>> */ /** * LDAP operations in a C++ jacket. * * Sync -- as in SyncRepl according to RFC4533 -- actions on an LDAP connection. */ #ifndef SWLDAP_SEARCH_H #define SWLDAP_SEARCH_H #include <string> #include "connection.h" namespace SteamWorks { namespace LDAP { /** * (Synchronous) sync. */ class SyncRepl: public Action { private: class Private; std::unique_ptr<Private> d; protected: void after_poll(); virtual void after_modification(const std::string& removed); virtual void after_modification(const std::string& modified, const picojson::object& values); public: SyncRepl(const std::string& base, const std::string& filter); ~SyncRepl(); std::string base() const; std::string filter() const; virtual void execute(Connection&, Result result=nullptr); void poll(Connection&); void resync(); /** Debugging, dump the DIT entries stored in this SyncRepl into @p result */ void dump_dit(Result result); } ; } // namespace LDAP } // namespace #endif
Generalized dirichlet mixture matching projection for supervised linear dimensionality reduction of proportional data In this paper, a novel effective method to reduce the dimensionality of labeled proportional data is introduced. Most well-known existing linear dimensionality reduction methods rely on solving the generalized eigen value problem which fails in certain cases such as sparse data. The proposed algorithm is a linear method and uses a novel approach to the problem of dimensionality reduction to solve this problem while resulting higher classification rates. Data is assumed to be from two different classes where each class is matched to a mixture of generalized Dirichlet distributions after projection. Jeffrey divergence is then used as a dissimilarity measure between the projected classes to increase the inter-class variance. To find the optimal projection that yields the largest mutual information, genetic algorithm is used. The method is especially designed as a preprocessing step for binary classification, however, it can handle multi-modal data effectively due to the use of mixture models and therefore can be used for multi-class problems as well.
import * as React from 'react'; import { Button, Input, Spin, Card } from 'antd'; import { connect } from 'react-redux'; import { CountAction, CountState } from '@/core/store/models/count'; import { StateModels } from '@/core/store/interface'; interface DemoProps extends PageProps { countState: CountState; countAction: CountAction; } declare interface DemoState { resData: queryTestInfoUsingGET.Response | {}; loading: boolean; createWindowLoading: boolean; } /** * DemoProps 是组件的 props 类型声明 * DemoState 是组件的 state 类型声明 * props 和 state 的默认值需要单独声明 */ class Demo extends React.Component<DemoProps, DemoState> { // state 初始化 state: DemoState = { resData: {}, loading: false, createWindowLoading: false, }; // 构造函数 constructor(props: DemoProps) { super(props); } componentDidMount() { console.log(this); } render() { const { resData, loading, createWindowLoading } = this.state; const { countState } = this.props; return ( <div> <Card title="Redux Test" className="mb-16"> <p>redux count : {countState.count}</p> <p>redux count2 : {countState.count}</p> <p>redux countAlias : {countState.count}</p> <div className="mt-16"> <Button type="primary" onClick={() => { this.props.countAction.increment(1); }}> Add </Button> <Button className="ml-16" type="primary" onClick={() => { this.props.countAction.decrement(1); }}> Decrement </Button> <Button className="ml-16" type="primary" onClick={async () => { await this.props.countAction.incrementAsync(1); console.log('hello'); }}> incrementAsync </Button> </div> <p className="text-light mt-16 mb-16"> Redux runs in the main process, which means it can be shared across all renderer processes. </p> <Button onClick={this.openNewWindow} loading={createWindowLoading}> Open new window </Button> </Card> <Card title="Request Test" className="mb-16"> <Spin spinning={loading}> <div className="mb-16"> <Button type="primary" onClick={this.requestTest.bind(this)}> Request </Button> <Button className="ml-16" type="primary" onClick={this.requestTestError.bind(this)}> Request Error (notification) </Button> <Button className="ml-16" type="primary" onClick={this.requestTestErrorModal.bind(this)}> Request Error (modal) </Button> </div> <Input.TextArea value={JSON.stringify(resData)} autoSize /> </Spin> </Card> </div> ); } openNewWindow = () => { this.setState({ createWindowLoading: true }); $tools.createWindow('Demo').finally(() => this.setState({ createWindowLoading: false })); }; requestTest() { this.setState({ loading: true }); $api .queryTestInfo({}) .then(resData => { this.setState({ resData }); }) .finally(() => this.setState({ loading: false })); } requestTestError() { this.setState({ loading: true }); $api .queryTestInfoError({}) .catch(resData => { this.setState({ resData }); }) .finally(() => this.setState({ loading: false })); } requestTestErrorModal() { this.setState({ loading: true }); $api .queryTestInfoError({}, { errorType: 'modal' }) .catch(resData => { this.setState({ resData }); }) .finally(() => this.setState({ loading: false })); } } const mapStateToProps = ({ count }: StateModels) => ({ countState: count, }); const mapDispatchToProps = (dispatch: any) => ({ countAction: dispatch.count, }); export default connect(mapStateToProps, mapDispatchToProps)(Demo);
The effects of an exercise with a stick on the lumbar spine and hip movement patterns during forward bending in patients with lumbar flexion syndrome. BACKGROUND AND OBJECTIVE Forward bending is frequently performed in daily activities. However, excessive lumbar flexion during forward bending has been reported as a risk factor for low back pain. Therefore, we examined the effects of an exercise strategy using a stick on the angular displacement and movement onset of lumbar and hip flexion during forward-bending exercises in patients with lumbar flexion syndrome. METHODS Eighteen volunteers with lumbar flexion syndrome were recruited in this study. Subjects performed forward-bending exercises with and without a straight stick in standing. The angular displacement and movement onset of lumbar and hip flexion during forward-bending exercises were measured by using a three dimensional motion analysis system. The significances of differences between the two conditions (with stick vs. without stick) was assessed using a one-way repeated analysis of variance. RESULTS When using a stick during a forward-bending exercise, the peak angular displacement of lumbar flexion decreased significantly, and those of right and left-hip flexion increased significantly compared with those without a stick. The movement onset of lumbar flexion occurred significantly later, and the onset of right-hip flexion occurred significantly earlier with than without a stick. CONCLUSIONS Based on these findings, a stick exercise was an effective method to prevent excessive lumbar flexion and more helpful in developing hip flexion during a forward-bending exercise. These findings will be useful for clinicians to teach self-exercise during forward bending in patients with lumbar flexion syndrome.
from bottle import route, run, template, view, static_file, post, request, redirect import subprocess @route('/') @view('index') def index(): return dict() @route('/static/<filename>') def server_static(filename): return static_file(filename, root='./static') @post('/setup') def do_setup(): ssid = request.forms.get('ssid') password = request.forms.get('password') subprocess.call(['/home/pi/WiPi/scripts/config_wpa', ssid, password]) return "<h1>Restarting</h1>" @route('/<path:re:.*>') def catchall(path=None): return redirect('/') run(host='0.0.0.0', port=80)
Karl Emil Franzos Life Karl Emil Franzos was born near the town of Czortków (Chortkiv) in the eastern, Podolian region of the Austrian Kingdom of Galicia. His family came from Sephardi Spanish Jews who fled the Inquisition to Holland and later settled in Lorraine. In the 1770s his great-grandfather established a factory for one of his sons in East Galicia, part of the Habsburg Monarchy since the First Partition of Poland in 1772. When the Austrian administration required Jews to adopt surnames, "Franzos" became his grandfather's name, from his French background, even though he regarded himself as German. Franzos's father Heinrich (1808–1858) was a highly respected doctor in Czortków. His German identity at the time had mainly linguistic and cultural meaning, there being no state called "Germany", just a loose German Confederation. He was steeped in the humanistic ideals of the German Enlightenment as expressed by Kant, Lessing and, especially, Schiller. This brought a certain isolation: for local Poles and Ukrainians he was German, for Germans a Jew and for Jews a renegade, a deutsch. In the Vormärz era of the first half of the 19th century, liberalism and nationalism went hand in hand, and Franzos's father was one of the first Jews to join a Burschenschaft student fraternity whose ideal was a German nation state with a liberal constitution. It is ironic that by the time Franzos, who shared his father's ideals, went to university, the German student fraternities had "dejudaised" themselves. His father died when he was ten and his mother moved to the Bukovina capital Czernowitz (Chernivtsi). The city's multiculturalism, representative of the Habsburg Empire, strongly influenced his youth and character. The first languages he spoke were Ukrainian and Polish, learnt from his nurse; his first school was attached to the Czortków Dominican abbey, where the teaching was in Latin and Polish; and he attended private lessons in Hebrew. In Czernowitz he attended the German gymnasium, passing the Matura exam with honours in 1867. By now the family was in reduced circumstances and he supported himself by giving lessons, later, as a student, from his writing. He would have liked to study classical philology with the aim of becoming a teacher, but no scholarship was forthcoming. Jews were not eligible for teaching posts, and even though he was non-religious, he refused to convert to advance his career. An additional reason for the refusal of a scholarship was that he did not attempt to conceal his liberal outlook, having, for example, tried to organise a celebration for the liberal poet, Ferdinand Freiligrath. He studied law at the universities of Vienna and Graz, that being a shorter course. When he graduated, he found himself in a similar situation: he did not want to become an advocate, and a position as judge was closed to him as a Jew. Having had a number of pieces published while he was a student, he went into journalism and worked for newspapers and magazines for the rest of his life, at first in Budapest and in Vienna as a travel writer of the Neue Freie Presse newspaper. In 1877 he married Ottilie Benedikt, a relative of editor Moriz Benedikt. From 1886 he lived in Berlin, capital of the German Empire. Franzos had acclaimed the 1871 German unification under Prussian leadership and advocated a Greater Germany including the Austrian territories. However, the move to the German capital was caused as much by the greater opportunities for publishing there as by his "Germanic" tendencies. Indeed, the increasing virulence of antisemitism in Germany meant that later on he had difficulty placing pieces which were felt to be too pro-Jewish—which was often another way of saying "not sufficiently anti-Jewish". More and more under Jew-hatred attacks, Franzos suffering from heart trouble died at the age of 55 in Berlin, where he is buried in the Weißensee Cemetery. Woyzeck Franzos is also well known for being the first to publish an edition of Georg Büchner's work, which was vital for the rediscovery of the Vormärz author. Franzos completed his edition in 1879, including plays like Danton's Death and Leonce and Lena. The manuscript of Büchner's drama Woyzeck was difficult to decipher, and had to be treated with chemicals in order to bring the ink up to the surface of the paper, and many of the pages were kept and later destroyed by Büchner's widow, who survived him by four decades. But Franzos's edition was for many years the authoritative version, until the late 1910s when a revival of Büchner's works began in Europe and the many errors in Franzos' edition came to light. These errors include the misspelling of the title, as "Wozzeck" instead of "Woyzeck", an alternate ending that involves Wozzeck drowning in lieu of Büchner's incomplete manuscript, and a fragmented plot without connections between the scenes. Although the play is often performed in newer versions, Franzos' edition has been immortalized in the form of Alban Berg's opera Wozzeck, which uses the Franzos edition as its base.
Back in May, the House passed the First Step Act, a modest effort to reform our broken criminal justice system. Prominent Republicans and Democrats urged Senate Majority Leader Mitch McConnell to pass the legislation before this Congress runs out of time. Top Senate Republicans agree. Sen. Chuck Grassley, R–Iowa, insisted that there is "plenty of time to pass First Step Act in December," while Sens. Lindsey Graham, R–S.C., and Rand Paul, R–Ky., also asked for a vote.
n, d = map(int, input().split()) a = list(map(int, input().split())) b = [] for i in a: b.append(i) if i+d not in b and i+d not in a: b.append(i+d) if i-d not in b and i-d not in a: b.append(i-d) b.sort() for i in range(n): val = b[b.index(a[i])] z = b[b.index(a[i]) - 1] while abs(val - z) != d and z not in a: b.remove(z) z = b[b.index(a[i]) - 1] z = b[b.index(a[i]) + 1] while abs(z - val) != d and z not in a: b.remove(z) z = b[b.index(a[i]) + 1] print(len(b) - len(a))
<reponame>perjonsson/DeskGap<filename>node/src/node_bindings/dialog/dialog_wrap.h #ifndef dialog_dialog_wrap_h #define dialog_dialog_wrap_h #include <napi.h> namespace DeskGap { Napi::Object DialogObject(const Napi::Env& env); } #endif
1. Field of the Invention The present invention relates to a device for measuring the density of a body, in particular a human body, under normal living conditions without being subjected to any restrictions. 2. Description of the Prior Art As used throughout the application, the term "density" is taken to refer to the average density of an organism at a given moment under given physiological conditions, e.g., before or after inhalation, the consumption of a meal, etc. The prior art in this domain does not easily lend itself to definition. It has been stated by some physicians that knowledge of body density is useful in principle, both for physiological research and pathological characterization, however, the devices developed for such measurements have encountered various difficulties until this time. Direct measurement by the displacement of an equivalent volume of water not only calls for an artificial respiratory device but also entails discomfort caused to the patient by the total immersion which is necessary. Indirect measurement by the combination of two independent measurements, that of the volume of the human body and that of its mass, have likewise hitherto proven impractical for reasons which will now be set forth. Known techniques for measuring the volume of a body comprise the steps of placing the body in an enclosure filled with a certain gas at a given pressure and of "treating" this gas by one of the following processes: (1) Exciting a resonant acoustic frequency, which is a function of the residual volume between the enclosure and the body. This phenomena, adequately described by HELMHOLTZ, after whom such "resonators" have been named, is expressed by a relatively complex law in which the volume and the frequency are interdependent while at the same time being a function of additional variables. (2) Subjecting the residual volume between a chamber and the body within the chamber to a known variation of volume and measuring the resulting pressure variation. The method may be "static", i.e., based on the use of one single compression level, or "dynamic", i.e., with compression varying according to an alternating function. The above techniques are not as simple as they may appear. The possibilities offered by the first method are seriously limited by the necessity of preventing leaks from the chambers and also by the temperature fluctuations which occur. The problems of "propagation", i.e., the finite speed at which a disturbance in a gas is propagated, set limits to the possibilities offered by the second method. Thus, whether the static or the dynamic method is adopted, the difference between isothermic and adiabactic compression has to be taken into account and the the coefficient .gamma., equal to the quotient obtained from the two specific heats, that prevailing at constant pressure and that prevailing at a constant volume, must be taken into account. Furthermore, it is necessary to accurately determine not only the volumetric variation creating the phenomenon, but also the pressure prevailing in the enclosure which plays a direct role in the measurement. Whether the resonance method or the volume-pressure sounding method is used, the living organism being studied must not be injured or disturbed, a condition which neither of the techniques has been able to satisfy thus far. Finally, whatever the volumetric measuring method adopted, the weight of the subject must still be determined as well. When independently measuring weight in order to determine density by simple division, a number of problems are encountered. There are, therefore, problems of not only convenience but also of rapidity, particularly in the case of physiological experiments, in which the weight of the subject may vary in the course of one and the same cycle of measurements and in which it must be possible for the density (varying as a result of the consumption of liquids or solids, urination, etc.) to be followed continuously.
import os from datetime import datetime import constants def is_allowed_file_extension(filename): """ Function used to check if the file extension is one of the allowed extensions :param filename:str :return: boolean """ return '.' in filename and \ filename.rsplit('.', 1)[1].lower() in constants.ALLOWED_EXTENSIONS def generate_secret_filename_for(filename): """ Function allows us to create a secret and append it to the original file name to make it unique :param filename: :return: str: New filename """ secret = os.urandom(constants.FILENAME_SECRET_LENGTH).hex() return secret + filename def generate_todays_date_folder(): """ Function to check and create if does not exist a folder of today's date and returns today's date folder directory :return: str """ todays_date = datetime.today().date() todays_date_folder_dir = os.path.join(constants.IMAGE_REPOSITORY_PATH, str(todays_date)) if not os.path.isdir(todays_date_folder_dir): os.mkdir(todays_date_folder_dir) return todays_date_folder_dir