content
stringlengths 7
2.61M
|
---|
A HTF-Based Higher-Order Adaptive Control of Single-Stage Grid-Interfaced PV System In this paper, a hyperbolic tangent function (HTF) based higher order adaptive control algorithm is used with perturb & observe based maximum power point tracking algorithm for a three-phase, single-stage, grid-interfaced solar photovoltaic system with distribution static compensator capabilities. The variable learning based HTF control algorithm is used for the reduction of the mean square error and increases the tracking speed in the system, thereby improving the response of the system. The HTF-based control algorithm is simple in implementation with easy mathematical formulations. The proposed system is simulated in MATLAB/Simulink and is tested on a developed prototype in the laboratory under various abnormal conditions, such as variable solar irradiation, load unbalancing, and voltage sag/swell. The response of system is satisfactory and the total harmonic distortions of grid current are within the limit, as outlined in the IEEE-519 standard.
|
Solitary Extramedullary Plasmacytoma of the Cricoid CartilageCase Report Solitary plasmacytoma (SP) is an extremely rare form of hematologic malignancy that can be classified as solitary bone plasmacytoma or solitary extramedullary plasmacytoma. Here, we report a patient who presented with progressive shortness of breath and foreign body sensation in his throat. Fluorodeoxyglucose positron emission tomography/computed tomography (18F-FDG-PET/CT) demonstrated an abnormal FDG-avid soft tissue mass arising from the larynx involving the cricoid cartilage without additional suspicious lesions. Histology revealed an abundance of plasma cells; immunohistochemistry was positive for CD138 expression and lambda chains, and negative for CD20. Comprehensive imaging studies and panendoscopy of the ENT tract confirmed solitary disease involvement. Following additional systemic work-up, a diagnosis of extramedullary plasmacytoma was rendered. The patient underwent definitive radiotherapy using intensity-modulated radiation therapy (total dose of 46Gy, divided in 23 fractions of 200cGy). Serial PET/CT showed the stepwise resolution of abnormal FDG uptake and resolution of the cricoid cartilage lesion. With 22months of follow-up, the patient remains free of disease. We describe the rare case of SP presenting as a FDG-avid hypermetabolic soft tissue mass in the cricoid cartilage, which should be considered in the differential diagnosis of laryngeal tumors. Of note, SP is radiosensitive; favorable outcome can be expected once treated with doses of 4050Gy. FDG PET/CT is helpful in diagnosis and response assessment for this disease. Here, we report the rare case of a laryngeal SEMP involving the cricoid cartilage. BaCKGRoUND A 77-year-old man who grew up in Sicily presented with progressive shortness of breath and foreign body sensation in his throat to an outside emergency department while traveling to Arizona. Other symptoms included intermittent cough of whitish sputum, intermittent wheezing, and dyspnea on exertion. Outside chest X-ray and CT of the chest revealed thickened soft tissue beneath the vocal cords. A prior chest CT from April 2014 showed no laryngeal lesion. A dedicated CT of the larynx performed in March 2015 with intravenous contrast then demonstrated an expansile soft tissue mass arising in the posterior half of the cricoid cartilage with mild airway narrowing measuring 3.3 cm 1.7 cm 2.2 cm. No infiltration of adjacent soft tissues, trachea, or arytenoid cartilage was detected, nor was focal calcification observed ( Figure 1B, blue arrow). FDG-PET performed 4 days later showed the soft tissue mass involving the posterior half of the cricoid cartilage with increased FDG uptake (Figure 1A, blue arrow). No other sites of abnormal increased FDG uptake were identified elsewhere in the body. Possible differential diagnosis included primary lesions of the cartilage (chondroma versus chondrosarcoma), lymphoma/lymphoid hyperplasia, and an inflammatory process. The next day, laryngoscopy confirmed the diffuse enlargement of the cricoid cartilage with circumferential subglottic narrowing (Figure 2). Figure 2A shows the epiglottis, arytenoid cartilage, and enlarged cricoid cartilage. Figure 2B shows a magnified view of the enlarged cricoid cartilage. Since an attempted endoscopic biopsy was not diagnostic, a CT-guided biopsy was obtained four weeks later (Figure 3). Histologically, the tumor was entirely composed of plasma cells, some of which showed the typical perinuclear clearing associated with the Golgi apparatus ( Figure 4A, arrow). On immunohistochemistry, the neoplastic cells stained positive for CD138 ( Figure 4B) and stains for immunoglobulin lambda ( Figure 4C) and kappa ( Figure 4D) in favor of lambda chains, demonstrating that the tumor is lambda light chain restricted. Complete lack of CD20 expression excluded an aggressive B-cell lymphoma. A diagnosis of extramedullary plasmacytoma (EMP) was rendered. Additional systemic work-up including bone marrow biopsy, urine/serum protein electrophoresis, immunofixation, and blood chemistry showed no evidence of MM, leading to the final diagnosis of SEMP. The patient underwent definitive radiotherapy using intensity-modulated radiation therapy (total dose of 46 Gy, divided in 23 fractions of 200 cGy; completed in July 2015). He tolerated the treatment well; the acute toxicity noted was grade 1 voice change. He had no unanticipated events during his RT course; however, he developed likely radiation-induced subclinical hypothyroidism (TSH 9.5, freeT4 normal), for which he was treated with levothyroxine. This RT-related complication is not unexpected in view of the thyroid's immediate vicinity to the larynx; therefore, baseline thyroid function tests prior to RT initiation and subsequent continued testing should be considered to detect transient or permanent dysfunction. Serial follow-up imaging studies showed stepwise resolution (Figure 1C-H, arrows). With 26 months of follow-up, the patient remains free of disease. DIsCUssIoN Solitary extramedullary plasmacytoma is defined as a solitary soft tissue lesion with clonal plasma cells, an absence of bone marrow involvement, and an absence of end-organ damage secondary to lympho-plasma cell proliferative disorder. SEMP occurs most commonly in the head and neck, demonstrating a predilection for male gender and for pharynx (21.5%), nasal cavity (19.3%), oral cavity (14.7%), and paranasal sinuses (13.0%). Involvement of the larynx, however, is rare, with a total of 32 cases (4.7%) reported in the SEER database from 1973 to 2000. The clinical presentation in patients with laryngeal involvement is varying and dependent on location and lesion size, usually involving hoarseness and/or dysphagia, sometimes even acute airway compromise requiring emergent bronchoscopic resection have been reported. In our literature search, we found only four case reports that have described SEMP involving the cricoid cartilage. Due to the low incidence of SP, reliable data regarding the clinical course and outcome of different treatment approaches are lacking. SP is radiosensitive, with favorable outcomes when treated with doses of 40-50 Gy. Other treatment options include surgical resection, laser excision, or combined modality therapy. SEMP, in particular for sites in the head and neck, carries a better prognosis than SBP, regardless of tumor grade or stage. Disease progression to MM is less common in SEMP as compared to SBP (36 vs. 53%). Risk factors for progression include age >60 and angiogenesis. Progression to MM and amyloid deposition has been associated with poor prognosis. Contemporary imaging studies for exclusion of MM and thus confirmation of SP, include whole-body low-dose computed tomography (to identify lytic osseous lesions), MRI of spine and pelvis, and FDG PET/CT (PET/CT) as second-line imaging techniques. PET is inferior to MRI for detection of bone marrow involvement in advanced (stage III) MM or recurrent MM, but it is a useful tool for evaluating treatment response and for prognostication. In the current case, serial PET/ CT showed the stepwise resolution of abnormal FDG uptake and resolution of the cricoid cartilage lesion following intensitymodulated radiation therapy. In contrast to MM, data on the role of FDG PET-CT in SP are scarce (see Table S1 in Supplementary Material for a summary of reported cases of plasmacytoma in head and neck imaged by PET/CT). In one study of 23 patients with SP (including SBP and SEMP) with 54 tumor sites, only 4 lesions were confined to soft tissue areas (head and neck, breast, and pelvis), and 50 were bone lesions. Per number of analyzed anatomical sites, the sensitivities, and the specificities of FDG PET/CT vs MRI were 98 and 99% vs 93 and 94%, respectively. However, in 50% of patients, the FDG PET/CT detected plasmacytoma lesions in 18 areas that were outside the field of view for the MRI. In follow-up, MRI showed six false positive findings, which were correctly classified as scar tissue on PET. The histologic differential diagnoses of a monoclonal cell population with plasmacytic features includes plasma cell neoplasms, such as plasmacytoma, plasma cell myeloma, monoclonal gammopathy of uncertain significance, and smoldering myeloma, as well as other B cell lymphomas such as extranodal marginal zone lymphoma and lymphoplasmacytic lymphoma. Analysis of adhesion molecule and chemokine receptor CD49d and CXCR4 may be helpful in differentiating SP from MM. Nevertheless, comprehensive imaging studies and panendoscopy of the ear, nose, and throat tract are necessary to confirm solitary disease involvement. The etiology of SEMP remains unknown; however, viral pathogens (particularly Epstein-Barr virus) and chronic irritation from inhaled irritants associated with its diagnosis have been reported. While specific chromosomal anomalies have been identified in MM, this has not been demonstrated in SBP or SEMP. CoNCLUDING ReMaRKs We describe the rare case of SP presenting as an FDG-avid hypermetabolic soft tissue mass in the cricoid cartilage, which should be considered in the differential diagnosis of laryngeal tumors. Whereas updated guidelines for treatment, risk stratification, and prognostic criteria for patients with MM have been established, determination of a concise approach for patients with SP has been hampered, largely due to the rare occurrence and limited literature. Of note, SP is radiosensitive; favorable outcome can be expected once treated with doses of 40-50 Gy. FDG PET/CT is helpful in diagnosis and response assessment for this disease. etHICs stateMeNt Written informed consent was obtained from the patient for publication of this case report and accompanying images. aUtHoR CoNtRIBUtIoNs SK and HS assembled, analyzed, and interpreted the patient's imaging data. IG performed the biopsy. RG undertook the histologic analyses. JaY and JmY provided the treatment and continue with the patient's follow-up. All authors contributed to writing the manuscript. All authors read and approved the final manuscript. aCKNoWLeDGMeNts The authors thank Leah Bassity for editing assistance.
|
Rocket Red
Dmitri Pushkin
Dmitri Pushkin (Rocket Red #4) became a member of the Justice League International after the previously assigned Rocket Red #7 was revealed to be a Manhunter android. A kind-hearted and jolly man with a taste for American culture, Dimitri served with the Justice League International for many years.
When his armor was destroyed by Lobo, he replaced it with a more advanced model made on Apokolips. This happened during a small-team Justice League mission to save Mister Miracle. He also suffered the destruction of his battle suit while facing Time Commander in Animal Man #16 (Oct 1989), when Dimitri served with Justice League Europe. During this time, Maxwell Lord made arrangements with the Russian government for Dmitri's wife, Belina, and his two children, Mischa and Tascha, to live with him at the League's Paris embassy. He also became friends with Buddy Baker, in a manner similar to the friendship of Blue Beetle and Booster Gold. Dimitri and Buddy initially bonded because they both had wives and children.
Dmitri is featured in the second Captain Atom Annual, helping to defend the country of Bialya from various threats.
In Justice League Europe #28, Dimitri was part of the resistance against Starro because his armor prevented the alien from controlling his mind. Dmitri was neutralized when Starro threatened to harm his family. He willingly surrendered to the alien's control in order to keep them safe. Other Justice League members eventually defeated the menace.
Later, Dmitri and most of the Reds are taken over by the sound-using criminal Sonar. In the same issue, Russian government reports have him listed as retired.
Dimitri was the only European on the team initially. He retired from super-heroics for a long time before dying in The OMAC Project, self-destructing to save the other members of the old JLI. His last words to Booster Gold were "My wife and children, Michael ... tell them I love them."
In the Booster Gold series, Rocket Red's grandfather, Dr. Sergei Pushkin, was a Russian scientist working with the U.S. on the space race in 1952. Task Force X was given a mission to expose Pushkin as a traitor to the American cause. Thanks to Pushkin, the launch was ahead of schedule, and the Russians were conducting a flight to outer space that night. Booster Gold traveled through time to stop it, giving a diversion to Task Force X to apprehend Pushkin without exposing him. Pushkin became more careful, and the space program started to lag behind until he was exposed by Frank Rock as a traitor in 1954. Because he was a valuable source, the U.S. placed him under house arrest where he worked on the Rocket Red armor in secret until he was sprung in 1957 by the Soviets. He did not live to see his work completed, and it was up to his son, Dimitri, to finish the suit. The legacy of the Rocket Reds was secure until 1962.
In Blackest Night #3, Rocket Red was reanimated as a member of the Black Lanterns and is shown attacking the Rocket Red Brigade.
Gavril Ivanovich
The 2010 ongoing series Justice League: Generation Lost introduced a new Rocket Red named Gavril Ivanovich. In this title, several members of the erstwhile JLI, pursuing a group of OMACs controlled by the resurrected Maxwell Lord, encounter a fight among a group of Rocket Reds, whose infighting was triggered by renegade Rocket Red (Gavril Ivanovich), who remains loyal to the old Communist cause and is resistant to the capitalist values of the modern Rocket Red brigade. He also sports a bulkier, outdated suit of armor that resembles Pushkin's armor rather than the sleek, modern suits worn by the other members of the brigade. The Justice League members intervene to prevent collateral damage, and Ivanovich joins the group (somewhat to their initial reluctance) in a move that paralleled Pushkin's choice to join the original JLI years earlier. Gavril cements his membership in the new group during a fight against the Checkmate organization, suffering serious injuries but earning the team's respect. While the team deals with the apparent loss of Blue Beetle, Gavril bonds with Fire. He shares his insecurities about being thought of as a joke by his teammates due to his poor grasp of the English language, and the two grow close, eventually sharing a passionate kiss. During the final battle against Lords' army of OMACs, Gavril's armor is heavily damaged. Once Lord is temporarily defeated and the battle ends, the injured Gavril sets out to repair his suit.
In September 2011, The New 52 rebooted DC's continuity. In this new timeline, Gavril is reintroduced in the ongoing series Justice League International as a member of a United Nations-assembled superhero team led by Booster Gold. He immediately clashes with August General in Iron, the team's Chinese representative, but their relationship evolves into an escalation of patriotic posturing leading to their mutual respect. After helping to repel an invasion by the alien conqueror Peraxxus, Gavril is killed in an explosion during a press conference introducing the team.
Powers and abilities
The Rocket Reds were originally created for the Soviet Union by Green Lantern Kilowog and the Rocket Red Brigade —normal human beings enhanced using "forced evolution" and armored battle suits— proudly defended the USSR.
Their abilities included super strength, invulnerability, rocket-powered flight, the ability to project powerful energy blasts, and "mecha-empathy"—the ability to sense and control computers and machines.
Other versions
Rocket Red Brigade is featured in the Smallville Season 11 digital comic based on the TV series.
|
// Access reports whether a directory can be accessed by the caller.
func (fdn *fuseDirnode) Access(ctx context.Context, mask uint32) syscall.Errno {
return syscall.F_OK
}
|
1. Field of the Invention
The present disclosure generally relates to an electronic device, in particular, an electronic device and a case member for the electronic device.
2. Description of the Related Art
Recently, various types of electronic devices, such as a portable phone, a tablet Personal Computer (PC), an MP3 player, a Portable Multimedia Player (PMP), and an e-book, have been provided, and users access various contents through such electronic devices. In an electronic device, diverse functions, such as a multimedia function of reproducing a photograph, music, a video image, or the like, and an entertainment function of a game or the like, have been integrated with a wireless transmission/reception function. In addition, as electronic devices have recently become lighter in weight and have improved power efficiency, the users may use the electronic devices regardless of time or location, and thus the use of electronic devices has become ubiquitous.
An electronic device includes a display device that is provided on one surface thereof to output diverse contents, such as a photograph and video image, to a screen. Recently, a display device equipped with a touch screen function is provided on a front surface of an electronic device to replace a physical input device, so that a screen having a sufficient size can be provided, even in an electronic device of limited size.
As the use of an electronic device has become generalized, the electronic device may be utilized as an instrument for expressing a user's personality, as well as for performing its own functions. For example, the user may express his/her personality by modifying an exterior color or texture of the electronic device.
|
I have been corrected by numerous people who have studied this subject for amny years and in great depth. I have been informed that I was underestimating. The 7.5 kwh is for a US gallon, in the UK it is 9 kwh and all the figures I have seen estimate the total amount of electricity used by the refining industry is very close to 20% of our total consumption.
That said, I am very impressed by your breakdown and what ever the actual figure, we do use a lot of electricity to refine petrol. Is the carbon output of this figure included in the 'tailpipe emissions' of a 'super, eco, econobox diesel' No, of course not. My argument has always been that the C02 output figures are pure fiction, in just the same way as 'zero emissions' are fiction. My argument is, if we charge an electric car off the UK grid today, there is a carbon element in that power, but no where near as much as a rattle old internal combustion engine.
thanks for that - It's the natural sceptic and physica graduate in me. You won't have seen my second posting with a much more definitive reference which rather confirms my interpretation that the kWh figure is total energy. It's not surprising that people associate kWh with electricity. In fact it's just a unit of energy (3.6MJ) and it would be helpful if the industry didn't keep mixing up units - BTUs, kWh, MJ, ktoe (kilotonnes of oilkd equivalent) and so on. That's not to mention units of mass (tonnes etc) with those of volume gallons (US & UK), litres (or liters if you are American) and barrels.
"In 2004, UK refineries consumed approximately 6,600 kilotonnes oil equivalent (ktoe) of energy (or 77,000 GWh) to satisfy their heat and power requirements (DTI 2005)."
This 6,600 kilotonnes was used, in the same year, to refine 90 megatonnes of crude oil (in the same report). That's the equivalent of 7.3% of the original oil (which goes some way to justifying my 10% estimate). Coming up with figures for oil extraction energy overheads is amazingly difficult, and it also varies a lot by source. The Canadian oil sands have huge overheads - ranging from 10% to 30% at the extreme of what is extracted. However, go to Saudia Arabia and the extraction energy costs are tiny - at least until steam and other injection is required. Oil transport by sea is extremely efficient (just compare a tanker's fuel oil capacity with it's crude oil carrying capacity).
I'll look you up on Twitter - my name is @Eulerid .
nb. I'm planning to semi-retire to the Cotswolds some time in the next year, but it looks like I'm more likely to be run down whilst out on my bike by one of Jeremy Clarkson's gas-guzzling V8s than your lithium-powered whisper box (although I suppose I'll at least hear him coming).
energy (or 77,000 GWh) to satisfy their heat and power requirements (DTI 2005)."
Note that's total energy consumption of the refineries.
According to this report, total diesel and petrol production in the UK amounted to near enough 40 million tonnes in 2004 (about 19m tonnes each).
77,000,000 mWh / 40,000,000 tonnes = 1.925 mWh/tonne or 1.925 kWh/Kg.
If we take the average density of petrol & diesel to be approximately 850gm/litre (diesel is denser than petrol, but both are less than water) then, at about 4.5 litres/gallon we can derive an average refining energy use per gallon.
Therefore to product 1 gallon of oil and diesel it will take, on average, 1.925 x 3.8 = 7.3kWh.
Note that 7.3kWh is an overestimate. It excludes the other products of the refinery. It is also total energy input - not electricity.
So that's the way I've worked out my figures. Where's the sources for yours? Unfortunately I have no privileged access to any data or organisations, but I'm well aware that interest groups distort and misrepresent figures for their own purposes. Personally I like to see the numbers myself.
But this still ignores the CO2 cost of manufacturing the damed things. Please can we also see how that compares.
Here's an example. If everyone threw away their current car today, and got a brand-new, more efficient one, then CO2 would go through the roof manufacturing all those vehicles and getting rid of the old ones.
If everyone threw-away their car after 1 year, to get the newest one, how exactly would that reduce the TOTAL co2 emissions? All the articles we see in the press suggests that the world would be better off if we did this!
"If everyone threw-away their car after 1 year, to get the newest one, how exactly would that reduce the TOTAL co2 emissions? All the articles we see in the press suggests that the world would be better off if we did this!"
You must be reading a different press from me, then. The articles I've seen suggest that half the carbon footprint of a car is spent in manufacture, so the green approach is to keep cars going for as long as possible to amortise that footprint.
But I don't have figures, and since most of the press demonstrate total scientific cluelessness every day, I don't expect they'll be easy to come by.
10% in production, 5% in disposal, 85% in use. The more efficient the car, the lower the percentage emitted during use.
I suspect the CO2 cost of manufacturing can be largely ignored, it's probably about the same for both since the only practical difference between an electric car and a petrol one is the engine and fuel tank/battery. An electric engine is simpler than a petrol/diesel one but batteries are more complex than fuel tanks, so I suspect they roughly balance.
Now if you have a hybrid, which has both, then the CO2 cost is almost certainly higher.
IC engines and fuel tanks don't need large amounts of rare earths and rare metals.
Their high cost is a reflection of the high cost of extraction and refining these materials and I expect CO2 production roughly follows monetary costs.
Laws of Thermodynamics apply to cars - shock!
"To produce these figures, Which? looked towards the Carbon Trust's measurements that 544g of CO2 is emitted for each kilowatt hour of electricity used"
If, on the other hand, you concede that you don't *have* to generate electricity by burning fossil fuels, then the car emits 0g. Don't get me wrong. There *are* issues with electric cars, like re-charging (practical) and raw materials (environmental), but this isn't one of them.
I assume the original Which? report makes this point. I mean, they surely aren't *that* stupid, are they?
The premise of this article is ludicrous. When they say a car is zero-emissions, that's exactly what it means. It means that the car emits no exhaust fumes.
I don't see how you can conclude that this means that someone is claiming that it gets energy for free.
"compared the energy consumed when charging electric cars to that of several efficient diesel vehicles"
And how efficient would these diesel vehicles be, if not for the push from leccy competition over the past 10-20 years?
The correct title for this piece would have been: "Electric cars as efficient as the most efficient diesel cars, despite tech being 50 years youunger."
If I have a green energy tariff and/or a roof-full of solar PV panels (both hypothetical) then my e-car would be 0g of cee-oh-twos to run? And no displacement of cee-oh-twos!
I’m staggered by the number of Clarksonites here, vapidly repeating his illogical nonsense in the vain hope they don’t have to think about an issue at all.
Canada? Batteries? You have to pull something out of the ground and then transport it around the world to make batteries? Shock! Horror!
Yes you do. ONCE. Whereas your petrol and diesel has to be pulled out of the ground every single day for as long as you want to carry on moving around.
infinate battery life ! ?
So these are new magical batteries last forever and have an infinite number of recharging cycles !! ??? I think you should do your home work .
Nissan have conveniently refused /dodged the question every time they have been asked how long these batteries will last in every press interview .
And they say it will only cost you 3 pence per mile or something like that, so much cheaper to run ! Well it is until 3 years later when you have to spend £5000 on new batteries and your fuel saving just goes out the window.
Is Robert llewellyn going to make another appearance? He's presumably going to accuse Which of being unreconstructed petrol heads as he did to those on this site who were unwise enough to question his judgement on this issue and that he might just have overstated the advantages of electric cars.
To repeat the obvious using electric cars only saves a lot of CO2 emissions if you can use a much higher proportion of non fossil-fueled power stations.
I'm sure he'll be along in a minute.
In the meantime, I'll ask: If the emissions are slightly better (according to Which, all of the EVs were 20% better than the diesels and one was 92% better than the comparison car), then what is the problem?
The grid is being cleaned up, so the EVs will only get better.
If you get an £8k solar PV system on your garage you can essentially get 10,000 miles a year for 25 years (that's the usual guarantee on them - they may work longer). That's a saving of over £22k on the diesel. The PV supplies the grid during the day, the car charges back from it at night - net saving £22k.
If you don't have the option for that, it's still going to be a lot cheaper even when they start taxing it.
Either way your not propping up Colonel Gaddafi.
I love the slant of your post, you write as though one lone voice standing up to the deluge of nonsense spun out by these stories is a terrifying prospect. The hundreds of thousands of loud mouthed, opinionated men who will no doubt defend the drill and burn economy we live in to the death are cowering because one wet liberal piped up and said, hang on, this just isn't true.
I have posted a comment, the gist of it is this.
Where does the petrol come from?
How much electricity is used to make petrol?
And of course, electric cars are not green, or eco, they are just cars, made in factories. When they start their lives they are no different from any drill and burn car. However, from that day on they are viable, cheaper, more efficient, cleaner, they can be charged from renewable sources, they last longer, need less servicing, fewer spare parts, go further and waste far less energy.
Personally I prefer a more measured debate. I was a physics graduate, and have watched with some amazement misleading stats and ranting from both sides.
No sure about all your points - in the round, do electric cars really need fewer spare parts? Sure electric motors and transmission will require less maintenance than their IC equivalent, but the elephant in the room is always the batteries. None of those last for ever. How long will they last before the gradual loss of range means they need to be replaced? Hopefully the lithium can all be recovered, as that's an energy intensive substance to mine in produce and supplies are limited.
I'm sure there is a role for a certain amount of battery-powered vehicles. They are quite useful as a way of absorbing the inherent peaks in wind power, although to do so would require a very sophisticated smart metering and distribution system which will cost a huge amount to implement. Battery vehicles are probably most attractive for local deliveries as stop/start is where there are major advantages. The UK once had the world's largest fleet of electric vehicles in the shape of milk floats.
As far as costs go, electric cars also have to be heavily subsidised - not only is there the £5,000 for purchasing the things, but they are also not paying a 200% tax on their base power costs as there's no duty and little VAT. For those limited to a single car, without easy access to charging they are simply impractical. If you want to be really efficient buy an electric-powered bike. Those things are way more efficient - indeed they are much more thermodynamically efficient than producing extra food to feed hungry cyclists.
So I'm not against these things as such, just deeply suspicious about those who've made wild claims and make misleading comparison (eg NIssan Leaf vs 4x4 and the like). Buy a new electric car and compare it with the best equivalent diesel model and the gap is relatively narrow.
My suspicion is that pure electric traction will never be the norm for cars and that liquid chemical fuels will remain with us. It may be that liquid chemical fuels will gradually move from fossil source to advanced bio (note, not from crops - maybe genetically engineered organisms) or other artificial means. Hydrocarbons are simply the most convenient way of storing large amounts of chemical energy for transport, and there's still much that can be done to eke out IC efficiency.
nb. the "lone liberal voice" thing is surely not true. The BBC, C4 are full of liberal (with a small "l") journalists. It is, outside of the deliberately provocative Top Gear, rather difficult to find anything else.
We all know about Which? surely?
And then I cancelled my subscription.
... as my old Dad liked to point out, if you spoke to an expert in 'x' for long enough, they would eventually tell you how everything written about 'x' in the media was pretty much rubbish. As you went through life, and met more people, you found that this was true for a pretty large range of 'x'.
Which?, oh you sad little mag for the baby boom generation. Opitome of selfishness and the me me me consumer. When I was a lad, 30 years ago, it was a sorry little affair. Can't believe it still exists. Good for toasters though.
Oh look, lots of discussions about TCO (at least total Carbon cost) of an electric car vs hydrocarbon-powered.
it's impossible to design an internal combustion engine that doesn't produce CO2 and - bio-fuels aside - doesn't require a very finite and increasingly expensive resource to power it. It is however possible to run an electric car without any CO2 production and from entirely renewable energy generation.
I'd rather we saved the oil left for making important stuff like aviation fuel. Whether or not powering a car via a coal fired power station is a good idea or not aside, I'm pretty sure you can't power a 747 that way.
If I could by a V8 that ran on liquidised baby rabbits or African orphans' tears I'd get it just to piss off the sanctimonious hippy green bastards that infest the media these days.
As it is I'll have to make do with a 30mpg 2.0T petrol and run down as much wildlife as possible.
Does diesel come out of the ground as diesel where normal cars are garaged, or is a significant amount of CO2 also expended seperating it from crude oil and then transporting to your local garage as well?
Are you suggesting that the fuels used to generate the electricity appear at the power station by magic?
Coal, for example, manages to cost much more CO2 per tonne than it used to. Time was most of the coal used in UK power stations was at least mined in the UK. These days most of it seems to be imported.
These numbers only apply to the UK - France generates nearly 80% of it electricity from nuclear power so the CO2 emission of it's domestic electric car fleet will be massively lower.
The electric car "argument" can't be conducted with exclusive reference to the UK's hopelessly outdated and dirty power generation infrastructure.
Yet another ... here we did some arb check on one aspect only ... never mind the possible faulty premise of is it "really" 544g or 844g?
I still can't see EV / Hybrids being "the" answer (perhaps closer to the answer than ICE's, but only in some instances). As was discussed numerous times, there's several points to still consider in all scenarios, e.g.: manufacture / supply emissions and costs (for both EV and IC), other types of emissions (CO2 is hardly a "bad" thing in comparison to some of the others - just think of ICE's CO emissions which WILL KILL YOU, not just make you sweat a bit more), charging / refuelling times and costs, etc. etc. etc.
IMO a first step in a "right" direction would be to combine the best points from both - and I don't mean Hybrid. I mean an ICE (probably Diesel) generating the electricity for the electrical motor(s). This removes the entire gearbox system (as you'd have to have with Hybrids), allows the ICE to run at its most efficient RPM (and not need to rev-up each time you pull away), the "battery" (or I'd think capacitors instead) would be much smaller than EVs' (or even those in Hybrids), refuelling becomes a non-issue in comparison to either EV / IC. And the technology is here and now, it's used in ... wait for it ... "Diesel-Electric" motors for trains and large trucks. So there's very little to be done except for miniaturizing the existing tech.
1. Alcohol can much more easily be produced through fermentation than H2 from extremely high voltages. And for best results the alcohol need not be pure, about 50-60% proof seems to work best - so you don't need to distil it as much as you'd expect.
2. It's not as dangerous to store liquid alcohol as it would be to hold enough H2 in a canister at thousands of atmospheres to get it into its liquid form (or at least smaller than your car). Imagine having an accident with the H2 canister rupturing - you'd take out a city block!
"H2 in a canister at thousands of atmospheres to get it into its liquid form"
You can't use cryogenic fuels in cars. Imagine coming back from a trip away/weekend where you haven't used it, going to start the car and realising that all your hydrogen has heated up by a couple of kelvin and exhausted through the vent valve (or, even worse, blown rather a large hole where your house used to be). And that you've frozen the neighbours cat who was walking past at the time (you wouldn't want to vent it into the car's body- even sprayed into somewhere unimportant seeming like the wheelarches you'd cause massive problems with the material going brittle).
Pressurised is the only way to go with Hydrogen- and highly pressurised. You're talking 4500 or so psi before you can get anywhere near the volumetric energy density of petrol- and a 4500psi housing is pretty heavy.
Then you have to make it able to hold that pressure after being deformed in a crash, while in the intense heat of a petrol fire and after 200,000 miles of being scraped going over speedbumps (not to mention being pressurised and depressurised a couple of times a week for, say, 20 years).
You've suddenly added like quarter of a tonne of Aluminium (>$500 at wholesale aluminium prices) and a bucketload of sensors and other warning equipment to the car.
So the small, light, cheap car is suddenly nigh-on impossible unless it's got a tiny capacity fuel tank.
And for this reason, Hydrogen will fail.
"....as it would be to hold enough H2 in a canister at thousands of atmospheres to get it into its liquid form "
I was merely pointing out that hydrogen can't be liquified by pressurization. Further even liquid hydrogen has a much lower energy density than hydrocarbon.
Unfortunately even fuel cells have a low-ish efficiency (~50% tank-wheel) esp.when combined with the efficiency of hydrogen production. No doubt some considerable improvements remain to be made.
what about CO2 produced refining, transporting etc.
the two figures do not compare the same thing.
for electric it is considering the whole energy cycle.
where as for diesel it is considering only that emitted by the car, not in refining, transporting the petrol etc.
Can someone please publish the true energy costs for extracting oil, refining it and transporting into your tank please (and name your sources), and translate that into a gm/km value? I'd love to, but I can't find any.
That would be more reflective of the true cost of hydrocarbons, and thus form a valid comparison to electric vehicles rating used by Which?.
Otherwise you'd need to revert to comparing *direct* emmission from the vehicle, and we're back where we started - with electric being "zero emission".
PS - I'm a motorbiker, so I'm expecting to be downvoted simultanously by both the Clarkonsites and the tree huggers.
.. it won't be because I'm some eco warrior out to save the planet. No, it'll be because I can no longer afford petrol.
I think I remember reading that it cost something like £2.40 to fully charge a Leaf, giving it a range of about 100 miles. Compare that to my current car (1.25 Fiesta), which I'm lucky if I get 200 miles out of what has recently become a £35+ tankful. I'll take paying less than a seventh of the price for my milage, thankyouverymuch.
Go - and get an EV. Which I will, as soon as I can afford the base price.
I think you'll find you're not alone. When it starts to hurt motorists the most (when filling up), that's when market forces will drive them to EV. I'm the same - I'd take EV now, and I'd serious consider the leaf - if it was literally half the price.
Snag is, an insider for a big oil company he tells me that the market research shows people are willing to pay DOUBLE what we pay now before they consider alternatives. So EV still has an uphill battle for the foreseeable.
I agree. In fact a review I saw of the Nissan leaf on channel 5's 'fifth gear' claimed that when you take into account the CO2 produced in the acquiring/refining/transportation of the diesel as well as the burning, the figure is a about 100g/km in favour of the electric car.
I can't vouch for the accuracy of these values, but you certainly can't compare the CO2 involved in generating electricity with the CO2 produced by burning diesel and draw any valid conclusions. You have to look at the whole cycle (including the construction and destruction of the vehicles).
Most of the cost of an electric vehicle is replacing the battery when its charge retention falls to useless. Long lasting batteries survive 1000 charge cycles. If you want some other features like good energy/weight or good energy/price then you will have to accept a smaller number of charge cycles. At present, the battery life for electric vehicles is unknown. If running an electric car was cheaper the running a petrol one, then the manufacturers would increase their profit margins to compensate.
The down side of electric is you are giving some money to the ROC farms. More money goes to battery and car manufacturers. On the other hand, petrol is a complete disaster. Try to imagine how much damage the government would do if you keep paying petrol tax.
One reason that petrol is expensive is the fuel duty & tax. As soon as any government realizes that there's a significant swing to other fuel sources, it will simply hike the cost of that fuel to maintain the same level of income for the treasury.
Add that to the cost of EV battery replacement every few years and your motoring will not cost you less.
Expect a minimum-price-per-kWh for batteries, coupled to a 500% level of tax on all replacement vehicle batteries.
The CO2 costs at the power plant are an direct comparison for CO2 cost of internal combustion. This cost is obviously highly dependent on your source of electricity though. If you want to get the cost of getting gasoline to the fuel station then you have to compare that to the cost of building and delivering a battery to your car. You also have to take into account the number of batteries used over the average lifetime of the car compared to the average number of gallons used over the cars average lifetime. As batteries become better this comparison will likely lean further and further toward the battery's favor, but I'm not sure where that is now.
Also do you consider the non-CO2 pollutants in the battery production? If so how do you also include non-CO2 pollutants from refining petroleum? It's a valid comparison that should be made but it isn't easy to do.
Well you will pay more for replacement batteries than the electricity to charge them. You can't currently buy a battery that costs less than the amount of electricity (at current mains prices) it can charge and discharge in its lifetime.
That problem will become less significant when we get a 300% tax rate on 'vehicle electricity' to match the 300% tax rate we currently have on vehicle fuels.
Ultimately, doesn't the consumer decide?
Especially with oil-based fuel prices climbing in recent days, won't the daily cost of operation factor into it, even if just a little bit?
Heck, I thought I'd never own a Prius, but I do now. Matter of fact, I see a lot more of the 1st generation sedan style around than I have before. Believe this to be a factor of the primary reason why people buy automobiles in the U.S.-the looks.
I'm all for bio-diesel, but only in the form of greasel. This doesn't impact anybody's food prices, where traditional bio-diesel flavored by corn or soy does.
Ultimately, a bio-diesel (greasel) -electric hybrid would probably be the best of both worlds.
And, of course, being a 'Merican, I can't resist the smell of fried foods, so that's another benefit of a greasel car.
What a lot of people fail to realise is that in order to get anywhere close to 108g/km in the diesel you have to drive like an old lady with very weak right leg muscles, who enjoys going on long journeys on empty dual carriageways. Due to the very high part and full load efficiency characteristics of electric motors you can drive it like you stole it all the time and still get close to the 81g/km.
@ Steve 44 - Of course they'll be making extra electricity to power electric cars - it's not comparable to the "the bus is going anyway" scenario.
that the tailpile is far from the only source of CO2 normal cars have. How much CO2 do you think was dumped to produce that diesel?
Refineries aren't exactly carbon neutral.
OK so we've all (hopefully) read about the plant that can generate a hydrocarbon fuel from water and CO2 drawn from the atmosphere running entirely on solar power. Sounds like a great idea, it's close to carbon neutral, it allows us to keep running the vehicles we have and it doesn't put any extra load on our already stretched electrical infrastructure.
* Not, you will appreciate, new technology. There's no really new technology in an EV, no matter what the marketing men tell us.
Electric trains are much nicer to travel on than diesel. They're quieter, accelerate better. They're also cheaper to maintain. Same is true of cars. The infernal combustion engine is noisy, smelly and requires high maintenance.
It's a shame batteries aren't up to snuff yet. However, got to start somewhere.
Also central electricity generation is greener and more efficient than lots of internal combustion engines and and has potential to improve. There's two new nuclear technologies on the way: TWR and thorium neither of which suffer so much from the bugbears of uranium fission.
But the consumer never gets to decide, because the consumer never gets a real choice.
Yeah, I can see the problem with that whole "awesome solar car" thing.
"Don't buy our car! It's only cheaper and greener to run! And if you want to screw over BP, then BOY are you in for a treat if you buy our car. Which you shouldn't."
There is no motor industry lobby trying to keep the Electric Car down, except in that EVs aren't ready for production yet. Even if the acceleration/top speed weren't issues (within reason), the range is still a problem.
The reason the Hydrocarbon from seawater/CO2 + Solar tech isn't deployed more is that the amount of solar energy you need is just not feasible. It's not like "ooh, we have a sunny day so I'll stick the generator by the window" and hey, presto- you've got a tank of fuel 10 minutes later.
Saying that, Hydrocarbon from Seawater/CO2 IS the solution to our energy problems- there are 850Mn cars in the world and there isn't enough lithium to cover 1% of them, so battery electric's out, and Hydrogen's just plain dangerous. Plus remember aircraft need hydrocarbons, as do boats and lorries and trains and many people's homes.
But "artificial hydrocarbons" are only really feasible if we use Nuclear power as this can provide a steady, dependable, carbon-free (and low waste volume) source of power for the chemical processes required to create the hydrocarbons. Solar and other renewables don't produce sufficient power or aren't dependable enough.
The problem with THIS is that to build a massive nuclear hydrocarbon generation plant you've got to contend with a load of treehuggers and NIMBYs. My solution would be to use the UK's unparalleled experience in subsea engineering to drop the hydrocarbon generators to the bottom of the north sea. They'd be relatively safe from Terrorists, they'd be on one of the best-mapped and most studied pieces of sea-floor in the world (far away from volcanic faults), and they're in the middle of existing oil fields, so the existing pipelines can be repurposed. Plus there's almost infinite amounts of space down there, and it's shallow enough that in the event of a problem some cheap ROVs (or expensive SAT divers) can be deployed to repair them.
|
Asynchronous Transfer Mode (ATM) networks provide integrated services having a wide range of bandwidths and holding times. ATM traffic can be subdivided into Constant Bit Rate (CBR) and Variable Bit Rate (VBR) traffic types. Each traffic type is supported by one or more ATM Adaptation Layers (AAL). AAL type 3, 4 or 5 protocols are employed for data packets or VBR traffic while AAL type 1 is used for CBR traffic.
The transport of packets across the network is accomplished by segmenting the data unit into cells, which are then transmitted to a destination. At the destination, reassembly of the packet is required before passing it to a receiving application. To accomplish the reassembly procedure, a memory addressing and management scheme is needed. For example, in a point-to-point transmission scenario, if consecutive cells belong to the same packet, reassembly can be achieved by storing cell payloads belonging to a packet in a memory space in a First In First Out (FIFO) manner. However, if packets are received from different virtual channels, having been multiplexed and switched through the network, cell interleaving occurs, and each virtual channel will require its own FIFO.
FIG. 1 illustrates cell interleaving in an ATM network. Stations A and B transmit information packets, which are carried in the network in the form of ATM cells marked A1, A2, A3 and B1, B2, B3, respectively. When these cells are transmitted through the network, they may be interleaved as shown. At the receive end, the packets must be reconstructed before being passed to applications running on Station C. As a result, reassembly typically requires two FIFOs (FIFO1 and FIFO2) each dedicated to a given virtual channel.
Different approaches have been attempted to solve the reassembly problem of interleaved cells. One solution is to realize that packets are generated and received by host computers, and therefore it is possible to share the host's physical memory space. Thus, one can use the host's operating system to manage the incoming packet information. This solution requires that the applications running on a given platform share the host's physical memory space with the network. As a result, depending on the network load, applications running on a given platform may experience performance degradation or if applications have priority over the network interface, the incoming data packets could be lost.
Another solution is to implement the reassembly function with dedicated hardware. This means reassembling packets in an external memory unit, which transfers packets to a host computer whenever a packet is successfully reconstructed. In the application noted above entitled "Method and Adaptor for Converting Data Packets Between First And Second Formats In A Data Transmission System", a hardware architecture uses linked lists to reconstruct incoming packets. A virtual channel queue holds partial data packets in a shared memory device. In one embodiment, the partial data packets destined for a common virtual channel are associated with a linked list data structure. In an alternate embodiment, a plurality of FIFO devices are used to store the addresses of successive partial packets.
Others have presented another technique by using the host's CPU cycles to control the linked list.
The above solutions are based on the assumption that best effort traffic transmission is required. This is an acceptable assumption since most of today's computer networks work under this constraint. In other words, these techniques might cause cell loss at the reassembly unit due to the nonavailability of memory space at high network throughputs. However, as new applications emerge with strict performance requirements (such as, for example, applications requiring distributed software processing, where the network transmission delay must be kept to a minimum for best performance results), a reliable transport mode must be supported. Furthermore, if multimedia stations are connected to the network, a need to handle AAL type 1 could arise, and a memory management architecture should be able to accommodate this traffic class.
|
2005 Dodge Charger 500
Background
Darlington Raceway, nicknamed by many NASCAR fans and drivers as "The Lady in Black" or "The Track Too Tough to Tame" and advertised as a "NASCAR Tradition", is a race track built for NASCAR racing located near Darlington, South Carolina. It is of a unique, somewhat egg-shaped design, an oval with the ends of very different configurations, a condition which supposedly arose from the proximity of one end of the track to a minnow pond the owner refused to relocate. This situation makes it very challenging for the crews to set up their cars' handling in a way that will be effective at both ends.
The track, Darlington Raceway, is a four-turn 1.366 miles (2.198 km) oval. The track's first two turns are banked at twenty-five degrees, while the final two turns are banked two degrees lower at twenty-three degrees. The front stretch (the location of the finish line) and the back stretch is banked at six degrees. Darlington Raceway can seat up to 60,000 people.
Summary
Greg Biffle led a race-high 176 of 370 laps en route to his third Nextel Cup victory of 2005. With four laps to go, Biffle's Roush Racing teammate Mark Martin spun out (sliding into the apron) trying to pass third-place runner and pole-sitter Kasey Kahne. Biffle took two tires on his final pit stop, while race leader Ryan Newman and Ken Schrader stayed out. Newman was expecting more of the teams, like Schrader in the #49 Dodge, at the tail of the lead lap (18 in all) to stay out for track position. Newman accelerated on the restart, brake-checked Schrader to hold off the pack, and accelerated again, leaving Schrader spinning his tires. Biffle passed both of them on a green-white-checker finish restart. Jeff Gordon finished second, followed by Kahne, Martin, and Newman, who fell back three spots in two laps. Schrader finished in 18th position.
Failed to qualify: Johnny Sauter (No. 09), Robby Gordon (No. 7), Tony Raines (No. 61), Morgan Shepherd (No. 89)
|
Binaural Summation of the Acoustic Reflex Objective: The ways in which summation of energy or of information occurs have long been used to explore sensory mechanisms. In the case of the acoustic reflex, some binaural summation is known to occur, but both data and specification of method have been sketchy. Accurate estimates of mean and standard deviation were therefore sought to compare binaural acoustic reflex summation (BARS) with binaural loudness summation (BLS) to determine whether these have a common basis. Design: A specified method was developed for determining reliable acoustic reflex values from admittance/intensity functions. Subjects were 34 university students; the ages ranged from 18 through 25 yr. For each, the contralateral component of the binaural stimulus was presented at a level above the ipsilateral component corresponding to the difference in monaural reflex thresholds ("physiologically equivalent"). Results: BARS had a mean of 4.4 dB (SD = 3.5 dB), which was significantly different from the BLS (mean = 7.6 dB, SD = 1.2 dB). The contralateralipsilateral difference had a mean of 11.0 dB (SD = 5.1 dB). The BARS estimate was not appreciably larger than that found in studies lacking correction for physiologic equivalence. Conclusions: Although the presence of a contralateral component elicits a summation or facilitation effect, the particular intensity value contributes little to the magnitude of that effect.
|
Measles-associated diarrhoea in the Infectious Diseases Hospital, Rangoon. A study was conducted in the Infectious Diseases Hospital in Rangoon (Burma) to determine the magnitude of measles-associated diarrhoea morbidity and mortality in children under 6 years of age contributing to the overall diarrhoeal morbidity and mortality, and to determine the bacterial pathogens of measles-associated diarrhoea cases. Measles-associated diarrhoea cases occur most frequently in younger age groups (12-23 and 0-11 months). Although not directly comparable, their contribution to the total diarrhoeal cases (8%) was high but the proportion of measles-associated diarrhoeal deaths contributing to total diarrhoeal deaths was lower than the theoretical estimates. A low fatality rate (2%) among the measles-associated diarrhoea cases was found and this suggests a much lower rate in the community. This implies that measles-associated diarrhoeal mortality is probably not a major public health problem in Burma. Chest infection was the most common complication (32%) and was found in the majority of deaths resulting from complicated measles. A definite seasonal distribution of measles and measles-associated diarrhoea cases was found. Only 10% of the stool samples examined were positive for bacterial pathogens and all were shigellae. We found that a significant number of measles-associated diarrhoeal cases were malnourished.
|
Zinc containing hydroxyapatite ceramics to promote osteoblastic cell activity Abstract Calcium phosphate ceramics with a (Ca + Zn)/P molar ratio of 1.67 containing various amounts of zinc (ZnHAP ceramics) were synthesised and their effect on promoting osteoblastic cell proliferation was examined. Above 0.13 wt-%Zn, which is the solid solution limit of zinc in hydroxyapatite (HAP), zinc containing tricalcium phosphate (ZnTCP) phases appeared in the ZnHAP ceramics. The TCP phases were in or form, or both, depending on the sintering temperatures and zinc content. A monophasic ZnHAP ceramic was obtained only when ZnHAP with a zinc content of less than 0.13 wt-% was sintered from 1050 to 1150°C. When zinc was incorporated only in HAP crystal lattice, thereby having no TCP phases, no marked release of zinc from ZnHAP ceramics was observed in either the cell culture medium or in the acetic acid sodium acetate buffer solution at pH 5. Without TCP phases, ZnHAP ceramics showed no influence on the proliferation of MC3T3-E1 cells in vitro. The optimum zinc content of ZnHAP ceramics for promoting osteoblastic cell proliferation was 0.34 wt-%. The present study demonstrated that the incorporation of zinc beyond the solid solution limit converted the HAP ceramic into a zinc releasing calcium phosphate material.
|
<gh_stars>10-100
from setuptools import setup, find_packages
requirements = ["cffi>=1.0.0"]
setup(name="pycallgrind",
version="0.1",
packages=find_packages(exclude=["pycallgrind/_build_wrapper.py"]),
setup_requires=requirements,
install_requires=requirements,
ext_package="pycallgrind",
cffi_modules=["pycallgrind/_build_wrapper.py:ffi"])
|
TRENTON-- A decorated U.S. Marine facing years in prison for a weapons offense had his sentence commuted to time served by Gov. Chris Christie Friday, the governor's office said.
Hisashi Pompey's request for a full pardon remained under review, the governor's office also said.
In 2011, Pompey, a sergeant still on active duty, traveled from Virginia to New Jersey to visit family. While at a Fort Lee nightclub, a friend removed Pompey's gun from its holster and had it in his possession when he confronted police following a fight. No shots were fired.
The weapon was registered in Virginia, but not in New Jersey, which has some of the nation's toughest gun laws. Pompey was charged with unlawful possession of a weapon and was sentenced to three years in prison, a term the married father and veteran of three tours in Iraq and Afghanistan was to begin serving next week.
After losing an appeal, Pompey sought clemency from Christie.
"Only help I am asking for is from the governor, that's the only one, everyone from judges to lawyers say the only person who will help me now is the governor," Sgt. Pompey said in a recent interview with WABC 7.
Paul Milo may be reached at [email protected]. Follow him on Twitter@PaulMilo2. Find NJ.com on Facebook.
|
<reponame>Eeshwar-Krishnan/NewSkystone<gh_stars>0
package Hardware;
import math.Vector3;
public class SensorData {
private double leftEncoder, rightEncoder, auxEncoder, gyro;
private byte[] pixy;
private long timestamp;
CalibrationSystem calibration;
public SensorData(CalibrationSystem calibration, long timestamp){
this.timestamp = timestamp;
this.calibration = calibration;
}
public void setOdometryEncoders(double leftEncoder, double rightEncoder, double auxEncoder){
this.leftEncoder = leftEncoder - calibration.getLeft();
this.rightEncoder = rightEncoder - calibration.getRight();
this.auxEncoder = auxEncoder - calibration.getAux();
}
public void setGyro(double gyro){
this.gyro = gyro - calibration.getGyro();
}
public double getLeft(){
return leftEncoder;
}
public void setPixy(byte[] pixy){
this.pixy = pixy;
}
public double getRight(){
return rightEncoder;
}
public double getAux(){
return auxEncoder;
}
public double getGyro(){
return gyro;
}
public byte[] getPixy(){
return pixy;
}
public long getTimestamp(){
return timestamp;
}
}
|
import * as SRCComponents from './components';
import { SearchResultsContainerComponent } from './search-results-container.component';
export const COMPONENTS = [
...SRCComponents.COMPONENTS,
SearchResultsContainerComponent
]
|
Freshmen will be required to take a 5-hour course on diversity in their first year, starting this fall at the University of Oklahoma, Tulsa World reported in June.
Now that students are trickling back to campus, some are telling The Oklahoma Daily they think the course is a waste of time:
Joseph Lyon, a mathematics junior, said the program seems counter-intuitive. “The university is wanting students to be more inclusive of other cultures and backgrounds, but … it should just be taken at face value that you can accept people of other cultures — that you have that level of intelligence already,” Lyon said. Tim Smith, a journalism junior, said the program may be beneficial, but unnecessary. “People have a pretty good idea that racism isn’t acceptable. If people don’t understand, they should be given information, but it’s generally about if the person wants to be accepting or not,” Smith said.
The course is part of the portfolio for the new vice president of diversity programs, Jabar Shumate, a former press secretary to President David Boren (an ex-U.S. senator) who will be making between $200,000 and $250,000 a year, the Associated Press reported.
Read the Daily and Tulsa World stories.
Like The College Fix on Facebook / Follow us on Twitter
IMAGE: Ron Mader/Flickr
Read More
Like The College Fix on Facebook / Follow us on Twitter
|
package com.phjethva.boilerplate.java.utils;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import com.phjethva.boilerplate.R;
import com.phjethva.boilerplate.databinding.LayDialogBinding;
public class UtilDialog extends AlertDialog implements View.OnClickListener {
private LayDialogBinding binding;
private int type;
private int icn;
private String ttl, msg, yes, no;
private String result;
private int action;
public DialogActionListen clickDialogAction;
public interface DialogActionListen {
void callbackDialogActionPrmListen(UtilDialog dialog, boolean bolAction, int type, int action);
void callbackDialogActionListen(UtilDialog dialog, boolean bolAction, String result, int action);
}
public UtilDialog(Activity act, DialogActionListen clickDialogAction,
int type,
int icn,
String ttl,
String msg,
String yes, String no,
String result, int action) {
super(act);
this.clickDialogAction = clickDialogAction;
this.type = type;
this.icn = icn;
this.ttl = ttl;
this.msg = msg;
this.yes = yes;
this.no = no;
this.result = result;
this.action = action;
}
/*public MyDialogs(Activity act, DialogActionListen clickDialogAction,
int icn,
String ttl,
String msg,
String yes, String no,
String result, int action) {
super(act);
this.clickDialogAction = clickDialogAction;
this.icn = icn;
this.ttl = ttl;
this.msg = msg;
this.yes = yes;
this.no = no;
this.result = result;
this.action = action;
}*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setBackgroundDrawableResource(R.color.colorNull);
binding = DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.lay_dialogs, null, false);
setContentView(binding.getRoot());
binding.ivDialogIcn.setBackgroundResource(icn);
binding.tvDialogTtl.setText(ttl);
binding.tvDialogMsg.setText(msg);
binding.btnDialogYes.setText(yes);
binding.btnDialogNo.setText(no);
binding.btnDialogYes.setOnClickListener(this);
binding.btnDialogNo.setOnClickListener(this);
}
@Override
public void onClick(View viw) {
int id = viw.getId();
switch (id) {
case R.id.btn_dialog_yes:
dismiss();
if (clickDialogAction != null) {
if (result.equalsIgnoreCase("prm")) {
clickDialogAction.callbackDialogActionPrmListen(this, true, type, action);
} else {
clickDialogAction.callbackDialogActionListen(this, true, result, action);
}
}
break;
case R.id.btn_dialog_no:
dismiss();
if (clickDialogAction != null) {
if (result.equalsIgnoreCase("prm")) {
clickDialogAction.callbackDialogActionPrmListen(this, false, type, action);
} else {
clickDialogAction.callbackDialogActionListen(this, false, result, action);
}
}
break;
}
}
}
|
Chapter 5 Neutrophils in Rheumatoid Arthritis : A Target for Discovering New Therapies Based on Natural Products Rheumatoid arthritis (RA) is a systemic autoimmune disorder with an important inflammatory component in joints. Neutrophils are the most abundant leukocytes in inflamed joints, and play an essential role in the initiation and progression of RA. Neutrophil effector mechanisms include the release of proinflammatory cytokines, reactive oxygen and nitrogen species (ROS and RNS), and granules containing degradative enzymes, which can cause further damage to the tissue and amplify the neutrophil response. Therefore, the modulation of neutrophil migration and functions is a potential target for pharmacological intervention in arthritis. The pharmacologic treatment options for RA are diverse. The current treatments are mostly symptomatic and have side effects, high costs, and an increased risk of malignancies. Because of these limitations, there is a growing interest in the use of natural products as therapies or adjunct therapies. Herbal products have attracted considerable interest over the past decade because of their multiple beneficial effects such as their antioxidant, anti-inflammatory, antiproliferative, and immunomodulatory properties. This chapter focuses on the role of neutrophils in the pathogenesis of arthritis and the action of substances from natural products as putative antirheumatic therapies. Introduction Arthritis is an inflammatory joint disorder that can cause edema, pain, and loss of function. The most common types of arthritis are osteoarthritis, gout, and rheumatoid arthritis. Rheumatoid arthritis is a systemic, autoimmune disorder with an important inflammatory we discuss the cascade of events that culminates in neutrophil entry into inflamed joints. The leukocyte recruitment cascade involves the following commonly recognized steps: capture, rolling, firm adhesion, and finally transendothelial migration. Neutrophil release from the bone marrow to the circulating blood occurs immediately after the first signal of inflammation, serving to increase the number of neutrophils available for recruitment into the tissue in response to inflammation. The mobilization of neutrophils from the bone marrow is orchestrated by the hematopoietic cytokine granulocyte colony-stimulating factor (G-CSF). G-CSF mobilizes neutrophils indirectly by shifting the balance between CXCR4 and CXCR2 ligands. In response to the release of inflammatory mediators such as TNF- and IL-17, the adjacent vascular endothelium becomes activated. Cell surface proteins of the selectin family termed E-and P-selectin and their ligands (L-selectin) mediate this initial neutrophil capture. Neutrophil rolling through the endothelium facilitates their contact with chemotactic factors that promotes neutrophil activation. Chemokines (CXCR-1 or 2 ligands, such as IL-8), the C5a fragment of the complement system, and leukotriene B 4 (LTB 4 ) are responsible for neutrophil mobilization to the synovial fluid. Firm adhesion is mediated by interactions between 2 integrins (LFA-1, CD11a/CD18, and MAC-1, CD11b/CD18) and their ligand (ICAM-1). Integrins are usually in an inactive state on neutrophil and become activated after the triggering of G protein-coupled receptors such as chemokine receptors. The binding of integrins to their ligands activates signaling pathways in neutrophils stabilizing adhesion and initiating cell motility. This signaling also regulates actin polymerization, which controls the direction of neutrophil movement. The final stage in the adhesion cascade is the ultimate migration of the neutrophil from the vasculature into the inflamed tissue. Passage through the endothelial cell layer occurs both paracellularly (between endothelial cells) and by a transcellular route (over the endothelial cell). Paracellular migration of neutrophils is mediated by binding to endothelial proteins that target neutrophils to intercellular junctions and facilitate their passage through them. To reach the inflamed joint, neutrophils must pass over the basal membrane, which occurs through the degradation of extracellular matrix molecules by proteases stored inside the cells, such as matrix metalloproteinases (MMPs) and serine proteases. In inflammatory foci, neutrophils find immune complexes on the synovium that bind to Fc receptors on the neutrophil membrane, triggering their degranulation and reactive oxygen species (ROS) production. In RA pathology, oxidative stress is a result of inadequate ROS release by neutrophils. Oxygen radicals cause DNA damage and oxidation of lipids, proteins, and lipoproteins and may be involved in immunoglobulin mutations that lead to rheumatoid factor (RF) formation. Moreover, proteins from neutrophil degranulation are found at high concentrations in the RA synovial fluid and could be responsible for cartilage and tissue damage, activation of cytokines and soluble receptors, inhibition of chondrocyte proliferation and activation of synoviocytes proliferation and invasion. In addition, activated neutrophils also generate chemoattractants (such as IL-8 and LTB 4 ) that promote further neutrophil recruitment and amplify the inflammatory response (see Figure 1). Neutrophil action in rheumatoid arthritis Neutrophils are key cells in articular inflammation that are abundant in the synovial fluid and pannus of patients with active RA, a typical knee joint may have 2 10 9 cells, of which 90% are neutrophils. These cells are mobilized to synovial tissue by chemoattractant mediators, such as CXCL1, CXCL2, endothelin (ET)-1, and leukotriene B 4, a process in which resident macrophages play a central role. For many years, the major contribution of neutrophils to the pathology of RA was thought to be their cytotoxic potential, since neutrophils participate in the pathogenesis of arthritis by promoting the inflammatory process and cartilage degradation, as well as bone resorption. However, neutrophils are now recognized to have an active role in orchestrating the progression of inflammation through regulating the functions of other immune cells, and current research has shown that these cells are involved in RA onset. In the synovial cavity, activated neutrophils exhibit an increased expression of plasma membrane receptors such as major histocompatibility complex (MHC) class II molecules and present antigens to T lymphocytes, an immune function that they share with macrophages and dendritic cells (DCs). In addition, the interaction of neutrophils with other cells induces the secretion of MMP-8 and MMP-9, and a repertoire of cytokines (IL-1, IL-12, IL-18, IL-23, Figure 1. Overview of the role of neutrophils in arthritis. Neutrophils leave blood vessels after chemotactic signals from inflamed tissues that promote the firm adhesion of neutrophils to endothelial cells mediated by adhesion molecules, which induce neutrophil activation and actin filament formation followed by transendothelial migration toward the inflammatory foci. Immune complexes and proinflammatory molecules activate neutrophils, which then produce ROS and release enzymes responsible for cartilage destruction. Activated neutrophils communicate with other cells of the immune system through the secretion of cytokines and chemokines and by antigen presentation in conjunction with MHC class II. Neutrophils can undergo a special form of cell death called NETosis. This results in the release of a complex of nuclear and granule molecules called NETs contributing to tissue damage. Activated neutrophils also generate chemoattractants (such as IL-8 and LTB 4 ), forming a positive-feedback loop that promotes further neutrophil recruitment and amplifies the acute inflammatory response. Finally, effective neutrophil apoptosis is required for the resolution of inflammation. However, delayed neutrophil apoptosis occurs in the inflamed joint, which results in persistent inflammation and tissue damage due to the continued release of ROS, granule enzymes, and cytokines. and TNF-) and chemokines (CCL-2, CCL-4, CCL-5, and CXCL-8), including TNF ligand superfamily member (RANKL) and TNFSF13B (also known as BLyS or BAFF), which are implicated in the activation of osteoclasts and B lymphocytes, respectively, regulate the function of other immune cells [48,. Neutrophils from patients with RA are functionally very different from those isolated from healthy individuals. RA blood neutrophils are already primed for ROS production and striking differences in gene and protein expression exist between peripheral blood neutrophils from patients with RA and their healthy counterparts, including higher levels of membrane-expressed TNF and myeloblastin (also known as PR-3 or cANCA antigen) in RA. Pain in rheumatoid arthritis and neutrophils One of the most prevalent symptoms of RA is the increase in sensitivity to joint pain (hyperalgesia), which causes movement limitations. Despite its clinical relevance, strategies for the treatment of arthralgia remain limited. In animal models, hyperalgesia (inflammatory pain) is defined as hypernociception (a decreased nociceptive threshold). It is broadly accepted that articular hypernociception results mainly from the direct and indirect effects of inflammatory mediators on the sensitization (increased excitability) of primary nociceptive fibers that innervate the inflamed joints. Prostaglandins and sympathetic amines are the key mediators of this process. Furthermore, other mediators, such as the cytokines TNF-, IL-1, IL-6, and IL-17 play a crucial role in the pathogenesis of arthritis, increasing the recruitment of neutrophils into the joint and driving the enhanced production of chemokines and degradative enzymes. In addition, endothelin-1 (ET-1), acting directly or indirectly, also sensitizes primary nociceptive neurons. Indeed, decreased inflammation and joint destruction have been directly correlated with reduced neutrophil influx into the joints, as observed in mouse models by means of antibody blockade or the gene deletion of chemoattractant receptors such as CXCR1, CXCR2, and BLT1 (LTB 4 receptor). Therefore, the blockade of neutrophil migration could be a target in the development of new analgesic drugs. Citrullinated autoantigens and NETs in rheumatoid arthritis Citrullination is the natural posttranslational conversion of arginine to citrulline mediated by peptidyl arginine deiminases (PADs), enzymes present in macrophages, dendritic cells, and neutrophils. Experimental evidence indicates that citrullination is involved in the breakdown of immune tolerance and may generate neoantigens (neoAgs) that become additional targets during epitope spreading. Citrullinated residues stimulate the production of anti-citrullinated protein antibodies (ACPAs) in predisposed individuals. It has been observed that ACPAs can be present for several years before any clinical signs of arthritis appear. A substantial increase in the number and titer of many antibodies against posttranslationally modified proteins is also seen shortly before the onset of arthritis. Citrullinated Ags have increased immunogenicity and arthritogenicity, and their presence in arthritic joints correlates with disease severity [80,. Osteoclasts are dependent on citrullinating enzymes for their normal maturation and display citrullinated antigens on their cell surface in a non-inflamed state. In humans, the binding of ACPAs to osteoclasts in the bone compartment induces IL-8 secretion. In turn, IL-8 sensitizes and/or activates sensory neurons by binding to CXC chemokine receptor (CXCR) 1 and CXCR2 on peripheral nociceptors, producing IL 8 dependent joint pain that is associated with ACPA-mediated bone loss. IL-8 release contributes to the chemoattraction of neutrophils, which play critical roles in initiating and maintaining joint-inflammatory processes that have been described in experimental arthritis. However, the exact roles that neutrophils play in the posttranslational modification of proteins and disease initiation and progression in RA remain unclear. Recent evidence suggests that, among the various mechanisms by which neutrophils cause tissue damage and promote autoimmunity, aberrant formation of neutrophil extracellular traps (NETs) could play important roles in the pathogenesis of RA. NETs are released during a process of cellular death named NETosis. NETosis occurs with neutrophils upon contact with bacteria, fungi, or under several inflammatory stimuli. This process is associated with changes in the morphology of the cells, which eventually lead to cell death with extrusion of NETs. This process requires calcium mobilization, reactive oxygen species (ROS) produced by NADPH oxidase, neutrophil chromatin decondensation mediated by neutrophil elastase (NE) and myeloperoxidase (MPO), and chromatin modification via the citrullination of histones by peptidyl arginine deiminase 4 (PAD4). NETs are a network of extracellular fibers, which contain nuclear compounds as DNA and histones and that are covered with antimicrobial enzymes and granular components, such as MPO, NE, cathepsin G, and other microbicidal peptides. In the extracellular environment, NET fibers entrap microorganisms, and their enzymes and granular substances reach locally high concentrations and are thus able to cleave virulence factors and kill microorganisms. Although NETs play a key role in the defense against pathogens, they may cause undesirable effects to the host, which has increased the interest in the role of neutrophils and NETs in autoimmunity. Augmented NET formation was first described in preeclampsia and ANCA-associated vasculitis and followed by the description in a series of autoimmune conditions, including psoriasis, systemic lupus erythematosus (SLE), antiphospholipid antibody syndrome (APS), and RA [50,100,. Neutrophil extracellular traps are an obvious source of nuclear material. Among these are a range of cytoplasmic and extracellular citrullinated antigens, well-established Role of Neutrophils in Disease Pathogenesis targets of the ACPAs found in RA. The protein contents of NETs not only serve as targets for autoantibody and immune complex formation but also induce further NETosis, resulting in a harmful positive-feedback loop. These factors form an inflammatory microenvironment that may trigger a strong autoimmune response in individuals with the corresponding susceptibility. Pro-inflammatory cytokines, such as TNF- and IL-17, as well as autoantibodies stimulate the formation of NETs and affect their protein composition. Additionally, NETs have been shown to stimulate autoimmunity via the production of interferons and activation of the complement cascade. Interferons activate both the innate and adaptive immune systems, inducing a Th1 immune response and stimulating B cells toward the generation of autoantibodies. The deposition of NETs observed in various inflammatory pathologies is associated with the circulating cell-free DNA (cfDNA) levels in biological fluids, such as plasma and serum, from patients. Therefore, circulatory cfDNA could eventually be utilized as a marker of NETs in these pathologies, while the determination of the DNA levels might facilitate the monitoring of disease activity and assessment of the effectiveness of a selected therapeutic strategy. Neutrophils have been traditionally viewed as short-lived cells that die at sites of inflammation; however, some evidence suggests that they can prolong their life span upon specific stimuli and transmigrate away from inflammatory loci. Conditions within the synovial joint, such as hypoxia and the presence of antiapoptotic cytokines (including TNF, granulocytemacrophage colony-stimulating factor (GM CSF), and IL 8), can increase neutrophil survival for up to several days, which contributes to enhanced tissue damage. As described above, neutrophils play an essential role on innate and adaptive immunity in RA physiopathology, contributing to tissue lesions in RA, and therefore represent a promising pharmacological target in RA. Pharmacological strategies that inhibit or reduce neutrophil mobilization or activation could be successful in RA treatment. Neutrophils as therapeutic targets Animal models have been extensively used in studies of RA pathogenesis. Despite the inherent limitations of all animal models, several rodent models have greatly contributed to the overall knowledge of important processes/mediators in the generation of inflammation, cartilage destruction, and bone resorption. In addition, the pharmaceutical industry has used these models for testing potential anti-arthritic agents, leading to important advances in therapeutic interventions for this destructive disease. Such models include collageninduced arthritis, collagen antibody-induced arthritis, zymosan-induced arthritis, the methylated BSA model, and genetically manipulated or spontaneous arthritis models such as the TNF--transgenic mouse, K/BxN mouse, and Skg mouse. Many of these models show that neutrophils are the first immune cells to enter the arthritic joint, and that early measures of joint inflammation correlate with neutrophil infiltration. In this section, we highlight pharmacological approaches targeting neutrophil recruitment and activity, which present a therapeutic benefit to patients with RA. The current treatments available to RA patients include glucocorticoids, non-steroidal antiinflammatory drugs, and disease-modifying antirheumatic drugs. Only disease-modifying agents-and to some extent glucocorticoids-can impede or halt the inflammatory and destructive disease processes. With a more complete understanding of the immuneinflammatory events that occur in the pathogenesis of RA, scientists have developed therapeutic strategies that include monoclonal antibodies and receptor constructs, which target specific soluble or cell-surface molecules of interest. Biological agents such as monoclonal antibodies and recombinant proteins that target TNF-, CD20, CTLA-4 (cytotoxic T-lymphocyteassociated protein 4), and the IL-1 receptor as well as therapies based on the blockade of T-cell and B-cell functions have shown efficacy in controlling the physical signs and pain associated with RA. Many interventions used to treat RA exert inhibitory effects on neutrophil responses in inflammation. However, non-steroid anti-inflammatory drugs (NSAIDS), DMARDs, and biologics do not specifically target neutrophil function. Most NSAIDs inhibit the action of the cyclo-oxygenase-1 and -2 (COX-1 and -2) enzymes, which metabolize arachidonic acid into inflammatory mediators of the prostaglandin family. NSAIDs have been shown to inhibit neutrophil adherence, decrease degranulation and oxidant production, inhibit neutrophil elastase activity, and induce neutrophil apoptosis. Corticosteroids induce anti-inflammatory signals by several mechanisms; a major one may be to reduce the expression of cytokine-induced genes. They enter all cells and bind to the cytoplasmic steroid receptor, and then this complex translocates to the nucleus where it is recognized by specific DNA sequences. The major effect of binding to DNA is the suppression of transcription by opposing the activation of the transcription factors AP-1 and NF-B. Corticosteroids have been shown to inhibit neutrophil degranulation and ROS production, decrease production of inflammatory mediators, and prevent neutrophil adhesion and migration into RA joints [44,. The most widely used DMARD in clinic settings is methotrexate, a compound that blocks folic acid metabolism. Its benefits in RA include the stimulation of neutrophil apoptosis, inhibition of the NF-B pathway, and reduced adhesion molecule expression and LTB 4 production, consequently decreasing neutrophil recruitment and ROS production. Anti-TNF- therapies are also widely used for the treatment of RA patients. TNF primes the neutrophil respiratory burst, upregulates the expression of adhesion molecules, cytokines and chemokines, and at high local concentrations can stimulate ROS production in adherent neutrophils. Three different TNF inhibitors are available for RA patients who fail to respond adequately to standard DMARD therapy. Infliximab and adalimumab are monoclonal antibodies against TNF, whereas etanercept is a TNFRII fusion protein. All three drugs sequester soluble TNF. Reports regarding the direct effect of anti-TNF agents on neutrophils have been published, and these drugs have been shown to decrease the mobilization of neutrophils from the peripheral blood to inflamed joints, decrease ex vivo neutrophil ROS production, and reduce neutrophil chemotactic and adhesive properties. Tocilizumab, a monoclonal antibody that blocks the soluble and tissue-expressed IL-6 receptor, is also proving to be a highly effective biologic agent in RA treatment. Neutrophils are a major source of soluble IL-6 receptors, which they shed in large quantities when activated, and their accumulation in high numbers within the synovial joint could contribute significantly to IL-6 signaling within the synovium through trans-signaling. In vivo therapeutic blockade of IL-6 with tocilizumab induces transient neutropenia caused by apoptosis or phagocytosis of apoptotic neutrophils but does not impair antibacterial neutrophil functions. Despite the clinical efficacy of these therapies, many patients do not exhibit significant responses or discontinue treatment because of adverse effects. In addition, the limited availability of biological agents in developing countries, the need for parenteral administration of these products, and the high cost restrict access to such therapies for many RA patients worldwide, and this promotes a continuous search for new therapeutic targets and the development of new drugs. Due to these limitations, interest has grown in the use of alternative treatments and herbal therapies for arthritis patients (Table 1). Plant-derived molecules as emerging therapies for arthritis Current arthritis treatments result in unwanted side effects and tend to be expensive, and natural products devoid of such disadvantages offer a novel opportunity. The use of natural products represents a promising alternative to treat rheumatic diseases, in particular by acting as therapeutic adjuvants to reduce the daily doses of conventional drugs that RA patients administer. In this section, we highlight future perspectives in the treatment of RA with natural compounds, mainly herbal compounds, to minimize the harmful effects of the over-activation of neutrophils. Decreased inflammation and joint destruction have been directly correlated with reduced neutrophil influx into the joints, as observed in mouse models by means of antibody blockade or the gene deletion of chemoattractant receptors such as CXCR1, CXCR2, and BLT1 (LTB 4 receptor). The prospect of new drugs obtained from herbal products (or from structures of herbal products) plays a compelling role in drug discovery and development. As previously mentioned, pharmacologic treatment options for arthritis are diverse and present several side effects. Furthermore, the high costs and increased risk of malignancies limit the use of such agents. Because of these limitations, there is a growing interest in the use of natural products as therapies or adjunct therapies. Plant-derived products such as polyphenols, sesquiterpenes, flavonoids, and tetranortriterpenoids, which are herbal metabolites, are considered to have potential activity to block inflammation, and they may provide new therapeutic agents and cost-effective treatments. These natural products have attracted considerable interest over the past decade because of their multiple beneficial effects, such as their antioxidant, anti-inflammatory, antiproliferative, and immunomodulatory properties. In this section, we discuss the plant-derived products that have been most studied in RA experimental models and/or clinical trials ( Table 2). well as clinical studies, suggest an inhibitory action of quercetin in RA. Quercetin has been reported to lower the levels of IL-1, C-reactive protein, and monocyte chemotactic protein-1 (MCP-1), and restore plasma antioxidant capacity. In addition, quercetin increased the expression of hemeoxygenase-1 in the joints of arthritic rats. Finally, quercetin inhibited the twofold increase in NF-B activity observed in joints after arthritis induction. There are divergent data on the effect of quercetin in neutrophils. For instance, in vitro, quercetin inhibited myeloperoxidase activity but had no effect on lipopolysaccharide-induced neutrophil surface expression of the adhesion molecules L-selectin (CD62L) and 2 integrin (CD11b/Mac1), which are related to rolling and firm adhesion, respectively. In paw edema induced by carrageen, quercetin did not inhibit the increase in myeloperoxidase, which is used as a marker of neutrophil recruitment. Therefore, it seems unlikely that quercetin would inhibit neutrophil recruitment. On the other hand, quercetin inhibits the fMLPinduced increase in intracellular calcium, which is necessary for actin polymerization and consequently neutrophil migration. In addition, in vitro, quercetin blocked human neutrophil mobilization through the inhibition of the cellular signaling responsible for actin polymerization in association with the down-regulation of adhesion molecules, indicating that treatment with this flavonoid is a conceivable approach to control excessive neutrophil recruitment during inflammation and to prevent neutrophil-mediated tissue lesions ( Table 3). Schinus terebinthifolius and methyl gallate S. terebinthifolius Raddi (Anacardiaceae) is a native plant from South America. It has been used in folk medicine as teas, infusions, or tinctures, as an anti-inflammatory, febrifuge, analgesic, and depurative agent and to treat urogenital system illnesses. Scientific reports demonstrated that S. terebinthifolius extracts and fractions are rich in polyphenols and display antioxidant, antibacterial, and antiallergic properties in different experimental models. The HPLH chromatograms of hydroalcoholic extracts from S. terebinthifolius leaves (ST-70) reveal that methyl gallate (MG, Figure 2b) is one of the major polyphenol components of the ST-70 extract. Methyl gallate has been extensively studied because of its antioxidant, antitumor, and antimicrobial activities. Pharmacological studies have shown that ST-70 and MG also have an anti-inflammatory effect and may have potential activity against arthritis. Pretreatment with ST-70 or MG markedly reduced knee-joint thickness, total leukocyte (mainly neutrophil) infiltration, and reduced the production of inflammatory mediators associated with arthritis such as CXCL- Table 3. Major molecular targets and anti-arthritic mechanisms of herbal products. Role of Neutrophils in Disease Pathogenesis MG impaired the adhesion of these cells to TNF--primed endothelial cells. These results provide some evidence that MG inhibits neutrophil activation and adhesion molecules expression and consequently prevents the neutrophil entry into inflammatory sites (Table 3). Moreover, unlike potassium diclofenac, the long-term oral administration of ST-70 does not induce lethality or gastric damage in mice, which suggests that ST-70 could be used to treat inflammatory conditions such as arthritis with less toxicity. Carapa guianensis and gedunin C. guianensis Aublet is a member of the Meliaceae family that is widely used in folk medicine in Brazil and other countries surrounding the Amazon rainforest. Anti-inflammatory and analgesic activities are among the most remarkable properties attributed by ethnopharmacological research to the oil extracted from C. guianensis seeds, mainly for rheumatic pain and arthritis. C. guianensis oil and six different tetranortriterpenoids (TNTP) isolated from the oil were able to significantly inhibit zymosan-induced knee joint edema formation and protein extravasation. TNTP pretreatment inhibited the increase in total leukocyte and neutrophil numbers in the synovial fluid. TNTP also impaired the production of TNF-, IL-1, and CXCL-8/IL-8, and significantly inhibited the expression of the NF-B p65 subunit. Gedunin (Figure 2c) is a natural tetranortriterpenoid isolated from vegetal species of the Meliaceae family and is known to inhibit the stress-induced chaperone heat shock protein (Hsp) 90. Mouse pretreatment and posttreatment with gedunin impaired zymosaninduced edema formation and total leukocyte influx mainly due to the inhibition of neutrophil migration and reduced articular hypernociception. Gedunin also reduced the in situ expression of preproET-1 mRNA and IL-6, TNF-, LTB 4 and PGE 2 production and prevented increases in the number of lipid bodies in synovial leukocytes. Lipid bodies are important sites for the synthesis and storage of lipid mediators and they increase in number during inflammatory responses. In neutrophils, gedunin impaired ET-1-induced shape changes, blocked ET-1-and LTB 4 -induced chemotaxis, decreased ET-1-induced lipid body formation and impaired neutrophil adhesion to TNF--primed endothelial cells. The combined in vitro and in vivo effects of gedunin reveal its potential as an anti-arthritic candidate, especially its direct effect on key cells involved in articular inflammation such as neutrophils ( Table 3). Epigallocatechin gallate Epigallocatechin gallate (EGCG, Figure 2d) is one of the main components of green tea. It has antioxidative, anti-inflammatory, antitumor, and chemopreventive properties. The potential disease-modifying effects of green tea on arthritis have been reported; for example, in a mouse model of RA, the induction and severity of arthritis was ameliorated by the prophylactic administration of green tea polyphenols. Subsequent studies suggested that EGCG possesses remarkable potential to prevent chronic diseases like OA and RA. The anti-inflammatory and anti-arthritic effects of EGCG are supported by in vitro and in vivo data indicating that EGCG can regulate the expression of cytokines, chemokines, MMPs, ROS, nitric oxide (NO), COX-2, and PGE 2 in cell types relevant to the pathogenesis of RA. In in vivo studies, EGCG was found to inhibit inflammation in mouse models by affecting the functioning of T cells and neutrophils. IL-8 is the most powerful chemo-attractant for neutrophils in the target tissue. EGCG is a very effective inhibitor of IL-1 and of TNF--induced IL-8 and macrophage-inflammatory protein-3 (MIP-3) expression in different cell types. These in vitro and in vivo observations indicated the efficacy of EGCG and demonstrate that it can modulate multiple signal transduction pathways in a fashion that suppresses the expression of inflammatory mediators that play a role in the pathogenesis of arthritis ( Table 3). Curcumin Curcumin (Figure 2e) is a yellow-colored polyphenol found in the rhizome of turmeric. It has antioxidant, anti-inflammatory, antiapoptotic, and anticarcinogenic properties. Oral administration of curcumin suppressed type II collagen-induced arthritis (CIA) in mice by reducing cellular infiltration, synovial hyperplasia, cartilage destruction, and bone erosion. Moreover, the production of MMP-1 and MMP-3 was inhibited by curcumin in CIA and in TNF--stimulated RA fibroblast-like synoviocytes (RA-FLS) and chondrocytes. In vitro, it has been reported that curcumin decreases IL-1-induced expression of the pro-inflammatory cytokine IL-6 and vascular endothelial growth factor (VEGF) in RA-FLS. In addition, curcumin blocks neutrophil recruitment through the inhibition of cellular signaling responsible for actin polymerization in association with the down-regulation of adhesion molecules. It has also been shown to induce apoptosis of RA-FLS (which are resistant to apoptosis) by increasing the expression of the proapoptotic protein Bax and down-regulating the expression of the antiapoptotic protein Bcl-2. Some molecular mechanisms related to curcumin have been identified. In a human synovial fibroblast cell line (MH7A) stimulated with IL-1, curcumin blocked the activation of the NF-B pathway and induced deactivation of the ERK-1/2 pathway. In addition, this polyphenol inhibited activating phosphorylation of protein kinase C (PKC) in CIA, RA-FLS, and chondrocytes. Curcumin also suppressed JNK and c-Jun activation in those cells. In a clinical trial with RA patients, curcumin reduced reported pain, tenderness, and swelling of joints. A curcumin-based medicine, Meriva®, demonstrated efficacy in clinical trials with patients with osteoarthritis by reducing reported pain. In another clinical trial, treatment with Meriva® reduced stiffness and physical signs of RA (treadmill test) along with IL-1, IL-6, and VCAM-1 production ( Table 3). Conclusion In RA, neutrophils are key cells that are recognized to play an active role in orchestrating the progress of inflammation, through the release of pro-inflammatory cytokines, ROS, RNS, and NETs, which potentially affect the activities of both neutrophils and other cell types, such as resident mononuclear cells and chondrocytes. In addition, neutrophils participate in the Role of Neutrophils in Disease Pathogenesis cascade of events leading to mechanical hypernociception. Therefore, neutrophils participate in the pathogenesis of arthritis by promoting the inflammatory process, degradation of cartilage, and bone resorption. The modulation of neutrophil migration and functions in RA can be considered a potential target for pharmacological intervention in arthritis. The pharmacologic treatment options for arthritis are diverse. High costs and an increased risk of malignancies limit the use of these agents, in addition to the potential for side effects that all therapies possess. Nevertheless, herbal metabolites with anti-inflammatory activity and inhibitory action in neutrophils may provide new therapeutic agents and cost-effective treatments.
|
//===- TableGenBackends.h - Declarations for LLVM TableGen Backends -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains the declarations for all of the LLVM TableGen
// backends. A "TableGen backend" is just a function. See below for a
// precise description.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_UTILS_TABLEGEN_TABLEGENBACKENDS_H
#define LLVM_UTILS_TABLEGEN_TABLEGENBACKENDS_H
// A TableGen backend is a function that looks like
//
// EmitFoo(RecordKeeper &RK, raw_ostream &OS /*, anything else you need */ )
//
// What you do inside of that function is up to you, but it will usually
// involve generating C++ code to the provided raw_ostream.
//
// The RecordKeeper is just a top-level container for an in-memory
// representation of the data encoded in the TableGen file. What a TableGen
// backend does is walk around that in-memory representation and generate
// stuff based on the information it contains.
//
// The in-memory representation is a node-graph (think of it like JSON but
// with a richer ontology of types), where the nodes are subclasses of
// Record. The methods `getClass`, `getDef` are the basic interface to
// access the node-graph. RecordKeeper also provides a handy method
// `getAllDerivedDefinitions`. Consult "include/llvm/TableGen/Record.h" for
// the exact interfaces provided by Record's and RecordKeeper.
//
// A common pattern for TableGen backends is for the EmitFoo function to
// instantiate a class which holds some context for the generation process,
// and then have most of the work happen in that class's methods. This
// pattern partly has historical roots in the previous TableGen backend API
// that involved a class and an invocation like `FooEmitter(RK).run(OS)`.
//
// Remember to wrap private things in an anonymous namespace. For most
// backends, this means that the EmitFoo function is the only thing not in
// the anonymous namespace.
// FIXME: Reorganize TableGen so that build dependencies can be more
// accurately expressed. Currently, touching any of the emitters (or
// anything that they transitively depend on) causes everything dependent
// on TableGen to be rebuilt (this includes all the targets!). Perhaps have
// a standalone TableGen binary and have the backends be loadable modules
// of some sort; then the dependency could be expressed as being on the
// module, and all the modules would have a common dependency on the
// TableGen binary with as few dependencies as possible on the rest of
// LLVM.
namespace llvm {
class raw_ostream;
class RecordKeeper;
void EmitIntrinsics(RecordKeeper &RK, raw_ostream &OS, bool TargetOnly = false);
void EmitAsmMatcher(RecordKeeper &RK, raw_ostream &OS);
void EmitAsmWriter(RecordKeeper &RK, raw_ostream &OS);
void EmitCallingConv(RecordKeeper &RK, raw_ostream &OS);
void EmitCodeEmitter(RecordKeeper &RK, raw_ostream &OS);
void EmitDAGISel(RecordKeeper &RK, raw_ostream &OS);
void EmitDFAPacketizer(RecordKeeper &RK, raw_ostream &OS);
void EmitDisassembler(RecordKeeper &RK, raw_ostream &OS);
void EmitFastISel(RecordKeeper &RK, raw_ostream &OS);
void EmitInstrInfo(RecordKeeper &RK, raw_ostream &OS);
void EmitPseudoLowering(RecordKeeper &RK, raw_ostream &OS);
void EmitRegisterInfo(RecordKeeper &RK, raw_ostream &OS);
void EmitSubtarget(RecordKeeper &RK, raw_ostream &OS);
void EmitMapTable(RecordKeeper &RK, raw_ostream &OS);
void EmitOptParser(RecordKeeper &RK, raw_ostream &OS);
void EmitCTags(RecordKeeper &RK, raw_ostream &OS);
} // End llvm namespace
#endif
|
<reponame>codetorex/realizer
#ifndef GPROGRESSBAR_H
#define GPROGRESSBAR_H
#include "gobject.h"
class GProgressBar: public GObject
{
public:
GProgressBar();
int Value;
int Minimum;
int Maximum;
bool ShowPercent;
Alignment PercentAlign;
void Render();
void Update();
inline int GetPercentWidth()
{
int totalValues = Maximum - Minimum;
int adjValue = Value - Minimum;
return (adjValue * Width) / totalValues;
}
inline int GetPercentage()
{
int totalValues = Maximum - Minimum;
int adjValue = Value - Minimum;
return (adjValue * 100) / totalValues;
}
};
#endif
|
/*=========================================================================
Program: Visualization Toolkit
Module: TestGPURayCastBlendModes.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* Tests support for blend modes with translucent geometry (similar to
* TestGPURayCastBlendModes).
*
* Maximum, Minimum, Additive and Average blend modes are only partially
* correct when using translucent geometry given that vtkDualDepthPeelingPass
* renders volumes through various intermediate passes and composites the
* intermediate results using under and over blending. Hence, Max, Min,
* Additive and Average values are only locally correct in areas overlapping
* with translucent geometry.
*/
#include "vtkCamera.h"
#include "vtkColorTransferFunction.h"
#include "vtkGPUVolumeRayCastMapper.h"
#include "vtkImageData.h"
#include "vtkNew.h"
#include "vtkOpenGLRenderer.h"
#include "vtkPiecewiseFunction.h"
#include "vtkPolyDataMapper.h"
#include "vtkProperty.h"
#include "vtkRegressionTestImage.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkSphereSource.h"
#include "vtkTestingObjectFactory.h"
#include "vtkVolume.h"
#include "vtkVolumeProperty.h"
int TestGPURayCastDepthPeelingBlendModes(int argc, char *argv[])
{
// Volume peeling is only supported through the dual depth peeling algorithm.
// If the current system only supports the legacy peeler, skip this test:
vtkNew<vtkRenderWindow> renWin;
vtkNew<vtkRenderWindowInteractor> iren;
iren->SetRenderWindow(renWin.GetPointer());
vtkNew<vtkRenderer> ren;
renWin->Render(); // Create the context
renWin->AddRenderer(ren.GetPointer());
vtkOpenGLRenderer *oglRen = vtkOpenGLRenderer::SafeDownCast(ren.Get());
assert(oglRen); // This test should only be enabled for OGL2 backend.
// This will print details about why depth peeling is unsupported:
oglRen->SetDebug(1);
bool supported = oglRen->IsDualDepthPeelingSupported();
oglRen->SetDebug(0);
if (!supported)
{
std::cerr << "Skipping test; volume peeling not supported.\n";
return VTK_SKIP_RETURN_CODE;
}
renWin->RemoveRenderer(ren.Get());
cout << "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)" << endl;
int dims[3] = {100, 100, 100};
int boundary[3] = {10, 10, 10};
// Create a vtkImageData with two components
vtkNew<vtkImageData> image;
image->SetDimensions(dims[0], dims[1], dims[2]);
image->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
// Fill the first half rectangular parallelopiped along X with the
// first component values and the second half with second component values
unsigned char * ptr =
static_cast<unsigned char *> (image->GetScalarPointer(0, 0, 0));
for (int z = 0; z < dims[2]; ++z)
{
for (int y = 0; y < dims[1]; ++y)
{
for (int x = 0; x < dims[0]; ++x)
{
if ((z < boundary[2] || z > (dims[2] - boundary[2] - 1)) ||
(y < boundary[1] || y > (dims[1] - boundary[1] - 1)) ||
(x < boundary[0] || x > (dims[0] - boundary[0] - 1)))
{
*ptr++ = 255;
}
else
{
*ptr++ = 0;
}
}
}
}
vtkNew<vtkColorTransferFunction> color;
color->AddRGBPoint(0.0, 0.2, 0.3, 0.6);
color->AddRGBPoint(255.0, 0.2, 0.6, 0.3);
vtkNew<vtkPiecewiseFunction> opacity;
opacity->AddPoint(0.0, 0.0);
opacity->AddPoint(255.0, 0.8);
vtkNew<vtkVolumeProperty> property;
property->SetScalarOpacity(opacity.GetPointer());
property->SetColor(color.GetPointer());
vtkNew<vtkVolume> volume[4];
vtkNew<vtkGPUVolumeRayCastMapper> mapper[4];
mapper[0]->SetBlendModeToMaximumIntensity();
mapper[1]->SetBlendModeToMinimumIntensity();
mapper[2]->SetBlendModeToAdditive();
mapper[3]->SetBlendModeToAverageIntensity();
renWin->SetMultiSamples(0);
renWin->SetSize(301, 300); // Intentional NPOT size
vtkNew<vtkRenderer> renderer[4];
renderer[0]->SetViewport(0.0, 0.0, 0.5, 0.5);
renderer[1]->SetViewport(0.5, 0.0, 1.0, 0.5);
renderer[2]->SetViewport(0.0, 0.5, 0.5, 1.0);
renderer[3]->SetViewport(0.5, 0.5, 1.0, 1.0);
// Translucent geometry
vtkNew<vtkSphereSource> sphereSource;
sphereSource->SetCenter(90.0, 90.0, 15.0);
sphereSource->SetRadius(30.0);
vtkNew<vtkActor> sphereActor;
vtkProperty* sphereProperty = sphereActor->GetProperty();
sphereProperty->SetColor(1., 0.9, 1);
sphereProperty->SetOpacity(0.4);
vtkNew<vtkPolyDataMapper> sphereMapper;
sphereMapper->SetInputConnection(sphereSource->GetOutputPort());
sphereActor->SetMapper(sphereMapper.GetPointer());
for (int i = 0; i < 4; ++i)
{
mapper[i]->SetInputData(image.GetPointer());
volume[i]->SetMapper(mapper[i].GetPointer());
volume[i]->SetProperty(property.GetPointer());
renderer[i]->AddVolume(volume[i].GetPointer());
renderer[i]->AddActor(sphereActor.GetPointer());
renderer[i]->SetUseDepthPeeling(1);
renderer[i]->SetOcclusionRatio(0.0);
renderer[i]->SetMaximumNumberOfPeels(5);
renderer[i]->SetUseDepthPeelingForVolumes(true);
renderer[i]->SetBackground(0.3, 0.3, 0.3);
renderer[i]->GetActiveCamera()->Yaw(20.0);
renderer[i]->ResetCamera();
renWin->AddRenderer(renderer[i].GetPointer());
}
renWin->Render();
int retVal = vtkTesting::Test(argc, argv, renWin.GetPointer(), 15);
if (retVal == vtkRegressionTester::DO_INTERACTOR)
{
iren->Start();
}
if ((retVal == vtkTesting::PASSED) || (retVal == vtkTesting::DO_INTERACTOR))
{
return EXIT_SUCCESS;
}
else
{
return EXIT_FAILURE;
}
}
|
<reponame>jar-ben/z3<filename>src/ast/macros/quantifier_macro_info.h
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
quantifier_macro_info.h
Abstract:
Macro solving utilities
Author:
<NAME> (leonardo) 2010-12-17.
Revision History:
--*/
#pragma once
#include "util/scoped_ptr_vector.h"
#include "ast/ast_ll_pp.h"
#include "ast/macros/cond_macro.h"
#include "ast/macros/macro_util.h"
#include "ast/func_decl_dependencies.h"
/**
\brief Store relevant information regarding a particular universal quantifier.
The information is used to (try to) build a model that satisfy the universal quantifier.
*/
class quantifier_macro_info {
protected:
ast_manager& m;
quantifier_ref m_flat_q; // (flattened) quantifier
bool m_is_auf;
bool m_has_x_eq_y;
func_decl_set m_ng_decls; // declarations used in non-ground applications (basic_family operators are ignored here).
scoped_ptr_vector<cond_macro> m_cond_macros;
func_decl_ref m_the_one; // the macro head used to satisfy the quantifier. this is useful for model checking
void collect_macro_candidates(quantifier* q);
public:
quantifier_macro_info(ast_manager& m, quantifier* q);
virtual ~quantifier_macro_info() {}
bool is_auf() const { return m_is_auf; }
quantifier* get_flat_q() const { return m_flat_q; }
bool has_cond_macros() const { return !m_cond_macros.empty(); }
scoped_ptr_vector<cond_macro> const& macros() const { return m_cond_macros; }
void set_the_one(func_decl* f) { m_the_one = f; }
func_decl* get_the_one() const { return m_the_one; }
bool contains_ng_decl(func_decl* f) const { return m_ng_decls.contains(f); }
func_decl_set const& get_ng_decls() const { return m_ng_decls; }
virtual void reset_the_one() { m_the_one = nullptr; }
void insert_macro(cond_macro* m) { m_cond_macros.push_back(m); }
bool unary_function_fragment() const;
virtual std::ostream& display(std::ostream& out) const;
};
|
<filename>client/src/Auth/Email/SignUpContainer.tsx
import { CognitoUserPool } from "amazon-cognito-identity-js";
import React from "react";
import { ErrorInfo } from "Error/ErrorUtil";
import { Stack, TextField } from "@mui/material";
import { PrimaryButton } from "Component/AppButton";
import { CompactErrorPanel } from "Error/CompactErrorPanel";
import { EmailFieldState } from "Auth/Email/EmailTabContainer";
import { useSignInContext } from "Auth/AuthProvider";
const signUpAction = "signupAction";
export function SignUpContainer({
pool,
emailState,
}: {
pool: CognitoUserPool
emailState: EmailFieldState,
}){
const [state, setState] = React.useState(
{status: "ready"} as
{status: "ready"} |
{status: "working"} |
{status: "error", error: ErrorInfo}
);
const [password, setPassword] = React.useState("");
const signInContext = useSignInContext();
const [email, setEmail] = emailState;
async function cognitoSignUp(email: string, password: string){
setState({status: "working"});
signInContext.setAction(signUpAction);
// https://github.com/aws-amplify/amplify-js/tree/master/packages/amazon-cognito-identity-js
// const user = new CognitoUser({Username: email, Pool: pool});
pool.signUp(email, password, [], [], (err, result) => {
console.log("signUp()", result, err?.message);
if( err ){
signInContext.setAction(undefined);
setState({
status: "error", error: {
message: err.message,
problem: err
}
});
}
else {
// let the "get session" logic in AuthnProvider deal with it
window.location.reload();
}
});
}
const isWorking = state.status === "working";
const disabled = !!signInContext.action;
return <div>
<form onSubmit={(e) => {
e.preventDefault();
console.debug("sign up clicked");
// noinspection JSIgnoredPromiseFromCall
cognitoSignUp(email, password);
}}>
<Stack spacing={1}>
<TextField id="email" label="Email" type="email" fullWidth
disabled={isWorking}
value={email} onChange={(e) => {
setEmail(e.target.value);
}}/>
<TextField id="password" label={"Password"} type={"password"} fullWidth
disabled={isWorking} value={password}
onChange={(e) => {
setPassword(e.target.value);
}
}/>
<div style={{display: "flex", flexWrap: "wrap", gap: ".5em"}}>
<PrimaryButton type={"submit"} isLoading={isWorking}
disabled={disabled || !email || !password}>
Sign up
</PrimaryButton>
{state.status === "error" &&
<CompactErrorPanel error={state.error}/>
}
</div>
</Stack>
</form>
</div>
}
|
Surface modification of titanium implants via electrospinning of sericin and Equisetum arvense enhances the osteogenic differentiation of stem cells Abstract Titanium-based biomaterials are among the most extensively used implants in orthopedics and dentistry. However, their poor osteoconductivity and osteoinductivity are the main challenges for researchers, so the existence of other components with the aim of overcoming the mentioned deficiencies could be desirable. In the present research, a bioactive nanofibrous coating of polyvinyl alcohol-sericin, containing different amounts of Equisetum arvense (EA) was obtained by electrospinning process. This method was performed to mimic the bone extracellular matrix structure and also to improve the osseointegration performance of Ti-based materials. Furthermore, the effect of EA on the morphology, structure, adhesive strength, bioactivity and biological properties of titanium plates was assessed. Increasing the EA content does not affect the fiber diameter. Coral-like apatite layers were successfully deposited on all samples after 7d of soaking in the simulated body fluid. The crystallinity degree of the deposited apatite layer decreased with the addition of EA as indicated by XRD analysis. Increasing EA content enhanced the adhesive strength, EA and silicon ions release and the amounts of deposited apatite layer. Moreover, EA enhanced the attachment, proliferation and differentiation of the Human Adipose-Derived Stem cells (hADSCs) indicated by ALP activity and calcium deposition assays and mRNA expressions of different genes such as Runx2, Col I and OPN. Overall, the addition of EA into the polyvinyl alcohol-sericin nanofibrous coatings not only enhanced titanium bioactivity but also improved the osteoinductivity, which are important factors in increasing osseointegration of Ti-based implants. Graphical abstract
|
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (object == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
ClassDescriptor referenceDescriptor = session.getDescriptor(object);
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(object.getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
|
1. Field of the Invention
The invention relates generally to the field of utility line installation equipment, and more particularly to an apparatus and method for simplifying the installation of static lines on the tops of utility poles.
2. Description of the Related Art
During installation and repair of utility transmission lines, it is often necessary to string a xe2x80x9cstatic wirexe2x80x9d or xe2x80x9cshield wirexe2x80x9d across the tops of the utility poles. The static wire is connected to the pole by means of a xe2x80x9cstatic bracketxe2x80x9d having a pair of vertical legs which are bolted to the pole near its upper end and extend upwardly past the top of the pole and a horizontal crossbar which is bolted to the upper extremities of the two legs. The static wire is suspended between the top of the pole and the crossbar by a xe2x80x9cshoexe2x80x9d which clamps to the static wire and a clevis which connects the shoe to the crossbar.
Utility wires are strung by pulling them through a pulley or xe2x80x9cstringing dollyxe2x80x9d which is connected to the pole. The stringing dolly holds the wire in place until the wire can be permanently fastened to the pole. Installation of static wire is complicated by the fact that a standard stringing dolly is too large to fit into the space between the crossbar of the static bracket and the top of the pole. A common method of stringing static wire is to fasten the stringing dolly to the crossbar outside of one of the legs, and then to pull the wire through the stringing dolly and tighten it. The lineman must then loosen the bolts holding the crossbar to the legs and completely remove the bolt on the end of the crossbar opposite the dolly. He or she then pivots the crossbar about the remaining bolt, manually lifts the wire over the top of the static bracket, and works it down between the unbolted end of the crossbar and the respective leg until the wire rests on the top of the pole. The lineman then reassembles the static bracket, clamps the shoe to the wire, and then lifts the wire up toward the crossbar and pins the shoe to the clevis.
The previous installation method clearly involves unnecessary steps since the static bracket must be first be installed, then unbolted to insert the static wire, and then reassembled. Previous practice also requires unnecessary manual lifting; first to raise the wire from the stringing dolly over the top of the bracket, and then again to fasten the shoe to the crossbar. This unnecessary exertion on the part of the lineman results in fatigue and can cause physical injury. What is needed is a device which allows the static wire to be installed between the crossbar and the top of the pole without disassembling the static bracket or manually lifting the wire.
The present invention comprises a static wire stringing apparatus for use when stringing static wire to a utility pole, and a method of using the apparatus. The apparatus comprises a body having a base portion and a pair of arms extending from the base portion in generally opposing directions. Each of the arms has a sleeve attached to its distal end, the sleeves having a generally vertical receiver and an upper bearing surface. Each sleeve receives a jackscrew, the jackscrews having lower ends with flanges sized and shaped so as to be receivable by a coupler of a standard stringing dolly. A nut is threaded on each jackscrew proximate its upper end and bears against the respective sleeve upper bearing surface. A jack handle is provided for turning the nuts and thereby raising and lowering the jackscrews.
The apparatus further includes a crossbar retaining structure which is connected to the body base portion and is securable to a crossbar of a utility pole static bracket such that the distal ends of the arms are in alignment with the desired location for connecting the static wire to the crossbar.
In use, the apparatus is secured to the static bracket crossbar by means of the crossbar retaining structure, and a pair of standard stringing dollies are connected to the jackscrew lower end flanges. A free end of the static wire is then pulled through the stringing dollies and through the gap between the upper extremity of the pole and the crossbar. The apparatus holds the static wire in place until it can be tensioned and permanently connected. After the wire is tensioned, the lineman uses the jack handle to turn the nuts and thereby raise the jackscrew lower ends and the attached static wire until it is the proper distance from the crossbar. The static wire is then connected to the crossbar in the usual manner.
In order to remove the apparatus, the lineman uses the jack handle to turn the nuts and thereby lower the static wire until the dollies are no longer supporting it. The static wire is then released from the stringing dollies and the apparatus is removed from the crossbar.
The principal objects and advantages of the present invention include: providing an apparatus for stringing static wire on power poles; providing such an apparatus which allows the static line to be installed without disassembling the respective static bracket, providing such an apparatus which does not require the static line to be manually lifted into position by a lineman; providing such an apparatus which is lightweight; providing such an apparatus which works equally well in conventional and fiber optic applications; providing such an apparatus which gives a lineman adequate room to work while fastening the static line to its respective static bracket and providing such an apparatus which is economical to manufacture, efficient in operation, capable of a long operating life and particularly well-adapted for the proposed usage thereof.
|
CONSIDERING the size of an ordinary color television, you might wonder how you can also watch ''E.R.'' on a flat-screen device that fits into a pocket. And someone who is considering trading in a bulky computer monitor for a sleek L.C.D. flat-panel display might ask, How can something that used to take up such an enormous amount of space squeeze into a case only a couple of inches deep?
Both things are possible because of liquid crystal displays, which are used in everything from cellular phones to handheld televisions and portable laptops. Since the first L.C.D. calculator was introduced in the early 1970's, L.C.D.'s have helped shrink the size of computers and electronic devices.
Traditional cathode-ray-tube television and computer monitors have vacuum tubes that contain electron guns, which shoot electron beams toward a screen covered with phosphors, materials that glow when electrons hit them. L.C.D. modules apply electrical charges to liquid crystals, rod-shaped molecules that have both liquid and solid properties. The structure of the liquid crystals changes in response to electrical charge, changing the way light passes through them.
In most L.C.D. devices, the layer of liquid crystals, about 5 microns thick (a human hair is about 100 microns wide), is between two layers of plastic or glass, both of which are covered with a layer of transparent electrodes, and two alignment layers; each alignment layer orients the liquid crystal molecules in a fixed direction. Light passes through a polarizing filter, then the L.C.D. cell, then another polarizing filter. If the second polarizing filter will allow to pass only light with waves perpendicular to the waves that went through the first filter, then only light that has changed its orientation while passing through the liquid crystals will get through and be seen.
There are two types of L.C.D. devices, active matrix and passive matrix. Active-matrix L.C.D.'s are used in products like newer laptop computers, flat-panel monitors and L.C.D. projectors. The primary difference is that an active-matrix display has at least one transistor for each of the pixels, the elements that make up the display (50,000 to several million, depending on the resolution), and that gives a finer control over the light exiting the L.C.D. cell.
A black-and-white active-matrix display has one transistor per pixel. Each color active-matrix L.C.D. pixel has three cells -- red, green and blue -- with one transistor per cell. Because of the fine control made possible by the transistors, the liquid crystals, which block or pass different kinds of light, produce thousands of different color variations. If you notice an aberrant red, green or blue spot (also known as a dead pixel) on an active-matrix display, it means that a transistor is not functioning properly.
Passive-matrix L.C.D.'s, which are used to display information on calculators, cellular phones, handheld personal computers and many other electronic de-vices, do not have transistors at every pixel. Instead, a charge must be sent all the way across the display at the intersection of each pixel. Sending charges all the way across or all the way down can inadvertently affect other liquid crystals along the way. That is why you will sometimes see ghosting, or blurred images, on a passive-matrix L.C.D. screen.
Because each pixel in a row or column in a passive-matrix display is charged in succession, much the way a freight train rolls down a track, the passive display has a generally lower response time than an active-matrix display. As a result, their images are not as bright, video can appear jumpier, and viewing angles are limited -- you have to look directly at the display to see what's on the screen.
Most L.C.D. monitors and computer screens are lighted by small fluorescent bulbs, sometimes no larger than the circumference of a straw, from the rear of the display. Displays with backlighting also use a reflector to shine the light source through the display to utilize as much of the light produced as possible.
L.C.D.'s in devices like calculators have no backlights and use reflected light, so they work only in a bright room. Light shines through the front polarizer and glass and through the crystals and rear polarizer. It then bounces back through the rear polarizer and crystals toward the viewer.
Companies like NEC and Sharp, two of the biggest manufacturers of L.C.D. panels and L.C.D. devices, are developing new technologies to give their L.C.D.'s wider viewing angles and make them cheaper to use. NEC Technologies recently introduced Xtra View for its line of flat-panel monitors. By controlling the orientation of the liquid crystal molecules in precise ways, Xtra View makes it possible to view the display from wider angles than conventional active-matrix displays, the company says.
Sharp says it is using high-reflective thin-film transistors for its handheld PC's. These transistors, Sharp says, eliminate the need for backlighting, which decreases the battery weight necessary, said Joel Pollack, vice president of L.C.D. marketing for Sharp.
In a liquid crystal display (L.C.D.), liquid crystals are sandwiched between two pieces of glass and subjected to electrical fields that affect the way light passes through.
Although liquid crystals lie in a loose fashion in their natural state, they line up when they come into contact with a finely grooved surface.The alignment layer of an L.C.D. is designed to position the molecules so that they lie parallel to one another along the grooves.
When sandwiched between upper and lower alignment layers that have grooves pointing in different directions, L.C.D. molecules move naturally into a twisted spiral structure.
A combination of polarizing filters, transistors, electrodes and liquid crystals work together to control light.
A.When two polarizing filters are arranged along perpendicular axes, the light travels along the spiral arrangement of the liquid crystal molecules. That changes the light's orientation so it passes through the second filter and is seen by the viewer.
B. When an electrical charge is applied, there is no spiral structure to reorient the light, so the light is blocked by the second filter.
Unlike passive-matrix displays, which use relatively few transistors arranged in rows along the liquid-crystal layer, active-matrix displays (like the one shown here) have an individual thin-film transistor for each of the three cells in a pixel. The transistors help drive the activity of the cells as they pass and block light, resulting in a brighter, sharper display than you see on passive-matrix devices.
1. Light for L.C.D. monitors is produced by a set of fluorescent bulbs either along the edges of or behind the glass panel at the back of the display.
2. The light passes through one polarizing filter before passing through the liquid crystal; only light that has had its polarization rotated 90 degrees by twisted, spiral liquid-crystal structures can pass through a second polarizing filter and get to the viewer's side of the glass. How much light makes it through depends on how much of the liquid crystal layer is twisted into a spiral.
3. In an active-matrix display, each liquid-crystal cell has at least one transistor, which turns the cell on or off like a switch. In color active-matrix displays, the light passes through a color filter before reaching the second polarizing filter. Each pixel has three fixed transistors, one for every red, green and blue cell.
4. The greater the electrical field, the more the liquid-crystal molecules move out of their spiral structure. That means that less light is rotated and less of it gets through the second polarizing filter.
5. In this example, the liquid crystals in the cell sending light to the blue filter are not in a spiral structure, so no blue light can get through the second polarizing filter. And only some of the liquid-crystal layer is in a spiral in the cell sending light to the green filter, so only some green light gets through. But all of the liquid-crystal layer is twisted into a spiral in the cell sending light to the red filter, so all the red light makes it to the viewer's side of the screen.
The red light comes through . . . and part of the green light, making the pixel show a pale brown color.
If all of the three color cells (red, green and blue) of a pixel were shining with full intensity, it would appear white.
|
<filename>docker/runner.go
package docker
import (
"context"
"fmt"
"net"
"os"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
fn "knative.dev/kn-plugin-func"
)
const (
// DefaultHost is the standard ipv4 looback
DefaultHost = "127.0.0.1"
// DefaultPort is used as the preferred port, and in the unlikly event of an
// error querying the OS for a free port during allocation.
DefaultPort = "8080"
// DefaultDialTimeout when checking if a port is available.
DefaultDialTimeout = 2 * time.Second
// DefaultStopTimeout when attempting to stop underlying containers.
DefaultStopTimeout = 10 * time.Second
)
// Runner starts and stops Functions as local contaieners.
type Runner struct {
verbose bool // Verbose logging
}
// NewRunner creates an instance of a docker-backed runner.
func NewRunner(verbose bool) *Runner {
return &Runner{verbose: verbose}
}
// Run the Function.
func (n *Runner) Run(ctx context.Context, f fn.Function) (job *fn.Job, err error) {
var (
port = choosePort(DefaultHost, DefaultPort, DefaultDialTimeout)
c client.CommonAPIClient // Docker client
id string // ID of running container
conn net.Conn // Connection to container's stdio
// Channels for gathering runtime errors from the container instance
copyErrCh = make(chan error, 10)
contBodyCh <-chan container.ContainerWaitOKBody
contErrCh <-chan error
// Combined runtime error channel for sending all errors to caller
runtimeErrCh = make(chan error, 10)
)
if f.Image == "" {
return job, errors.New("Function has no associated image. Has it been built?")
}
if c, _, err = NewClient(client.DefaultDockerHost); err != nil {
return job, errors.Wrap(err, "failed to create Docker API client")
}
if id, err = newContainer(ctx, c, f, port, n.verbose); err != nil {
return job, errors.Wrap(err, "runner unable to create container")
}
if conn, err = copyStdio(ctx, c, id, copyErrCh); err != nil {
return
}
// Wait for errors or premature exits
contBodyCh, contErrCh = c.ContainerWait(ctx, id, container.WaitConditionNextExit)
go func() {
for {
select {
case err = <-copyErrCh:
runtimeErrCh <- err
case body := <-contBodyCh:
// NOTE: currently an exit is not expected and thus a return, for any
// reason, is considered an error even when the exit code is 0.
// Functions are expected to be long-running processes that do not exit
// of their own accord when run locally. Should this expectation
// change in the future, this channel-based wait may need to be
// expanded to accept the case of a voluntary, successful exit.
runtimeErrCh <- fmt.Errorf("exited code %v", body.StatusCode)
case err = <-contErrCh:
runtimeErrCh <- err
}
}
}()
// Start
if err = c.ContainerStart(ctx, id, types.ContainerStartOptions{}); err != nil {
return job, errors.Wrap(err, "runner unable to start container")
}
// Stopper
stop := func() {
var (
timeout = DefaultStopTimeout
ctx = context.Background()
)
if err = c.ContainerStop(ctx, id, &timeout); err != nil {
fmt.Fprintf(os.Stderr, "error stopping container %v: %v\n", id, err)
}
if err = c.ContainerRemove(ctx, id, types.ContainerRemoveOptions{}); err != nil {
fmt.Fprintf(os.Stderr, "error removing container %v: %v\n", id, err)
}
if err = conn.Close(); err != nil {
fmt.Fprintf(os.Stderr, "error closing connection to container: %v\n", err)
}
if err = c.Close(); err != nil {
fmt.Fprintf(os.Stderr, "error closing daemon client: %v\n", err)
}
}
// Job reporting port, runtime errors and provides a mechanism for stopping.
return fn.NewJob(f, port, runtimeErrCh, stop)
}
// Dial the given (tcp) port on the given interface, returning an error if it is
// unreachable.
func dial(host, port string, dialTimeout time.Duration) (err error) {
address := net.JoinHostPort(host, port)
conn, err := net.DialTimeout("tcp", address, dialTimeout)
if err != nil {
return
}
defer conn.Close()
return
}
// choosePort returns an unused port
// Note this is not fool-proof becase of a race with any other processes
// looking for a port at the same time.
// Note that TCP is presumed.
func choosePort(host string, preferredPort string, dialTimeout time.Duration) string {
// If we can not dial the preferredPort, it is assumed to be open.
if err := dial(host, preferredPort, dialTimeout); err != nil {
return preferredPort
}
// Use an OS-chosen port
lis, err := net.Listen("tcp", net.JoinHostPort(host, "")) // listen on any open port
if err != nil {
fmt.Fprintf(os.Stderr, "unable to check for open ports. using fallback %v. %v", DefaultPort, err)
return DefaultPort
}
defer lis.Close()
_, port, err := net.SplitHostPort(lis.Addr().String())
if err != nil {
fmt.Fprintf(os.Stderr, "unable to extract port from allocated listener address '%v'. %v", lis.Addr(), err)
return DefaultPort
}
return port
}
func newContainer(ctx context.Context, c client.CommonAPIClient, f fn.Function, port string, verbose bool) (id string, err error) {
var (
containerCfg container.Config
hostCfg container.HostConfig
)
if containerCfg, err = newContainerConfig(f, port, verbose); err != nil {
return
}
if hostCfg, err = newHostConfig(port); err != nil {
return
}
t, err := c.ContainerCreate(ctx, &containerCfg, &hostCfg, nil, nil, "")
if err != nil {
return
}
return t.ID, nil
}
func newContainerConfig(f fn.Function, _ string, verbose bool) (c container.Config, err error) {
// httpPort := nat.Port(fmt.Sprintf("%v/tcp", port))
httpPort := nat.Port("8080/tcp")
c = container.Config{
Image: f.Image,
Tty: false,
AttachStderr: true,
AttachStdout: true,
AttachStdin: false,
ExposedPorts: map[nat.Port]struct{}{httpPort: {}},
}
// Environment Variables
// Interpolate references to local environment variables and convert to a
// simple string slice for use with container.Config
envs, err := fn.Interpolate(f.Envs)
if err != nil {
return
}
for k, v := range envs {
c.Env = append(c.Env, k+"="+v)
}
if verbose {
c.Env = append(c.Env, "VERBOSE=true")
}
return
}
func newHostConfig(port string) (c container.HostConfig, err error) {
// httpPort := nat.Port(fmt.Sprintf("%v/tcp", port))
httpPort := nat.Port("8080/tcp")
ports := map[nat.Port][]nat.PortBinding{
httpPort: {
nat.PortBinding{
HostPort: port,
HostIP: "127.0.0.1",
},
},
}
return container.HostConfig{PortBindings: ports}, nil
}
// copy stdin and stdout from the container of the given ID. Errors encountered
// during copy are communicated via a provided errs channel.
func copyStdio(ctx context.Context, c client.CommonAPIClient, id string, errs chan error) (conn net.Conn, err error) {
var (
res types.HijackedResponse
opt = types.ContainerAttachOptions{
Stdout: true,
Stderr: true,
Stdin: false,
Stream: true,
}
)
if res, err = c.ContainerAttach(ctx, id, opt); err != nil {
return conn, errors.Wrap(err, "runner unable to attach to container's stdio")
}
go func() {
_, err := stdcopy.StdCopy(os.Stdout, os.Stderr, res.Reader)
errs <- err
}()
return res.Conn, nil
}
|
No detrimental effect on renal function during long-term use of fluvastatin in renal transplant recipients in the Assessment of Lescol in Renal Transplantation (ALERT) study. BACKGROUND Concerns have recently been raised regarding a potential harmful effect of statins on renal function. This study investigated the effect of fluvastatin treatment on renal function in renal transplant recipients enrolled in the Assessment of Lescol in Renal Transplantation (ALERT) trial. METHODS ALERT was a randomized, double-blind, placebo-controlled study of the effect of fluvastatin, 40-80 mg daily (n = 1050) or placebo (n = 1052) on cardiac and renal outcomes in renal transplant recipients over a follow-up period of five to six years. The incidence of graft loss, changes in serum creatinine, calculated creatinine clearance and proteinuria, and the incidence of renal adverse events (AEs) were assessed in both treatment groups. RESULTS Fluvastatin treatment in ALERT had no significant effect compared with placebo on renal function, assessed by serum creatinine (overall adjusted mean +/- SEM: fluvastatin, 175.4 +/- 2.20 micromol/L; placebo, 172.7 +/- 2.20 micromol/L; p = 0.39), creatinine clearance (fluvastatin, 55.3 +/- 0.30 mL/min; placebo, 55.8 +/- 0.30 mL/min; p = 0.26) or proteinuria (fluvastatin, 0.58 +/- 0.03 g/24 h; placebo, 0.53 +/- 0.03 g/24 h; p = 0.31). There were no significant differences between treatment groups when the 283 patients suffering graft loss were excluded from the analysis. Fluvastatin also had no detrimental effect on creatinine clearance or proteinuria in the subgroup of 340 diabetic patients without graft loss in ALERT. No notable differences in the rate of renal or musculoskeletal AEs were observed between fluvastatin and placebo groups. CONCLUSIONS Fluvastatin had no detrimental effect on renal function, or the risk of renal AEs, in renal transplant recipients with or without diabetes enrolled in ALERT. Fluvastatin treatment for the prevention of cardiac events may therefore be used without fear of jeopardizing renal function.
|
# This method reads a file, puts each line into a list whilst splitting each line at each Seperator, also removes newline
# Name of the file you wish to convert to a list, the seperator
#returns list which has the file info in it
def fileToList(originalFileName, seperator):
# creates a list in which the file is put into
tempList = []
# opens the file and defines it as a temp var called file
with originalFileName as file:
# iterates over each line in file until it hits a pointer exeption (a.k.a blank line)
for line in file:
# adds line to file, removes newline and seperates by given seperator
tempList.append(line.strip("\n").split(seperator))
#returns list which has the file info in it
return (tempList)
|
export function nextFrame() {
return new Promise((r) => requestAnimationFrame(r))
}
|
<reponame>wangfeng0805/panda-rules
package org.wangfeng.panda.app.common;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.io.Serializable;
import java.util.List;
public class Paginate implements Serializable {
public final static int PAGE_NUMBER = 20;
private List pageList;
/**
* 当前页号
*/
private int pageNo;
/**
* 总页数
*/
private int totalPage;
/**
* 总记录数
*/
private int totalCount = 0;
/**
* 每页记录数
*/
private int pageSize = PAGE_NUMBER;
/**
* 返回下一页页数
*/
private int nextPage;
/**
* 返回上一页页数
*/
private int prePage;
public int getBeginNum() {
return (pageNo - 1) * pageSize + 1;
}
public int getEndNum() {
return pageNo * pageSize + 1;
}
public Paginate(int pageNo, int pageSize) {
if (pageNo <= 0) {
pageNo = 1;
}
this.pageNo = pageNo;
this.pageSize = pageSize;
}
public List getPageList() {
return pageList;
}
public void setPageList(List pageList) {
this.pageList = pageList;
}
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getTotalPage() {
if (getTotalCount() == 0) {
setTotalPage(1);
} else {
if (getTotalCount() % getPageSize() == 0) {
setTotalPage(getTotalCount() / getPageSize());
} else {
setTotalPage(getTotalCount() / getPageSize() + 1);
}
}
return totalPage;
}
private void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getNextPage() {
if (isLastPage()) {
return getTotalPage();
} else {
return getPageNo() + 1;
}
}
public int getPrePage() {
if (isFirstPage()) {
return 1;
} else {
return getPageNo() - 1;
}
}
public boolean isLastPage() {
if (getTotalPage() <= 0) {
return true;
} else {
return getPageNo() >= getTotalPage();
}
}
public boolean isFirstPage() {
return getPageNo() <= 1;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
|
<reponame>aditimewada/ziksuka<filename>src/app/pages/teacher/plunk/plunk.component.ts
import {
Component,
ChangeDetectionStrategy,
ViewChild,
TemplateRef,
OnInit,
} from '@angular/core';
import {
startOfDay,
endOfDay,
subDays,
addDays,
endOfMonth,
isSameDay,
isSameMonth,
addHours,
} from 'date-fns';
import { Observable } from 'rxjs/Rx';
import { Subject } from 'rxjs/Subject';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import {
CalendarEvent,
CalendarEventAction,
CalendarEventTimesChangedEvent,
} from 'angular-calendar';
import {Events} from './models/events';
import {EventLink} from './models/eventLink';
import {EventService} from './service/events.service';
const colors: any = {
red: {
primary: '#ad2121',
secondary: '#FAE3E3',
},
blue: {
primary: '#1e90ff',
secondary: '#D1E8FF',
},
yellow: {
primary: '#e3bc08',
secondary: '#FDF1BA',
},
};
@Component({
// moduleId: __moduleName,
selector: 'ngx-demo-component',
changeDetection: ChangeDetectionStrategy.OnPush,
styleUrls: ['plunk.styles.css'],
templateUrl: 'plunk.template.html',
providers: [ EventService],
})
export class DemoComponent implements OnInit {
@ViewChild('modalContent') modalContent: TemplateRef<any>;
view: string = 'month';
private event = new Events();
viewDate: Date = new Date();
modalData: {
action: string;
event: CalendarEvent;
};
actions: CalendarEventAction[] = [
{
label: '<i class="fa fa-fw fa-pencil"></i>',
onClick: ({ event }: { event: CalendarEvent }): void => {
this.handleEvent('Edited', event);
},
},
{
label: '<i class="fa fa-fw fa-times"></i>',
onClick: ({ event }: { event: CalendarEvent }): void => {
// console.log('link', event.link),
this.events = this.events.filter(iEvent => iEvent !== event);
this.handleEvent('Deleted', event);
},
},
];
refresh: Subject<any> = new Subject();
// [
// // {
// // start: subDays(startOfDay(new Date()), 1),
// // end: addDays(new Date(), 1),
// // title: 'A 3 day event',
// // color: colors.red,
// // actions: this.actions,
// // },
// // {
// // start: startOfDay(new Date()),
// // title: 'An event with no end date',
// // color: colors.yellow,
// // actions: this.actions,
// // },
// {
// start : startOfDay(new Date('2018-02-08T00:00:00+05:30')),
// title: 'Test12',
// color: colors.red,
// actions: this.actions,
// },
// // {
// // start: subDays(endOfMonth(new Date()), 3),
// // end: addDays(endOfMonth(new Date()), 3),
// // title: 'A long event that spans 2 months',
// // color: colors.blue,
// // },
// // {
// // start: addHours(startOfDay(new Date()), 2),
// // end: new Date(),
// // title: 'A draggable and resizable event',
// // color: colors.yellow,
// // actions: this.actions,
// // resizable: {
// // beforeStart: true,
// // afterEnd: true,
// // },
// // draggable: true,
// // },
// ];
activeDayIsOpen: boolean = true;
constructor(private modal: NgbModal, private eventService: EventService) {}
events: CalendarEvent[] = new Array();
eventlink: EventLink[] = new Array();
ngOnInit() {
this.eventService.getEvents().subscribe(data => {data.forEach(element => {
const eve = {
start : startOfDay(new Date(element.event_date_time)),
title: element.event_name,
color: colors.red,
actions: this.actions,
link: element.event_link,
};
// console.log(eve);
this.events.push(eve);
});
});
}
dayClicked({ date, events }: { date: Date; events: CalendarEvent[] }): void {
if (isSameMonth(date, this.viewDate)) {
if (
(isSameDay(this.viewDate, date) && this.activeDayIsOpen === true) ||
events.length === 0
) {
this.activeDayIsOpen = false;
} else {
this.activeDayIsOpen = true;
this.viewDate = date;
}
}
}
eventTimesChanged({
event,
newStart,
newEnd,
}: CalendarEventTimesChangedEvent): void {
event.start = newStart;
event.end = newEnd;
this.handleEvent('Dropped or resized', event);
this.refresh.next();
}
handleEvent(action: string, event: CalendarEvent): void {
this.modalData = { event, action };
this.modal.open(this.modalContent, { size: 'lg' });
}
addEvent(): void {
this.events.push({
title: ' ',
start: startOfDay(new Date()),
end: endOfDay(new Date()),
color: colors.red,
draggable: true,
resizable: {
beforeStart: true,
afterEnd: true,
},
});
console.log(this.events);
this.refresh.next();
}
add(l): void {
this.refresh.next();
console.log(this.events[l].start);
// const teacher_id = localStorage.getItem('id');
// const school_id = localStorage.getItem('school');
// const class_id = localStorage.getItem('class');
// const std_id = localStorage.getItem('std');
this.event.event_name = this.events[l].title;
this.event.event_date_time = this.events[l].start;
this.event.event_link = 'test';
this.event.event_class = +localStorage.getItem('class');
this.event.event_school = +localStorage.getItem('school');
this.event.event_standard = +localStorage.getItem('std');
this.event.teacher_id = +localStorage.getItem('id');
this.eventService.start(this.event)
.subscribe(
error => alert(error),
() => console.log('successful'));
}
}
|
#ifndef _RIGIDBODYFRAME_H_
#define _RIGIDBODYFRAME_H_
class RigidBodyFrame {
public:
std::string name;
int body_ind;
Eigen::Matrix4d T;
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
#endif // _RIGIDBODYFRAME_H_
|
package com.zebra.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.zebra.common.annotation.Log;
import com.zebra.common.config.ConfigServerApplication;
import com.zebra.common.core.controller.BaseController;
import com.zebra.common.core.domain.AjaxResult;
import com.zebra.common.enums.BusinessType;
import com.zebra.common.utils.StringUtils;
import com.zebra.common.utils.file.FileUploadUtils;
import com.zebra.framework.shiro.service.SysPasswordService;
import com.zebra.framework.util.ShiroUtils;
import com.zebra.system.domain.SysUser;
import com.zebra.system.service.ISysUserService;
import lombok.extern.slf4j.Slf4j;
/**
* 个人信息 业务处理
*
* @author ruoyi
*/
@Controller
@RequestMapping("/system/user/profile")
@Slf4j
public class SysProfileController extends BaseController {
private String prefix = "system/user/profile";
@Autowired
private ISysUserService userService;
@Autowired
private ConfigServerApplication configServerApplication;
@Autowired
private SysPasswordService passwordService;
/**
* 个人信息
*/
@GetMapping()
public String profile(ModelMap mmap) {
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", user);
mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
return prefix + "/profile";
}
@GetMapping("/checkPassword")
@ResponseBody
public boolean checkPassword(String password) {
SysUser user = ShiroUtils.getSysUser();
if (passwordService.matches(user, password)) {
return true;
}
return false;
}
@GetMapping("/resetPwd")
public String resetPwd(ModelMap mmap) {
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/resetPwd";
}
@Log(title = "重置密码", businessType = BusinessType.UPDATE)
@PostMapping("/resetPwd")
@ResponseBody
public AjaxResult resetPwd(String oldPassword, String newPassword) {
SysUser user = ShiroUtils.getSysUser();
if (StringUtils.isNotEmpty(newPassword) && passwordService.matches(user, oldPassword)) {
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
if (userService.resetUserPwd(user) > 0) {
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
return success();
}
return error();
} else {
return error("修改密码失败,旧密码错误");
}
}
/**
* 修改用户
*/
@GetMapping("/edit")
public String edit(ModelMap mmap) {
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/edit";
}
/**
* 修改头像
*/
@GetMapping("/avatar")
public String avatar(ModelMap mmap) {
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/avatar";
}
/**
* 修改用户
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ResponseBody
public AjaxResult update(SysUser user) {
SysUser currentUser = ShiroUtils.getSysUser();
currentUser.setUserName(user.getUserName());
currentUser.setEmail(user.getEmail());
currentUser.setPhonenumber(user.getPhonenumber());
currentUser.setSex(user.getSex());
if (userService.updateUserInfo(currentUser) > 0) {
ShiroUtils.setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
return error();
}
/**
* 保存头像
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/updateAvatar")
@ResponseBody
public AjaxResult updateAvatar(@RequestParam("avatarfile") MultipartFile file) {
SysUser currentUser = ShiroUtils.getSysUser();
try {
if (!file.isEmpty()) {
String avatar = FileUploadUtils.upload(configServerApplication.getAvatarPath(), file);
currentUser.setAvatar(avatar);
if (userService.updateUserInfo(currentUser) > 0) {
ShiroUtils.setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
}
return error();
} catch (Exception e) {
log.error("修改头像失败!", e);
return error(e.getMessage());
}
}
}
|
#pragma once
// 3D geometric algebra
namespace gem::ga3d
{
// Blades used as template parameters of multivector in algebra
namespace blades
{
using scalar = blade<0, 0, 0 , float>;
using e1 = blade<0b001, 0, 0, float>;
using e2 = blade<0b010, 0, 0, float>;
using e3 = blade<0b100, 0, 0, float>;
using e12 = blade<0b011, 0, 0, float>;
using e13 = blade<0b101, 0, 0, float>;
using e23 = blade<0b110, 0, 0, float>;
using e123 = blade<0b111, 0, 0, float>;
}
// Named constant values
namespace values
{
mvec<blades::e123> constexpr inline I = 1.0f;
}
// Multivector aliases
using vec = mvec<blades::e1, blades::e2, blades::e3>;
using rotor = mvec<blades::e12, blades::e13, blades::e23>;
// Literals
auto constexpr operator "" _e1 (long double val) { return mvec<blades::e1 >{val}; }
auto constexpr operator "" _e1 (unsigned long long val) { return mvec<blades::e1 >{val}; }
auto constexpr operator "" _e2 (long double val) { return mvec<blades::e2 >{val}; }
auto constexpr operator "" _e2 (unsigned long long val) { return mvec<blades::e2 >{val}; }
auto constexpr operator "" _e3 (long double val) { return mvec<blades::e3 >{val}; }
auto constexpr operator "" _e3 (unsigned long long val) { return mvec<blades::e3 >{val}; }
auto constexpr operator "" _e12 (long double val) { return mvec<blades::e12 >{val}; }
auto constexpr operator "" _e12 (unsigned long long val) { return mvec<blades::e12 >{val}; }
auto constexpr operator "" _e13 (long double val) { return mvec<blades::e13 >{val}; }
auto constexpr operator "" _e13 (unsigned long long val) { return mvec<blades::e13 >{val}; }
auto constexpr operator "" _e23 (long double val) { return mvec<blades::e23 >{val}; }
auto constexpr operator "" _e23 (unsigned long long val) { return mvec<blades::e23 >{val}; }
auto constexpr operator "" _e123(long double val) { return mvec<blades::e123>{val}; }
auto constexpr operator "" _e123(unsigned long long val) { return mvec<blades::e123>{val}; }
}
|
<filename>main.py
import weather_api
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler
from telegram import InlineKeyboardMarkup, InlineKeyboardButton
from apscheduler.schedulers.blocking import BlockingScheduler
from google_func import search_area
from valid import check_input
import random
import threading
import weather_api
from config import BOT_TOKEN
all_type_list = {}
type_list = ['基隆市', '臺北市', '新北市', '桃園縣', '新竹市', '新竹縣', '苗栗縣', '臺中市', '彰化縣', '南投縣',
'雲林縣', '嘉義市', '嘉義縣', '臺南市', '高雄市', '屏東縣', '臺東縣', '花蓮縣', '宜蘭縣', '澎湖縣', '金門縣', '連江縣']
user_location = {}
sche_thread = []
emoji = ['🚂','🚃','🚄','🚅','🚆','🚇','🚈','🚉','🚊','🚝','🚞','🚋','🚌','🚍','🚎','🚏','🚐','🚑','🚒','🚓','🚔','🚕','🚖','🚗','🚘','🚚','🚛','🚜','🚲','⛽','🚨','🚥','🚦','🚧','⛵','🚣','🚤','🚢','💺','🚁','🚟','🚠','🚡','🚀']
def request_choose(locate, day):
request = [day for i in range(5)]
result = weather_api.get_data(locate, request)
weather_now = result[0]['parameter']['parameterName']
raining_rate = result[1]['parameter']['parameterName']
lowest_temp = result[2]['parameter']['parameterName']
feeling = result[3]['parameter']['parameterName']
highest_temp = result[4]['parameter']['parameterName']
return (locate+"的天氣爲"+weather_now+"\n降雨機率: "+raining_rate +
"%\n最低溫度: "+lowest_temp+"C 最高溫度: "+highest_temp+"C \n舒適度爲"+feeling)
def get_request(locate, update):
request = [1, 1, 1, 1, 1]
result = weather_api.get_data(locate, request)
weather_now = result[0]['parameter']['parameterName']
raining_rate = result[1]['parameter']['parameterName']
lowest_temp = result[2]['parameter']['parameterName']
feeling = result[3]['parameter']['parameterName']
highest_temp = result[4]['parameter']['parameterName']
update.message.reply_text(locate+"的天氣爲"+weather_now+"\n降雨機率: "+raining_rate +
"%\n最低溫度: "+lowest_temp+"C 最高溫度: "+highest_temp+"C \n舒適度爲"+feeling, reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton(time, callback_data='{}-{}'.format(index, locate)) for index, time in [(2, '12小時後'), (3, '24小時後')]
]]))
def locate_sentence(bot, update):
possiple_list = check_input(update.message.text.strip())
print(possiple_list)
if len(possiple_list) == 1:
get_request(possiple_list[0], update)
elif len(possiple_list) > 5:
update.message.reply_text("請重新輸入!")
else:
update.message.reply_text('我們只支援台灣喔!還是你是要以下選擇', reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton(random.choice(emoji)+ ' ' + locate, callback_data='msg-'+locate) for locate in possiple_list
]]))
def notification(location, update):
def hello():
update.message.reply_text("個人天氣通知")
get_request(location, update)
return hello
def set_notify(bot, update):
userid = update.message.from_user.id
if userid not in user_location:
update.message.reply_text('你還沒設定居住區域啦 幹你娘低能兒')
print(update.message.text.strip())
time = update.message.text.strip()[8:]
print(time)
if int(time[:2]) >= 0 and int(time[:2]) <= 23 and int(time[3:]) >= 0 and int(time[3:]) < 60:
location = user_location[userid]
update.message.reply_text('你的居住地爲'+location+', 設定通知時間爲'+time)
sche_thread.append(threading.Thread(
target=schedule, args=(location, update, time,)))
sche_thread[-1].start()
else:
update.message.reply_text("輸入時間不合法")
def schedule(location, update, time):
sched = BlockingScheduler()
sched.add_job(func=notification(location, update),
trigger='cron', hour=time[:2], minute=time[3:])
sched.start()
def set_location(bot, update):
possiple_list = check_input(update.message.text.strip()[5:])
userid = update.message.from_user.id
if len(possiple_list) == 1:
user_location[userid] = possiple_list[0]
print(user_location)
update.message.reply_text('已更變居住區域: ' + possiple_list[0])
elif len(possiple_list) > 5:
update.message.reply_text("請重新輸入!")
else:
update.message.reply_text('目前我們只支持台灣喔!還是您是要...', reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton(random.choice(emoji)+ ' ' + locate, callback_data='set-'+locate+'-'+str(userid)) for locate in possiple_list
]]))
def location_handler(bot, update):
latlng = (update['message']['location']
['latitude'], update['message']['location']['longitude'])
locate = search_area(latlng)
if locate == None:
update.message.reply_text('目前本系統只支援台灣喔!')
else:
get_request(search_area(latlng), update)
button_map = {
'1': [(2, '12小時後'), (3, '24小時後')],
'2': [(1, '12小時前'), (3, '12小時後')],
'3': [(1, '24小時前'), (2, '12小時前')],
}
def callback_query_handler(bot, update):
callback_data = update.callback_query.data.split('-')
print(update.callback_query.data)
if callback_data[0] == 'msg':
update.callback_query.edit_message_text(
request_choose(callback_data[1], 1))
update.callback_query.edit_message_reply_markup(reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton(time, callback_data='{}-{}'.format(index, callback_data[1])) for index, time in button_map['1']
]]))
elif callback_data[0] == 'set':
user_location[int(callback_data[2])] = callback_data[1]
update.callback_query.edit_message_text('已更變居住區域: ' + callback_data[1])
print(user_location)
else:
update.callback_query.edit_message_text(
request_choose(callback_data[1], int(callback_data[0])))
update.callback_query.edit_message_reply_markup(reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton(time, callback_data='{}-{}'.format(index, callback_data[1])) for index, time in button_map[callback_data[0]]
]]))
def helping(bot,update):
update.message.reply_text('歡迎使用Weather Now 專業氣象推播機器人!\n請直接輸入欲查詢的縣市名稱或傳送位置資料即可立即取得最新氣象資訊!\n訊息自動推播功能:\n您可以使用/set 縣市 指令來綁定位置,再使用/notify HH:MM 設定推播時間,機器人便會自動通報氣象。\n感謝您使用本產品!若在使用上有任何問題,歡迎使用/help 指令查看說明。')
def meow_handler(bot,update):
photos = ['https://i.imgur.com/bYLtKnH.jpg','https://i.imgur.com/vD2BIwP.jpg','https://i.imgur.com/4EscGMW.jpg', 'https://i.imgur.com/e6ZLwtM.jpg','https://i.imgur.com/VyYkZHz.jpg','https://i.imgur.com/mRzIERX.jpg','https://i.imgur.com/wJi74LE.jpg' ]
update.message.reply_photo(random.choice(photos))
updater = Updater(BOT_TOKEN)
updater.dispatcher.add_handler(
MessageHandler(Filters.location, location_handler))
updater.dispatcher.add_handler(CallbackQueryHandler(callback_query_handler))
updater.dispatcher.add_handler(MessageHandler(Filters.text, locate_sentence))
updater.dispatcher.add_handler(CommandHandler('notify', set_notify))
updater.dispatcher.add_handler(CommandHandler('set', set_location))
updater.dispatcher.add_handler(CommandHandler('help', helping))
updater.dispatcher.add_handler(CommandHandler('start', helping))
updater.dispatcher.add_handler(CommandHandler('meow', meow_handler))
updater.start_polling()
updater.idle()
|
def test4(self):
@functor_api
def test4(data, x=1, y=2):
data.a = y
data.b[0] = x
return data
options = FunctorAPIData()
options.a = 1
options.b = [1, 2]
retval = test4(options, x=2)
self.assertEquals(retval.data.a, 2)
self.assertEquals(retval.data.b, [2, 2])
retval = test4(data=options, x=2)
self.assertEquals(retval.data.a, 2)
self.assertEquals(retval.data.b, [2, 2])
|
Construction was hit harder than any other sector by the 2014-16 oil price crash and subsequent fiscal adjustment policies in the Middle East and North Africa region. This led to a slowdown in project spending.
Annual awards for building and real estate projects fell to $37bn in 2018, down from $66bn the previous year.
Despite this, construction remains the biggest sector by project value, making up 46 per cent of the total value of projects that are planned or under construction in the region.
With $864bn of projects, Saudi Arabia is the biggest construction market in the region. The UAE is second with $575.9bn of projects.
During the period of low oil prices, construction projects in ring-fenced sectors such as social housing, education and healthcare were more likely to see progress.
The largest project to be completed in the 2017-18 period was Qatar Foundation’s $2.7bn Sidra Medicine healthcare and research centre.
The second-biggest project was the first package of the Sharma complex, located on Saudi Arabia’s northern Red Sea coast and developed by the Public Investment Fund, with a budget of $2.4bn.
The biggest project in Kuwait to be completed during the period was The Avenues, the country’s largest shopping mall.
With a budget of $1.5bn, the development is spread over 382,000 square metres of land. It includes more than 800 shops, more than 10,000 parking spaces and 150 restaurants.
The MEED Projects Awards 2019 in association with Mashreq recognises the best projects in the GCC. Reflecting the latest market trends, this year’s awards feature 17 different categories for entries. If you have been involved in a project completed in 2017 or 2018 that you believe deserves to be recognised, you can submit your entry at: MEED Projects Awards 2019.
|
package com.birthstone.base.security;
import com.birthstone.core.interfaces.ICellTitleStyleRequire;
import com.birthstone.core.interfaces.IControlSearcherHandler;
import java.util.ArrayList;
import java.util.List;
public class ControlRequired implements IControlSearcherHandler
{
private Boolean isRequeired;
public ControlRequired( )
{
isRequeired = true;
}
public static ControlRequired createObjectRequire()
{
ControlRequired ObjectRequire = new ControlRequired();
return ObjectRequire;
}
public Boolean isMatched(Object form) throws Exception
{
try
{
if(form != null)
{
List<IControlSearcherHandler> Controllist = new ArrayList<IControlSearcherHandler>();
Controllist.add(this);
new ControlSearcher(Controllist).search(form);
}
}
catch(Exception ex)
{
throw ex;
}
return isRequeired;
}
public void handle(Object object)
{
try
{
if(object instanceof ICellTitleStyleRequire)
{
/*
* ICellTitleStyleRequire Required =
* (ICellTitleStyleRequire)object; if
* (ValidatorHelper.CreateDataTypeValidator(Required.DataType,
* Object)) { if (Required.getIsRequired() == true &&
* string.IsNullOrEmpty(Required.ReturnValue() as string))// {
* ValidatorHelper.CreateRequiredValidator(Object); IsRequeired
* = false; } }
*/
}
else
{
isRequeired = false;
}
}
catch(Exception ex)
{
try
{
throw ex;
}
catch(Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public Boolean isPicked(Object Object)
{
return(Object instanceof ICellTitleStyleRequire);
}
}
|
Isolation and characterization of a mutant of Staphylococcus aureus deficient in autolytic activity A mutant of Staphylococcus aureus H (RUS3) uas isolated after mutagenesis with N-methyl-N'-nitro-N-nitrosoguanidine. The rate of autolysis of whole cells and isolated cell walls of RUS3 was less than 10% of the parent strain. In addition, the ability of the crude soluble enzyme isolated from RUS3 to degrade cell walls was negligible compared with the parent strain. The cell wall composition and the generation time of RUS3 were comparable to the parent strain. Unlike S. aureus H, RUS3 grew in clumps and did not undergo cell wall turnover. Both strains exhibited identical kinetics of killing by penicillin G. This may indicate that autolytic enzymes play a role in cell wall turnover and cell separation, but in S. aureus most of the autolytic activity is unrelated to the lethal effect of cell wall antibiotics.
|
Hybrid UWB and WiMAX radio-over-multi-mode fibre for in-building optical networks In this paper the use of hybrid WiMedia-defined ultra-wideband (UWB) and IEEE 802.16d WiMAX radio-over-fibre is proposed and experimentally demonstrated for multi-mode based in-building optical networks with the advantage of great immunity to optical transmission impairments. In the proposed approach, spectral coexistence of both signals must be achieved with negligible mutual interference. The experimental study performed addressed an indoor configuration with 50 m multi-mode fibres (MMF) and 850 nm vertical-cavity surface-emitting laser (VCSEL) transmitters. The results indicate that the impact of the wireless convergence in radio-over-multi-mode fibre (RoMMF) is significant for UWB transmissions, mainly due to MMF dispersion and electrooptical (EO) devices with limited bandwidth. On the other hand, WiMAX transmission is feasible for a 300 m MMF and 30 m wireless link in the presence of UWB, with −31 dBm WiMAX EVM.
|
<filename>urionlinejudge/1177/PreenchimentodeVetorII.c
#include <stdio.h>
#define SIZE 1000
int main() {
int e, i, j = 0, vetor[SIZE];
scanf("%d", &e);
for(i = 0; i < SIZE; i++) {
vetor[i] = j;
j++;
if(j == e) {
j = 0;
}
printf("N[%d] = %d\n", i, vetor[i]);
}
return 0;
}
|
OP23Perceptions of reasons for discordance between current preferences and existing documentation: a qualitative study Background Nursing homes throughout the United States use the Physician Orders for Life-Sustaining Treatment (POLST) form to document resident treatment preferences as medical orders. Reasons for discordance between POLST orders and current preferences were explored in the context of a larger study of POLST discordance. Methods Nursing facility residents (n = 25) and surrogate decision-makers (n = 25) were interviewed using Respecting Choices Advanced Steps, a structured, advance care planning facilitation process, to elicit current values-based, informed preferences. Interviews were recorded, transcribed, and coded using qualitative descriptive methods. Results Reasons for discordance between current preferences and POLST orders included changes in preferences related to new experiences, observations of other residents, new insights, a re-evaluation of goals and values, or a change in condition. Several participants indicated that discordance occurred because they learned new information or developed a better understanding about the treatment options during the interview. A few reported that the decisions recorded on POLST were influenced by others, though this was infrequent. Other participants were unable to explain the discordance because they did not recall the original conversation, or had no insight. Facility process issues including documentation errors and being asked to make decisions hastily during admission to the nursing facility also contributed to discordance. Discussion Reasons for discordance are varied, but suggest a need for increased education, more frequent re-evaluation of treatment preferences, and improved practices in order to ensure nursing home documentation is concordant with the current, values-based informed preferences of residents.
|
def compute_vertex_channels(input_channels, output_channels, matrix):
num_vertices = np.shape(matrix)[0]
vertex_channels = [0] * num_vertices
vertex_channels[0] = input_channels
vertex_channels[num_vertices - 1] = output_channels
if num_vertices == 2:
return vertex_channels
in_degree = np.sum(matrix[1:], axis=0)
interior_channels = output_channels // in_degree[num_vertices - 1]
correction = output_channels % in_degree[num_vertices - 1]
for v in range(1, num_vertices - 1):
if matrix[v, num_vertices - 1]:
vertex_channels[v] = interior_channels
if correction:
vertex_channels[v] += 1
correction -= 1
for v in range(num_vertices - 3, 0, -1):
if not matrix[v, num_vertices - 1]:
for dst in range(v + 1, num_vertices - 1):
if matrix[v, dst]:
vertex_channels[v] = max(vertex_channels[v], vertex_channels[dst])
assert vertex_channels[v] > 0
_logger.debug('vertex_channels: %s', str(vertex_channels))
final_fan_in = 0
for v in range(1, num_vertices - 1):
if matrix[v, num_vertices - 1]:
final_fan_in += vertex_channels[v]
for dst in range(v + 1, num_vertices - 1):
if matrix[v, dst]:
assert vertex_channels[v] >= vertex_channels[dst]
assert final_fan_in == output_channels or num_vertices == 2
return vertex_channels
|
<reponame>pnorton-usgs/notebooks
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python [conda env:gis_38]
# language: python
# name: conda-env-gis_38-py
# ---
# %% language="javascript"
# IPython.notebook.kernel.restart()
# %%
# from future.utils import iteritems
import xml.dom.minidom as minidom
try:
import xml.etree.cElementTree as xmlET
except ImportError:
import xml.etree.ElementTree as xmlET
# %%
# workfile = '/Users/pnorton/Projects/National_Hydrology_Model/src/fortran/prms6/src/xml/control.xml'
workfile = '/Users/pnorton/PycharmProjects/pyPRMS/pyPRMS/xml/control.xml'
xml_tree = xmlET.parse(workfile)
xml_root = xml_tree.getroot()
# print(xml_root.tag)
control = {}
# Iterate over child nodes of root
for elem in xml_root.findall('control_param'):
# print(elem.attrib.get('name'))
name = elem.attrib.get('name')
var_version_major = version_info(elem.attrib.get('version'))[0]
# Print the elements of the node
# print(elem.find('desc').text)
# print(elem.find('size').text)
ctl_type = int(elem.find('type').text)
# # Add dimensions for current parameter
# for cdim in elem.findall('./dimensions/dimension'):
# self.parameters.get(name).dimensions.add(cdim.attrib.get('name'))
# for cmod in elem.findall('./modules/module'):
# self.parameters.get(name).modules = cmod.text
# Lookup what the control variable values mean
for cvals in elem.findall('./values'):
# print(cval.attrib.get('name'))
if var_version_major == 6:
val_type = cvals.attrib.get('type')
print(name, var_version_major)
print('type: {}'.format(val_type))
for cv in cvals.findall('./value'):
outvals = []
for xx in cv.text.split(','):
outvals.append(xx)
print('{}: {}'.format(cv.attrib.get('name'), outvals))
control[name] = ctl_type
ctl_names = list(control)
ctl_names.sort()
# %%
control.keys()
# %%
def version_info(version_str, delim='.'):
if version_str is None:
return [0, 0, 0]
flds = [int(kk) for kk in version_str.split(delim)]
return flds
# %%
version_info('5.1.0')
# %%
|
def continuous_dimensions(self,
field_number,
dimension,
to_file):
if dimension == 'valence':
int_dimension = 0
elif dimension == 'arousal':
int_dimension = 1
elif dimension == 'dominance':
int_dimension = 2
dimension_list = []
nb_annotated_persons = len(self.matdata[self.mode][0]['person'][field_number][0])
print ('=== Processing field ' + str(field_number + 1) + ' ===')
for person in xrange(0, nb_annotated_persons):
multiple_persons_dimension_list = []
current_valence_dimension = \
self.matdata[self.mode][0]['person'][field_number][self.continuous_field_name][0][person][0][0][int_dimension][
0][0]
if nb_annotated_persons == 1:
dimension_list.append(current_valence_dimension)
with open(to_file, 'a') as resultFile:
print (dimension_list)
wr = csv.writer(resultFile, dialect='excel')
wr.writerow(dimension_list)
else:
multiple_persons_dimension_list.append(current_valence_dimension)
with open(to_file, 'a') as resultFile:
print (multiple_persons_dimension_list)
wr = csv.writer(resultFile, dialect='excel')
wr.writerow(multiple_persons_dimension_list)
|
def local_graph(df, cell_var=cell_label, max_dist=1):
square_labels = df[cell_var].str[5:]
int_dict = square_labels.reset_index().set_index(cell_var)['index'].to_dict()
X = df[['e','n']].values
tree = KDTree(X)
neighbors = tree.query_radius(X, max_dist)
edgelist = \
np.array([(i, j) for i in range(len(X)) for j in neighbors[i] if j!=i])
edgelist_idx = \
np.concatenate([df.iloc[edgelist[:,c]].index.values.reshape(-1,1)
for c in [0,1]],axis=1)
if len(edgelist)>0:
G = nx.Graph()
G.add_nodes_from(df.index)
G.add_edges_from(edgelist_idx)
return G
else:
raise ValueError('Empty network')
|
<gh_stars>10-100
/*
* Copyright 2017 The Depan Project Authors
*
* 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.google.devtools.depan.resources;
import com.google.devtools.depan.persistence.AbstractDocXmlPersist;
import org.eclipse.core.resources.IFile;
/**
* Define a resource that is backed in the file system.
*
* @author <a href='mailto:<EMAIL>'><NAME></a>
*/
public class FileDocumentReference<T extends PropertyDocument<?>>
implements PropertyDocumentReference<T> {
private IFile location;
private T document;
public FileDocumentReference(IFile location, T document) {
this.location = location;
this.document = document;
}
@Override
public void saveResource(T document, AbstractDocXmlPersist<T> persist) {
this.document = document;
persist.saveDocument(location, document, null);
}
@Override
public T getDocument() {
return document;
}
public IFile getLocation() {
return location;
}
public static <T extends PropertyDocument<?>>
FileDocumentReference<T> buildFileReference(
IFile location, T document) {
return new FileDocumentReference<T>(location, document);
}
}
|
NEW DELHI: Consumer electronics maker Panasonic will launch its first smartphone marking its re-entry into the Rs 31,000-crore Indian handset market after being absent for more than half a decade.
The Japanese company is learnt to have partnered with Delhi-based Jaina Group for marketing, distribution and customer support of its smartphones in India, people aware of the deal told ET. Panasonic did not comment on the partnership but these people added that Jaina Group will also advise the electronics maker to create a smartphone portfolio that will be suitable for the Indian market.
Jaina Group is one of the two parent companies that owns local handset maker Karbonn Mobiles and is likely to use its experience in local mobile phone market to aide Panasonic that will get its handsets made from original design manufacturers (ODMs) overseas. This unique model for the Indian market could be a test bed for Panasonic that may look to replicate it in other emerging markets if sales of its smartphones take off here.
Panasonic intends to take on the likes of Samsung and Apple, who together make up for more than half of smartphone sales in India. Television commercials show Panasonic's smartphone with a 5-inch HD LCD screen and a 1.2 Ghz quadcore processor besides an 8-megapixel rear camera. The Android phone is expected to cost anywhere between Rs 28,000 and Rs 30,000.
Don't Miss 2.7 K SHARES 996 SHARES 7.2 K SHARES
Panasonic sells Android smartphones in its home market of Japan and has increased its focus on smart devices since last year. "Reflecting a drastic shift towards smartphones, the featurephone market has contracted substantially. Looking ahead, Panasonic will increasingly channel management resources into the smartphone field in an effort to expand its market share," the company said in its annual report for the year ended March 2012.
The company holds around one fourth of the overall handset market in Japan but has been facing sluggish sales. Panasonic attempted to cash in on the global smartphone growth and introduced smartphones in Europe but met with little success.
|
export * from './CircularTabBarItem';
export * from './SimpleCircularTabBarItem';
export * from './SimpleTabBarItem';
|
<gh_stars>0
package com.jozefiak.exchange.repository;
import com.jozefiak.exchange.domain.model.Rate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;
@Repository
public interface RateRepo extends JpaRepository<Rate,Long> {
Optional<Rate> findByCode(String Code);
}
|
def index():
articles = get_articles('top-headlines')
business = get_categories('business')
general = get_categories('general')
health = get_categories('health')
sports = get_categories('sports')
technology = get_categories('technology')
science = get_categories('science')
title = 'news'
return render_template('index.html', title = title,articles = articles,sports = sports,business = business,general = general,health = health, technology = technology,science = science)
|
def query_killcell_event(self, event_term):
event_term = self.aug_term(event_term)
results = []
for k in self.auxilary['keywords']['killcell']:
assert 'killcell' in k, "not a killcell keyword?"
num_arg = int(k[len('killcell'):])
args = [f'X{i}' for i in range(num_arg - 1)]
args.insert(1, event_term)
results += self.query_rule(k, args)
results = sorted(list(set(results)))
return results
|
To win the 2019 elections, Modi needs to turn India into the land of free money.
So, he’s reining in the independence of The Reserve Bank of India (RBI). “The government is trying to ruin the RBI in order to win the elections,” says LIU POST economics Professor Udayan Roy.
For years, an independent RBI has been a big asset for India. It provided a stable macroeconomic environment that helped the country’s economy grow fast, beating the economy of mighty China. In 2018, India’s economy grew by 7.4% compared to 6.6% for China. And, according to a recently published BNP Paribas Global Outlook, it’s expected to grow by 7.6% in 2019, well ahead of China’s 6.2%.
Investors have taken notice, helping India’s equity markets stage a big rally.
A strong economy, in turn, is a tailwind for Modi as he runs for re-election in 2019. But it isn’t enough, for an obvious reason. India’s strong economic growth and hot equity markets haven’t touch the masses of the Indian people.
In fact, as the Indian economy has climbed the world economic ladder, Indians have been headed the other way. They took a few steps down on the life ladder.
That’s according to a Gallup survey a couple of months ago, which finds that Indians' ratings of their current lives nationwide stands at an average of 4.0 on a 0-to-10 scale in 2017 – down from 4.4 back in 2014.
That’s the worst on record.
The findings of this survey are in line with a previous Gallup survey that found a big decline in the percentage of Indians who rate their lives positively enough to rate it as "thriving" since Modi assumed office. Only 3% of Indians considered themselves thriving in 2017 compared to 14% in 2014.
What’s behind this disconnect between the metrics that measure the pulse of the overall economy and the metrics that measure how the masses feel?
A couple of things. One of them is that the Living Family Wage in India remains almost flat in the 17300-17400 INR/Month range over his tenure. Meanwhile, wages paid to low-skilled labor decreased to 10300 INR/Month in 2018 from 13300 INR/Month in 2014.
The other is food affordability. Indians have had a hard time buying food, especially in rural areas, according to a Gallup report.
To win the votes of the masses, Modi needs to remedy this situation. And he must do it fast, the old way, though massive government spending.
But there’s a big problem in doing that: the government is already running large deficits.
Apparently, the RBI is correct, in all these cases. But without free bank lending, Modi’s 2019 re-election campaign is at risk.
That’s why Modi is willing to sacrifice the independence of RBI and turn India into the land of free money -- to win the 2019 elections.
|
<reponame>yretenai/libfez
// Copyright 2015 @yukimono_
// The license is included in the root directory under the file "LICENSE"
#ifndef __LIBFEZ_LIBFEZ_TYPES_H
#define __LIBFEZ_LIBFEZ_TYPES_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _LIBFEZ_ENTRY {
unsigned int filename_sz;
char* filename;
unsigned int offset;
unsigned int size;
unsigned int data_sz;
char* data;
} LIBFEZ_ENTRY;
typedef struct _LIBFEZ {
unsigned int files_sz;
unsigned int version;
LIBFEZ_ENTRY* files;
FILE* ptr;
} LIBFEZ;
#define LIBFEZ_SUCCESS 0
#define LIBFEZ_FAILURE 1
#define LIBFEZ_WHAT -1
typedef int LIBFEZ_RET;
#endif // __LIBFEZ_LIBFEZ_TYPES_H
|
Section 12. Living donor liver transplantation for patients with high model for end-stage liver disease scores and acute liver failure. Living donor liver transplantation (LDLT) for patients with high model for end-stage liver disease score and acute liver failure patients have little or not gained any substantial following among Western centers because of the "donor high risk-low recipient benefit scenario" that puts the donor at a significant risk against the survival odds for a recipient who is receiving a partial graft and considered marginal by Western standards. In most Asian countries, there is sometimes no other source of live graft but a willing live liver donor. There are individual Asian center reports that conclude that LDLT has comparable outcome to deceased donor liver transplant. However, the outcomes of a large number of patients after undergoing adult LDLT for high model for end-stage liver disease scores and acute liver failure at a single center have not been investigated. Here in, we present our experience with such subgroup of patients undergoing LDLT.
|
7. Law, Religion and Theology This volume consists of 17 essays on the theme of the temple in biblical theology, most of which were originally given as papers at the Biblical Theology Study Group of the Tyndale Fellowship in Cambridge in 2001. Seven of the essays are directly on OT topics, namely Exodus and the Biblical Theology of the Tabernacle (J. Palmer); From Tent of Meeting to Temple: Presence, Rejection and Renewal of Divine Favour (P. Pitknen); Did I Ever Ask for a House of Cedar? The Contribution of 2 Samuel 7 and 1 Chronicles 17 to the Theology of the Temple (C. Armerding); A Curious Silence: The Temple in 1 and 2 Kings (R. Fyall); The Temple in Ezekiel (J.B. Taylor); The Temple Restored (R.T. Beckwith); Gods Image, His Cosmic Temple and the High Priest: Towards an Historical and Theological Account of the Incarnation (C. Fletcher-Louis). There are in addition essays on the temple in Luke, John, Acts, the Corinthian letters, Ephesians and 1 Peter, Hebrews and Revelation. The volume closes with three essays in Systematic Theology, on the dwelling place of the Triune God (D. Strange), the temple in Karl Barth (J. Norgate), and the temple in contemporary Christian Zionism (S. Sizer). The collection brings about some illuminating dialogue between biblical interpretation and theology. J.G. MCCONVILLE
|
package coza.opencollab.unipoole.service.util.impl;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import coza.opencollab.unipoole.service.util.CacheManager;
import java.util.Arrays;
/**
* A Hazel Cast implementation of the cache manager.
*
* @author OpenCollab
*/
public class HazelcastCacheManager implements CacheManager{
/**
* The hazel cast instance.
*/
private HazelcastInstance instance;
/**
* The default cache to use.
*/
private String defaultCacheName = "default";
/**
* The hazel cast instance.
*/
public void setInstance(HazelcastInstance instance) {
this.instance = instance;
}
/**
* The default cache to use.
*/
public void setDefaultCacheName(String defaultCacheName) {
this.defaultCacheName = defaultCacheName;
}
/**
* Retrieve the cache.
*
* @param cacheName The name of the cache to retrieve. If null the default
* of the cache manager is retrieved.
* @return The cache.
*/
private IMap<String, String> getMap(String cacheName){
if(cacheName == null){
return instance.getMap(defaultCacheName);
}else{
return instance.getMap(cacheName);
}
}
/**
* {@inheritDoc}
*/
@Override
public void init() {
if (instance == null) {
instance = Hazelcast.newHazelcastInstance();
}
}
/**
* {@inheritDoc}
*/
@Override
public void destroy() {
Hazelcast.shutdownAll();
}
/**
* {@inheritDoc}
*/
@Override
public String getStatus() {
return "TODO";
}
/**
* {@inheritDoc}
*/
@Override
public String get(String key) {
return get(key, defaultCacheName);
}
/**
* {@inheritDoc}
*/
@Override
public String get(String key, String cacheName) {
return getMap(cacheName).get(key);
}
/**
* {@inheritDoc}
*/
@Override
public String put(String key, String value) {
return put(key, value, defaultCacheName);
}
/**
* {@inheritDoc}
*/
@Override
public String put(String key, String value, String cacheName) {
return getMap(cacheName).put(key, value);
}
/**
* {@inheritDoc}
*/
@Override
public String putIfAbsent(String key, String value) {
return putIfAbsent(key, value, defaultCacheName);
}
/**
* {@inheritDoc}
*/
@Override
public String putIfAbsent(String key, String value, String cacheName) {
return getMap(cacheName).putIfAbsent(key, value);
}
/**
* {@inheritDoc}
*/
@Override
public String remove(String key) {
return remove(key, defaultCacheName);
}
/**
* {@inheritDoc}
*/
@Override
public String remove(String key, String cacheName) {
return getMap(cacheName).remove(key);
}
/**
* {@inheritDoc}
*/
@Override
public void lock(String... key){
instance.getLock(Arrays.toString(key)).lock();
}
/**
* {@inheritDoc}
*/
@Override
public void unlock(String... key){
instance.getLock(Arrays.toString(key)).unlock();
}
}
|
def attrify(response):
return Response(**{k:response[k] for k in Response._fields})
|
. Thirty-one consecutive patients with clinically and histologically documented urothelial cancer of the urinary bladder of category T3-T4a, N0, M0 underwent a trial of neoadjuvant chemotherapy before radical cystectomy. All patients received 2 courses of methotrexate 300 mg/m2 day 1 followed by folinic acid rescue days 2 and 3 and cisplatin 100 mg/m2 day 4, q. 3 weeks. Only responders were to receive 2 further courses of chemotherapy. The protocol was violated in 5 cases and all did poorly. Of the remaining 26 patients, 19 (73%) had a partial or complete remission to neoadjuvant chemotherapy. The actuarial disease-free survival was very encouraging at 18 months (87% for responders versus 43% for the 7 non responders), but at 30 months the difference became minimal (60% versus 43%). Furthermore, all 3 responders who had refused radical cystectomy relapsed locally. Postoperative randomized trials are necessary to prove the advantage of neoadjuvant therapy with a long term survival and bladder preservation.
|
Photoresist roughness characterization in additive lithography processes for the fabrication of phase-only optical vortices The roughness on the surface of phase-only micro-optical elements can limit their performance. An optical vortex phase element was fabricated by using additive lithography with an optimized process to have minimal surface roughness. Thick photoresist was used in order to obtain the appropriate dynamic range for the desired phase profile. We investigated the effects of both post applied and post exposure baking processes, as well as the effects of surfactant in the developer. We found the resist surface roughness to be a function of both the temperature and the time of the respective bakes, as well as the developer surfactant content.
|
def cvimage_to_pygame(image):
image_rgb = cv2.CreateMat(image._height, image._width, cv2.CV_8UC3)
cv2.CvtColor(image, image_rgb, cv2.COLOR_BGR2RGB)
return pygame.image.frombuffer(image.tostring(), cv2.GetSize(image_rgb), "RGB")
|
Preparation and characterization of wood dust natural fiber re-enforced polymer composite Composites based on natural fiber reinforcement have generated wide research and engineering interest in the last few decades. This is mostly due to their high specific strength, low cost, low density, light weight and biodegradability and has earned a special category of green composite. In this study, wood dust reinforced composite were processed with 2wt%, 4wt%, 6wt%, 8wt%,10wt%, 12 wt.% and 14wt%. The tensile, impact, stress and strain tests were performed at different wt% to study the mechanical behavior of the composite. The result of the study showed that the mechanical properties decrease considerable up to 16.7 wt% wood dust contents. However, above 16.7 wt% there was no significant change to the overall mechanical properties of the composite, therefore yielding an advantage of cost saving. Keywords: Composites; Polyvinylchloride; Mechanical Properties; Wood dust
|
<gh_stars>10-100
// Basic type 'Tuple'
let aTuple: [number, string] = [1, 'Hello'];
let aListOfTuples: Array<[number, string]> = [[1, 'Hello'], [2, 'World']];
// Note typesafe access of tuple members.
let numberInTuple: number = aTuple[0];
let stringInTuple: string = aTuple[1];
//numberInTuple = aTuple[1];
// Basic type 'enum'
enum Color { Red, Green, Blue }; // Note that first enum starts with value 0
let anEnum: Color = Color.Green;// Assignment; anEnum gets value 1
enum Color2 { Red = 0b001, Green = 0b010, Blue = 0b100 };
let enumName: string = Color[2];// Note getting string name from enum (here 'Blue')
enum AccessMode {
Read = 0b01,
Write = Read << 1, // Write becomes 0b10
ReadWrite = Read | Write // Note computed member
};
console.log(AccessMode[3]); // Prints 'ReadWrite'
|
def strip_domain_from_object_location(location: str, domain_dns_name: str) -> str:
if location is None:
return location
domain_rdn_upper = ',' + construct_ldap_base_dn_from_domain(domain_dns_name).upper()
location = location.upper()
if location.endswith(domain_rdn_upper):
trim_length = len(domain_rdn_upper)
location = location[:-trim_length]
return location
|
After about 24 hours of social media-fed rumors, fans of CBS comedies can now officially rejoice: Mom, Mike & Molly and 2 Broke Girls all will be back for another season, the network confirmed Thursday.
The Anna Faris-Allison Janney comedy was renewed for Season 3, the Billy Gardell-Melissa McCarthy sitcom will return for its sixth go-around, and Kat Dennings and Beth Behrs will keep slinging hash for a fifth season.
RELATED 2015 Renewal Scorecard: What’s Coming Back? What’s Getting Cancelled? What’s on the Bubble?
The news leaked out Wednesday via Twitter and Instagram posts from people connected with both series (though the Instagram post was later removed).
MOM picked up for next year! Thanks, fans from all of us at MOM! — Sheldon Bull (@SheldonMBull) March 11, 2015
Are you excited about the renewals? Sound off in the comments!
|
Links lipoproteins to chronic kidney disease and atherosclerosis. DOI:10.1097/MOL.0000000000000625 Dyslipidemia has been reported frequently in patients with chronic kidney disease. There is also accumulating evidence that chronic kidney disease accelerates and augments atherosclerosis . This commentary summarizes two recent publications: one article reported association of the HDL proteome with albuminuria and atherosclerosis , and the other article showed that inhibition of proprotein convertase subtilisin-kexin type 9 (PCSK9) improved cardiovascular outcomes in patients with chronic kidney disease . Albuminuria is a marker that represents the development and progression of kidney disease in patients with diabetes, who also have high risk for atherosclerosis. Shao et al. provided comprehensive analyses on type 1 diabetes mellitus individuals from an observational cohort study, the EDIC (Epidemiology of Diabetes Interventions and Complications) study. One hundred and ninety-one patients were grouped as normal albumin excretion rate, microalbuminuria (30 to <300 mg/day), and macroalbuminuria ( 300 mg/day), respectively. Tandem mass spectrometric analyses detected 46 proteins in HDL in all participants. Among these proteins, seven proteinswere higher and sevenproteinswere lower in HDL isolated from individuals with microalbuminuria or macroalbuminuria, compared with individuals with normal albumin excretion rate. In a logistic regression model, after adjusting age, sex, smoking, medications, and some metabolic parameters, paraoxonase (PON)1 and PON3 had lower abundance in individuals with coronary artery disease, independent of LDL-cholesterol and HDL-cholesterol concentrations. In addition, low abundance of PON1, but not PON3, was associated with albuminuria. This study provided evidence that the HDL proteome had specific patterns in type 1 diabetic patients with albuminuria, compared with those having normal albumin excretion rates. However, it is unclear whether this HDL proteome has causal correlation with albuminuria or atherosclerotic disease. High plasma concentrations of LDL-cholesterol are an independent risk factor for atherosclerosis. Evolocumab is a human monoclonal antibody targeting PCSK9 to reduce plasma LDL-cholesterol
|
Smooth positon solutions of the focusing modified Korteweg-de Vries equation The $n$-fold Darboux transformation $T_{n}$ of the focusing real mo\-di\-fied Kor\-te\-weg-de Vries (mKdV) equation is expressed in terms of the determinant representation. Using this representation, the $n$-soliton solutions of the mKdV equation are also expressed by determinants whose elements consist of the eigenvalues $\lambda_{j}$ and the corresponding eigenfunctions of the associated Lax equation. The nonsingular $n$-positon solutions of the focusing mKdV equation are obtained in the special limit $\lambda_{j}\rightarrow\lambda_{1}$, from the corresponding $n$-soliton solutions and by using the associated higher-order Taylor expansion. Furthermore, the decomposition method of the $n$-positon solution into $n$ single-soliton solutions, the trajectories, and the corresponding"phase shifts"of the multi-positons are also investigated. Introduction It is a well-known fact that nonlinear partial differential equations play a fundamental role both in the understanding of many natural phenomena and in the development of advanced technologies and engineering designs. A plethora of such nonlinear evolutions equations have been investigated during the many years such as the celebrated Korteweg-de Vries (KdV) equation, the modified Korteweg-de Vries (mKdV) equation, the sine-Gordon (sG) equation, the nonlinear Schrdinger (NLS) equation, the Manakov system, Kadomtsev-Petviashvili equation, Davey-Stewartson equation, Maccari system etc. Especially, the origin of the KdV equation and its birth has been a long process and spanned a period of about sixty years from the experiments of Scott-Russell in 1834 to the publication in 1895 of a seminal article by Korteweg and de Vries who developed a mathematical model for the shallow water problem and demonstrated the possibility of solitary wave generation. The KdV equation has been derived in a series of physical settings, e.g. in plasma physics, and in studies of anharmonic (nonlinear) lattices. Here we recall that the existence and uniqueness of solutions of the KdV equation for appropriate initial and boundary conditions have been proved by Sjberg. It is well known that if u is a solution of the KdV equation u t + u xxx − 6uu x = 0 and v is a solution of the defocusing mKdV equation v t + v xxx − 6v 2 v x = 0, the two solutions are connected by the Miura transformation, namely, u = v x + v 2. Both KdV and mKdV equations are completely integrable and have infinitely many conserved quantities. The KdV and mKdV equations and its many generalizations were used to describe a series of physical phenomena. For example, the system of coupled KdV equations is a generic model of resonantly coupled internal waves in stratified fluids and can also describe the formation of gap solitons and of parametric envelope solitons, see Ref. -. In optical settings the mKdV equation and its further generalizations were found to adequately describe the propagation in nonlinear optical media of ultrasort pulses consisting of only a few optical cycles, beyond the so-called slowly varying envelope aproximation -. Recently, a model based on two coupled mKdV equations was used to describe the soliton propagation in two parallel optical waveguides, in the presence of linear nondispersing coupling and in the few-cycle regime. The mKdV, sG, and mKdV-sG equations were used in modelling the process of generation of supercontinuum light in optical fibers. The mKdV equation also appears in other fields such as ion acoustic soliton experiments in plasmas, fluid mechanics, soliton propagation in lattices and acoustic waves in certain anharmonic lattices, nonlinear van Alfvn waves propagating in plasmas, meandering ocean currents, the dynamics of traffic flow, and the study of Schottky barrier transmission lines. For a series of recent studies of the KdV and mKdV equations, and other relevant nonlinear partial differential equations that describe the dynamics of diverse physical phenomena, see Refs. -. It is worth mentioning that being a completely integrable nonlinear dynamical system, the generic mKdV partial differential equation possesses unique features such as the Painlev property, Miura transformation, the inverse scattering transformation, the Darboux transformation (DT) and so on. In a pioneering work, Matveev introduced the concept of a positon solution as a new type of solution of the KdV equation. Both positon and soliton-positon solutions of the KdV equation were first constructed and ana-lyzed. The positon solutions have many interesting properties that differ from those of soliton solutions. The positons can be characterized as slowly decaying oscillating solutions of the nonlinear completely integrable equations having the special property of being superreflectionless. The positons are weakly localized, in contrast to exponentially decaying soliton solutions. For a positon solution the corresponding eigenvalue of the spectral problem is positive and is embedded in the continuous spectrum. The positons are completely transparent to other interacting objects. In particular, two positons remain unchanged after mutual collision. However, during the soliton-positon collision the soliton remains unchanged, while both the carrier-wave of the positon and its envelope experience finite phase-shifts. The positon solutions were then constructed for many other models, such as the defocusing mKdV equation, the sG equation and the Toda-lattice. It is well known that that the above mentioned positon solutions are singular ones. So it is important from the point of view of possible applications of positon solutions to model diverse physical phenomena to seek smooth, nonsingular positon solutions for nonlinear evolution equations. It is worth noting that it is not possible to get smooth, nonsingular positon solutions of the defocusing mKdV because of the singularity that is inherent in its Darboux transformation. Instead, it is natural to seek nonsingular positon solutions of the following focusing-type mKdV equation by using the DT method. Here q = q(x, t) is a real function of variables x and t. Furthermore, we know that the multi-soliton solution for the mKdV equation has been given, e.g., in Refs.. We should note that the n-soliton solution of the mKdV equation can be decomposed into a summation of n single solitons with a constant phase shift at |t| −→ ∞, see, for example Ref.. It is the main aim of this paper to decompose the multi-positon solution of the focusing real mKdV equation, and to further study its key properties of the nonsigular positons including their trajectories and the associated "phase shift". The organization of this paper is as follows. In Section 2, the n-fold Darboux transformation is given. In Section 3, the positon solution of the focusing real mKdV equation is calculated by using the degenerate Darboux transformation method and a special Taylor expansion. The multi-positon solution and its decomposition into several single-positon solutions, the associated positon trajectories and phase shifts are also discussed. Our conclusions are provided in the last section. The Darboux transformation of the focusing mKdV equation The Lax pair of the mKdV equation can be derived by the Lie algebra splitting : with Here () is an eigenfunction of the Lax equation associated with eigenvalue. In order to later construct the kernel of n-fold DT, it is necessary to introduce 2n eigenfunctions: The even-numbered functions are given through the reduction condition: Here 1 (x, t, ) and 2 (x, t, ) are the two components of eigenfunction associated with in Eqs. and. Furthermore, we will set T to be a gauge transformation as follows According to Eqs.,,,, and, it is easy to get Similarly, the following equation can be also obtained Hence, we get M t − N x + = 0. In general, in order to seek for Darboux transformation, we assume Here, a 0, b 0, c 0, d 0, a 1, b 1, c 1, and d 1 are functions of x and t, which can be easily obtained according to the Eqs. and, by comparing the coefficients of i (i = 4, 3, 2, 1, 0). For example, it is easily to get a 1t = 0, b 1t = 0, by comparing the coefficients of. Furthermore, a 1x = 0, b 1x = 0, so a 1 and d 1 are arbitrary constants. Then we set a 1 = 1, b 1 = 1 in order to simplify the later calculations without loss of generality, i.e., Then, a 0, b 0, c 0, and d 0 can be obtained by using the kernel of T 1 : Here the two eigenfunctions ( 1 ) and ( 2 ) are in the form of Solving the above algebraic equations, then Taking these elements back into T 1, then the determinant representation of T 1 is given by Further, the one-fold Darboux transformation T 1 generates a new solution of the focusing mKdV equation according to Eq.. Note that 2 and 2 are given by the reduction condition in Eq. By iterating n times T 1 and using the representation of T 1, it is easy to get the n-fold Darboux transformation, see the following theorem. Therefore, the nth-order solution generated by the transformation T n from a "seed" solution q is given by where The n-positon solutions of the focusing mKdV equation In the previous Section, we have derived the expression of the n-fold DT and in what follows we will give the soliton solution of the mKdV equation in order to study the associated positon solution. To this end, we set the seed solution q = 0, and we get the eigenfunctions Taking the above eigenfunctions back into Eq. and using the reduction condition given by Eq., then it yields an explicit form of the n-order soliton solution. We set n = 1 in equation, then the single soliton solution is given by which is plotted in Fig. 1. If we set n = 2, the Eq. generates a two-soliton solution, namely Here p = 2H, q = 2( 3 3 t + 3 x). Three kinds of two-soliton solutions consisting of one bright soliton and one dark soliton, two bright solitons, and two dark solitons are plotted in Fig. 2, Fig. 3(a) and Fig. 3(b), respectively. Similarly, three different cases of three-soliton solutions (see Eq. are also plotted in Figs. 4 and 5, namely two bright solitons and one dark soliton (see Fig. 4), and three bright solitons and three dark solitons (see Fig. 5). It is easy to see that the denominator in the two-soliton solution is zero in the degenerate case when 1 = 3. In general, the n-soliton solution becomes an indeterminate form 0 0 when j → 1 (j = 1, 3, 5,, 2n − 1). However, if we set j = 1 + in the n-soliton solution, and then we perform the higher-order Taylor expansion (see, for example, Ref. ), we then get the n-positon solution where and n i = , define the floor function of i. If we set n = 2, the expression of two-positon solution is given by The typical two-positon solution is plotted in Fig. 6. Similarly, we can get the three-positon solution from the three-soliton solution when n = 3 in Eq. by performing the corresponding Taylor expansion as in the case of the two-positon solution. Because of the complexity of the exact form of the threepositon solution, we do not write down its explicit expression, but we have plotted it in 7. In what follows we will discuss the unique properties of the positon solutions. According to the expression of the two-positon solution, we see that the denominator of the q 2−p cannot be zero, which proves the assertion that the positon solution of the focusing mKdV equation is nonsingular, a result that is completely different from the previous studies about the singular positon solution of the defocusing mKdV equation. At the same time, we can see from Fig. 6(a) the smoothness of the positon solution. The above results inspires us to further study the key features of the positon solution of the focusing mKdV equation. We can easily see that the two-positon solution q 2−p is not a travelling wave, and the trajectory of the positon q 2−p is not a straight line, that is to say, it is a slowly changing curve. Then, we can explore the dynamics of smooth positons by looking at three main features: the decomposition procedure, the positon trajectories and the corresponding "phase shifts". We will set 1 = 1 in order to simplify the calculations. The dynamics of smooth two-positon and three-positon solutions will be analyzed as follows: -As is well known, a two-soliton solution can be decomposed into a sum of two single solitons with a phase shift at |t| ≫ 0. The fact stimulates us consider a similar decomposition of the two-positon solution, because a smooth two-positon is obtained in a certain limit of the two-soliton solution solution. Naturally, we introduce the following decomposition of the two-positon solution when |t| −→ ∞ Here where q 1−s (H) is the single-soliton solution given by Eq.. The phase shift c 1 can be determined by substituting and into and considering the corresponding approximation in the neighborhood of H = 0. It yields Note that the phase shift is a constant for the two-soliton solution. However, the corresponding "phase shift" c 1 for the positon solution is an undetermined function of x and t. By a simple calculation, is an approximate solution of Eq. for |t| >> 1. Therefore a two-positon solution of the focusing mKdV equation can be decomposed as when |t| −→ ∞. Here, H = x + t, and very good approximate trajectories are two curves defined by x + t ± ln(64t 2 ) 4 = 0. By comparing with the correponding decomposition of a multi-soliton solution into several single soliton solutions, the appearance of the variable "phase shift" in the decomposition of multi-positon solution into several single-soliton solutions is the key difference between the two decomposition processes. -For a three-positon solution, we get when |t| −→ ∞ (here H = ( 1 x + 3 1 t)| 1=1 = x + t as before). Certainly, the phase shift c 2 still is an undetermined function of x and t. Here we have c 2 = ln 1024t 4 4, and thus very good approximate trajectories are the three curves defined by x + t ± ln 1024t 4 4 = 0 and x + t = 0. Summary and discussion In this paper, a determinant representation of the n-fold Darboux transformation T n of the focusing real mKdV equation was given. Using this representation, we have obtained the n-soliton solution q , and thus we explicitly provided the one-, two-, and three-soliton solutions. Furthermore, a general expression of the smooth, nonsingular multi-positon solution of the focusing mKdV equation was calculated by using a certain Taylor expansion in the corresponding determinant representation of the multi-soliton solution (see Eq. ). Finally, we further analyzed the unique properties of the positon solution of the focusing mKdV equation from three points of view: the decomposition procedure, the approximate trajectories, and the corresponding "phase shifts". By comparing the case of the decomposition of the multi-soliton solution into single solitons with that of the decomposition of the multi-positon solution into single solitons we arrive at the interesting result that in the latter case the "phase shifts" are variable and the approximate trajectories are not straight lines (see Figs. 6 and 7). It is worth mentioning that Figs. 2 to 5 show that we cannot get pure bright or dark solitons when all the eigenvalues of multi-soliton solutions are positive numbers or are negative ones. This facts implies naturally that a multi-positon solution is a combination of several bright and dark solitons, see the two-positons shown in Fig. 6 and the threepositons shown in Fig. 7. This interesting result comes from the fact that the multi-positon solution is obtained in the special limit when the eigenvalues j (j = 3, 5, ) tend to the same eigenvalue 1. We may conclude that the obtained nonsingular multi-positon solutions of the focusing mKdV equation will undoubtedly be useful for further studies in this area and will give insights in modeling a diverse set of nonlinear wave phenomena in many relevant physical settings. From our study it is clear that the smooth n-positon solution is expressed by a mixture of polynomial and hyperbolic functions, similar to the multi-pole solutions of the real and complex mKdV and the NLS equations, which were reported during the past three decades by using the classical inverse scattering and Hirota methods -. Comparing our results with the known results we would like to point out the following: 1) Equation provides a simple closed formula to calculate the n-positon solution; 2) Equations and provide simple and direct expressions for the decomposition of multi-positon solutions into single solitons, and also show more precise formulas for the "phase shifts" and soliton trajectories. The corresponding soliton trajectories have been illustrated numerically in Figs. 6 and 7. Moreover, it is worthy to further study the relationship between the smooth positon solutions and the multi-pole solutions for other physically relevant nonlinear evolution equations.
|
. OBJECTIVE This study aimed to optimize the preparation of carboxymethyl chitosan/sodium alginate (CMCS/OSA) compound hydrogels. This study also aimed to investigate the applicability of the hydrogels in cartilage tissue engi-neering. METHODS Three groups of CMCS/OSA composite hydrogels with amino-to-aldehyde ratios of 2∶1, 1∶1 and 1∶2 were prepared. The microstructure, physical properties, and cell biocompatibility of the three groups of CMCS/OSA com-posite hydrogels were evaluated. Samples were subjected to scanning electron microscopy, rheological test, adhesion tension test, swelling rate test, and cell experiments to identify the CMCS/OSA composite hydrogel with the cross-linking degree that can meet the requirements for scaffolds in cartilage tissue engineering. RESULTS The experimental results showed that the CMCS/OSA hydrogel with a amine-to-aldhyde ratio of 1∶1 had good porosity, suitable gelling time, strong adhesive force, stable swelling rate, and good cellular biocompatibility. CONCLUSIONS The CMCS/OSA compound hydrogel prepared with a 1∶1 ratio of amino and aldehyde groups has potential applications in cartilage tissue engineering.
|
// Copyright 2022 PyMatching Contributors
//
// 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.
#include "pymatching/sparse_blossom/driver/namespaced_main.h"
#include "gtest/gtest.h"
struct RaiiTempNamedFile {
int descriptor;
std::string path;
RaiiTempNamedFile();
~RaiiTempNamedFile();
};
RaiiTempNamedFile::RaiiTempNamedFile() {
char tmp_stdin_filename[] = "/tmp/stim_test_named_file_XXXXXX";
descriptor = mkstemp(tmp_stdin_filename);
if (descriptor == -1) {
throw std::runtime_error("Failed to create temporary file.");
}
path = tmp_stdin_filename;
}
RaiiTempNamedFile::~RaiiTempNamedFile() {
if (!path.empty()) {
remove(path.data());
path = "";
}
}
std::string result_of_running_main(const std::vector<std::string> args, const std::string &input) {
std::vector<const char *> argv;
argv.push_back("TEST_PROCESS");
for (const auto &a : args) {
argv.push_back(a.c_str());
}
RaiiTempNamedFile inp;
RaiiTempNamedFile out;
argv.push_back("--in");
argv.push_back(inp.path.c_str());
argv.push_back("--out");
argv.push_back(out.path.c_str());
FILE *f = fopen(inp.path.c_str(), "w");
if (f == nullptr || fwrite(input.data(), 1, input.size(), f) != input.size()) {
throw std::invalid_argument("Failed to write input.");
}
fclose(f);
if (pm::main((int)argv.size(), argv.data()) != EXIT_SUCCESS) {
throw std::invalid_argument("Returned not EXIT_SUCCESS");
}
f = fopen(out.path.c_str(), "r");
if (f == nullptr) {
throw std::invalid_argument("Failed to read output.");
}
std::string s;
while (true) {
int i = getc(f);
if (i == EOF) {
break;
}
s.push_back((char)i);
}
return s;
}
TEST(Main, predict) {
RaiiTempNamedFile dem;
FILE *f = fopen(dem.path.c_str(), "w");
fprintf(f, "%s", R"DEM(
error(0.1) D0 L0
error(0.1) D0 D1 L1
error(0.1) D1 L2
)DEM");
fclose(f);
auto stdout = result_of_running_main(
{"predict", "--dem", dem.path, "--in_format", "dets", "--out_format", "dets"},
R"stdin(shot
shot D0
shot D1
shot D0 D1)stdin");
ASSERT_EQ(stdout, R"stdout(shot
shot L0
shot L2
shot L1
)stdout");
}
TEST(Main, count_mistakes) {
RaiiTempNamedFile dem;
FILE *f = fopen(dem.path.c_str(), "w");
fprintf(f, "%s", R"DEM(
error(0.1) D0 L0
error(0.1) D0 D1 L1
error(0.1) D1 L2
)DEM");
fclose(f);
auto stdout_text = result_of_running_main(
{
"count_mistakes",
"--dem",
dem.path,
"--in_format",
"dets",
"--in_includes_appended_observables",
},
R"stdin(shot L0
shot D0 L0
shot D1 L2
shot D0 D1 L1)stdin");
ASSERT_EQ(stdout_text, "1 / 4\n");
}
|
<filename>src/genres/dto/index.ts
export { CreateGenreDto } from './create-genre.dto';
export { UpdateGenreDto } from './update-genre.dto';
|
Serial carotid MRI identifies rupture of a vulnerable plaque resulting in amaurosis fugax A 66-year-old man with cryptogenic ischemic stroke and multiple acute ischemic lesions in the right middle cerebral artery territory was enrolled in the CAPIAS trial (Carotid Plaque Imaging in Acute Stroke; NCT01284933). Baseline carotid MRI demonstrated a right-sided nonstenotic American Heart Association type-VI plaque with a large lipid/necrotic core and intraplaque hemorrhage (figure 1). Eleven months later, the patient presented again after an episode of right eye amaurosis fugax. Repeat carotid MRI revealed a new ulceration on the right side with large parts of the former lipid/necrotic core missing (figure 2). We hypothesize that plaque rupture had caused embolization into the right retinal artery.
|
Content validity and usefulness of Picture My Participation for measuring participation in children with and without intellectual disability in South Africa and Sweden Abstract Background: Participation comprises attendance and involvement in everyday situations. Picture My Participation (PmP) is an instrument intended to measure participation in children with disabilities, particularly in low and middle income countries. Aim: To investigate content validity and usefulness of PmP for measuring participation in children with intellectual disability (ID) in South Africa and Sweden. Methods: A picture supported interview with 149 children, 618 years, with and without ID. Twenty everyday activities were provided. The three most important activities were selected by the child. Attendance was rated on all activities. Involvement was rated on the most important. Results: All activities were selected as important by at least one child with ID in both countries. There were similarities in perceived importance between the children with and without ID from South Africa. The children from South Africa with ID were the only subgroup that used all scale points for rating attendance and involvement. Conclusion: The 20 selected activities of PmP were especially relevant for children with ID in South Africa. The usefulness of the scales was higher for the children with ID in both countries. PmP is promising for assessing participation across different settings but psychometrical properties and clinical utility need further exploration.
|
Complementary and Alternative Medicine: Ethics, the Patient, and the Physician F irst do no harm is the basis of bioethics. Embodied in this quote are the four principles of physicians obligations in patient care: beneficence, nonmaleficence, respect for patient autonomy, and justice. With the growing surge of people using complementary and alternative medicine (CAM), this book is a welcome treat, informative and quite refreshing to physiciansincluding those like me, who currently incorporate CAM in practice. The book is divided into seven chapters written by physicians, attorneys, scholars, and a medical student with general exposure to CAM. The first chapter is an overview of CAM and ethics. After defining CAM, it discusses the different approaches of CAM and conventional medicine and how the two are affecting each other. Chapter 2 sheds light on the rich history of CAM. Mentioned in the chapter are the reasons for the staggering usage of CAM, seemingly without regard for the out-of-pocket costs. The different types of CAM healing are addressed in depth. This chapter also discusses the positive aspects of CAMs holistic approach, with focus on health promotion and disease prevention, compared with the disease focus of conventional medicine. While author Richard J. Carroll gives examples of some negatives of CAMaddressing claims that it is unsafe, unproven, worthless, or verges on quackeryhe counters with comment on the flaws of conventional medicine. He summarizes with a quote from Fontarosa and Lundberg: We must focus on fundamental issuesmainly, the target disease or condition, the proposed treatment and need for convincing data on safety and therapeutic efficacy. Only then can we blend the best that both conventional medicine and CAM have to offer. The third chapter delves more into ethics. Wayne Vaught begins with the example of a pregnant woman who wants a doula with her during labor and delivery. Her obstetrician belittles her request and ruins her expectations for her birth experience. He discusses the application of ethics in conventional medicine, the role of culture and spirituality in CAM, and why physicians need to learn about CAM. Chapter 4, Advising Patients and Communicating About Complementary and Alternative Medicine, clearly illustrates the interconnectivity between the patient, conventional medicine, and CAM. Authors Arti Prasad and Mariebeth B. Velasquez state that the patient can best be served by integrating the two, as neither conventional medicine nor CAM has all the answers. As a CAM advocate, I agree with the authors comment that we can be more sensitive and learn from our patientssomething that we may forget at times. The fifth chapter deals with patient and medical education on CAM. The amount of information available can be overwhelming, particularly with the Internet; some sources reinforce misconceptions and inaccuracies. I was glad to see pharmacists mentioned as a resource; they should know about herbals and supplements and their interaction with drugs. The history of integrating CAM into medical education is compelling. In the mid-1990s, only 46 of the 125 medical schools included CAM topics in the curriculum. By 2004, the count was up to 84, including spirituality in medicine. Chapter 5 includes 10 pages of helpful resource information. I totally agree with the author, Catherine Leffler, that we have the obligation to give patients the information on safety, efficiency, risks, and benefits of the therapies and a referral to a reputable CAM practitioner as necessary. In chapter 6, Michael H. Cohen addresses legal and risk management issues related to CAM, including information on licensure, credentialing, and scope of practice as regulated by each state. I found the malpractice section very interesting. The CAM profession has its own standard of care. If overlap with conventional medicine occursfor example, if a chiropractor takes and interprets x-raysthen medical standards may be applied. The Federation of State Medical Boards recently issued Model Guidelines for the Use of Complementary and Alternative Therapies in Medical Practice. A reprint is included at the end of the chapter. As explained in chapter 6, treatments like herbals and supplements are not regulated by the Food and Drug Administration but rather by the Dietary Supplement Health and Education Act. These items are considered food and not drugs and can be sold without proof of safety or efficacy. As such, people take them, equating natural with safe, and face possible serious interactions with prescription drugs. A recent survey by the AARP and the National Center for Complementary and Alternative Medicine at the National Institutes of Health showed that 69% of patients using CAM therapies did not discuss their use with their physicians; 42% said the physician never asked, 30% said they did not know they needed to share this information, and 19% said they had insufficient time during office visits. As far as third-party reimbursement, insurance companies deny payment for CAM on the basis of the lack of evidence for its safety, efficacy, and cost-effectiveness. But some insurers offer discounted access to CAM networks. Health fraud is well discussed in this chapter. In addition, the section of chapter 6 dealing with informed consent is very informative. For example, when a patient for whom surgery is recommended Book Reviews
|
/**
* This creates a copy of the string to make it compatible with C. The better way would be to
* pass the string to this function with a null terminal at the correct position. Not sure how
* to do that in fortran
*/
void f_kameleon_load_vector_variable_(int *id, const char * variable)
{
std::string variable_str = variable;
int length = variable_str.size();
char variable_corrected[length+1];
strcpy(variable_corrected, variable_str.c_str());
for (int i = 0; i< length; i++)
{
if (variable_corrected[i] == ' ')
{
variable_corrected[i] = '\0';
break;
}
}
Kameleon_load_vector_variable(*id, variable_corrected);
}
|
A neuropsychological study of personality: Trait openness in relation to intelligence, fluency, and executive functioning Openness is a personality trait that has been linked to intelligence and divergent thinking. DeYoung, Peterson, and Higgins theorized that trait Openness depends on dopamine function, especially in the prefrontal cortex. We tested their theory in 335 healthy adults by hypothesizing that individual differences in Openness would correlate more strongly with performance on tests of executive function than on tests of intelligence and fluency. However, Openness correlated more strongly with verbal/crystallized intelligence (Gc; r =.44) than with executive functioning (r =.16) and fluency (r =.24). Further, the partial correlation between Openness and Gc increased from r =.26 among young adults to r =.53 among elderly adults. These findings suggest that Openness is more closely associated with the acquisition of broad verbal intellectual skills and knowledge than with executive abilities localized to a specific brain region or neurotransmitter system.
|
Weirdest Tradition in Each State - 24/7 Wall St.
Each U.S. state has its own history, a history that helped create and mold the state’s culture. Whether it is because of past events or influential people, each state also has traditions particular to that state.
Because they are so singular, these traditions may seem quirky, even peculiar, to outsiders. Regardless, states hold fast to these customs, even if they might seem odd — especially if there is a profit to be made.
24/7 Wall St. decided to take a look at these unique traditions by tracking down the weirdest in each state.
Click here to see the weirdest tradition in each state.
Some of these traditions revolve around holidays such as New Year’s Eve, Christmas, and the Fourth of July. Many towns in these states have put their own spin on these traditional celebrations.
To ring in the new year, folks in Idaho drop a gigantic potato. Traditional Christmas ornaments aren’t enough in Mississippi, where people embellish their holiday displays with decorations bearing a oceanic theme. In California, the Fourth of July is celebrated with a marshmallow fight in Ogden Beach.
Not surprisingly, some of these offbeat traditions involve food. West Virginia hosts a cook-off for roadkill. In Minnesota, folks hold a meat raffle.
Some of these traditions include races in which animals — not dogs or horses — compete against each other. Arizona plays host to ostrich racing. In Maryland, visitors can root for their favorite crustacean in the National Hard Crab Derby.
Though some places may balk at characterizing a particular custom as weird, many cities — perhaps taking a cue from our British cousins who embrace quirky customs and traditions — enjoy their offbeat description. For example, the cities of Portland, Oregon; Asheville, North Carolina; and Austin, Texas, have used the slogan of keeping their city weird on public buildings, signs, and bumper stickers as a way to boost tourism and commerce. Leave it to Americans to monetize weirdness.
24/7 Wall St. reviewed media sources, state and city websites, and cultural resources to determine a list of the weirdest tradition in each state. We looked at each tradition to assess its uniqueness in regard to the state as well as how unusual the tradition or custom is. Obviously, the peculiarity of a tradition is in the eye of the beholder. What is weird to one person is special to another.
|
/**
* wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature
* @wiphy: Pointer to wiphy
* @config: pointer to config
*
* This function is used to indicate the support of SAE
*
* Return: None
*/
static
void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
hdd_config_t *config)
{
if (config->is_sae_enabled)
wiphy->features |= NL80211_FEATURE_SAE;
}
|
<filename>src/main/java/com/pulawskk/bettingsite/models/BetSlipDto.java
package com.pulawskk.bettingsite.models;
import com.pulawskk.bettingsite.enums.BetSlipType;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.math.BigDecimal;
import java.util.List;
@Setter
@Getter
@NoArgsConstructor
public class BetSlipDto {
private List<Selection> selections;
private BigDecimal stake;
private List<BetSlipType> betSlipTypeList;
@Builder
public BetSlipDto(List<Selection> selections, BigDecimal stake, List<BetSlipType> betSlipTypeList) {
this.selections = selections;
this.stake = stake;
this.betSlipTypeList = betSlipTypeList;
}
}
|
Of Sports, Identity, and the Cultural Context: The Failed Attempts to Create a Baseball Culture in Pre-State and Early Israel, 19271960 ABSTRACT:This paper aims to offer the first account of the initial, hesitant (yet persistent) efforts to import baseball and its culture into Eretz Israel, from 1927 until the first decade of statehood; the (implicit or explicit) cultural and ideological background behind these efforts; and the various practical, cultural, political, and ideological reasons why the entire endeavor ultimately remained a marginal episode that failed to leave a significant mark on the local cultural landscape. The paper is based on close reading of the memoirs of some of the figures involved in these events, as well as on contemporary press reports and several archival and scholarly sources.
|
Aatos Erkko
Aatos Juho Michel Erkko (16 September 1932 – 5 May 2012) was a Finnish newspaper editor, newspaper publisher, and the main owner of the Sanoma Corporation and the newspaper Helsingin Sanomat, of which he was also the editor in chief.
He was for many years the wealthiest person in Finland and directly or indirectly controlled 23.29% of the Sanoma Corporation's shares, whose value on 29 July 2009 was more than €453 million.
Family
Aatos Erkko was born in Helsinki. He married Jane Airola in 1959, but they did not have any children.
His father was the politician and journalist Eljas Erkko, who preceded him as editor in chief of Helsingin Sanomat, and his mother was the English-born Eugenia Violet Sutcliffe. Erkko's grandfather Eero Erkko was also a journalist and politician, best remembered as the founder of Helsingin Sanomat.
Education
Erkko earned a Master of Science degree in Journalism from the Columbia College of Columbia University.
Sanoma
Sanoma made its initial public offering in 1999, during Aatos Erkko's time as chairman of the board. Reporting news from around the world became increasingly important. Erkko founded Sanoma's own school for journalists in 1967, and Sanoma has foreign correspondents in many countries.
Wealth
Aatos Erkko was the largest single owner of Finland's largest media concern, holding just over 23% of the Sanoma stock. As one of the key part of Sanoma, Helsingin Sanomat is the largest newspaper by circulation in the entire Nordic region. The value of his assets were in 2012 estimated as of €600 million. Ca €300 million is in international securities managed by an investment company registered in Switzerland.
Donations
Aatos Erkko once donated €2.9 million to the University of Helsinki for the establishment of a professorship.
He also donated expensive equipment to the Helsinki University Central Hospital and gave significant financial support to the Nuuksio National Park.
Finnish Nature Centre Haltia
The Finnish Nature Centre Haltia in the Nuuksio National Park received a donation of one million euros from the Jane and Aatos Erkko Foundation for the incorporation of ecological features into the centre’s design. Innovative ways to exploit solar energy and thermal energy from the ground will make the centre 75% self-sufficient in terms of heating, and its cooling system will be 100% self-sufficient. The centre is due to be completed by January 2013. It will present the best of Finland’s natural features and biodiversity and enable people living in or visiting the Helsinki area to get perspectives on the natural wonders of the whole country.
Medicine
The Jane and Aatos Erkko Foundation donated €415,000 for child disease diagnostics in 2011.
|
The top political news on Friday was the unexpected resignation of Trump campaign chairman, Paul Manafort, which was the result of emerging revelations that his political consulting firm, DMP International, had orchestrated a covert Washington lobbying operation in the period 2012-2014 on behalf of Ukraine's then ruling political party, attempting to sway American public opinion in favor of the country's pro-Russian government (which was overthrown in a CIA-orchestrated coup in early 2014).
As the AP reported yesterday, the lobbying included attempts to gain positive press coverage of Ukrainian officials in The New York Times, The Wall Street Journal and The Associated Press. Another goal: undercutting American public sympathy for the imprisoned rival of Ukraine's then-president. At the time, European and American leaders were pressuring Ukraine to free her. Furthermore, under the U.S. Foreign Agents Registration Act (or FARA), US entities who lobby on behalf of foreign political leaders or political parties must provide detailed reports about their actions to the Justice Department.
The 1938 U.S. foreign agents law is intended to track efforts of foreign government's unofficial operatives in the United States. A violation is a felony and can result in up to five years in prison and a fine of up to $250,000.
The issue is that neither Paul Manafort, nor his deputy, Rick Gates, disclosed their work as foreign agents as required under federal law. "There is no question that Gates and Manafort should have registered along with the lobbying firms," said Joseph Sandler of Sandler Reiff Lamb Rosenstein & Birkenstock, a Democratic-leaning Washington law firm that advises Republican and Democratic lobbyists.
Now if this was the extent of the violations, it would be an open and shut case of potential non-disclosure of lobbying on behalf of a foreign (soon to be overthrown) government, one which could result in felony charges and potential prison time for employees of DMP International, up to and including Manafort. Which is why it is clear why Trump had to quickly get rid of Manafort as his ongoing presence was a major risk factor overhanging the entire Trump campaign, one which could even lead to incarceration and ongoing accusations of pro-Russian influence.
It also explains why as CNN reported yesterday, the FBI and DOJ prosecutors have started a probe into possible US ties to alleged corruption of the former pro-Russian president of Ukraine, including the work of Paul Manafort's firm, according to multiple US law enforcement officials. "The investigation is broad and is looking into whether US companies and the financial system were used to aid alleged corruption by the party of former president Viktor Yanukovych."
* * *
However, where things get trickier is that in addition to Manafort and his deputy Rick Gates, other, far more prominent firms are also implicated, chief among them the Podesta Group, headed by Tony Podesta - the brother of Hillary Clinton campaign chairman John Podesta.
Tony Podesta, the Podesta Group
As reported yesterday, emails obtained by the Associated Press showed that Gates personally directed two Washington lobbying firms, Mercury LLC and the Podesta Group, between 2012 and 2014 to set up meetings between a top Ukrainian official and senators and congressmen on influential committees involving Ukrainian interests. Gates noted in the emails that the official, Ukraine's foreign minister, did not want to use his own embassy in the United States to help coordinate the visits.
The emails further illustrate how Gates worked with Mercury and the Podesta Group on behalf of Ukrainian political leaders. None of the firms, nor Manafort or Gates, disclosed their work to the Justice Department counterespionage division responsible for tracking the lobbying of foreign governments.
And this is where the plot thickens, because while the bulk of the press has so far spun the entire Ukraine lobbying scandal, which led to Manafort's resignation, as the latest "proof" that pro-Moscow powers were influencing not only Manafort but the Trump campaign in general (who some democrats have even painted of being a Putin agent), the reality is that a firm closely tied with the Democratic party, the Podesta Group, is just as implicated.
As AP further adds, the European Center for a Modern Ukraine, a Brussels-linked nonprofit entity which allegely ran the lobbying project, paid Mercury and the Podesta Group a combined $2.2 million over roughly two years. In papers filed in the U.S. Senate, Mercury and the Podesta Group listed the European nonprofit as an independent, nonpolitical client. The firms said the center stated in writing that it was not aligned with any foreign political entity.
Sure enough, the chairman of the Podesta Group, Tony Podesta, brother of Clinton campaign chairman John Podesta, repeated the excuse and said his firm believed Gates was working for the nonprofit. Podesta said he was unaware of the firm's work for the Ukraine's Party of Regions, led by Yanukovych. On Thursday, his firm said it had nothing new to add. As BuzzFeed added yesterday, Podesta Group CEO Kimberly Fritts also said in a statement on Thursday that “we were not aware that Rick Gates was a Party of Regions consultant at the time he introduced us to the Centre. We believed he was working for the Centre, as we were hired to do.”
Now political consultants are generally leery of registering under the FARA, and disclosing foreign government clients, because their reputations tends to suffer once they are on record as accepting money to advocate the interests of foreign governments - especially if those interests conflict with America's. Moreover, registering under the law would have required Gates, Manafort or the lobbying firms to disclose the specifics of their lobbying work and their efforts to sway public opinion through media outreach.
However, now that the FBI is involved, Podesta Group has quickly lawyered up and as a statement by CEO Fritts reveals, the firm has hired an outside legal counsel in anticipatory defense for what may be a significant legal battle for the pro-democratic think tank:
“The firm has retained Caplin & Drysdale as independent, outside legal counsel to determine if we were misled by the Centre for a Modern Ukraine or any other individuals with regard to the Centre’s potential ties to foreign governments or political parties. When the Centre became a client, it certified in writing that ‘none of the activities of the Centre are directly or indirectly supervised, directed, controlled, financed or subsidized in whole or in part by a government of a foreign country or a foreign political party.’ We relied on that certification and advice from counsel in registering and reporting under the Lobbying Disclosure Act rather than the Foreign Agents Registration Act. We will take whatever measures are necessary to address this situation based on Caplin & Drysdale’s review, including possible legal action against the Centre.”
A quick primer on Tony Podesta: born 1943, he is an American lobbyist best known for founding the Podesta Group. Podesta has lobbied for a variety of groups, including Bank of America, BP, and Egypt in addition to political campaigns such as Ted Kennedy, George McGovern, Michael Dukakis, and Bill Clinton. More recently, he has worked for Pennsylvania Democratic representatives Joe Sestak, Chris Carney, and Patrick Murphy, and chaired former Pennsylvania Gov. Ed Rendell's reelection campaign. He is closely connected with the Barack Obama White House and has repeatedly been named one of Washington's most powerful lobbyists and fundraisers.
An interesting tangent on the power of the Podesta Group was revealed back in 2009 in a brief US News expose:
When the White House proved true to its promise of full disclosure by releasing a list of recent West Wing visitors, the headlines went to the big donors like George Soros, the big movie stars like George Clooney, and the mega-union bosses like Andy Stern of the Service Employees International Union. But to insiders, the list showed something else: The power of the Podesta family. Between them, Obama adviser and former Clinton Chief of Staff John Podesta; his brother, lobbyist Tony Podesta; and Tony's lobbying wife Heather made 25 visits. By comparison, House Speaker Nancy Pelosi made one visit. For John Podesta, the rise as one of Washington's influentials is richly deserved. He runs the Center for American Progress, which has become a very influential policy shop for the Democrats. He also was Obama's transition chief. According to the White House list, he met with the president twice and Chief of Staff Rahm Emanuel three times. As for the Podesta lobbying husband-and-wife team, their legendary influence has now been stamped with the White House seal of approval.
The Democratic White House's seal of approval that is. Some other examples of Podesta Group clients lientele over the years according to Open Secrets: BAE Systems, BP, Credit Suisse Group, Financial Industry Regulatory Authority, General Electric, KKR & Co, Lockheed Martin, Monsanto Co, Wal-Mart Stores and Wells Fargo. Of course, this is just a small fraction and you can examine the entire list here.
Where things get even trickier is when looking at recent disclosures of who we know the Podesta Group has received substantial cash from. Namely Saudi Arabia. Recall from an April 2016 article in The Hill, discussing the fallout from the disclosure of Saudi ties in the Sept 11 terrorist attack, which as reported previously, was initially heavily frowned upon by the Saudis:
Five of the firms work for the Saudi Arabia Embassy, while another two — Podesta Group and BGR Group — have registered to represent the Center for Studies and Media Affairs at the Saudi Royal Court, an arm of the government. * * * The dispute is causing a diplomatic storm for the Obama administration; Saudi Arabia has long been an ally of the U.S. despite the country’s history of abusing human rights. The country has some top-flight representation in Washington — at a hefty price tag. The Podesta Group is billing Saudi Arabia $140,000 a month for its public relations services. During the last few months of 2015, it sent 27 emails, had two phone calls and one meeting with lawmakers and staffers, journalists, and organizations including Human Rights Watch and the Center for American Progress, disclosure forms show.
Most recently, however, the Podesta Group made a curious appearance in early June, when the website Middle-East Eye caught a shocking statement by the Jordan News Agency (Petra), revealed that the Saudi Deputy Crown Prince Mohammed bin Salman made various traditionally diplomatic statements about the US ahead of his visit to the US, which also included the stunning claim that Riyadh has provided 20% of the total funding to the prospective Democratic candidate's campaign, something which is considered illegal. This is what bin Salman was quoted as saying:
"Saudi Arabia always has sponsored both Republican and Democratic Party of America and in America current election also provide with full enthusiasm 20 percent of the cost of Hillary Clinton’s election even though some events in the country don’t have a positive look to support the king of a woman (sic) for presidency."
Below is a screenshot of the English report published, and which then was quickly deleted, by the Petra News Agency
However, according to an update by MEE just the next day, a spokesperson for the Podesta Group contacted MEE to say that they work with the Saudi Royal Court and to request a correction to the earlier story that said the Jordanian news agency had deleted the quotes from Prince Mohammed.
Senior global communications specialist Will Bohlen - who, prior to joining Podesta, was chief researcher for a best-selling history of Bill Clinton's presidency - sent a link to a clarification issued by the Petra News Agency which said it was "totally false and untrue" that they had published then deleted the quotes from Prince Mohammed about funding the Clinton campaign. "A technical failure on Petra ’s website occurred for a few minutes on Sunday evening, 12 June 2016," the Jordanian news agency said. "Protection systems at the agency as well as the technical department noticed that and therefore, they suspended the transmission system and the electronic site and moved to the alternative website. "Later, it became clear that the technical failure that occurred was an attempt to hack the agency’s transmission system and its website. The agency was surprised to see some media outlets as well as the social media publishing false news that were attributed to Petra. They said that Petra transmitted a news item related to the deputy crown prince of Saudi Arabia and later deleted this news item. This is totally false and untrue."
As we said at the time, "one can see why Podesta would be worried: it is illegal in the United States for foreign countries to try and influence the outcome of elections by funding candidates. Naturally, Bohlen said he could confirm that Saudi Arabia has provided no funding to Hillary Clinton's presidential campaign. The question is now that the cat is out of the bag, can others?"
For the record, we find the story that someone would hack the Jordanian News Agency to insert a boring interview with a Saudi crown prince, hard to believe and if anything, the involvement of the Podesta Group dramatically increases the odds that what the Saudi prince revealed may have been the unvarnished truth.
We concluded by saying that "we leave it up to readers to decide how credible the Podesta-inspired explanation by Petra is that someone would hack the Jordanian news agency just to insert an interview with the Saudi deputy crown prince, which said nothing inflamatory, or defamatory, but merely made reference to just how much money the Saudis had spent on getting Hillary elected. In many other nations, merely these revelations should have been sufficient for the mainstream media to probe and inquire further to find out just how much of the Podesta statement is a lie, how deep are the inherent, and allegedly illegal, conflicts of interest if indeed Saudi Arabia has been funding a potential future US president, both directly and indirectly, and how much money the Saudis have spent on Hillary's presidential campaign: an easy check by the authorities who monitor every wire transfer out of the Kingdom and its agents."
* * *
For now, the Clinton campaign has avoided any outside focus whether the Saudis have indeed ilegally funded it by millions of dollars, meaning the Podesta Group has done its job. However, the ironic twist is that with Manafort having become the fall guy for the Ukraine lobbying and corruption scandal, the very Podesta Group which is the stalwart defender of Hillary's presidential campaign, run incidentally by the brother of the firm's founder, is now being investigated in a totally separate matter.
Alas, if the recent interaction between the FBI and Hillary Clinton is any indication, we doubt much more will be revealed, and this latest scandal will quickly quiet down, even if it appears that Democrats were as involved in Ukraine illegal lobbying as Paul Manafort himself.
Finally, we wonder if now that the media is so clearly focused on Ukrainian money flows into the US, if it will just as ardently pursue a story first reported last March by the WSJ which revealed that the Clinton Foundation had received millions of dollars from a Ukrainian oligarch who between 2009 and 2013 had been pushing for closer ties to the European Union:
Between 2009 and 2013, including when Mrs. Clinton was secretary of state, the Clinton Foundation received at least $8.6 million from the Victor Pinchuk Foundation, according to that foundation, which is based in Kiev, Ukraine. It was created by Mr. Pinchuk, whose fortune stems from a pipe-making company. He served two terms as an elected member of the Ukrainian Parliament and is a proponent of closer ties between Ukraine and the European Union. In 2008, Mr. Pinchuk made a five-year, $29 million commitment to the Clinton Global Initiative, a wing of the foundation that coordinates charitable projects and funding for them but doesn’t handle the money. The pledge was to fund a program to train future Ukrainian leaders and professionals “to modernize Ukraine,” according to the Clinton Foundation. Several alumni are current members of the Ukrainian Parliament. Actual donations so far amount to only $1.8 million, a Pinchuk foundation spokesman said, citing the impact of the 2008 financial crisis. The Pinchuk foundation said its donations were intended to help to make Ukraine “a successful, free, modern country based on European values.” It said that if Mr. Pinchuk was lobbying the State Department about Ukraine, “this cannot be seen as anything but a good thing.”
In 2014, the well-funded wishes of the Pinchuk Foundation were ultimately realized when Ukraine, with the help of the US State Department (recall from February 2014: ""F**k The EU" - US State Department Blasts Europe; Revealed As Alleged Mastermind Behind Ukraine Unrest"), underwent a violent presidential coup, which led to the exile of then-president Viktor Yanukovich, a far "closer" relationship between Ukraine and Europe, the appointment of Joe Biden's son, Hunter, on the board of Ukraine energy giant Burisma Holdings, and the ongoing conflict between Ukraine and Russia.
Alas, we doubt that anyone in the media will pursue allegations that a Ukraine billionaire was funding the Clinton Campaign - with a very specific goal in mind - with the same effort as it did to show how Paul Manafort had been in bed with Pinchuk's number one opponent.
|
<reponame>Bhaskers-Blu-Org2/ctsTraffic
/*
Copyright (c) Microsoft Corporation
All rights reserved.
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
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.
*/
#pragma once
// cpp headers
#include <array>
#include <memory>
// os headers
#include <windows.h>
// ctl headers
#include <ctSockaddr.hpp>
#include <ctThreadIocp.hpp>
namespace ctsTraffic
{
class ctsMediaStreamServerListeningSocket
{
private:
static const size_t RecvBufferSize = 1024;
std::shared_ptr<ctl::ctThreadIocp> threadIocp;
mutable wil::critical_section listeningsocketLock;
_Requires_lock_held_(listeningsocket_lock) wil::unique_socket listeningSocket;
const ctl::ctSockaddr listeningAddr;
std::array<char, RecvBufferSize> recv_buffer{};
DWORD recvFlags{};
ctl::ctSockaddr remoteAddr;
int remoteAddrLen{};
bool priorFailureWasConectionReset = false;
void recv_completion(OVERLAPPED* _ov) noexcept;
public:
ctsMediaStreamServerListeningSocket(
wil::unique_socket&& _listening_socket,
ctl::ctSockaddr _listening_addr);
~ctsMediaStreamServerListeningSocket() noexcept;
SOCKET get_socket() const noexcept;
ctl::ctSockaddr get_address() const noexcept;
void initiate_recv() noexcept;
// non-copyable
ctsMediaStreamServerListeningSocket(const ctsMediaStreamServerListeningSocket&) = delete;
ctsMediaStreamServerListeningSocket& operator=(const ctsMediaStreamServerListeningSocket&) = delete;
ctsMediaStreamServerListeningSocket(ctsMediaStreamServerListeningSocket&&) = delete;
ctsMediaStreamServerListeningSocket& operator=(ctsMediaStreamServerListeningSocket&&) = delete;
};
}
|
I’m the commissary/inmate account/phones administrator for my county jail. I’m looking for ideas to streamline my process, and I’m also looking for any ideas for maybe some new technology to implement that would help not only myself, but the other officers in my facility.
Just seeing what others in my position have done that they found helped and improved productivity.
|
Tamoxifen may increase the risk of later tumours being more aggressive If a woman who takes tamoxifen for breast cancer develops a cancer in her other previously healthy breast, the risk is higher that it will be of a more dangerous type than a contralateral cancer in a woman who has never taken the drug. Researchers collected data on 8981 women with primary unilateral breast cancer aged at least 50 who had received adjunctive hormonal therapy but not chemotherapy (tamoxifen users) or had received neither hormonal therapy nor chemotherapy (tamoxifen non-users) ( Journal of the National Cancer Institute 2001;93:1008-12). The researchers identified contralateral breast cancers in 89
|
Accelerating the Race to Autonomous Cars Every automaker is working on driver assistance systems and self-driving cars. Conventional computer vision used for ADAS is reaching its threshold because it is impossible to write code for every possible scenario as a vehicle navigates. In order to develop a truly autonomous car, deep learning and artificial intelligence are required. With deep learning, the vehicle can be trained to have super human levels of perception, driving safer than anyone on the road. An end-to-end artificial intelligence platform based on supercomputers in the cloud and in the vehicle enables cars to get smarter and smarter. Coupled with an extensive software development kit with vision and AI libraries and software modules, automakers, tier 1s, and startups can build scalable systems from ADAS to full autonomy.
|
package cn.bushadie.framework.shiro.session;
import java.io.Serializable;
import java.util.Date;
import cn.bushadie.project.monitor.online.domain.OnlineSession;
import cn.bushadie.project.monitor.online.domain.UserOnline;
import cn.bushadie.project.monitor.online.service.IUserOnlineService;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import cn.bushadie.framework.manager.AsyncManager;
import cn.bushadie.framework.manager.factory.AsyncFactory;
/**
* 针对自定义的ShiroSession的db操作
*
* @author ruoyi
*/
public class OnlineSessionDAO extends EnterpriseCacheSessionDAO {
/**
* 同步session到数据库的周期 单位为毫秒(默认1分钟)
*/
@Value("${shiro.session.dbSyncPeriod}")
private int dbSyncPeriod;
/**
* 上次同步数据库的时间戳
*/
private static final String LAST_SYNC_DB_TIMESTAMP=OnlineSessionDAO.class.getName()+"LAST_SYNC_DB_TIMESTAMP" ;
@Autowired
private IUserOnlineService onlineService;
@Autowired
private OnlineSessionFactory onlineSessionFactory;
public OnlineSessionDAO() {
super();
}
public OnlineSessionDAO(long expireTime) {
super();
}
/**
* 根据会话ID获取会话
*
* @param sessionId 会话ID
* @return ShiroSession
*/
@Override
protected Session doReadSession(Serializable sessionId) {
UserOnline userOnline=onlineService.selectOnlineById(String.valueOf(sessionId));
if(userOnline==null) {
return null;
}
return onlineSessionFactory.createSession(userOnline);
}
/**
* 更新会话;如更新会话最后访问时间/停止会话/设置超时时间/设置移除属性等会调用
*/
public void syncToDb(OnlineSession onlineSession) {
Date lastSyncTimestamp=(Date)onlineSession.getAttribute(LAST_SYNC_DB_TIMESTAMP);
if(lastSyncTimestamp!=null) {
boolean needSync=true;
long deltaTime=onlineSession.getLastAccessTime().getTime()-lastSyncTimestamp.getTime();
if(deltaTime<dbSyncPeriod*60*1000) {
// 时间差不足 无需同步
needSync=false;
}
boolean isGuest=onlineSession.getUserId()==null||onlineSession.getUserId()==0L;
// session 数据变更了 同步
if(isGuest==false&&onlineSession.isAttributeChanged()) {
needSync=true;
}
if(needSync==false) {
return;
}
}
onlineSession.setAttribute(LAST_SYNC_DB_TIMESTAMP,onlineSession.getLastAccessTime());
// 更新完后 重置标识
if(onlineSession.isAttributeChanged()) {
onlineSession.resetAttributeChanged();
}
AsyncManager.me().execute(AsyncFactory.syncSessionToDb(onlineSession));
}
/**
* 当会话过期/停止(如用户退出时)属性等会调用
*/
@Override
protected void doDelete(Session session) {
OnlineSession onlineSession=(OnlineSession)session;
if(null==onlineSession) {
return;
}
onlineSession.setStatus(OnlineSession.OnlineStatus.off_line);
onlineService.deleteOnlineById(String.valueOf(onlineSession.getId()));
}
}
|
<gh_stars>0
/* bcast.c */
/* Custom Fortran interface file */
#include "mpiimpl.h"
#ifdef _CRAY
#include <fortran.h>
#include <stdarg.h>
#endif
#if defined(MPI_BUILD_PROFILING) || defined(HAVE_WEAK_SYMBOLS)
#if defined(HAVE_WEAK_SYMBOLS)
#if defined(HAVE_PRAGMA_WEAK)
#if defined(FORTRANCAPS)
#pragma weak MPI_BCAST = PMPI_BCAST
EXPORT_MPI_API void MPI_BCAST ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma weak mpi_bcast__ = pmpi_bcast__
EXPORT_MPI_API void mpi_bcast__ ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#elif !defined(FORTRANUNDERSCORE)
#pragma weak mpi_bcast = pmpi_bcast
EXPORT_MPI_API void mpi_bcast ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#else
#pragma weak mpi_bcast_ = pmpi_bcast_
EXPORT_MPI_API void mpi_bcast_ ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#endif
#elif defined(HAVE_ATTRIBUTE_WEAK)
#if defined(FORTRANCAPS)
EXPORT_MPI_API void MPI_BCAST ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint *, MPI_Fint * ) __attribute__ ((weak, alias ("PMPI_BCAST")));
#elif defined(FORTRANDOUBLEUNDERSCORE)
EXPORT_MPI_API void mpi_bcast__ ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint *, MPI_Fint * ) __attribute__ ((weak, alias ("pmpi_bcast__")));
#elif !defined(FORTRANUNDERSCORE)
EXPORT_MPI_API void mpi_bcast ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint *, MPI_Fint * ) __attribute__ ((weak, alias ("pmpi_bcast")));
#else
EXPORT_MPI_API void mpi_bcast_ ( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint *, MPI_Fint * ) __attribute__ ((weak, alias ("pmpi_bcast_")));
#endif
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#if defined(FORTRANCAPS)
#pragma _HP_SECONDARY_DEF PMPI_BCAST MPI_BCAST
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma _HP_SECONDARY_DEF pmpi_bcast__ mpi_bcast__
#elif !defined(FORTRANUNDERSCORE)
#pragma _HP_SECONDARY_DEF pmpi_bcast mpi_bcast
#else
#pragma _HP_SECONDARY_DEF pmpi_bcast_ mpi_bcast_
#endif
#elif defined(HAVE_PRAGMA_CRI_DUP)
#if defined(FORTRANCAPS)
#pragma _CRI duplicate MPI_BCAST as PMPI_BCAST
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma _CRI duplicate mpi_bcast__ as pmpi_bcast__
#elif !defined(FORTRANUNDERSCORE)
#pragma _CRI duplicate mpi_bcast as pmpi_bcast
#else
#pragma _CRI duplicate mpi_bcast_ as pmpi_bcast_
#endif
/* end of weak pragmas */
#endif
/* Include mapping from MPI->PMPI */
#include "mpiprof.h"
/* Insert the prototypes for the PMPI routines */
#undef __MPI_BINDINGS
#include "binding.h"
#endif
#ifdef FORTRANCAPS
#define mpi_bcast_ PMPI_BCAST
#elif defined(FORTRANDOUBLEUNDERSCORE)
#define mpi_bcast_ pmpi_bcast__
#elif !defined(FORTRANUNDERSCORE)
#define mpi_bcast_ pmpi_bcast
#else
#define mpi_bcast_ pmpi_bcast_
#endif
#else
#ifdef FORTRANCAPS
#define mpi_bcast_ MPI_BCAST
#elif defined(FORTRANDOUBLEUNDERSCORE)
#define mpi_bcast_ mpi_bcast__
#elif !defined(FORTRANUNDERSCORE)
#define mpi_bcast_ mpi_bcast
#endif
#endif
#ifdef _CRAY
#ifdef _TWO_WORD_FCD
#define NUMPARAMS 6
void mpi_bcast_ (void *unknown, ...)
{
void *buffer;
int *count;
MPI_Datatype *datatype;
int *root;
MPI_Comm * comm;
int *__ierr;
int buflen;
va_list ap;
va_start(ap, unknown);
buffer = unknown;
if (_numargs() == NUMPARAMS+1) {
buflen = va_arg(ap, int) /8; /* This is in bits. */
}
count = va_arg (ap, int *);
datatype = va_arg(ap, MPI_Datatype *);
root = va_arg(ap, int *);
comm = va_arg(ap, MPI_Comm *);
__ierr = va_arg(ap, int *);
*__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count,*datatype,*root,*comm );
}
#else
void mpi_bcast_ ( buffer, count, datatype, root, comm, __ierr )
void *buffer;
int*count;
MPI_Datatype * datatype;
int*root;
MPI_Comm * comm;
int *__ierr;
{
_fcd temp;
if (_isfcd(buffer)) {
temp = _fcdtocp(buffer);
buffer = (void *)temp;
}
*__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count,*datatype,*root,*comm);
}
#endif
#else
/* Prototype to suppress warnings about missing prototypes */
EXPORT_MPI_API void FORTRAN_API mpi_bcast_ ANSI_ARGS(( void *, MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint *, MPI_Fint * ));
EXPORT_MPI_API void FORTRAN_API mpi_bcast_ ( void *buffer, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *__ierr )
{
*__ierr = MPI_Bcast(MPIR_F_PTR(buffer), (int)*count,
MPI_Type_f2c(*datatype), (int)*root,
MPI_Comm_f2c(*comm));
}
#endif
|
number_of_pages = int(input())
pages_per_hour = int(input())
number_of_days = int(input())
time_per_book = number_of_pages // pages_per_hour
days = time_per_book / number_of_days
print(int(days))
|
In military of training, it is desirable that simulate battle scenarios be a realistic as possible. Often, simulated weapons are used in training exercises. The simulated weapons are designed to look, feel, and operate much like actual weapons, but for reasons of safety, economy, and data gathering, do not fire live ammunition. Rather, the sound, recoil effect, and other aspects of an actual weapon are simulated. Similar training may be used by law enforcement, private security, government agencies, and the like.
Besides simulating the mechanical aspects of an actual weapon, a simulated weapon may include electronic components that allow measurement of the user's performance. For example, a simulated weapon may include an infrared laser that projects a beam in the direction in which the simulated weapon is aimed whenever the simulated weapon is “fired”. Information may be coded into the beam, for example an identifier of the simulated weapon from which the beam emanated. The simulated weapon may also include a wireless communication interface that sends information to a central computer system, including an indication of each firing of the simulated weapon. Sensors at the targets can report when they receive “hits” from simulated fire, and may report the identity of the weapon that scored each hit.
Previous simulated weapons have not been able to simulate some features of actual weapons in a realistic manner. For example, some simulated weapons require a tether to a source of power for operating the weapon. A tethered weapon is unrealistic, and does not allow the user to move as he or she might in an actual combat situation. Furthermore, a tethered weapon may not be able to function without the control of an external computer system. In other cases, simulated weapons have simply omitted features of actual weapons that are difficult to simulate.
There is a need for more realistic simulation of actual weapons.
|
package com.zhangyao.springboot.mapper;
import com.zhangyao.springboot.domin.Databaseinfo;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.BaseMapper;
/**
* @author: zhangyao
* @create:2020-11-03 22:03
* @Description:
**/
@Repository
public interface DataBaseMapper extends BaseMapper<Databaseinfo> {
}
|
Q:
When should I include semi-core electrons in DFT calculations?
Many DFT codes use pseudopotentials (for the core electrons) and basis set functions (for the valence electrons) in order to solve the Schrodinger equation. This is due because simulate each electron wavefunction is very costly.
I found works where the authors generate the pseudopotentials dividing the core electrons in electrons from the inner core and electrons for the external core (called semi-core). These semi-core electrons were also considered as "valence" electrons.
A:
I am quoting from the book Materials Modelling Using Density Functional Theory: Properties and Predictions by Feliciano Giustino
How do we decide which wavefunctions should be considered ‘core’ and which ones ‘valence’ states? As a rule of thumb, in the context of DFT calculations the ‘valence’ corresponds to the outermost shell of the atom in the periodic table; for example, for tungsten we would have 6s25d4. However, there are cases where one might need to include more electronic states in the set of ‘valence electrons’. For example, in the case of bismuth it is important to describe on an equal footing both the nominal valence shell, 6s26p3 , and the ‘semi-core’ shell, 5d10. In practice the distinction between core and valence is not a strict one, and depends on the level of accuracy that one is trying to achieve. When in doubt, an inspection of the spatial extent of all the atomic wavefunctions represents the first point of call for identifying core and valence states.
|
package no.nav.familie.ks.sak.app.behandling.domene.grunnlag.barnehagebarn;
import no.nav.familie.ks.sak.app.behandling.domene.Behandling;
import no.nav.familie.ks.sak.app.behandling.domene.typer.BaseEntitet;
import javax.persistence.*;
@Entity
@Table(name = "GR_BARNEHAGE_BARN")
public class BarnehageBarnGrunnlag extends BaseEntitet {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "gr_barnehage_barn_seq")
@SequenceGenerator(name = "gr_barnehage_barn_seq")
private Long id;
@Column(name = "behandling_id", nullable = false, updatable = false)
private Long behandlingId;
@ManyToOne(cascade = CascadeType.PERSIST)
@JoinColumn(name = "OPPGITT_FAMILIEFORHOLD_ID")
private OppgittFamilieforhold familieforhold;
@Column(name = "aktiv", nullable = false)
private boolean aktiv = true;
BarnehageBarnGrunnlag() {
}
public BarnehageBarnGrunnlag(Behandling behandling, OppgittFamilieforhold familieforhold) {
this.behandlingId = behandling.getId();
this.familieforhold = familieforhold;
}
public BarnehageBarnGrunnlag(Long behandlingId, OppgittFamilieforhold familieforhold) {
this.behandlingId = behandlingId;
this.familieforhold = familieforhold;
}
public OppgittFamilieforhold getFamilieforhold() {
return familieforhold;
}
@Override
public String toString() {
return "BarnehageBarnGrunnlag{" +
"id=" + id +
"familieforhold=" + familieforhold +
", aktiv=" + aktiv +
'}';
}
public Long getBehandlingId() {
return behandlingId;
}
public boolean isAktiv() {
return aktiv;
}
}
|
<filename>components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl/t_cose/src/t_cose_defines.h
/*
* t_cose_defines.h
*
* Copyright (c) 2018-2019, <NAME>. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* See BSD-3-Clause license in README.md
*/
#ifndef __T_COSE_DEFINES_H__
#define __T_COSE_DEFINES_H__
/**
* \file t_cose_defines.h
*
* \brief Constants from COSE standard and IANA registry.
*
* This file contains constants identifiers defined in [COSE (RFC
* 8152)] (https://tools.ietf.org/html/rfc8152) and [IANA COSE
* Registry] (https://www.iana.org/assignments/cose/cose.xhtml). They
* include algorithm IDs and other constants.
*
* Many constants in the IANA registry are not included here yet as
* they are not needed by t_cose. They can be added if they become
* needed.
*/
/* --------------- COSE Header parameters -----------
* https://www.iana.org/assignments/cose/cose.xhtml#header-parameters
*/
/**
* \def COSE_HEADER_PARAM_ALG
*
* \brief Label of COSE header that indicates an algorithm.
*/
#define COSE_HEADER_PARAM_ALG 1
/**
* \def COSE_HEADER_PARAM_KID
*
* \brief Label of COSE header that contains a key ID.
*/
#define COSE_HEADER_PARAM_KID 4
/* ------------ COSE Header Algorithm Parameters --------------
* https://www.iana.org/assignments/cose/cose.xhtml#header-algorithm-parameters
*
* None of these are defined here yet, as they are not needed by t_cose yet.
*/
/* ------------- COSE Algorithms ----------------------------
* https://www.iana.org/assignments/cose/cose.xhtml#algorithms
*/
/**
* \def COSE_ALGORITHM_ES256
*
* \brief Indicates ECDSA with SHA-256.
*
* Value for \ref COSE_HEADER_PARAM_ALG to indicate ECDSA. w/SHA-256
*/
#define COSE_ALGORITHM_ES256 -7
/**
* \def COSE_ALGORITHM_ES384
*
* \brief Indicates ECDSA with SHA-384.
*
* Value for \ref COSE_HEADER_PARAM_ALG to indicate ECDSA. w/SHA-384
*/
#define COSE_ALGORITHM_ES384 -35
/**
* \def COSE_ALGORITHM_ES512
*
* \brief Indicates ECDSA with SHA-384.
*
* Value for \ref COSE_HEADER_PARAM_ALG to indicate ECDSA. w/SHA-512
*/
#define COSE_ALGORITHM_ES512 -36
/**
* \def COSE_ALG_SHA256_PROPRIETARY
*
* \brief COSE-style algorithm ID for SHA256. The official COSE
* algorithm registry doesn't yet define an ID for a pure hash
* function. One is needed for internal use, so this is defined.
*
* This is only used internally in the implementation and doesn't
* appear in any protocol messages so there are no interoperability
* issues. When this gets defined in the IANA registry, that value can
* be substituted here and all will work fine.
*/
#define COSE_ALG_SHA256_PROPRIETARY -72000
/* ---------- COSE Key Common Parameters --------------
* https://www.iana.org/assignments/cose/cose.xhtml#key-common-parameters
*/
/**
* \def COSE_KEY_COMMON_KTY
*
* \brief Label for data item containing the key type.
*
* In a \c COSE_Key, label that indicates the data item containing the
* key type.
*/
#define COSE_KEY_COMMON_KTY 1
/**
* \def COSE_KEY_COMMON_KID
*
* \brief Label for data item containing the key's kid.
*
* In a \c COSE_Key, label that indicates the data item containing the
* kid of this key.
*/
#define COSE_KEY_COMMON_KID 2
/* ---------- COSE Key Type Parameters --------------------
* https://www.iana.org/assignments/cose/cose.xhtml#key-type-parameters
*/
/**
* \def COSE_KEY_PARAM_CRV
*
* \brief Label for data item indicating EC curve.
*
* In a \c COSE_Key that holds an EC key of either type \ref
* COSE_KEY_TYPE_EC2 or \ref COSE_KEY_TYPE_OKP this labels the data
* item with the EC curve for the key.
*/
#define COSE_KEY_PARAM_CRV -1
/**
* \def COSE_KEY_PARAM_X_COORDINATE
*
* \brief Label for data item that is an X coordinate of an EC key.
*
* In a \c COSE_Key that holds an EC key, this is label that indicates
* the data item containing the X coordinate.
*
* This is used for both key types \ref COSE_KEY_TYPE_EC2 and \ref
* COSE_KEY_TYPE_OKP.
*/
#define COSE_KEY_PARAM_X_COORDINATE -2
/**
* \def COSE_KEY_PARAM_Y_COORDINATE
*
* \brief Label for data item that is a y coordinate of an EC key.
*
* In a COSE_Key that holds an EC key, this is label that indicates
* the data item containing the Y coordinate.
*
* This is used only for key type \ref COSE_KEY_TYPE_EC2.
*/
#define COSE_KEY_PARAM_Y_COORDINATE -3
/**
* \def COSE_KEY_PARAM_PRIVATE_D
*
* \brief Label for data item that is d, the private part of EC key.
*
* In a \c COSE_Key that holds an EC key, this is label that indicates
* the data item containing the Y coordinate.
*
* This is used for both key types \ref COSE_KEY_TYPE_EC2 and \ref
* COSE_KEY_TYPE_OKP.
*/
#define COSE_KEY_PARAM_PRIVATE_D -4
/* ---------- COSE Key Types --------------------------------
* https://www.iana.org/assignments/cose/cose.xhtml#key-type
*/
/**
* \def COSE_KEY_TYPE_OKP
*
* \brief Key type is Octet Key Pair
*
* In a \c COSE_Key, this is a value of the data item labeled \ref
* COSE_KEY_COMMON_KTY that indicates the \c COSE_Key is some sort of
* key pair represented by some octets. It may or may not be an EC
* key.
*/
#define COSE_KEY_TYPE_OKP 1
/**
* \def COSE_KEY_TYPE_EC2
*
* \brief Key is a 2-parameter EC key.
*
* In a \c COSE_Key, this is a value of the data item labeled \ref
* COSE_KEY_COMMON_KTY that indicates the \c COSE_Key is an EC key
* specified with two coordinates, X and Y.
*/
#define COSE_KEY_TYPE_EC2 2
/**
* \def COSE_KEY_TYPE_SYMMETRIC
*
* \brief Key is a symmetric key.
*
* In a \c COSE_Key, this is a value of the data item labeled \ref
* COSE_KEY_COMMON_KTY that indicates the \c COSE_Key is a symmetric
* key.
*/
#define COSE_KEY_TYPE_SYMMETRIC 4
/* ----------- COSE Elliptic Curves ---------------------
* https://www.iana.org/assignments/cose/cose.xhtml#elliptic-curves
*/
/**
* \def COSE_ELLIPTIC_CURVE_P_256
*
* \brief Key type for NIST P-256 key
*
* In a \c COSE_Key, this is a value of the data item labeled \ref
* COSE_KEY_PARAM_CRV to indicate the NIST P-256 curve, also known as
* secp256r1.
*
* This key type is always \ref COSE_KEY_TYPE_EC2.
*/
#define COSE_ELLIPTIC_CURVE_P_256 1
/**
* \def COSE_ELLIPTIC_CURVE_P_384
*
* \brief Key type for NIST P-384 key
*
* In a \c COSE_Key, this is a value of the data item labeled \ref
* COSE_KEY_PARAM_CRV to indicate the NIST P-384 curve, also known as
* secp384r1.
*
* This key type is always \ref COSE_KEY_TYPE_EC2.
*/
#define COSE_ELLIPTIC_CURVE_P_384 2
/**
* \def COSE_ELLIPTIC_CURVE_P_521
*
* \brief Key type for NIST P-521 key
*
* In a \c COSE_Key, this is a value of the data item labeled \ref
* COSE_KEY_PARAM_CRV to indicate the NIST P-521 curve, also known as
* secp521r1.
*/
#define COSE_ELLIPTIC_CURVE_P_521 3
/* ------- Constants from RFC 8152 ---------
*/
/**
* \def COSE_SIG_CONTEXT_STRING_SIGNATURE1
*
* \brief This is a string constant used by COSE to label \c COSE_Sign1
* structures. See RFC 8152, section 4.4.
*/
#define COSE_SIG_CONTEXT_STRING_SIGNATURE1 "Signature1"
#endif /* __T_COSE_DEFINES_H__ */
|
<filename>src/main/java/com/hisuie08/nicechat/NiceConfig.java<gh_stars>1-10
package com.hisuie08.nicechat;
import net.minecraftforge.fml.loading.FMLPaths;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
public class NiceConfig {
public static Path NICE_CONFIG_DIR = FMLPaths.CONFIGDIR.get().resolve("NiceChat");
public static Path IGNORE_WORDS_FILE = NICE_CONFIG_DIR.resolve("ignoreContents.txt");
public static Path IGNORE_UUIDS_FILE = NICE_CONFIG_DIR.resolve("ignoreUUID.txt");
public static void init() throws IOException {
if(Files.notExists(NICE_CONFIG_DIR)){
Files.createDirectories(NICE_CONFIG_DIR);
NiceChat.LOGGER.debug(NICE_CONFIG_DIR);
}
if(Files.notExists(IGNORE_WORDS_FILE)){
Files.createFile(IGNORE_WORDS_FILE);
}
if(Files.notExists(IGNORE_UUIDS_FILE)){
Files.createFile(IGNORE_UUIDS_FILE);
}
}
public List<String> loadContent() throws IOException {
return Files.readAllLines(IGNORE_WORDS_FILE);
}
public List<UUID> loadUUIDs() throws IOException {
return Files.readAllLines(IGNORE_UUIDS_FILE)
.stream()
.map(UUID::fromString)
.collect(Collectors.toList());
}
}
|
<gh_stars>0
/*
@@author shihaoyap
*/
package seedu.address.model.event;
import java.util.function.Predicate;
/**
* Tests that a {@code Event}'s {@code Date} is within the range of the {code Event}'s Start & End Dates.
*/
public class EventContainsKeyDatePredicate implements Predicate<Event> {
private final EventDate eventDate;
public EventContainsKeyDatePredicate(EventDate date) {
this.eventDate = date;
}
public String getDate() {
return eventDate.toString();
}
@Override
public boolean test(Event event) {
return (event.getStartDate().isBefore(eventDate) || event.getStartDate().equals(eventDate))
&& (event.getEndDate().isAfter(eventDate) || event.getEndDate().equals(eventDate));
}
@Override
public boolean equals(Object other) {
return other == this // short circuit if same object
|| (other instanceof EventContainsKeyDatePredicate
&& eventDate.equals(((EventContainsKeyDatePredicate) other).eventDate));
}
}
|
declare var Motoko: any;
export interface PackageInfo {
name: string;
repo: string;
version: string;
dir?: string;
dependencies?: Array<string>;
description?: string;
homepage?: string;
}
export interface RepoInfo {
repo: string;
branch: string;
dir: string;
}
export async function fetchPackage(info: PackageInfo): Promise<boolean> {
if (
!info.repo.startsWith("https://github.com/") ||
!info.repo.endsWith(".git")
) {
return false;
}
const repo: RepoInfo = {
repo: info.repo.slice(0, -4).replace(/^(https:\/\/github.com\/)/, ""),
branch: info.version,
dir: info.dir || "src",
};
const result = await fetchGithub(repo, info.name);
if (result) {
Motoko.addPackage(info.name, info.name + "/");
}
return result ? true : false;
}
export async function fetchGithub(
repo: RepoInfo,
target_dir = ""
): Promise<Record<string, string> | undefined> {
const possiblyCDN = !(
(repo.branch.length % 2 === 0 && /^[A-F0-9]+$/i.test(repo.branch)) ||
repo.branch === "master" ||
repo.branch === "main"
);
if (possiblyCDN) {
const result = await fetchFromCDN(repo, target_dir);
if (result) {
return result;
}
}
return await fetchFromGithub(repo, target_dir);
}
export function saveWorkplaceToMotoko(files: Record<string, string>) {
for (const [name, code] of Object.entries(files)) {
if (!name.endsWith("mo")) continue;
Motoko.saveFile(name, code);
}
}
async function fetchFromCDN(
repo: RepoInfo,
target_dir = ""
): Promise<Record<string, string> | undefined> {
const meta_url = `https://data.jsdelivr.com/v1/package/gh/${repo.repo}@${repo.branch}/flat`;
const base_url = `https://cdn.jsdelivr.net/gh/${repo.repo}@${repo.branch}`;
const response = await fetch(meta_url);
const json = await response.json();
if (!json.hasOwnProperty("files")) {
return;
}
const promises: any[] = [];
const files = {};
for (const f of json.files) {
if (f.name.startsWith(`/${repo.dir}/`) && /\.mo$/.test(f.name)) {
const promise = (async () => {
const content = await (await fetch(base_url + f.name)).text();
const stripped =
target_dir + f.name.slice(repo.dir ? repo.dir.length + 1 : 0);
Motoko.saveFile(stripped, content);
files[stripped] = content;
})();
promises.push(promise);
}
}
if (!promises.length) {
return;
}
return Promise.all(promises).then(() => {
return files;
});
}
async function fetchFromGithub(
repo: RepoInfo,
target_dir = ""
): Promise<Record<string, string> | undefined> {
const meta_url = `https://api.github.com/repos/${repo.repo}/git/trees/${repo.branch}?recursive=1`;
const base_url = `https://raw.githubusercontent.com/${repo.repo}/${repo.branch}/`;
const response = await fetch(meta_url);
const json = await response.json();
if (!json.hasOwnProperty("tree")) {
return;
}
const promises: any[] = [];
const files = {};
for (const f of json.tree) {
if (
f.path.startsWith(repo.dir ? `${repo.dir}/` : "") &&
f.type === "blob" &&
/\.mo$/.test(f.path)
) {
const promise = (async () => {
const content = await (await fetch(base_url + f.path)).text();
const stripped =
target_dir +
(target_dir ? "/" : "") +
f.path.slice(repo.dir ? repo.dir.length + 1 : 0);
Motoko.saveFile(stripped, content);
files[stripped] = content;
})();
promises.push(promise);
}
}
if (!promises.length) {
return;
}
return Promise.all(promises).then(() => {
return files;
});
}
|
import React, { useState, useEffect, useRef } from 'react';
import useSchema from '../hooks/use-schema';
import { Position } from '../common/type';
import { isDefine } from '../utils';
import { traverseDataNodes, addKey, delKey, getDropPosition } from './utils';
import { TreeData, TreeNode as TreeNodeProp } from './tree.types';
import TreeNode from './tree-node';
import './tree.scss';
const Tree = () => {
const [store, , setStore] = useSchema();
const [expandedKeys, setExpandedKeys] = useState([]);
const [treeData, setTreeData] = useState([]);
const [dragOverNode, setDragOverNode] = useState<TreeNodeProp>(null);
const [dropPosition, setDropPosition] = useState(null);
const [offsetLeft, setOffsetLeft] = useState(0);
const dataRef = useRef<TreeData>([]);
const dragStartPosition = useRef<Position>(null);
const dragNode = useRef<TreeNodeProp>(null);
const dragNodeEle = useRef<HTMLDivElement>(null);
const timeRef = useRef(null);
const { schema, activityId } = store;
useEffect(() => {
const data = traverseDataNodes(schema);
dataRef.current = data.map((item) => ({
...item,
expanded: isDefine(item.expanded) ? !expandedKeys.includes(item.id) : undefined,
}));
setTreeData(
dataRef.current.filter(
(item) => !expandedKeys.some((key) => item.validKey.includes(key)),
),
);
}, [schema, expandedKeys]);
const cleanDragState = () => {
//
};
const onExpand = (id) => {
if (expandedKeys.includes(id)) {
setExpandedKeys(delKey(expandedKeys, id));
} else {
setExpandedKeys(addKey(expandedKeys, id));
}
};
const onClick = (id: string) => {
setStore({ ...store, activityId: id });
};
const onWinNodeDragEnd = () => {
setDragOverNode(null);
cleanDragState();
};
const onWindowDragEnd = () => {
onWinNodeDragEnd();
window.removeEventListener('dragend', onWindowDragEnd);
};
const onNodeDragStart = (
e: React.DragEvent<HTMLDivElement>,
node: TreeNodeProp,
ele: HTMLDivElement,
) => {
const { id } = node;
dragStartPosition.current = {
x: e.clientX,
y: e.clientY,
};
dragNode.current = node;
dragNodeEle.current = ele;
setExpandedKeys(addKey(expandedKeys, id));
window.addEventListener('dragend', onWindowDragEnd);
};
const onNodeDragEnter = (
e: React.DragEvent<HTMLDivElement>,
node: TreeNodeProp,
ele: HTMLDivElement,
) => {
if (timeRef.current) {
clearTimeout(timeRef.current);
}
if (!dragNode.current) return;
const { position, offsetLeft } = getDropPosition(
e,
e.target as HTMLDivElement,
ele,
dragStartPosition.current,
node,
);
if (node.id === dragNode.current.id && position !== -1) {
setDragOverNode(null);
setDropPosition(null);
return;
}
setOffsetLeft(offsetLeft);
setDragOverNode(node);
if (isDefine(node.expanded) && !node.expanded) {
timeRef.current = setTimeout(() => {
setExpandedKeys(delKey(expandedKeys, node.id));
}, 400);
}
};
const onNodeDragOver = (
e: React.DragEvent<HTMLDivElement>,
node: TreeNodeProp,
ele: HTMLDivElement,
) => {
if (node.id === dragNode.current.id) {
setDragOverNode(null);
setDropPosition(null);
return;
}
if (dragNode.current) {
const { position, offsetLeft: offset } = getDropPosition(
e,
e.target as HTMLDivElement,
ele,
dragStartPosition.current,
node,
);
if (position === dropPosition && offset === offsetLeft) return;
setDropPosition(position);
setOffsetLeft(offset);
setDragOverNode(node);
console.log(node, position, offset);
}
};
const onNodeDragEnd = () => {
setDragOverNode(null);
cleanDragState();
dragNode.current = null;
};
const onNodeDrop = (e: React.DragEvent<HTMLDivElement>, node: TreeNodeProp) => {
setDragOverNode(null);
cleanDragState();
// const { id } = node;
// console.log('id', id, dragNode.current, dragOverNode);
dragNode.current = null;
};
// console.log('dragOverNode', dragOverNode);
return (
<div data-testid="tree" className="jigsaw-tree">
{treeData.map((data) => (
<TreeNode
schema={schema[data.id]}
{...data}
key={data.id}
offsetLeft={offsetLeft}
dropPosition={dropPosition}
activityId={activityId}
dragOverNode={dragOverNode}
onExpand={onExpand}
onClick={onClick}
onNodeDragStart={onNodeDragStart}
onNodeDragEnter={onNodeDragEnter}
onNodeDragOver={onNodeDragOver}
onNodeDragEnd={onNodeDragEnd}
onNodeDrop={onNodeDrop}
/>
))}
</div>
);
};
export default Tree;
|
<gh_stars>0
import { Entity } from 'typeorm';
import { UserBase } from '../../../base-entities/user.entity';
@Entity()
export class Staff extends UserBase {}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.