text
stringlengths
3
1.04M
United Nations, September 6: Pakistan’s focus for decades has been to undermine India’s territorial integrity through the “explicit use of terrorism” as a state policy, New Delhi said in a stern response after Islamabad raked up the Kashmir issue at the UN. Pakistan’s Ambassador to the UN Maleeha Lodhi yet again raised the issue of Kashmir while addressing the High Level Forum on the Culture of Peace in the UN General Assembly Wednesday. She said “foreign occupation and the denial of fundamental rights including the right to self-determination exacerbate the sense of injustice among the occupied and the oppressed”. “Nowhere is this more apparent than in the pain and suffering” of the people in Kashmir and Palestine, she said, citing the recent report on Kashmir issued by former UN High Commissioner for Human Rights Zeid Ra’ad Al Hussein. Minister in India’s Permanent Mission to the UN Srinivas Prasad said that a culture of peace is not just an abstract value or principle to be discussed and extolled in conferences, but needs to be actively built into global relationships between and among nation states. “It rests on good neighborliness and a respect for the territory and the governing systems and principles of other states,” he said. In a stern response, Prasad said it is ironic that Pakistan, “whose focus over the decades has been the undermining of India’s territorial integrity through the explicit use of terrorism as a state policy has chosen to use this platform to yet again claim Indian territory under the guise of a supposed concern for ‘justice and self-determination’ by quoting a report that not a single member state had asked for or has supported”. He asserted that Jammu and Kashmir is and will remain an integral part of India. “As a democracy, India has always abided by the choices of the people and will not allow this freedom to be undermined by terrorism and extremism,” he said. Prasad further said that one of India’s enduring principles has been Vasudheva Kutumbakam’ or the concept that the world is one family’. Quoting Mahatma Gandhi, he said a “non-violent revolution is not a programme of seizure of power. It is a programme of transformation of relationships”. “From the Vedic age in the distant past to the great teachers Mahavira and Buddha to Gandhiji, India’s message has always been about the need of a Culture of Peace. It is may be due to this heritage of a Culture of Peace that has made India, home to the harmonious blending of different cultures and religions,” Prasad said. He said that India is the birthplace of Lord Buddha as well as home to the second largest Muslim community in the world.
/** * Appcelerator Titanium Mobile * Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. * * WARNING: This is generated code. Modify at your own risk and without support. */ // A good bit of this code was derived from the Three20 project // and was customized to work inside compras // // All modifications by compras are licensed under // the Apache License, Version 2.0 // // // Copyright 2009 Facebook // // 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. // #ifdef USE_TI_UIDASHBOARDVIEW #import <Foundation/Foundation.h> @class LauncherButton; @interface LauncherItem : NSObject { NSString *title; UIImage *image; UIImage *selectedImage; NSInteger badgeValue; BOOL canDelete; LauncherButton *button; UIView *view; id userData; } @property(nonatomic,readwrite,retain) NSString *title; @property(nonatomic,readwrite,retain) UIImage *image; @property(nonatomic,readwrite,retain) UIImage *selectedImage; @property(nonatomic,readwrite,retain) UIView *view; @property(nonatomic,assign) LauncherButton *button; @property(nonatomic,readwrite,assign) id userData; @property(nonatomic) BOOL canDelete; @property(nonatomic) NSInteger badgeValue; @end #endif
Toward the back of the report is a (GPS) location guide to where all the boxes are located. There were 119 boxes surveyed across the City during 2016. Over 50% of the wildlife boxes were used for breeding or denning and 77% were used by a range of the target vertebrate species. Various fauna species were using 66 artificial boxes (57%), on the servicing/monitoring days, the highest numerical usage ever recorded. Note: all the photos included in the report were taken in 2016, during surveying or box servicing within Unley.
using System; using System.Collections.Generic; using System.IO; using System.Reflection; using Google.Protobuf; using Orleans.Serialization; using Xunit; namespace UnitTests.Serialization { public class ProtobufSerializationTests { public ProtobufSerializationTests() { SerializationTestEnvironment.Initialize(new List<TypeInfo> { typeof(ProtobufSerializer).GetTypeInfo() }, null); } [Fact, TestCategory("BVT"), TestCategory("Functional"), TestCategory("Serialization"), TestCategory("Protobuf")] public void ProtobufSerializationTest_1_DirectProto() { AddressBook book = CreateAddressBook(); byte[] bytes; using (MemoryStream stream = new MemoryStream()) { book.WriteTo(stream); bytes = stream.ToArray(); } AddressBook restored = AddressBook.Parser.ParseFrom(bytes); Assert.NotSame(book, restored); //The serializer returned an instance of the same object Assert.Equal(1, restored.People.Count); //The serialization didn't preserve the same number of inner values Assert.Equal(book.People[0], restored.People[0]); //The serialization didn't preserve the proper inner value Assert.Equal(book, restored); //The serialization didn't preserve the proper value } [Fact, TestCategory("BVT"), TestCategory("Functional"), TestCategory("Serialization"), TestCategory("Protobuf")] public void ProtobufSerializationTest_2_RegularOrleansSerializationStillWorks() { var input = new OrleansType(); var output = SerializationManager.RoundTripSerializationForTesting(input); Assert.NotSame(input, output); //The serializer returned an instance of the same object Assert.Equal(input, output); //The serialization didn't preserve the proper value } [Fact, TestCategory("BVT"), TestCategory("Functional"), TestCategory("Serialization"), TestCategory("Protobuf")] public void ProtobufSerializationTest_3_ProtoSerialization() { var input = CreateAddressBook(); var output = SerializationManager.RoundTripSerializationForTesting(input); Assert.NotSame(input, output); //The serializer returned an instance of the same object Assert.Equal(input, output); //The serialization didn't preserve the proper value } [Fact, TestCategory("BVT"), TestCategory("Functional"), TestCategory("Serialization"), TestCategory("Protobuf")] public void ProtobufSerializationTest_4_ProtoSerialization() { var input = CreateCounter(); var output = SerializationManager.RoundTripSerializationForTesting(input); Assert.NotSame(input, output); //The serializer returned an instance of the same object Assert.Equal(input, output); //The serialization didn't preserve the proper value } [Fact, TestCategory("BVT"), TestCategory("Functional"), TestCategory("Serialization"), TestCategory("Protobuf")] public void ProtobufSerializationTest_5_DeepCopy() { var input = CreateAddressBook(); var output = SerializationManager.DeepCopy(input); Assert.NotSame(input, output); //The serializer returned an instance of the same object Assert.Equal(input, output); //The serialization didn't preserve the proper value } [Fact, TestCategory("BVT"), TestCategory("Functional"), TestCategory("Serialization"), TestCategory("Protobuf")] public void ProtobufSerializationTest_6_DefaultMessageSerialization() { var input = CreateDefaultCounter(); var output = SerializationManager.RoundTripSerializationForTesting(input); Assert.NotSame(input, output); //The serializer returned an instance of the same object Assert.Equal(input, output); //The serialization didn't preserve the proper value } private Counter CreateCounter() { Counter counter = new Counter(); counter.Id = 1; counter.Name = "Foo"; return counter; } private Counter CreateDefaultCounter() { Counter counter = new Counter(); counter.Id = 0; counter.Name = ""; return counter; } private AddressBook CreateAddressBook() { Person person = new Person { Id = 1, Name = "Foo", Email = "foo@bar", Phones = { new Person.Types.PhoneNumber { Number = "555-1212" } } }; person.Id = 2; AddressBook book = new AddressBook { People = { person }, AddressBookName = "MyGreenAddressBook" }; return book; } [Serializable] public class OrleansType { public int val = 33; public override bool Equals(object obj) { var o = obj as OrleansType; return o != null && val.Equals(o.val); } public override int GetHashCode() { return val; } } } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateMedicamentoTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('medicamento', function(Blueprint $table) { $table->bigInteger('ident_medicamento_seq', true); $table->bigInteger('id_registro'); $table->bigInteger('fecha_entrega'); $table->smallInteger('tipo_codificacion'); $table->string('codigo_medicamento', 40)->nullable(); $table->integer('catidad')->nullable(); $table->string('ambito_suministro', 8)->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('medicamento'); } }
ObjectiveEd.com is our new organization where we are building ECC interactive simulations for vision impaired students, based on the child’s Individual Educational Plan. The child’s progression in acquiring skills in these ECC-based games will be preserved in a private secure cloud, visible to the school IEP team in a web-based console . One of the goals when we designed Blindfold Racer was to introduce children and teens to different music genres besides the typical top 40 that many listen to. The game has different music for each level that we’ve preselected as the best match for the course, with selections from classical, rock, reggae, pop, world, country, Broadway and others. I’m glad that Blindfold Racer is exposing some gamers to new music styles. Other gamers asked for the ability to pick their own music. In the newest version, you can select music tracks from your iTunes library, and hear it (as the fence sound) while driving. By the way, the Turkish March has special meaning to our family; my daughter – the voice you hear in Blindfold Racer – heard it when she was just a baby. She used to sit in front of the TV and watch the video “Baby Mozart”. On the TV she would see tiny toy penguins climb up a stairway and then roll down a ramp, while hearing the Mozart’s Turkish March. She could watch this video for hours. The video was so hypnotizing that once when several guests came to visit, they looked at what my daughter was watching on TV. After a while, there were five adults completely mesmerized: watching the penguins and listening to Mozart.
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections.Generic; using ASPNET.StarterKit.BusinessLogicLayer; public partial class MasterPage_master : System.Web.UI.MasterPage { public MasterPage_master() { } void Page_Load(object sender, EventArgs e) { } }
<?php namespace AppBundle\Controller; use AppBundle\Event\VisitContactEvent; use AppBundle\Event\VisitEvents; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; class ContactController extends Controller { /** * @Route("/contact", name="contact") */ public function contactAction(Request $request){ $eventDispatcher = $this->get('event_dispatcher'); $event = new VisitContactEvent(); $event->setIp($request->getClientIp()); $eventDispatcher->dispatch(VisitEvents::CONTACT, $event); //on pourrait déclencher autant d'évènement que l'on voudrait //dump('coucou');die; // $filesCSV = file('../var/logs/contactFormLogs.csv'); //dump($filesCSV);die; return $this->render('Default-old/contact.html.twig', ['file' => $filesCSV]); /*$firstname="ludo"; $lastname="wouaZha"; $age="19 ans"; //replace this example code with whatever you need return $this->render('Default-old/contact.html.twig', [ 'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR, 'firstname' => $firstname, 'lastname' => $lastname, 'age' => $age ]); }*/ } }
/* * Copyright (C) 2007 FhG Fokus * * This file is part of RESTAC, a peer-to-peer Java framework implementing REST. * * RESTAC is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * For a license to use the RESTAC software under conditions * other than those described here, please contact David Linner by e-mail at the following addresses: * [email protected] * RESTAC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License and the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * Created on Sep 7, 2005 */ package de.fhg.fokus.restac.resource.wrapping.serialization; import java.lang.reflect.Array; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.regex.Pattern; import de.fhg.fokus.restac.httpx.core.common.Path; /** * Simple function that retrieves a java object for a list of name-value pairs, if an adqquate * mapping can be found. * * @author David Linner * @author Stefan Föll * @see Parser */ public class ParserFunction { /** The singleton instance of <code>ParserFunction</code>. */ private static ParserFunction instance = new ParserFunction(); /** The map of registered parsers. */ private Map<Class<?>, Parser> parsers; /** * Constructs a new empty <code>ParserFunction</code>. */ private ParserFunction(){ parsers = Collections.synchronizedMap(new HashMap<Class<?>, Parser>()); } /** * Returns the singletong instance of <code>ParserFunction</code>. * * @return the singletong instance of <code>ParserFunction</code> */ public static ParserFunction getInstance(){ return instance; } /** * Checks wether an object of the given class can be assembled * * @param expectedType type that indicates a pattern for assembling * @return true if it is possible to assemble an object of the given * type, false otherwise */ public boolean isParseable(Class<?> expectedType){ Parser parser = parsers.get(expectedType); if (parser != null || expectedType.isArray()) return true; return false; } /** * Tries to assemble an object from an assign list of name-value pairs. * * @param expectedType type that indicates a pattern for assembling * @param values name-value pairs to be assembled to an object * @return the object or null if parsing failed */ public Object parse(Class<?> expectedType, Map<String, String> values){ Parser primitiveParser = parsers.get(expectedType); if (primitiveParser != null){ return primitiveParser.parse(values); } try { if (expectedType.isArray()) return new ArrayParser().parse(expectedType, values); /* * The following code in comments is for assembling objects whose types * are implementing the List, Set or Map interface. Because of missing information on * their element types this works only for String element types: * Set<String>,Map<String,String>,List<String> * * else if (java.util.Map.class.isAssignableFrom(expectedType)){ return new MapParser().parse(expectedType, values); } else if (java.util.List.class.isAssignableFrom(expectedType)){ return new ListParser().parse(expectedType, values); } else if (java.util.Set.class.isAssignableFrom(expectedType)) { return new SetParser().parse(expectedType,values); } */ } catch (Exception e){ } return null; } /** * Adds a new parser for a certain type to this <code>ParserFunction</code>. * * @param type type of the parser * @param parser the parser to be added */ public void addParser(Class<?> type, Parser parser){ parsers.put(type, parser); } /** * Add some parsers for basic types here. Later parsers may be loaded reflective. */ static { ParserFunction reader = ParserFunction.getInstance(); //adding parser for strings reader.addParser(String.class, new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); return value != null ? value : name; } return null; } }); //adding parser for integer types Parser intParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Integer(Integer.parseInt((value != null ? value : name))); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Integer.class, intParser); reader.addParser(Integer.TYPE, intParser); //adding parser for long types Parser longParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Long(value != null ? value : name); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Long.class, longParser); reader.addParser(Long.TYPE, longParser); //adding parser for short types Parser shortParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Short(value != null ? value : name); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Short.class, shortParser); reader.addParser(Short.TYPE, shortParser); //adding parser for float types Parser floatParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Float(value != null ? value : name); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Float.class, floatParser); reader.addParser(Float.TYPE, floatParser); //adding parser for double types Parser doubleParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Double(value != null ? value : name); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Double.class, doubleParser); reader.addParser(Double.TYPE, doubleParser); //adding parser for byte types Parser byteParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Byte(value != null ? value : name); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Byte.class, byteParser); reader.addParser(Byte.TYPE, byteParser); //adding parser for boolean types Parser booleanParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ //return new Boolean(entry.getValue() != null ? entry.getValue() : entry.getName()); if(value != null) { if(value.equalsIgnoreCase("true")) return new Boolean(true); if(value.equalsIgnoreCase("false")) return new Boolean(false); } else new Boolean(true); // single parameter without value interpreted as true }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Boolean.class, booleanParser); reader.addParser(Boolean.TYPE, booleanParser); //adding parser for character types Parser characterParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size() == 1){ String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new Character(value != null ? value.charAt(0) : name.charAt(0)); }catch(NumberFormatException e){ //nothing please } } return null; } }; reader.addParser(Character.class, characterParser); reader.addParser(Character.TYPE, characterParser); //adding parser for void types Parser voidParser = new Parser() { public Object parse(Map<String, String> params) { return null; } }; reader.addParser(Void.class, voidParser); reader.addParser(Void.TYPE, voidParser); //Parser for NamingServiceAnnouncement-Messages // Parser announcementParser = new Parser() { // public Object parse(Map<String, String> params) { // if (params.size() == 3) { // try { // URL url = new URL(params.get(NamingConstants.ADDRESS)); // int life_time = Integer.parseInt(params.get(NamingConstants.LIFE_TIME)); // VisibilityGroup visibilityGroup = new VisibilityGroup(params.get(NamingConstants.VISIBILITY_GROUP)); // return new NamingServiceAnnouncement(url, life_time, visibilityGroup); // } // catch (MalformedURLException e) { // //nothing please // } // catch (NumberFormatException e) { // // nothing please // } // catch(InvalidMulticastGroupException e) { // // } // } // return null; // } // }; // // //adding parser for NamingServiceAnnouncement-Messages // reader.addParser(NamingServiceAnnouncement.class,announcementParser); // Parser urlParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size()==1) { String name = params.keySet().iterator().next(); String value = params.get(name); try{ return new URL(value != null ? value : name); } catch (MalformedURLException e) { //nothing please } } return null; } }; // adding parser for URL Type reader.addParser(URL.class,urlParser); Parser pathParser = new Parser() { public Object parse(Map<String, String> params) { if (params.size()==1) { String name = params.keySet().iterator().next(); String value = params.get(name); return new Path(value != null ? value : name); } return null; } }; // adding parser for URL Type reader.addParser(Path.class,pathParser); } /** * Parser class for assembling an object of type <code>Map<String></code>. * Assuming elements of type <code>String</code> because of missing information on the required element type. * * @author Stefan Föll */ private class MapParser { /** * Assembles an object of type <code>Map</code> * * @param expectedType the type conform to the <code>Map</code>type * @param values the name-value map to parse from * @return the assembled <code>Map</code> object * @throws Exception creating an instance of the expected type failed */ public Object parse(Class<?> expectedType, Map<String, String> values) throws Exception { Map<String, String> map; if (expectedType == java.util.Map.class) map = new HashMap<String, String>(); else map = (Map<String, String>) expectedType.newInstance(); for(Iterator<String> iter = values.keySet().iterator(); iter.hasNext();) { String name = iter.next(); String value = values.get(name); map.put(name, value); } return null; } } /** * Parser class for assembling an object of type <code>List<String></code>. * Assuming elements of type <code>String</code> because of missing information on the required element type. * * @author Stefan Föll */ private class ListParser { /** * Assembles an object of type <code>List/code> * * @param expectedType the type conform to the <code>List</code>type * @param values the name-value map to parse from * @return the assembled <code>List</code> object * @throws Exception creating an instance of the expected type failed */ public Object parse(Class<?> expectedType, Map<String, String> values) throws Exception { List<String> list; if(expectedType == java.util.List.class) list = new ArrayList<String>(); list = (List<String>)expectedType.newInstance(); for(Iterator<String> iter = values.keySet().iterator(); iter.hasNext();) { String name = iter.next(); String value = values.get(name); list.add((value != null) ? value : name) ; } return null; } } /** * Parser class for assembling an object of type <code>Set<String></code>. * Assuming elements of type <code>String</code> because of missing information on the required element type. * * @author Stefan Föll */ private class SetParser { /** * Assembles an object of type <code>Set</code> * * @param expectedType the type conform to the <code>Set</code>type * @param values the name-value map to parse from * @return the assembled <code>Set</code> object * @throws Exception creating an instance of the expected type failed */ public Object parse(Class<?> expectedType, Map<String, String> values) throws Exception { Set<String> set; if(expectedType == java.util.Set.class) set = new HashSet<String>(); set = (Set<String>)expectedType.newInstance(); for(Iterator<String> iter = values.keySet().iterator(); iter.hasNext();) { String name = iter.next(); String value = values.get(name); set.add((value != null) ? value : name); } return null; } } /** * * Parser class for assembling an object of type <code>Array</code>. * By means of Java Reflection the array object is created with the required array's element type. * The process assumes all array entries contained in the map of name value pairs, no entry may be missing. * * @author Stefan Föll */ private class ArrayParser { /** * Assembles an object of type <code>Array</code> * * @param expectedType the dynamic type the assembled object shall have * @param nameValueMap the name-value map to parse from * @return the assembled object */ public Object parse(Class<?> expectedType, Map<String, String> nameValueMap) throws Exception { //check if names of name-value pairs match the required pattern Pattern arrayPattern = Pattern.compile("(\\w*\\.?\\w*)(\\[\\d+\\])+"); Class<?> arrayElementType = expectedType.getComponentType(); for(Iterator<String> iter = nameValueMap.keySet().iterator(); iter.hasNext();) { String name = iter.next(); if (!arrayPattern.matcher(name).matches()) throw new Exception("Array identifier does not conform with the required syntax"); } //sort the map with the name-value pairs lexicographically over the names if(nameValueMap.size() > 1) { Map<String, String> sortedEntries = Collections.synchronizedMap(new TreeMap<String, String>()); for(Iterator<String> iter = nameValueMap.keySet().iterator(); iter.hasNext();) { String name = iter.next(); String value = nameValueMap.get(name); sortedEntries.put(name, value); } nameValueMap = sortedEntries; } //get array size int size = getArraySizeForThisDimension(nameValueMap); //cut off prefix and array index from names in map and parse array from that map Object array = Array.newInstance(arrayElementType, size); for(int i = 0; i < size; ++i){ //why ++i instead of i++? Map<String, String> map = fillMap(nameValueMap, i); Object o = ParserFunction.this.parse(arrayElementType, map); Array.set(array, i, o); } return array; } /** * Creates a name-value map with all required entries for this position. * The returned map is parsed in turn to obtain an object which can be set as entry on the current array's position * * @param entries the array of name-value pairs to examine * @param position the current position in the array to set an object * @return name-value map with all required entries for this position. */ private Map<String, String> fillMap(Map<String, String> nameValueMap, int position ) { Map<String, String> map = new HashMap<String, String>(); int begin, end, compare; for(Iterator<String> iter = nameValueMap.keySet().iterator(); iter.hasNext();) { //int i = 0; i < entries.length;++i) { String name = iter.next(); begin = name.indexOf('['); end = name.indexOf(']'); compare = Integer.parseInt(name.substring(begin + 1, end).trim()); if(compare == position) map.put(name.substring(end + 1).trim(), nameValueMap.get(name)); } return map; } /** * Gets the Array size for the current dimension. * Therefore the method returns the max value within the first bracket pair of all names * * @param entries the array of name-value pairs to examine * @return the array size for this dimension */ private int getArraySizeForThisDimension(Map<String, String> nameValueMap) { int size = -1; int begin, end, newSize; for(Iterator<String> iter = nameValueMap.keySet().iterator(); iter.hasNext();) { String name = iter.next(); begin = name.indexOf('['); end = name.indexOf(']'); newSize = Integer.parseInt(name.substring(begin + 1, end).trim()); if(newSize > size) size = newSize; } return size + 1; } } }
print "Iniciando la Agenda..."
MLive reported that Walton will join the Orlando Magic for NBA Summer League and ESPN added that Zak Irvin will join the Miami Heat. The Magic play in the Orlando Pro Summer League which runs from July 1st through July 7th. Irvin will play with the Heat in Las Vegas from July 7th through 17th. Both players will be aiming to impress scouts enough to earn an invitation to training camp and eventually a 2017-18 roster spot. Walton’s late season charge led Michigan to the Sweet 16 as he averaged 19.7 points and 7.1 assists in the Big Ten and NCAA Tournaments. Irvin averaged 13 points and 4.5 rebounds per game and finished with 1,610 career points in Ann Arbor. They’ll likely be joined in the NBA Summer League by their former teammate, DJ Wilson, who was selected 17th overall by the Milwaukee Bucks.
################################################################# # Class DirectoryListing # Author: A.T. # Added 02.03.2015 ################################################################# from __future__ import print_function __RCSID__ = "$Id$" import stat from DIRAC import gConfig from DIRAC.Core.Security import CS class DirectoryListing( object ): def __init__( self ): self.entries = [] def addFile( self, name, fileDict, repDict, numericid ): """ Pretty print of the file ls output """ perm = fileDict['Mode'] date = fileDict['ModificationDate'] #nlinks = fileDict.get('NumberOfLinks',0) nreplicas = len( repDict ) size = fileDict['Size'] if fileDict.has_key('Owner'): uname = fileDict['Owner'] elif fileDict.has_key('OwnerDN'): result = CS.getUsernameForDN(fileDict['OwnerDN']) if result['OK']: uname = result['Value'] else: uname = 'unknown' else: uname = 'unknown' if numericid: uname = str(fileDict['UID']) if fileDict.has_key('OwnerGroup'): gname = fileDict['OwnerGroup'] elif fileDict.has_key('OwnerRole'): groups = CS.getGroupsWithVOMSAttribute('/'+fileDict['OwnerRole']) if groups: if len(groups) > 1: gname = groups[0] default_group = gConfig.getValue('/Registry/DefaultGroup','unknown') if default_group in groups: gname = default_group else: gname = groups[0] else: gname = 'unknown' else: gname = 'unknown' if numericid: gname = str(fileDict['GID']) self.entries.append( ('-'+self.__getModeString(perm),nreplicas,uname,gname,size,date,name) ) def addDirectory( self, name, dirDict, numericid ): """ Pretty print of the file ls output """ perm = dirDict['Mode'] date = dirDict['ModificationDate'] nlinks = 0 size = 0 if dirDict.has_key('Owner'): uname = dirDict['Owner'] elif dirDict.has_key('OwnerDN'): result = CS.getUsernameForDN(dirDict['OwnerDN']) if result['OK']: uname = result['Value'] else: uname = 'unknown' else: uname = 'unknown' if numericid: uname = str(dirDict['UID']) if dirDict.has_key('OwnerGroup'): gname = dirDict['OwnerGroup'] elif dirDict.has_key('OwnerRole'): groups = CS.getGroupsWithVOMSAttribute('/'+dirDict['OwnerRole']) if groups: if len(groups) > 1: gname = groups[0] default_group = gConfig.getValue('/Registry/DefaultGroup','unknown') if default_group in groups: gname = default_group else: gname = groups[0] else: gname = 'unknown' if numericid: gname = str(dirDict['GID']) self.entries.append( ('d'+self.__getModeString(perm),nlinks,uname,gname,size,date,name) ) def addDataset( self, name, datasetDict, numericid ): """ Pretty print of the dataset ls output """ perm = datasetDict['Mode'] date = datasetDict['ModificationDate'] size = datasetDict['TotalSize'] if datasetDict.has_key('Owner'): uname = datasetDict['Owner'] elif datasetDict.has_key('OwnerDN'): result = CS.getUsernameForDN(datasetDict['OwnerDN']) if result['OK']: uname = result['Value'] else: uname = 'unknown' else: uname = 'unknown' if numericid: uname = str( datasetDict['UID'] ) gname = 'unknown' if datasetDict.has_key('OwnerGroup'): gname = datasetDict['OwnerGroup'] if numericid: gname = str( datasetDict ['GID'] ) numberOfFiles = datasetDict ['NumberOfFiles'] self.entries.append( ('s'+self.__getModeString(perm),numberOfFiles,uname,gname,size,date,name) ) def __getModeString( self, perm ): """ Get string representation of the file/directory mode """ pstring = '' if perm & stat.S_IRUSR: pstring += 'r' else: pstring += '-' if perm & stat.S_IWUSR: pstring += 'w' else: pstring += '-' if perm & stat.S_IXUSR: pstring += 'x' else: pstring += '-' if perm & stat.S_IRGRP: pstring += 'r' else: pstring += '-' if perm & stat.S_IWGRP: pstring += 'w' else: pstring += '-' if perm & stat.S_IXGRP: pstring += 'x' else: pstring += '-' if perm & stat.S_IROTH: pstring += 'r' else: pstring += '-' if perm & stat.S_IWOTH: pstring += 'w' else: pstring += '-' if perm & stat.S_IXOTH: pstring += 'x' else: pstring += '-' return pstring def humanReadableSize( self, num, suffix = 'B' ): """ Translate file size in bytes to human readable Powers of 2 are used (1Mi = 2^20 = 1048576 bytes). """ num = int(num) for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']: if abs(num) < 1024.0: return "%3.1f%s%s" % (num, unit, suffix) num /= 1024.0 return "%.1f%s%s" % (num, 'Yi', suffix) def printListing( self, reverse, timeorder, sizeorder, humanread ): """ """ if timeorder: if reverse: self.entries.sort(key=lambda x: x[5]) else: self.entries.sort(key=lambda x: x[5],reverse=True) elif sizeorder: if reverse: self.entries.sort(key=lambda x: x[4]) else: self.entries.sort(key=lambda x: x[4],reverse=True) else: if reverse: self.entries.sort(key=lambda x: x[6],reverse=True) else: self.entries.sort(key=lambda x: x[6]) # Determine the field widths wList = [0] * 7 for d in self.entries: for i in range(7): if humanread and i == 4: humanreadlen = len(str(self.humanReadableSize(d[4]))) if humanreadlen > wList[4]: wList[4] = humanreadlen else: if len(str(d[i])) > wList[i]: wList[i] = len(str(d[i])) for e in self.entries: size = e[4] if humanread: size = self.humanReadableSize(e[4]) print(str(e[0]), end=' ') print(str(e[1]).rjust(wList[1]), end=' ') print(str(e[2]).ljust(wList[2]), end=' ') print(str(e[3]).ljust(wList[3]), end=' ') print(str(size).rjust(wList[4]), end=' ') print(str(e[5]).rjust(wList[5]), end=' ') print(str(e[6])) def addSimpleFile( self, name ): """ Add single files to be sorted later""" self.entries.append(name) def printOrdered( self ): """ print the ordered list""" self.entries.sort() for entry in self.entries: print(entry)
/// <reference types="node" /> import { Readable, ReadableOptions, Transform } from 'stream'; import Mail = require('./mailer'); import SMTPConnection = require('./smtp-connection'); declare namespace MimeNode { interface Addresses { from?: string[]; sender?: string[]; 'reply-to'?: string[]; to?: string[]; cc?: string[]; bcc?: string[]; } interface Envelope { /** includes an address object or is set to false */ from: string | false; /** includes an array of address objects */ to: string[]; } interface Options { /** root node for this tree */ rootNode?: MimeNode; /** immediate parent for this node */ parentNode?: MimeNode; /** filename for an attachment node */ filename?: string; /** shared part of the unique multipart boundary */ baseBoundary?: string; /** If true, do not exclude Bcc from the generated headers */ keepBcc?: boolean; /** either 'Q' (the default) or 'B' */ textEncoding?: 'B' | 'Q'; /** method to normalize header keys for custom caseing */ normalizeHeaderKey?(key: string): string; } } /** * Creates a new mime tree node. Assumes 'multipart/*' as the content type * if it is a branch, anything else counts as leaf. If rootNode is missing from * the options, assumes this is the root. */ declare class MimeNode { constructor(contentType: string, options?: MimeNode.Options); /** Creates and appends a child node.Arguments provided are passed to MimeNode constructor */ createChild(contentType: string, options?: MimeNode.Options): MimeNode; /** Appends an existing node to the mime tree. Removes the node from an existing tree if needed */ appendChild(childNode: MimeNode): MimeNode; /** Replaces current node with another node */ replace(node: MimeNode): MimeNode; /** Removes current node from the mime tree */ remove(): this; /** * Sets a header value. If the value for selected key exists, it is overwritten. * You can set multiple values as well by using [{key:'', value:''}] or * {key: 'value'} as the first argument. */ setHeader(key: string, value: string | string[]): this; setHeader(headers: { [key: string]: string } | Array<{ key: string, value: string }>): this; /** * Adds a header value. If the value for selected key exists, the value is appended * as a new field and old one is not touched. * You can set multiple values as well by using [{key:'', value:''}] or * {key: 'value'} as the first argument. */ addHeader(key: string, value: string): this; addHeader(headers: { [key: string]: string } | Array<{ key: string, value: string }>): this; /** Retrieves the first mathcing value of a selected key */ getHeader(key: string): string; /** * Sets body content for current node. If the value is a string, charset is added automatically * to Content-Type (if it is text/*). If the value is a Buffer, you need to specify * the charset yourself */ setContent(content: string | Buffer | Readable): this; /** Generate the message and return it with a callback */ build(callback: (err: Error | null, buf: Buffer) => void): void; getTransferEncoding(): string; /** Builds the header block for the mime node. Append \r\n\r\n before writing the content */ buildHeaders(): string; /** * Streams the rfc2822 message from the current node. If this is a root node, * mandatory header fields are set if missing (Date, Message-Id, MIME-Version) */ createReadStream(options?: ReadableOptions): Readable; /** * Appends a transform stream object to the transforms list. Final output * is passed through this stream before exposing */ transform(transform: Transform): void; /** * Appends a post process function. The functon is run after transforms and * uses the following syntax * * processFunc(input) -> outputStream */ processFunc(processFunc: (outputStream: Readable) => Readable): void; stream(outputStream: Readable, options: ReadableOptions, done: (err?: Error | null) => void): void; /** Sets envelope to be used instead of the generated one */ setEnvelope(envelope: Mail.Envelope): this; /** Generates and returns an object with parsed address fields */ getAddresses(): MimeNode.Addresses; /** Generates and returns SMTP envelope with the sender address and a list of recipients addresses */ getEnvelope(): MimeNode.Envelope; /** Sets pregenerated content that will be used as the output of this node */ setRaw(raw: string | Buffer | Readable): this; } export = MimeNode;
These items I carry every single day to help me with specific tasks. A pen, a notebook, a watch, a knife, a flashligt, a slim wallet, a phone, and something for self defense. The Not Me tool is a prototype of my own design, and I will be launching an etsy store for it soon. It's meant to work as an impact tool/force multiplier, while not being too overtly aggressive looking. It also works as a pocket/belt loop hook, and a purse/bag hanger.
Know Bartow HS Class of 1961 graduates that are NOT on this List? Help us Update the 1961 Class List by adding missing names. More 1961 alumni from Bartow HS have posted profiles on Classmates.com®. Click here to register for free at Classmates.com® and view other 1961 alumni. Alumni from the Bartow High School class of 1961 that have been added to this alumni directory are shown on this page. All of the people on this page graduated in '61 from Bartow HS. You can register for free to add your name to the BHS alumni directory.
/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation ([email protected]) ** ** No Commercial Usage ** ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at [email protected]. ** **************************************************************************/ #include "codaruncontrol.h" #include "s60deployconfiguration.h" #include "s60devicerunconfiguration.h" #include "codadevice.h" #include "codamessage.h" #include "qt4buildconfiguration.h" #include "qt4symbiantarget.h" #include "qt4target.h" #include "qtoutputformatter.h" #include "symbiandevicemanager.h" #include <coreplugin/icore.h> #include <utils/qtcassert.h> #include <symbianutils/symbiandevicemanager.h> #include <QtCore/QDir> #include <QtCore/QFileInfo> #include <QtCore/QScopedPointer> #include <QtCore/QTimer> #include <QtGui/QMessageBox> #include <QtGui/QMainWindow> #include <QtNetwork/QTcpSocket> using namespace ProjectExplorer; using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; using namespace Coda; enum { debug = 0 }; CodaRunControl::CodaRunControl(RunConfiguration *runConfiguration, const QString &mode) : S60RunControlBase(runConfiguration, mode), m_port(0), m_state(StateUninit) { const S60DeviceRunConfiguration *s60runConfig = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration); QTC_ASSERT(s60runConfig, return); const S60DeployConfiguration *activeDeployConf = qobject_cast<S60DeployConfiguration *>(s60runConfig->qt4Target()->activeDeployConfiguration()); QTC_ASSERT(activeDeployConf, return); S60DeployConfiguration::CommunicationChannel channel = activeDeployConf->communicationChannel(); if (channel == S60DeployConfiguration::CommunicationCodaTcpConnection) { m_address = activeDeployConf->deviceAddress(); m_port = activeDeployConf->devicePort().toInt(); } else if (channel == S60DeployConfiguration::CommunicationCodaSerialConnection) { m_serialPort = activeDeployConf->serialPortName(); } else { QTC_ASSERT(false, return); } } CodaRunControl::~CodaRunControl() { } bool CodaRunControl::doStart() { if (m_address.isEmpty() && m_serialPort.isEmpty()) { cancelProgress(); QString msg = tr("No device is connected. Please connect a device and try again."); appendMessage(msg, NormalMessageFormat); return false; } appendMessage(tr("Executable file: %1").arg(msgListFile(executableFileName())), NormalMessageFormat); return true; } bool CodaRunControl::isRunning() const { return m_state >= StateConnecting; } bool CodaRunControl::setupLauncher() { QTC_ASSERT(!m_codaDevice, return false); if (m_serialPort.length()) { // We get the port from SymbianDeviceManager appendMessage(tr("Connecting to '%1'...").arg(m_serialPort), NormalMessageFormat); m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getTcfPort(m_serialPort); bool ok = m_codaDevice && m_codaDevice->device()->isOpen(); if (!ok) { appendMessage(tr("Could not open serial device: %1").arg(m_codaDevice->device()->errorString()), ErrorMessageFormat); return false; } connect(SymbianUtils::SymbianDeviceManager::instance(), SIGNAL(deviceRemoved(const SymbianUtils::SymbianDevice)), this, SLOT(deviceRemoved(SymbianUtils::SymbianDevice))); connect(m_codaDevice.data(), SIGNAL(error(QString)), this, SLOT(slotError(QString))); connect(m_codaDevice.data(), SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString))); connect(m_codaDevice.data(), SIGNAL(tcfEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent))); connect(m_codaDevice.data(), SIGNAL(serialPong(QString)), this, SLOT(slotSerialPong(QString))); m_state = StateConnecting; m_codaDevice->sendSerialPing(false); } else { // For TCP we don't use device manager, we just set it up directly m_codaDevice = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice); connect(m_codaDevice.data(), SIGNAL(error(QString)), this, SLOT(slotError(QString))); connect(m_codaDevice.data(), SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString))); connect(m_codaDevice.data(), SIGNAL(tcfEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent))); const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket); m_codaDevice->setDevice(codaSocket); codaSocket->connectToHost(m_address, m_port); m_state = StateConnecting; appendMessage(tr("Connecting to %1:%2...").arg(m_address).arg(m_port), NormalMessageFormat); } QTimer::singleShot(4000, this, SLOT(checkForTimeout())); if (debug) m_codaDevice->setVerbose(debug); return true; } void CodaRunControl::doStop() { switch (m_state) { case StateUninit: case StateConnecting: case StateConnected: finishRunControl(); break; case StateProcessRunning: QTC_ASSERT(!m_runningProcessId.isEmpty(), return); m_codaDevice->sendRunControlTerminateCommand(CodaCallback(), m_runningProcessId.toAscii()); break; } } void CodaRunControl::slotError(const QString &error) { appendMessage(tr("Error: %1").arg(error), ErrorMessageFormat); finishRunControl(); } void CodaRunControl::slotTrkLogMessage(const QString &log) { if (debug > 1) qDebug("CODA log: %s", qPrintable(log.size()>200?log.left(200).append(QLatin1String(" ...")): log)); } void CodaRunControl::slotSerialPong(const QString &message) { if (debug > 1) qDebug() << "CODA serial pong:" << message; } void CodaRunControl::slotCodaEvent(const CodaEvent &event) { if (debug) qDebug() << "CODA event:" << "Type:" << event.type() << "Message:" << event.toString(); switch (event.type()) { case CodaEvent::LocatorHello: { // Commands accepted now m_state = StateConnected; appendMessage(tr("Connected."), NormalMessageFormat); setProgress(maxProgress()*0.80); initCommunication(); } break; case CodaEvent::RunControlContextRemoved: handleContextRemoved(event); break; case CodaEvent::RunControlContextAdded: m_state = StateProcessRunning; reportLaunchFinished(); handleContextAdded(event); break; case CodaEvent::RunControlSuspended: handleContextSuspended(event); break; case CodaEvent::RunControlModuleLoadSuspended: handleModuleLoadSuspended(event); break; case CodaEvent::LoggingWriteEvent: handleLogging(event); break; default: if (debug) qDebug() << "CODA event not handled" << event.type(); break; } } void CodaRunControl::initCommunication() { m_codaDevice->sendLoggingAddListenerCommand(CodaCallback(this, &CodaRunControl::handleAddListener)); } void CodaRunControl::handleContextRemoved(const CodaEvent &event) { const QVector<QByteArray> removedItems = static_cast<const CodaRunControlContextRemovedEvent &>(event).ids(); if (!m_runningProcessId.isEmpty() && removedItems.contains(m_runningProcessId.toAscii())) { appendMessage(tr("Process has finished."), NormalMessageFormat); finishRunControl(); } } void CodaRunControl::handleContextAdded(const CodaEvent &event) { typedef CodaRunControlContextAddedEvent TcfAddedEvent; const TcfAddedEvent &me = static_cast<const TcfAddedEvent &>(event); foreach (const RunControlContext &context, me.contexts()) { if (context.parentId == "root") //is the created context a process m_runningProcessId = QLatin1String(context.id); } } void CodaRunControl::handleContextSuspended(const CodaEvent &event) { typedef CodaRunControlContextSuspendedEvent TcfSuspendEvent; const TcfSuspendEvent &me = static_cast<const TcfSuspendEvent &>(event); switch (me.reason()) { case TcfSuspendEvent::Other: case TcfSuspendEvent::Crash: appendMessage(tr("Thread has crashed: %1").arg(QString::fromLatin1(me.message())), ErrorMessageFormat); if (me.reason() == TcfSuspendEvent::Crash) stop(); else m_codaDevice->sendRunControlResumeCommand(CodaCallback(), me.id()); //TODO: Should I resume automaticly break; default: if (debug) qDebug() << "Context suspend not handled:" << "Reason:" << me.reason() << "Message:" << me.message(); break; } } void CodaRunControl::handleModuleLoadSuspended(const CodaEvent &event) { // Debug mode start: Continue: typedef CodaRunControlModuleLoadContextSuspendedEvent TcfModuleLoadSuspendedEvent; const TcfModuleLoadSuspendedEvent &me = static_cast<const TcfModuleLoadSuspendedEvent &>(event); if (me.info().requireResume) m_codaDevice->sendRunControlResumeCommand(CodaCallback(), me.id()); } void CodaRunControl::handleLogging(const CodaEvent &event) { const CodaLoggingWriteEvent &me = static_cast<const CodaLoggingWriteEvent &>(event); appendMessage(me.message(), StdOutFormat); } void CodaRunControl::handleAddListener(const CodaCommandResult &result) { Q_UNUSED(result) m_codaDevice->sendSymbianOsDataFindProcessesCommand(CodaCallback(this, &CodaRunControl::handleFindProcesses), QByteArray(), QByteArray::number(executableUid(), 16)); } void CodaRunControl::handleFindProcesses(const CodaCommandResult &result) { if (result.values.size() && result.values.at(0).type() == JsonValue::Array && result.values.at(0).children().count()) { //there are processes running. Cannot run mine appendMessage(tr("The process is already running on the device. Please first close it."), ErrorMessageFormat); finishRunControl(); } else { setProgress(maxProgress()*0.90); m_codaDevice->sendProcessStartCommand(CodaCallback(this, &CodaRunControl::handleCreateProcess), executableName(), executableUid(), commandLineArguments().split(" "), QString(), true); appendMessage(tr("Launching: %1").arg(executableName()), NormalMessageFormat); } } void CodaRunControl::handleCreateProcess(const CodaCommandResult &result) { const bool ok = result.type == CodaCommandResult::SuccessReply; if (ok) { setProgress(maxProgress()); appendMessage(tr("Launched."), NormalMessageFormat); } else { appendMessage(tr("Launch failed: %1").arg(result.toString()), ErrorMessageFormat); finishRunControl(); } } void CodaRunControl::finishRunControl() { m_runningProcessId.clear(); if (m_codaDevice) { disconnect(m_codaDevice.data(), 0, this, 0); SymbianUtils::SymbianDeviceManager::instance()->releaseTcfPort(m_codaDevice); } m_state = StateUninit; emit finished(); } QMessageBox *CodaRunControl::createCodaWaitingMessageBox(QWidget *parent) { const QString title = tr("Waiting for CODA"); const QString text = tr("Qt Creator is waiting for the CODA application to connect.<br>" "Please make sure the application is running on " "your mobile phone and the right IP address and port are " "configured in the project settings."); QMessageBox *mb = new QMessageBox(QMessageBox::Information, title, text, QMessageBox::Cancel, parent); return mb; } void CodaRunControl::checkForTimeout() { if (m_state != StateConnecting) return; QMessageBox *mb = createCodaWaitingMessageBox(Core::ICore::instance()->mainWindow()); connect(this, SIGNAL(finished()), mb, SLOT(close())); connect(mb, SIGNAL(finished(int)), this, SLOT(cancelConnection())); mb->open(); } void CodaRunControl::cancelConnection() { if (m_state != StateConnecting) return; stop(); appendMessage(tr("Canceled."), ErrorMessageFormat); emit finished(); } void CodaRunControl::deviceRemoved(const SymbianUtils::SymbianDevice &device) { if (m_codaDevice && device.portName() == m_serialPort) { QString msg = tr("The device '%1' has been disconnected").arg(device.friendlyName()); appendMessage(msg, ErrorMessageFormat); finishRunControl(); } }
The Chameleon. Sylvius Gin, made with an excruciating eye for detail, adapts to your chosen drink revealing all kinds of new flavours. The only gin based on true genever tradition possessing a genuine link with Dr. Sylvius and Leiden, where gin and our distillery originated. Made in the oldest independent distillery in The Netherlands, Sylvius London Dry Gin represents Onder de Boompjes' rich history of distilling high-quality spirits; starting with the production of Jenever in 1669. The experimenting spirit has always defined their brands in every arena from authentic craftsmanship to new ways of creating premium spirits. Sylvius has more fresh botanicals (11 to be exact) and fruit than most other gins. It takes Boompjes 2 weeks to give its smoothness and create the balance between fruit and botanicals to make it the 50 shades of grey to your senses. A very distinctive taste. Onder de Boompjes uses fresh citrus and herbs rather than dried botanicals as well as painstakingly peeling tons of oranges themselves to ensure maximum freshness. Upon tasting, Sylvius displays hints of anise, cinnamon on a sturdy basis of proper gin. Taste is neat with notes of citrus and lavender. Taste it 1 on 1; the gin is much sweeter and cinnamon, anise and some spiciness dominate.
How Bethany-Kris, Author treats personal information that it collects and receives from its website (www.bethanykris.com), ecommerce tools, and other services. We do not, under any circumstances, sell your information or provide it to any one. We use your information only to ship you products you may have purchased from our store, or to send you marketing emails and updates through our newsletter should you sign up for that. This notice tells you the information we collect from you, what we do with it, and how we protect it. You have the right to contact us at any time, and request removal of your information or data from the information where we have access to do so. Otherwise, Personal information we collect will be held onto for as long as it is suitable to our business, or needed. (c) Billing Information. If you make a purchase from our store, we need your billing information to process the purchase. Billing information can include your name, address, telephone number, credit card details, PayPal email address, and any other info you provide. We do keep last 4 digits of your credit card number, credit card type, name, address, and some other billing information, so that you may identify that card used in the future, and keep record of your purchase in case issues happen where it needs replaced, etc. We do not keep or store or know your full credit card number or CVV2; this information is discarded after your transaction is finished. (a) Use. We do not use your information for anything other than shipping a product to you that you buy, or sending you marketing emails if you sign up to our newsletter. (b) Sharing. We do not share personal information you share with us under any circumstances. Our website contains links which will take you to 3rd party sites. Please familiarize yourself with those websites privacy and cookies policies should you visit their sites or provide them with your personal information. Upon request, we will provide you with information about whether we hold or process your personal information. Your information can be removed from storage and deleted, should you request us to do so. Bethany-Kris, Author reserves the right to revise, modify, or update this notice at any time. Should a direct change to this policy affect you or your personal data, you will be notified by email.
The UKs fourth leading reason behind death. « According to optical chemistry research on the College or university of Toledo. Greater than a thousand of the received a fresh inhaler to control their condition, which includes three different substances, while another thousand received the most frequent used inhaler globally. An additional 500 received the triple mixture however in two inhalers. COPD is term used to spell it out several progressive lung illnesses such as for example emphysema. The root cause is definitely smoking, although the problem can affect individuals who have by no means smoked occasionally. All individuals in the trial were previous or current smokers. This group all together would be prepared to experience average 1.3 exacerbations per person in a year – which are often caused by contamination and can bring about hospitalisation or loss of life and faster progression of the condition.Her parents, Rachael and shaun Westbrook, said the MRI scan was very useful. Shaun explained: ‘It’s a very much crisper picture and easier to understand compared to the ultrasound.’ Rachael added: ‘It has been a rollercoaster since Alice-Rose was created on 6 November: not everything was fully formed, and she even now weighs only 2lb 13oz . ‘The MRI was reassuring since it meant you have a better take a look at her human brain.’ Ultrasound of the mind can be done in newborn infants only as the bones within their skull aren’t yet fused.
using jaytwo.Common.Extensions; using jaytwo.Common.Http; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NUnit.Framework; using System; using System.Collections.Generic; using System.Collections.Specialized; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Web.Script.Serialization; namespace jaytwo.Common.Test.Http { [TestFixture] public static partial class HttpProviderTests { private static IEnumerable<TestCaseData> HttpProvider_Put_with_content_TestCases() { yield return new TestCaseData(new Func<string, string, string>((url, content) => new HttpClient().Put(url, content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new HttpClient().Put(new Uri(url), content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new HttpClient().Put(WebRequest.Create(url) as HttpWebRequest, content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => HttpProvider.Put(url, content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => HttpProvider.Put(new Uri(url), content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => HttpProvider.Put(WebRequest.Create(url) as HttpWebRequest, content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new Uri(url).Put(content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => (WebRequest.Create(url) as HttpWebRequest).Put(content))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new HttpClient().Put(url, Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new HttpClient().Put(new Uri(url), Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new HttpClient().Put(WebRequest.Create(url) as HttpWebRequest, Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => HttpProvider.Put(url, Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => HttpProvider.Put(new Uri(url), Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => HttpProvider.Put(WebRequest.Create(url) as HttpWebRequest, Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => new Uri(url).Put(Encoding.UTF8.GetBytes(content)))); yield return new TestCaseData(new Func<string, string, string>((url, content) => (WebRequest.Create(url) as HttpWebRequest).Put(Encoding.UTF8.GetBytes(content)))); } [Test] [TestCaseSource("HttpProvider_Put_with_content_TestCases")] public static void HttpProvider_Put_with_content(Func<string, string, string> submitMethod) { // http://httpbin.org/ var url = "http://httpbin.org/put"; var content = "hello world"; //var contentType = "application/custom"; var responseString = submitMethod(url, content); Console.WriteLine(responseString); var result = JsonConvert.DeserializeObject<JObject>(responseString); Assert.AreEqual(url, result["url"].ToString()); //Assert.AreEqual("application/custom; charset=utf-8", result["headers"]["Content-Type"].ToString()); Assert.AreEqual(content, result["data"].ToString()); } private static IEnumerable<TestCaseData> HttpProvider_Put_with_form_TestCases() { yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => new HttpClient().Put(url, content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => new HttpClient().Put(new Uri(url), content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => new HttpClient().Put(WebRequest.Create(url) as HttpWebRequest, content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => HttpProvider.Put(url, content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => HttpProvider.Put(new Uri(url), content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => HttpProvider.Put(WebRequest.Create(url) as HttpWebRequest, content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => new Uri(url).Put(content))); yield return new TestCaseData(new Func<string, NameValueCollection, string>((url, content) => (WebRequest.Create(url) as HttpWebRequest).Put(content))); } [Test] [TestCaseSource("HttpProvider_Put_with_form_TestCases")] public static void HttpProvider_Put_with_form(Func<string, NameValueCollection, string> submitMethod) { // http://httpbin.org/ var url = "http://httpbin.org/put"; var form = new NameValueCollection() { { "hello", "world" } }; var responseString = submitMethod(url, form); Console.WriteLine(responseString); var result = JsonConvert.DeserializeObject<JObject>(responseString); Assert.AreEqual(url, result["url"].ToString()); //Assert.AreEqual("application/custom; charset=utf-8", result["headers"]["Content-Type"].ToString()); Assert.AreEqual("world", result["form"]["hello"].ToString()); } private static IEnumerable<TestCaseData> HttpProvider_Put_with_stream_TestCases() { yield return new TestCaseData(new Func<string, Stream, string>((url, content) => new HttpClient().Put(url, content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => new HttpClient().Put(new Uri(url), content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => new HttpClient().Put(WebRequest.Create(url) as HttpWebRequest, content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => HttpProvider.Put(url, content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => HttpProvider.Put(new Uri(url), content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => HttpProvider.Put(WebRequest.Create(url) as HttpWebRequest, content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => new Uri(url).Put(content))); yield return new TestCaseData(new Func<string, Stream, string>((url, content) => (WebRequest.Create(url) as HttpWebRequest).Put(content))); } [Test] [TestCaseSource("HttpProvider_Put_with_stream_TestCases")] public static void HttpProvider_Put_with_stream(Func<string, Stream, string> submitMethod) { // http://httpbin.org/ var url = "http://httpbin.org/put"; var content = "hello world"; using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(content))) { var responseString = submitMethod(url, stream); Console.WriteLine(responseString); var result = JsonConvert.DeserializeObject<JObject>(responseString); Assert.AreEqual(url, result["url"].ToString()); //Assert.AreEqual("application/custom; charset=utf-8", result["headers"]["Content-Type"].ToString()); Assert.AreEqual(content, result["data"].ToString()); } } } }
package org.usfirst.frc.team3414.autonomous; import org.usfirst.frc.team3414.actuators.ActuatorConfig; import org.usfirst.frc.team3414.actuators.IDriveTrain; import org.usfirst.frc.team3414.sensors.ITimeEventHandler; import org.usfirst.frc.team3414.sensors.ITimeListener; import org.usfirst.frc.team3414.sensors.SensorConfig; import org.usfirst.frc.team3414.sensors.TimeEventArgs; /** * An autonomous routine that drives backward into the autonomous zone and does nothing else, used in other autonomous methods. * * @author Ray * */ public class DriveBackwardIntoAuto implements AutonomousProcedure, ITimeListener { IVision cameraAssist; IDriveTrain mecanumDrive; ITimeEventHandler clock; public DriveBackwardIntoAuto() { super(); SensorConfig sensors = SensorConfig.getInstance(); ActuatorConfig actuators = ActuatorConfig.getInstance(); this.mecanumDrive = actuators.getDriveTrain(); this.clock = sensors.getClock(); this.cameraAssist = sensors.getVisionAssist(); } public void doAuto() { clock.addTimeListener(this, 3000); //Change for timeout value (this sets the value where the robot gives up on finding the line and just stops by timebase) mecanumDrive.move(0, -1.0, 0.0); // Move backward into the autonomous zone while(cameraAssist.isInAutoZone() == false) { } mecanumDrive.stop(); // Stops when we get into the autonomous zone } @Override public void timeEvent(TimeEventArgs timeEvent) { mecanumDrive.stop(); } }
# MongoDB - Aula 04 - Exercício autor: Ronaldo Feitosa ## **Adicionar** 2 ataques ao mesmo tempo para os seguintes pokemons: Pikachu, Squirtle, Bulbassauro e Charmander; ``` var query = {name: /pikachu/i} var attacks = ['raio elétrico', 'rajada de raios'] var mod = {$pushAll:{moves: attacks}} db.pokemons.update(query, mod) Updated 1 existing record(s) in 1ms WriteResult({ "nMatched": 1, "nUpserted": 0, "nModified": 1 }) db.pokemons.find(query) { "_id": ObjectId("56e74e19334563dc5915b2f2"), "name": "Pikachu", "description": "Rato elétrico bem fofinho", "type": "electric", "attack": 55, "height": 0.4, "moves": [ "investida", "choque do trovão", "raio elétrico", "rajada de raios" ], "active": false } Fetched 1 record(s) in 1ms var query = {name: /squirtle/i} var attacks = ['tsunami', 'fúria do mar'] var mod = {$pushAll:{moves: attacks}} db.pokemons.update(query, mod) Updated 1 existing record(s) in 1ms WriteResult({ "nMatched": 1, "nUpserted": 0, "nModified": 1 }) db.pokemons.find(query) { "_id": ObjectId("56e74e6a334563dc5915b2f5"), "name": "Squirtle", "description": "Ejeta água que passarinho não bebe", "type": "água", "attack": 48, "height": 0.5, "active": false, "moves": [ "investida", "hidro bomba", "tsunami", "fúria do mar" ] } Fetched 1 record(s) in 1ms var query = {name: /bulbassauro/i} var attacks = ['galhos cortantes', 'explosão verde'] var mod = {$pushAll:{moves: attacks}} db.pokemons.update(query, mod) Updated 1 existing record(s) in 1ms WriteResult({ "nMatched": 1, "nUpserted": 0, "nModified": 1 }) db.pokemons.find(query) { "_id": ObjectId("56e74e2e334563dc5915b2f3"), "name": "Bulbassauro", "description": "Chicote de trepadeira", "type": "grama", "attack": 49, "height": 0.4, "active": false, "moves": [ "investida", "folha navalha", "galhos cortantes", "explosão verde" ] } Fetched 1 record(s) in 3ms var query = {name: /charmander/i} var attacks = ['vulcão em erupção', 'tempestade de fogo'] var mod = {$pushAll:{moves: attacks}} db.pokemons.update(query, mod) Updated 1 existing record(s) in 1ms WriteResult({ "nMatched": 1, "nUpserted": 0, "nModified": 1 }) db.pokemons.find(query) { "_id": ObjectId("56e74e4b334563dc5915b2f4"), "name": "Charmander", "description": "Esse é o cão chupando manga de fofinho", "type": "fogo", "attack": 52, "height": 0.6, "active": false, "moves": [ "investida", "lança chamas", "vulcão em erupção", "tempestade de fogo" ] } Fetched 1 record(s) in 1ms ``` ## **Adicionar** 1 movimento em todos os pokemons: 'desvio'; ``` var query = {} var mod = {$push:{moves: 'desvio'}} var options = {multi: true} db.pokemons.update(query, mod, options) ``` ## **Adicionar** o pokemon 'AindaNaoExisteMon' caso ele não exista com todos os dados com o valor 'null' e a descrição: "Sem maiores informações"; ``` var query = {name: /AindaNaoExisteMon/i} var mod = {$setOnInsert:{name: "AindaNaoExisteMon", type: null, attack: null, height: null, active: false, moves: null, description: "Sem maiores informações"}} var options = {upsert: true} db.pokemons.update(query, mod, options) Updated 1 new record(s) in 1ms WriteResult({ "nMatched": 0, "nUpserted": 1, "nModified": 0, "_id": ObjectId("56e990f87e3a81c70cb353a9") }) db.pokemons.find(query) { "_id": ObjectId("56e990f87e3a81c70cb353a9"), "name": "AindaNaoExisteMon", "type": null, "attack": null, "height": null, "active": false, "moves": null, "description": "Sem maiores informações" } Fetched 1 record(s) in 2ms ``` ## Pesquisar todos os pokemons que possuam o ataque 'investida' e mais um que você adicionou, escolha seu pokemon favorito; ``` var query = {moves: {$in: [/investida/i, /tsunami/i]}} db.pokemons.find(query) ``` ## Pesquisar **todos** os pokemons que possuam os ataques que você adicionou, escolha seu pokemon favorito; ``` var query = {moves: {$all: [/investida/i, /tsunami/i]}} db.pokemons.find(query) { "_id": ObjectId("56e74e6a334563dc5915b2f5"), "name": "Squirtle", "description": "Ejeta água que passarinho não bebe", "type": "água", "attack": 48, "height": 0.5, "active": false, "moves": [ "investida", "tsunami", "fúria do mar", "desvio" ] } Fetched 1 record(s) in 0ms ``` ## Pesquisar **todos** os pokemons que não são do tipo 'elétrico'; ``` var query = {type: {$ne: 'electric'}} db.pokemons.find(query) { "_id": ObjectId("56e5be1c1ed08ada9f1ebe72"), "name": "Mewtwo", "description": "Pokemon super poderoso", "type": "psíquico", "height": "6.7", "attack": 35, "defense": 30, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5bef71ed08ada9f1ebe74"), "name": "Kadabra", "description": "Mestre das colheres tortas", "type": "psíquico", "height": 4.3, "attack": 35, "defense": 30, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5bfe41ed08ada9f1ebe75"), "name": "Cubone", "description": "Pokemon cabeça de Osso", "type": "terra", "height": 1.4, "attack": 50, "defense": 95, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5c0c61ed08ada9f1ebe76"), "name": "Vaporeon", "description": "Pokemon aquático evoluído do Eevee", "type": "água", "height": 3.3, "attack": 65, "defense": 60, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5c0ff1ed08ada9f1ebe77"), "name": "Butterfree", "description": "Pokemon voador", "type": "vento", "height": 3.7, "attack": 45, "defense": 50, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5c1931ed08ada9f1ebe78"), "name": "Golbat", "description": "Morcego sanguinário", "type": "vento e veneno", "height": 5.3, "attack": 80, "defense": 70, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e74e2e334563dc5915b2f3"), "name": "Bulbassauro", "description": "Chicote de trepadeira", "type": "grama", "attack": 49, "height": 0.4, "active": false, "moves": [ "investida", "galhos cortantes", "explosão verde", "desvio" ] } { "_id": ObjectId("56e74e6a334563dc5915b2f5"), "name": "Squirtle", "description": "Ejeta água que passarinho não bebe", "type": "água", "attack": 48, "height": 0.5, "active": false, "moves": [ "investida", "tsunami", "fúria do mar", "desvio" ] } { "_id": ObjectId("56e9535771ff65fe620a04a7"), "description": "Pokemon de teste", "name": "Testemon", "attack": 8000, "defense": 8000, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e990f87e3a81c70cb353a9"), "name": "AindaNaoExisteMon", "type": null, "attack": null, "height": null, "active": false, "moves": [ "investida", "desvio" ], "description": "Sem maiores informações" } { "_id": ObjectId("56e74e4b334563dc5915b2f4"), "name": "Charmander", "description": "Esse é o cão chupando manga de fofinho", "type": "fogo", "attack": 52, "height": 0.6, "active": false, "moves": [ "investida", "vulcão em erupção", "tempestade de fogo", "desvio" ] } Fetched 11 record(s) in 4ms ``` ## Pesquisar **todos** os pokemons que tenham o ataque 'investida' **E**tenham o attack **não menor ou igual** a 49; ``` var query = {$and: [{moves: {$in: ['investida']}}, {attack: {$not: {$lte: 49}}}]} db.pokemons.find(query) { "_id": ObjectId("56e5bfe41ed08ada9f1ebe75"), "name": "Cubone", "description": "Pokemon cabeça de Osso", "type": "terra", "height": 1.4, "attack": 50, "defense": 95, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5c0c61ed08ada9f1ebe76"), "name": "Vaporeon", "description": "Pokemon aquático evoluído do Eevee", "type": "água", "height": 3.3, "attack": 65, "defense": 60, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e5c1931ed08ada9f1ebe78"), "name": "Golbat", "description": "Morcego sanguinário", "type": "vento e veneno", "height": 5.3, "attack": 80, "defense": 70, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e9535771ff65fe620a04a7"), "description": "Pokemon de teste", "name": "Testemon", "attack": 8000, "defense": 8000, "active": false, "moves": [ "investida", "desvio" ] } { "_id": ObjectId("56e74e19334563dc5915b2f2"), "name": "Pikachu", "description": "Rato elétrico bem fofinho", "type": "electric", "attack": 55, "height": 0.4, "moves": [ "investida", "raio elétrico", "rajada de raios", "desvio" ], "active": false } { "_id": ObjectId("56e990f87e3a81c70cb353a9"), "name": "AindaNaoExisteMon", "type": null, "attack": null, "height": null, "active": false, "moves": [ "investida", "desvio" ], "description": "Sem maiores informações" } { "_id": ObjectId("56e74e4b334563dc5915b2f4"), "name": "Charmander", "description": "Esse é o cão chupando manga de fofinho", "type": "fogo", "attack": 52, "height": 0.6, "active": false, "moves": [ "investida", "vulcão em erupção", "tempestade de fogo", "desvio" ] } Fetched 7 record(s) in 4ms ``` ## Remova **todos** os pokemons do tipo água e com attack menor que 50; ``` var query = {$and: [{type: /água/i}, {attack: {$lt: 50 }}]} db.pokemons.remove(query) Removed 1 record(s) in 1ms WriteResult({ "nRemoved": 1 }) ```
define({ "showArcgisBasemaps": "ポータルのベースマップを含める", "add": "クリックすると新規ベースマップが追加されます", "edit": "プロパティ", "titlePH": "ベースマップ タイトル", "thumbnailHint": "画像を変更するにはサムネイルをクリックします", "urlPH": "レイヤー URL", "addlayer": "ベースマップの追加", "warning": "不正な入力", "save": "保存して戻る", "back": "キャンセルして戻る", "addUrl": "URL の追加", "autoCheck": "自動チェック", "checking": "チェック中...", "result": "正常に保存されました", "spError": "ギャラリーに追加されるすべてのベースマップの空間参照は同じである必要があります。", "invalidTitle1": "ベースマップ '", "invalidTitle2": "' はすでに存在します。 別のタイトルを選択してください。", "invalidBasemapUrl1": "このタイプのレイヤーは、ベースマップとして使用できません。", "invalidBasemapUrl2": "追加しているベースマップは、現在のマップとは空間参照が異なります。", "addBaselayer": "ベースマップ レイヤーの追加", "repectOnline": "組織のベースマップ ギャラリーの設定と常に同期", "customBasemap": "カスタム ベースマップの構成", "basemapTips": "\"${import}\" または \"${createNew}\" をクリックして、ベースマップを追加します。", "importBasemap": "インポート", "createBasemap": "新規作成", "importTitle": "ベースマップのインポート", "createTitle": "新規ベースマップ", "selectGroupTip": "Web マップをベースマップとして使用できるグループを選択します。", "noBasemaps": "ベースマップがありません。", "defaultGroup": "Esri デフォルト", "defaultOrgGroup": "組織のデフォルト", "warningTitle": "警告", "confirmDelete": "選択したベースマップを削除しますか?", "noBasemapAvailable": "すべてのベースマップの空間参照またはタイル スキーマが現在のマップと異なっているため、使用できるベースマップがありません。" });
<?php /** * Owner's questions */ $sort = get_input('sort', 'newest'); // Get the current page's owner $page_owner = elgg_get_page_owner_entity(); if (!$page_owner) { forward('answers/all'); } elgg_push_breadcrumb(elgg_echo('answers:owner', array($page_owner->name))); if($_GET['tab']) { elgg_register_title_button(null, 'add', 'tab=' . $_GET['tab']); } $tab = $_GET['tab']; $phase = get_entity($tab)->order; $filter = function($element) use ($tab, $phase) { return $element->tab == $tab || (!$element->tab && $phase == 1); }; $questions = array_filter(answers_get_sorted_questions($page_owner->guid, $sort), $filter); $content = elgg_view_entity_list($questions, array( 'full_view' => false, 'pagination' => true, )); if (!$content) { $content = elgg_echo('answers:none'); } $title = elgg_echo('answers:owner', array($page_owner->name)); $vars = array( 'content' => $content, 'title' => $title, ); if ($page_owner instanceof ElggGroup || $page_owner->guid == elgg_get_logged_in_user_guid()) { $vars['filter'] = elgg_view('answers/search_and_submit_question'); $vars['filter'].= elgg_view('answers/filter_questions', array( 'sort' => $sort )); } else { $vars['filter_context'] = ''; } $body = elgg_view_layout('content', $vars); echo elgg_view_page($title, $body);
# xelatex-watcher A simple utility for watching changes in .tex, .sty and .bib files and rebuilding the main XeLaTeX document. ## Installation Set the prefix for npm global installation: ```bash npm config set prefix ~/<your/directory> ``` ```bash npm install xelatex-watcher -g ``` Set the alias to `~/<your/directory>/bin/xelatex-watcher` command. ## Usage ``` xelatex-watcher <main.tex> ```
For all your wedding car hire needs in Sunderland, don't look anywhere else. You won't find a bigger choice of wedding cars anywhere else in the Sunderland area plus we guarantee to offer you the very best wedding car, at the very lowest rate. If you're looking for a traditional wedding car to complete your big day, then take a look at our stunning 1960's Princess car. This vehicle comes complete with a suited chauffeur and never fails to make a lasting impression. For those brides and grooms with a more contemporary taste, cast your eyes over our latest Rolls Royce Phantom model and prepare to swoon. This state of the art wedding car boasts an onboard champagne bar, full entertainment system and air conditioning. Sunderland has a great choice of quality wedding venues. The Sunderland Marriott Hotel is one such place. Enjoying a seaside setting this 4 star hotel provides a picturesque backdrop to your big day as it looks out over the sandy beach at Seaburn. Another superb wedding venue in the Sunderland area is Chester's. This delightful inn will provide you with a warm welcome on your special day, plus they offer some really affordable wedding packages making it ideal for brides on a budget. For more information on our wedding car hire service in Sunderland, call us now.
package com.nordicpeak.flowengine.queries.tablequery; import com.nordicpeak.flowengine.interfaces.QueryHandler; public class SummaryTableQueryUtils { @SuppressWarnings("unchecked") public static <X extends SummaryTableQuery> SummaryTableQueryCallback<X> getGenericTableQueryCallback(Class<? extends SummaryTableQuery> clazz, QueryHandler queryHandler, String queryTypeID) { return (SummaryTableQueryCallback<X>) queryHandler.getQueryProvider(queryTypeID); } }
Represents the type decltype(expr) (C++11). Definition at line 4258 of file Type.h. Definition at line 3186 of file Type.cpp. Definition at line 4277 of file Type.h. Remove a single level of sugar. Definition at line 3198 of file Type.cpp. References getUnderlyingType(), isSugared(), and clang::ExtQualsTypeCommonBase::QualType. Definition at line 4268 of file Type.h. Referenced by addExceptionSpec(), clang::getParameterABISpelling(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), mangleAArch64VectorBase(), clang::TreeTransform< Derived >::TransformExceptionSpec(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitDecltypeType(), and clang::ASTNodeImporter::VisitDecltypeType(). Definition at line 4269 of file Type.h. Referenced by addExceptionSpec(), desugar(), and clang::ASTNodeImporter::VisitDecltypeType(). Returns whether this type directly provides sugar. Definition at line 3196 of file Type.cpp. Definition at line 4263 of file Type.h.
# encoding: utf-8 # frozen_string_literal: true describe ContactData::Contact do let(:name) { 'Derek Jones III' } let(:source) { 'angel_list' } let(:slug) { 'derek-jones' } let(:domain) { 'anthemis.com' } it 'searches for a contact by name' do VCR.use_cassette('name_search') do result = ContactData::Contact.search name # , verbose: true expect(result).to be_a(Hash) expect(result[:slug]).to eq('derek-jones') expect(result[:identities].count).to eq(15) end end it 'retrieves a contact from a source' do VCR.use_cassette('source_slug') do result = ContactData::Contact.from source, slug # , verbose: true expect(result).to be_a(Hash) expect(result[:slug]).to eq(slug) expect(result[:data].first[:source_identities].count).to eq(5) end end it 'retrieves an organization contact from a domain name' do VCR.use_cassette('domain_name') do result = ContactData::Contact.from_domain domain # , verbose: true expect(result).to be_a(Hash) expect(result[:contacts].first[:slug]).to eq('anthemis-group') expect(result[:contacts].count).to eq(1) end end it 'retrieves a person contact from a domain name' do VCR.use_cassette('domain_name') do result = ContactData::Contact.from_domain domain, contact_type: 'person' # , verbose: true expect(result).to be_a(Hash) expect(result[:contacts].first[:slug]).to eq('sean-park') expect(result[:contacts].count).to eq(1) end end it 'retrieves all contacts for a domain name' do VCR.use_cassette('domain_name') do result = ContactData::Contact.from_domain domain, contact_type: 'all' # , verbose: true expect(result).to be_a(Hash) expect(result[:contacts].count).to eq(2) end end end
/* * Copyright (C) 2011-2012 Sansar Choinyambuu * Copyright (C) 2012-2014 Andreas Steffen * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ #include "pts.h" #include <utils/debug.h> #include <crypto/hashers/hasher.h> #include <bio/bio_writer.h> #include <bio/bio_reader.h> #ifdef TSS_TROUSERS #include <trousers/tss.h> #include <trousers/trousers.h> #else #ifndef TPM_TAG_QUOTE_INFO2 #define TPM_TAG_QUOTE_INFO2 0x0036 #endif #ifndef TPM_LOC_ZERO #define TPM_LOC_ZERO 0x01 #endif #endif #include <sys/types.h> #include <sys/stat.h> #include <sys/utsname.h> #include <libgen.h> #include <unistd.h> #include <errno.h> typedef struct private_pts_t private_pts_t; /** * Private data of a pts_t object. * */ struct private_pts_t { /** * Public pts_t interface. */ pts_t public; /** * PTS Protocol Capabilities */ pts_proto_caps_flag_t proto_caps; /** * PTS Measurement Algorithm */ pts_meas_algorithms_t algorithm; /** * DH Hash Algorithm */ pts_meas_algorithms_t dh_hash_algorithm; /** * PTS Diffie-Hellman Secret */ diffie_hellman_t *dh; /** * PTS Diffie-Hellman Initiator Nonce */ chunk_t initiator_nonce; /** * PTS Diffie-Hellman Responder Nonce */ chunk_t responder_nonce; /** * Secret assessment value to be used for TPM Quote as an external data */ chunk_t secret; /** * Primary key of platform entry in database */ int platform_id; /** * TRUE if IMC-PTS, FALSE if IMV-PTS */ bool is_imc; /** * Do we have an activated TPM */ bool has_tpm; /** * Contains a TPM_CAP_VERSION_INFO struct */ chunk_t tpm_version_info; /** * Contains TSS Blob structure for AIK */ chunk_t aik_blob; /** * Contains a Attestation Identity Key or Certificate */ certificate_t *aik; /** * Primary key referening AIK in database */ int aik_id; /** * Shadow PCR set */ pts_pcr_t *pcrs; }; METHOD(pts_t, get_proto_caps, pts_proto_caps_flag_t, private_pts_t *this) { return this->proto_caps; } METHOD(pts_t, set_proto_caps, void, private_pts_t *this, pts_proto_caps_flag_t flags) { this->proto_caps = flags; DBG2(DBG_PTS, "supported PTS protocol capabilities: %s%s%s%s%s", flags & PTS_PROTO_CAPS_C ? "C" : ".", flags & PTS_PROTO_CAPS_V ? "V" : ".", flags & PTS_PROTO_CAPS_D ? "D" : ".", flags & PTS_PROTO_CAPS_T ? "T" : ".", flags & PTS_PROTO_CAPS_X ? "X" : "."); } METHOD(pts_t, get_meas_algorithm, pts_meas_algorithms_t, private_pts_t *this) { return this->algorithm; } METHOD(pts_t, set_meas_algorithm, void, private_pts_t *this, pts_meas_algorithms_t algorithm) { hash_algorithm_t hash_alg; hash_alg = pts_meas_algo_to_hash(algorithm); DBG2(DBG_PTS, "selected PTS measurement algorithm is %N", hash_algorithm_names, hash_alg); if (hash_alg != HASH_UNKNOWN) { this->algorithm = algorithm; } } METHOD(pts_t, get_dh_hash_algorithm, pts_meas_algorithms_t, private_pts_t *this) { return this->dh_hash_algorithm; } METHOD(pts_t, set_dh_hash_algorithm, void, private_pts_t *this, pts_meas_algorithms_t algorithm) { hash_algorithm_t hash_alg; hash_alg = pts_meas_algo_to_hash(algorithm); DBG2(DBG_PTS, "selected DH hash algorithm is %N", hash_algorithm_names, hash_alg); if (hash_alg != HASH_UNKNOWN) { this->dh_hash_algorithm = algorithm; } } METHOD(pts_t, create_dh_nonce, bool, private_pts_t *this, pts_dh_group_t group, int nonce_len) { diffie_hellman_group_t dh_group; chunk_t *nonce; rng_t *rng; dh_group = pts_dh_group_to_ike(group); DBG2(DBG_PTS, "selected PTS DH group is %N", diffie_hellman_group_names, dh_group); DESTROY_IF(this->dh); this->dh = lib->crypto->create_dh(lib->crypto, dh_group); rng = lib->crypto->create_rng(lib->crypto, RNG_STRONG); if (!rng) { DBG1(DBG_PTS, "no rng available"); return FALSE; } DBG2(DBG_PTS, "nonce length is %d", nonce_len); nonce = this->is_imc ? &this->responder_nonce : &this->initiator_nonce; chunk_free(nonce); if (!rng->allocate_bytes(rng, nonce_len, nonce)) { DBG1(DBG_PTS, "failed to allocate nonce"); rng->destroy(rng); return FALSE; } rng->destroy(rng); return TRUE; } METHOD(pts_t, get_my_public_value, void, private_pts_t *this, chunk_t *value, chunk_t *nonce) { this->dh->get_my_public_value(this->dh, value); *nonce = this->is_imc ? this->responder_nonce : this->initiator_nonce; } METHOD(pts_t, set_peer_public_value, void, private_pts_t *this, chunk_t value, chunk_t nonce) { this->dh->set_other_public_value(this->dh, value); nonce = chunk_clone(nonce); if (this->is_imc) { this->initiator_nonce = nonce; } else { this->responder_nonce = nonce; } } METHOD(pts_t, calculate_secret, bool, private_pts_t *this) { hasher_t *hasher; hash_algorithm_t hash_alg; chunk_t shared_secret; /* Check presence of nonces */ if (!this->initiator_nonce.len || !this->responder_nonce.len) { DBG1(DBG_PTS, "initiator and/or responder nonce is not available"); return FALSE; } DBG3(DBG_PTS, "initiator nonce: %B", &this->initiator_nonce); DBG3(DBG_PTS, "responder nonce: %B", &this->responder_nonce); /* Calculate the DH secret */ if (this->dh->get_shared_secret(this->dh, &shared_secret) != SUCCESS) { DBG1(DBG_PTS, "shared DH secret computation failed"); return FALSE; } DBG3(DBG_PTS, "shared DH secret: %B", &shared_secret); /* Calculate the secret assessment value */ hash_alg = pts_meas_algo_to_hash(this->dh_hash_algorithm); hasher = lib->crypto->create_hasher(lib->crypto, hash_alg); if (!hasher || !hasher->get_hash(hasher, chunk_from_chars('1'), NULL) || !hasher->get_hash(hasher, this->initiator_nonce, NULL) || !hasher->get_hash(hasher, this->responder_nonce, NULL) || !hasher->allocate_hash(hasher, shared_secret, &this->secret)) { DESTROY_IF(hasher); return FALSE; } hasher->destroy(hasher); /* The DH secret must be destroyed */ chunk_clear(&shared_secret); /* * Truncate the hash to 20 bytes to fit the ExternalData * argument of the TPM Quote command */ this->secret.len = min(this->secret.len, 20); DBG3(DBG_PTS, "secret assessment value: %B", &this->secret); return TRUE; } #ifdef TSS_TROUSERS /** * Print TPM 1.2 Version Info */ static void print_tpm_version_info(private_pts_t *this) { TPM_CAP_VERSION_INFO versionInfo; UINT64 offset = 0; TSS_RESULT result; result = Trspi_UnloadBlob_CAP_VERSION_INFO(&offset, this->tpm_version_info.ptr, &versionInfo); if (result != TSS_SUCCESS) { DBG1(DBG_PTS, "could not parse tpm version info: tss error 0x%x", result); } else { DBG2(DBG_PTS, "TPM 1.2 Version Info: Chip Version: %hhu.%hhu.%hhu.%hhu," " Spec Level: %hu, Errata Rev: %hhu, Vendor ID: %.4s [%.*s]", versionInfo.version.major, versionInfo.version.minor, versionInfo.version.revMajor, versionInfo.version.revMinor, versionInfo.specLevel, versionInfo.errataRev, versionInfo.tpmVendorID, versionInfo.vendorSpecificSize, versionInfo.vendorSpecificSize ? (char*)versionInfo.vendorSpecific : ""); } free(versionInfo.vendorSpecific); } #else static void print_tpm_version_info(private_pts_t *this) { DBG1(DBG_PTS, "unknown TPM version: no TSS implementation available"); } #endif /* TSS_TROUSERS */ METHOD(pts_t, get_platform_id, int, private_pts_t *this) { return this->platform_id; } METHOD(pts_t, set_platform_id, void, private_pts_t *this, int pid) { this->platform_id = pid; } METHOD(pts_t, get_tpm_version_info, bool, private_pts_t *this, chunk_t *info) { if (!this->has_tpm) { return FALSE; } *info = this->tpm_version_info; print_tpm_version_info(this); return TRUE; } METHOD(pts_t, set_tpm_version_info, void, private_pts_t *this, chunk_t info) { this->tpm_version_info = chunk_clone(info); print_tpm_version_info(this); } /** * Load an AIK Blob (TSS_TSPATTRIB_KEYBLOB_BLOB attribute) */ static void load_aik_blob(private_pts_t *this) { char *blob_path; FILE *fp; u_int32_t aikBlobLen; blob_path = lib->settings->get_str(lib->settings, "%s.plugins.imc-attestation.aik_blob", NULL, lib->ns); if (blob_path) { /* Read aik key blob from a file */ if ((fp = fopen(blob_path, "r")) == NULL) { DBG1(DBG_PTS, "unable to open AIK Blob file: %s", blob_path); return; } fseek(fp, 0, SEEK_END); aikBlobLen = ftell(fp); fseek(fp, 0L, SEEK_SET); this->aik_blob = chunk_alloc(aikBlobLen); if (fread(this->aik_blob.ptr, 1, aikBlobLen, fp) == aikBlobLen) { DBG2(DBG_PTS, "loaded AIK Blob from '%s'", blob_path); DBG3(DBG_PTS, "AIK Blob: %B", &this->aik_blob); } else { DBG1(DBG_PTS, "unable to read AIK Blob file '%s'", blob_path); chunk_free(&this->aik_blob); } fclose(fp); return; } DBG1(DBG_PTS, "AIK Blob is not available"); } /** * Load an AIK certificate or public key * the certificate having precedence over the public key if both are present */ static void load_aik(private_pts_t *this) { char *cert_path, *key_path; cert_path = lib->settings->get_str(lib->settings, "%s.plugins.imc-attestation.aik_cert", NULL, lib->ns); key_path = lib->settings->get_str(lib->settings, "%s.plugins.imc-attestation.aik_pubkey", NULL, lib->ns); if (cert_path) { this->aik = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509, BUILD_FROM_FILE, cert_path, BUILD_END); if (this->aik) { DBG2(DBG_PTS, "loaded AIK certificate from '%s'", cert_path); return; } } if (key_path) { this->aik = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_TRUSTED_PUBKEY, BUILD_FROM_FILE, key_path, BUILD_END); if (this->aik) { DBG2(DBG_PTS, "loaded AIK public key from '%s'", key_path); return; } } DBG1(DBG_PTS, "neither AIK certificate nor public key is available"); } METHOD(pts_t, get_aik, certificate_t*, private_pts_t *this) { return this->aik; } METHOD(pts_t, set_aik, void, private_pts_t *this, certificate_t *aik, int aik_id) { DESTROY_IF(this->aik); this->aik = aik->get_ref(aik); this->aik_id = aik_id; } METHOD(pts_t, get_aik_id, int, private_pts_t *this) { return this->aik_id; } METHOD(pts_t, is_path_valid, bool, private_pts_t *this, char *path, pts_error_code_t *error_code) { struct stat st; *error_code = 0; if (!stat(path, &st)) { return TRUE; } else if (errno == ENOENT || errno == ENOTDIR) { DBG1(DBG_PTS, "file/directory does not exist %s", path); *error_code = TCG_PTS_FILE_NOT_FOUND; } else if (errno == EFAULT) { DBG1(DBG_PTS, "bad address %s", path); *error_code = TCG_PTS_INVALID_PATH; } else { DBG1(DBG_PTS, "error: %s occurred while validating path: %s", strerror(errno), path); return FALSE; } return TRUE; } /** * Obtain statistical information describing a file */ static bool file_metadata(char *pathname, pts_file_metadata_t **entry) { struct stat st; pts_file_metadata_t *this; this = malloc_thing(pts_file_metadata_t); if (stat(pathname, &st)) { DBG1(DBG_PTS, "unable to obtain statistics about '%s'", pathname); free(this); return FALSE; } if (S_ISREG(st.st_mode)) { this->type = PTS_FILE_REGULAR; } else if (S_ISDIR(st.st_mode)) { this->type = PTS_FILE_DIRECTORY; } else if (S_ISCHR(st.st_mode)) { this->type = PTS_FILE_CHAR_SPEC; } else if (S_ISBLK(st.st_mode)) { this->type = PTS_FILE_BLOCK_SPEC; } else if (S_ISFIFO(st.st_mode)) { this->type = PTS_FILE_FIFO; } else if (S_ISLNK(st.st_mode)) { this->type = PTS_FILE_SYM_LINK; } else if (S_ISSOCK(st.st_mode)) { this->type = PTS_FILE_SOCKET; } else { this->type = PTS_FILE_OTHER; } this->filesize = st.st_size; this->created = st.st_ctime; this->modified = st.st_mtime; this->accessed = st.st_atime; this->owner = st.st_uid; this->group = st.st_gid; *entry = this; return TRUE; } METHOD(pts_t, get_metadata, pts_file_meta_t*, private_pts_t *this, char *pathname, bool is_directory) { pts_file_meta_t *metadata; pts_file_metadata_t *entry; /* Create a metadata object */ metadata = pts_file_meta_create(); if (is_directory) { enumerator_t *enumerator; char *rel_name, *abs_name; struct stat st; enumerator = enumerator_create_directory(pathname); if (!enumerator) { DBG1(DBG_PTS," directory '%s' can not be opened, %s", pathname, strerror(errno)); metadata->destroy(metadata); return NULL; } while (enumerator->enumerate(enumerator, &rel_name, &abs_name, &st)) { /* measure regular files only */ if (S_ISREG(st.st_mode) && *rel_name != '.') { if (!file_metadata(abs_name, &entry)) { enumerator->destroy(enumerator); metadata->destroy(metadata); return NULL; } entry->filename = strdup(rel_name); metadata->add(metadata, entry); } } enumerator->destroy(enumerator); } else { if (!file_metadata(pathname, &entry)) { metadata->destroy(metadata); return NULL; } entry->filename = path_basename(pathname); metadata->add(metadata, entry); } return metadata; } #ifdef TSS_TROUSERS METHOD(pts_t, read_pcr, bool, private_pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value) { TSS_HCONTEXT hContext; TSS_HTPM hTPM; TSS_RESULT result; chunk_t rgbPcrValue; bool success = FALSE; result = Tspi_Context_Create(&hContext); if (result != TSS_SUCCESS) { DBG1(DBG_PTS, "TPM context could not be created: tss error 0x%x", result); return FALSE; } result = Tspi_Context_Connect(hContext, NULL); if (result != TSS_SUCCESS) { goto err; } result = Tspi_Context_GetTpmObject (hContext, &hTPM); if (result != TSS_SUCCESS) { goto err; } result = Tspi_TPM_PcrRead(hTPM, pcr_num, (UINT32*)&rgbPcrValue.len, &rgbPcrValue.ptr); if (result != TSS_SUCCESS) { goto err; } *pcr_value = chunk_clone(rgbPcrValue); DBG3(DBG_PTS, "PCR %d value:%B", pcr_num, pcr_value); success = TRUE; err: if (!success) { DBG1(DBG_PTS, "TPM not available: tss error 0x%x", result); } Tspi_Context_FreeMemory(hContext, NULL); Tspi_Context_Close(hContext); return success; } METHOD(pts_t, extend_pcr, bool, private_pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output) { TSS_HCONTEXT hContext; TSS_HTPM hTPM; TSS_RESULT result; u_int32_t pcr_length; chunk_t pcr_value = chunk_empty; result = Tspi_Context_Create(&hContext); if (result != TSS_SUCCESS) { DBG1(DBG_PTS, "TPM context could not be created: tss error 0x%x", result); return FALSE; } result = Tspi_Context_Connect(hContext, NULL); if (result != TSS_SUCCESS) { goto err; } result = Tspi_Context_GetTpmObject (hContext, &hTPM); if (result != TSS_SUCCESS) { goto err; } pcr_value = chunk_alloc(PTS_PCR_LEN); result = Tspi_TPM_PcrExtend(hTPM, pcr_num, PTS_PCR_LEN, input.ptr, NULL, &pcr_length, &pcr_value.ptr); if (result != TSS_SUCCESS) { goto err; } *output = pcr_value; *output = chunk_clone(*output); DBG3(DBG_PTS, "PCR %d extended with: %B", pcr_num, &input); DBG3(DBG_PTS, "PCR %d value after extend: %B", pcr_num, output); chunk_clear(&pcr_value); Tspi_Context_FreeMemory(hContext, NULL); Tspi_Context_Close(hContext); return TRUE; err: DBG1(DBG_PTS, "TPM not available: tss error 0x%x", result); chunk_clear(&pcr_value); Tspi_Context_FreeMemory(hContext, NULL); Tspi_Context_Close(hContext); return FALSE; } METHOD(pts_t, quote_tpm, bool, private_pts_t *this, bool use_quote2, chunk_t *pcr_comp, chunk_t *quote_sig) { TSS_HCONTEXT hContext; TSS_HTPM hTPM; TSS_HKEY hAIK; TSS_HKEY hSRK; TSS_HPOLICY srkUsagePolicy; TSS_UUID SRK_UUID = TSS_UUID_SRK; BYTE secret[] = TSS_WELL_KNOWN_SECRET; TSS_HPCRS hPcrComposite; TSS_VALIDATION valData; TSS_RESULT result; chunk_t quote_info; BYTE* versionInfo; u_int32_t versionInfoSize, pcr; enumerator_t *enumerator; bool success = FALSE; result = Tspi_Context_Create(&hContext); if (result != TSS_SUCCESS) { DBG1(DBG_PTS, "TPM context could not be created: tss error 0x%x", result); return FALSE; } result = Tspi_Context_Connect(hContext, NULL); if (result != TSS_SUCCESS) { goto err1; } result = Tspi_Context_GetTpmObject (hContext, &hTPM); if (result != TSS_SUCCESS) { goto err1; } /* Retrieve SRK from TPM and set the authentication to well known secret*/ result = Tspi_Context_LoadKeyByUUID(hContext, TSS_PS_TYPE_SYSTEM, SRK_UUID, &hSRK); if (result != TSS_SUCCESS) { goto err1; } result = Tspi_GetPolicyObject(hSRK, TSS_POLICY_USAGE, &srkUsagePolicy); if (result != TSS_SUCCESS) { goto err1; } result = Tspi_Policy_SetSecret(srkUsagePolicy, TSS_SECRET_MODE_SHA1, 20, secret); if (result != TSS_SUCCESS) { goto err1; } result = Tspi_Context_LoadKeyByBlob (hContext, hSRK, this->aik_blob.len, this->aik_blob.ptr, &hAIK); if (result != TSS_SUCCESS) { goto err1; } /* Create PCR composite object */ result = use_quote2 ? Tspi_Context_CreateObject(hContext, TSS_OBJECT_TYPE_PCRS, TSS_PCRS_STRUCT_INFO_SHORT, &hPcrComposite) : Tspi_Context_CreateObject(hContext, TSS_OBJECT_TYPE_PCRS, TSS_PCRS_STRUCT_DEFAULT, &hPcrComposite); if (result != TSS_SUCCESS) { goto err2; } /* Select PCRs */ enumerator = this->pcrs->create_enumerator(this->pcrs); while (enumerator->enumerate(enumerator, &pcr)) { result = use_quote2 ? Tspi_PcrComposite_SelectPcrIndexEx(hPcrComposite, pcr, TSS_PCRS_DIRECTION_RELEASE) : Tspi_PcrComposite_SelectPcrIndex(hPcrComposite, pcr); if (result != TSS_SUCCESS) { break; } } enumerator->destroy(enumerator); if (result != TSS_SUCCESS) { goto err3; } /* Set the Validation Data */ valData.ulExternalDataLength = this->secret.len; valData.rgbExternalData = (BYTE *)this->secret.ptr; /* TPM Quote */ result = use_quote2 ? Tspi_TPM_Quote2(hTPM, hAIK, FALSE, hPcrComposite, &valData, &versionInfoSize, &versionInfo): Tspi_TPM_Quote(hTPM, hAIK, hPcrComposite, &valData); if (result != TSS_SUCCESS) { goto err4; } /* Set output chunks */ *pcr_comp = chunk_alloc(HASH_SIZE_SHA1); if (use_quote2) { /* TPM_Composite_Hash is last 20 bytes of TPM_Quote_Info2 structure */ memcpy(pcr_comp->ptr, valData.rgbData + valData.ulDataLength - HASH_SIZE_SHA1, HASH_SIZE_SHA1); } else { /* TPM_Composite_Hash is 8-28th bytes of TPM_Quote_Info structure */ memcpy(pcr_comp->ptr, valData.rgbData + 8, HASH_SIZE_SHA1); } DBG3(DBG_PTS, "Hash of PCR Composite: %#B", pcr_comp); quote_info = chunk_create(valData.rgbData, valData.ulDataLength); DBG3(DBG_PTS, "TPM Quote Info: %B",&quote_info); *quote_sig = chunk_clone(chunk_create(valData.rgbValidationData, valData.ulValidationDataLength)); DBG3(DBG_PTS, "TPM Quote Signature: %B",quote_sig); success = TRUE; /* Cleanup */ err4: Tspi_Context_FreeMemory(hContext, NULL); err3: Tspi_Context_CloseObject(hContext, hPcrComposite); err2: Tspi_Context_CloseObject(hContext, hAIK); err1: Tspi_Context_Close(hContext); if (!success) { DBG1(DBG_PTS, "TPM not available: tss error 0x%x", result); } return success; } #else /* TSS_TROUSERS */ METHOD(pts_t, read_pcr, bool, private_pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value) { return FALSE; } METHOD(pts_t, extend_pcr, bool, private_pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output) { return FALSE; } METHOD(pts_t, quote_tpm, bool, private_pts_t *this, bool use_quote2, chunk_t *pcr_comp, chunk_t *quote_sig) { return FALSE; } #endif /* TSS_TROUSERS */ /** * TPM_QUOTE_INFO structure: * 4 bytes of version * 4 bytes 'Q' 'U' 'O' 'T' * 20 byte SHA1 of TCPA_PCR_COMPOSITE * 20 byte nonce * * TPM_QUOTE_INFO2 structure: * 2 bytes Tag 0x0036 TPM_Tag_Quote_info2 * 4 bytes 'Q' 'U' 'T' '2' * 20 bytes nonce * 26 bytes PCR_INFO_SHORT */ METHOD(pts_t, get_quote_info, bool, private_pts_t *this, bool use_quote2, bool use_ver_info, pts_meas_algorithms_t comp_hash_algo, chunk_t *out_pcr_comp, chunk_t *out_quote_info) { chunk_t selection, pcr_comp, hash_pcr_comp; bio_writer_t *writer; hasher_t *hasher; if (!this->pcrs->get_count(this->pcrs)) { DBG1(DBG_PTS, "No extended PCR entries available, " "unable to construct TPM Quote Info"); return FALSE; } if (!this->secret.ptr) { DBG1(DBG_PTS, "Secret assessment value unavailable, ", "unable to construct TPM Quote Info"); return FALSE; } if (use_quote2 && use_ver_info && !this->tpm_version_info.ptr) { DBG1(DBG_PTS, "TPM Version Information unavailable, ", "unable to construct TPM Quote Info2"); return FALSE; } pcr_comp = this->pcrs->get_composite(this->pcrs); /* Output the TPM_PCR_COMPOSITE expected from IMC */ if (comp_hash_algo) { hash_algorithm_t algo; algo = pts_meas_algo_to_hash(comp_hash_algo); hasher = lib->crypto->create_hasher(lib->crypto, algo); /* Hash the PCR Composite Structure */ if (!hasher || !hasher->allocate_hash(hasher, pcr_comp, out_pcr_comp)) { DESTROY_IF(hasher); free(pcr_comp.ptr); return FALSE; } DBG3(DBG_PTS, "constructed PCR Composite hash: %#B", out_pcr_comp); hasher->destroy(hasher); } else { *out_pcr_comp = chunk_clone(pcr_comp); } /* SHA1 hash of PCR Composite to construct TPM_QUOTE_INFO */ hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA1); if (!hasher || !hasher->allocate_hash(hasher, pcr_comp, &hash_pcr_comp)) { DESTROY_IF(hasher); chunk_free(out_pcr_comp); free(pcr_comp.ptr); return FALSE; } hasher->destroy(hasher); /* Construct TPM_QUOTE_INFO/TPM_QUOTE_INFO2 structure */ writer = bio_writer_create(TPM_QUOTE_INFO_LEN); if (use_quote2) { /* TPM Structure Tag */ writer->write_uint16(writer, TPM_TAG_QUOTE_INFO2); /* Magic QUT2 value */ writer->write_data(writer, chunk_create("QUT2", 4)); /* Secret assessment value 20 bytes (nonce) */ writer->write_data(writer, this->secret); /* PCR selection */ selection.ptr = pcr_comp.ptr; selection.len = 2 + this->pcrs->get_selection_size(this->pcrs); writer->write_data(writer, selection); /* TPM Locality Selection */ writer->write_uint8(writer, TPM_LOC_ZERO); /* PCR Composite Hash */ writer->write_data(writer, hash_pcr_comp); if (use_ver_info) { /* TPM version Info */ writer->write_data(writer, this->tpm_version_info); } } else { /* Version number */ writer->write_data(writer, chunk_from_chars(1, 1, 0, 0)); /* Magic QUOT value */ writer->write_data(writer, chunk_create("QUOT", 4)); /* PCR Composite Hash */ writer->write_data(writer, hash_pcr_comp); /* Secret assessment value 20 bytes (nonce) */ writer->write_data(writer, this->secret); } /* TPM Quote Info */ *out_quote_info = writer->extract_buf(writer); DBG3(DBG_PTS, "constructed TPM Quote Info: %B", out_quote_info); writer->destroy(writer); free(pcr_comp.ptr); free(hash_pcr_comp.ptr); return TRUE; } METHOD(pts_t, verify_quote_signature, bool, private_pts_t *this, chunk_t data, chunk_t signature) { public_key_t *aik_pub_key; aik_pub_key = this->aik->get_public_key(this->aik); if (!aik_pub_key) { DBG1(DBG_PTS, "failed to get public key from AIK certificate"); return FALSE; } if (!aik_pub_key->verify(aik_pub_key, SIGN_RSA_EMSA_PKCS1_SHA1, data, signature)) { DBG1(DBG_PTS, "signature verification failed for TPM Quote Info"); DESTROY_IF(aik_pub_key); return FALSE; } aik_pub_key->destroy(aik_pub_key); return TRUE; } METHOD(pts_t, get_pcrs, pts_pcr_t*, private_pts_t *this) { return this->pcrs; } METHOD(pts_t, destroy, void, private_pts_t *this) { DESTROY_IF(this->pcrs); DESTROY_IF(this->aik); DESTROY_IF(this->dh); free(this->initiator_nonce.ptr); free(this->responder_nonce.ptr); free(this->secret.ptr); free(this->aik_blob.ptr); free(this->tpm_version_info.ptr); free(this); } #ifdef TSS_TROUSERS /** * Check for a TPM by querying for TPM Version Info */ static bool has_tpm(private_pts_t *this) { TSS_HCONTEXT hContext; TSS_HTPM hTPM; TSS_RESULT result; u_int32_t version_info_len; result = Tspi_Context_Create(&hContext); if (result != TSS_SUCCESS) { DBG1(DBG_PTS, "TPM context could not be created: tss error 0x%x", result); return FALSE; } result = Tspi_Context_Connect(hContext, NULL); if (result != TSS_SUCCESS) { goto err; } result = Tspi_Context_GetTpmObject (hContext, &hTPM); if (result != TSS_SUCCESS) { goto err; } result = Tspi_TPM_GetCapability(hTPM, TSS_TPMCAP_VERSION_VAL, 0, NULL, &version_info_len, &this->tpm_version_info.ptr); this->tpm_version_info.len = version_info_len; if (result != TSS_SUCCESS) { goto err; } this->tpm_version_info = chunk_clone(this->tpm_version_info); Tspi_Context_FreeMemory(hContext, NULL); Tspi_Context_Close(hContext); return TRUE; err: DBG1(DBG_PTS, "TPM not available: tss error 0x%x", result); Tspi_Context_FreeMemory(hContext, NULL); Tspi_Context_Close(hContext); return FALSE; } #else /* TSS_TROUSERS */ static bool has_tpm(private_pts_t *this) { return FALSE; } #endif /* TSS_TROUSERS */ /** * See header */ pts_t *pts_create(bool is_imc) { private_pts_t *this; pts_pcr_t *pcrs; pcrs = pts_pcr_create(); if (!pcrs) { DBG1(DBG_PTS, "shadow PCR set could not be created"); return NULL; } INIT(this, .public = { .get_proto_caps = _get_proto_caps, .set_proto_caps = _set_proto_caps, .get_meas_algorithm = _get_meas_algorithm, .set_meas_algorithm = _set_meas_algorithm, .get_dh_hash_algorithm = _get_dh_hash_algorithm, .set_dh_hash_algorithm = _set_dh_hash_algorithm, .create_dh_nonce = _create_dh_nonce, .get_my_public_value = _get_my_public_value, .set_peer_public_value = _set_peer_public_value, .calculate_secret = _calculate_secret, .get_platform_id = _get_platform_id, .set_platform_id = _set_platform_id, .get_tpm_version_info = _get_tpm_version_info, .set_tpm_version_info = _set_tpm_version_info, .get_aik = _get_aik, .set_aik = _set_aik, .get_aik_id = _get_aik_id, .is_path_valid = _is_path_valid, .get_metadata = _get_metadata, .read_pcr = _read_pcr, .extend_pcr = _extend_pcr, .quote_tpm = _quote_tpm, .get_pcrs = _get_pcrs, .get_quote_info = _get_quote_info, .verify_quote_signature = _verify_quote_signature, .destroy = _destroy, }, .is_imc = is_imc, .proto_caps = PTS_PROTO_CAPS_V, .algorithm = PTS_MEAS_ALGO_SHA256, .dh_hash_algorithm = PTS_MEAS_ALGO_SHA256, .pcrs = pcrs, ); if (is_imc) { if (has_tpm(this)) { this->has_tpm = TRUE; this->proto_caps |= PTS_PROTO_CAPS_T | PTS_PROTO_CAPS_D; load_aik(this); load_aik_blob(this); } } else { this->proto_caps |= PTS_PROTO_CAPS_T | PTS_PROTO_CAPS_D; } return &this->public; }
<!DOCTYPE html> <html lang="en"> <<<<<<< HEAD <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <title>Login Form for Able Sail</title> <meta name="generator" content="Bootply" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="css/bootstrap.min.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link href="css/styles.css" rel="stylesheet"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> </head> <body> <!--login modal--> <div id="loginModal" class="modal show" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button onclick="loginFunction()" type="button" class="close" data-dismiss="modal" aria-hidden="true"></button > <h1 class="text-center">Login for Able Sail</h1> </div> <div class="modal-body"> <form action="index.php" method="get" id="form" onsubit="return textFilled(username, password);" class="form col-md-12 center-block"> <div class="form-group"> <input onKeyUp="updateLength('username', 'usernameLength')" onblur="checkTextField(this);" type="text" class="form-control input-lg" placeholder="Email"> </div> <div class="form-group"> <input type="password" class="form-control input-lg" placeholder="Password" name="password" maxlength="50" onKeyUp="updateLength('password', 'passwordLength')"> </div> <div class="form-group"> <button type="button" id="goButton" onclick="textFilled(username, password)" class="btn btn-primary btn-lg btn-block"> <a href="index.php">Sign In</button> <span class="pull-right"><a href="createAccount.html">Register new Account</a></span><span><a href="http://www.kingstonyachtclub.com/contact">Need help?</a></span> </div> </form> </div> <div class="modal-footer"> <div class="col-md-12"> <button class="btn" data-dismiss="modal" aria-hidden="true"><a href="http://www.kingstonyachtclub.com/contact">Cancel</a></button> </div> </div> </div> </div> </div> <!-- script references --> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script type="text/javascript" src="loginScript.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> </body> </html></html> ======= <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <title>Login Form for Able Sail</title> <meta name="generator" content="Bootply" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="css/bootstrap.min.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link href="css/styles.css" rel="stylesheet"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> </head> <body> <!--login modal--> <div id="loginModal" class="modal show" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button onclick="loginFunction()" type="button" class="close" data-dismiss="modal" aria-hidden="true"></button > <h1 class="text-center">Login for Able Sail</h1> </div> <div class="modal-body"> <form action="demoFiles/viewRegistrations.php" method="get" id="form" onsubit="return textFilled(username, password);" class="form col-md-12 center-block"> <div class="form-group"> <input onKeyUp="updateLength('username', 'usernameLength')" onblur="checkTextField(this);" type="text" class="form-control input-lg" placeholder="Email"> </div> <div class="form-group"> <input type="password" class="form-control input-lg" placeholder="Password" name="password" maxlength="50" onKeyUp="updateLength('password', 'passwordLength')"> </div> <div class="form-group"> <input type="submit" class="btn btn-primary"><br> <span><a href="createAccount.php">Register new Account</a></span> | <span><a href="http://www.kingstonyachtclub.com/contact">Need help?</a></span> </div> </form> </div> <div class="modal-footer"> <div class="col-md-12"> &nbsp; </div> </div> </div> </div> </div> <!-- script references --> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script type="text/javascript" src="loginScript.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> </body> </html> >>>>>>> 9f243be92874b38893c65083a1af2090579fc0b1
Trouble makers have infiltrated the movement of yellow vests in Paris, Saturday 24th November. The police had to use tear gas to repel them. 4pm: several lights were lit by the thugs, including Roosevelt Avenue where bikes and a scooter burn in the middle of the street. Breakers have just attacked the window of the bank Milleis. Immediately, the CRS responded with tear gas and a deafening bomb. Shots from projectiles were also seen directly at the protesters. At 2.30 pm, several barricades were set on fire by the yellow vests protesters. The police replicate by activating the water cannons. A protester was surprised to throw a block on the CRS , other protesters got angry with him and asked him why he was doing this? A large part of the protesters turn back, some talk about joining the Eiffel Tower, others go to Bercy. At 2 pm , while the yellow vests protesters managed to encircle the Arc de Triomphe, they now walk towards the Concorde. The CRS go down the Avenue des Champs Elysées. But new barricades are erected in the middle of the avenue to prevent the police from joining them. The demonstration of Vests yellow in Paris, Saturday , November 24 , does not take place in calm. Very quickly, clashes between protesters and law enforcement. Several metro stations have been closed and many streets have been cordoned off to prevent Yellow Vests from reaching the Champs Elysees. Once there, the first tensions quickly broke out. The police were thrown stones. The police fought back with water cannons. Protesters use everything they find to block the police : flower boxes, street furniture, construction equipment, are placed across the street to prevent the CRS to move forward. Chairs fly to CRS, but also pavers and construction equipment. While the demonstrators wanted to advance at all costs towards the Concorde, while the CRS pushed them towards the Arc de Triomphe, the Yellow Vests finally decided to join the Arc de Triomphe, chanting “Macron resignation”. Some protesters leave the premises by perpendicular small streets to escape the police and tear gas . Some gassed demonstrators are evacuated by other yellow vests. The demonstrators set fire to electric scooters that were parked along the Champs Elysees. The CRS are fighting back and trying to repel the protesters. A truck used to extinguish the fires has been overturned and is currently burning. Alternately, Yellow Vests and CRS charge to gain ground.
<html><img border=0 src=3731-39-3.txt alt=3731-39-3.txt></img><body> "x" "1" "KAZIUS, J, MCGUIRE, R AND BURSI, R. DERIVATION AND VALIDATION OF TOXICOPHORES FOR MUTAGENICITY PREDICTION. J. MED. CHEM. 48: 312-320, 2005" </body></html>
Navigation is a huge part of our everyday lives. We must use our knowledge of navigation to get to certain places or else we would be stuck in one spot forever, right? Well, it’s not any different on a website. Website navigation plays a big role in having a successful website’s design. An organized and well-designed website navigation is what allows the visitor to interact with your website. It would not be a good thing if the visitor was stuck on a single page, would it? Top Horizontal Bar Navigation- These types of navigation bars are located at the top of the page, usually in text links, button-shaped links and tabbed-shaped links. Top Horizontal Bar navigation should only be used if you have a small number of links. An overload of links will cause the website to look cluttered and hinder the visitor from successfully navigating through your website. However, if you want to add a few additional links, there is the option of adding a drop-down menu that reveals the additional links when the visitor hovers or clicks on the main category links. Vertical Bar or Sidebar Navigation- These navigation bars are used primarily in a single column on the left side of the page. These help accommodate for pages that have a long list of page links. Similar to the Top Horizontal Bar Navigation, Vertical Bar or Sidebar Navigations can also add on a drop-down menu. Vertical Bar or Sidebar navigation designs can be used in any kind of website. Tabs Navigation- Tab navigations are usually placed horizontally across the top of the web page; however they can also be placed vertically. Tabs are usually made to represent real-life tabs, such as those in notebooks and binders, to differentiate among each section of the page. Tabs can be made into any kind of design (eg. rounded, squared, textured, etc). They also provide a more organized look to the website, however, just like with horizontal bar navigation, it limits the number of links you can display. A solution to this would be to place a vertical menu on the side to accommodate for sub-category links. Breadcrumb Navigation- Breadcrumb Navigation is a secondary navigation design. It helps the visitor locate where they is on the web page as well as how deep he is in the web page. They are usually displayed with text links and right-pointing arrows to show each level of depth within the page. These menus are a problem in a responsive design though. There is no way for a visitor to hover over a touchscreen tablet to activate the menu, therefore these are not efficient if you want a primarily responsive web design layout. Check out our previous post on Responsive Web Design for more information on this. Menu navigation, as stated above, is very important to a website’s design. Messy navigation systems will result in the visitor to leave the website in frustration. That’s why it is important to consider all the possibilities when deciding which navigation design is most suitable for your website. What type of navigation menu design do you prefer?
object MyModule { def abs(n: Int): Int = if (n < 0) -n else n private def formatAbs(x: Int): String = { val msg = "The absolute value of %d is %d" msg.format(x, abs(x)) } def factorial(n: Int): Int = { def go(n: Int, acc: Int): Int = if (n <= 0) acc else go(n-1, n*acc) go(n, 1) } private def formatFactorial(x: Int): String = { val msg = "The factorial of %d is %d" msg.format(x, factorial(x)) } def fib(n: Int): Int = { def loop(n: Int, prev: Int, cur: Int): Int = if (n == 0) prev else loop(n - 1, cur, prev + cur) loop(n, 0, 1) } def formatResult(name: String, n: Int, f: Int => Int) = { val msg = "The %s of %d is %d." msg.format(name, n, f(n)) } // Exercise 2: Implement a polymorphic function to check whether // an `Array[A]` is sorted def isSorted[A](as: Array[A], gt: (A,A) => Boolean): Boolean = { @annotation.tailrec def go(n: Int): Boolean = if (n >= as.length-1) true else if (gt(as(n), as(n+1))) false else go(n+1) go(0) } def curry[A,B,C](f: (A,B) => C): A => (B => C) = a => b => f(a,b) def uncurry[A,B,C](f: A => B => C): (A, B) => C = (a,b) => f(a)(b) def compose[A,B,C](f: B => C, g: A => B): A => C = (a) => f(g(a)) def main(args: Array[String]): Unit = { println(formatAbs(-42)) println(formatFactorial(20)) println(fib(8)) } }
// Created file "Lib\src\PhotoAcquireUID\photoacquireuid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(MACHINE_POLICY_PRESENT_GUID, 0x659fcae6, 0x5bdb, 0x4da9, 0xb1, 0xff, 0xca, 0x2a, 0x17, 0x8d, 0x46, 0xe0);
<?php namespace TYPO3\Flow\I18n\Parser; /* * This file is part of the TYPO3.Flow package. * * (c) Contributors of the Neos Project - www.neos.io * * This package is Open Source Software. For the full copyright and license * information, please view the LICENSE file which was distributed with this * source code. */ use TYPO3\Flow\Annotations as Flow; use TYPO3\Flow\I18n\Cldr\Reader\NumbersReader; use TYPO3\Flow\I18n\Locale; use TYPO3\Flow\I18n\Utility; /** * Parser for numbers. * * This parser does not support full syntax of number formats as defined in * CLDR. It uses parsed formats from NumbersReader class. * * @Flow\Scope("singleton") * @see NumbersReader * @api * @todo Currency support */ class NumberParser { /** * Regex pattern for matching one or more digits. */ const PATTERN_MATCH_DIGITS = '/^[0-9]+$/'; /** * Regex pattern for matching all except digits. It's used for clearing * string in lenient mode. */ const PATTERN_MATCH_NOT_DIGITS = '/[^0-9]+/'; /** * @var NumbersReader */ protected $numbersReader; /** * @param NumbersReader $numbersReader * @return void */ public function injectNumbersReader(NumbersReader $numbersReader) { $this->numbersReader = $numbersReader; } /** * Parses number given as a string using provided format. * * @param string $numberToParse Number to be parsed * @param string $format Number format to use * @param Locale $locale Locale to use * @param boolean $strictMode Work mode (strict when TRUE, lenient when FALSE) * @return mixed Parsed float number or FALSE on failure * @api */ public function parseNumberWithCustomPattern($numberToParse, $format, Locale $locale, $strictMode = true) { return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseCustomFormat($format), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode); } /** * Parses decimal number using proper format from CLDR. * * @param string $numberToParse Number to be parsed * @param Locale $locale Locale to use * @param string $formatLength One of NumbersReader FORMAT_LENGTH constants * @param boolean $strictMode Work mode (strict when TRUE, lenient when FALSE) * @return mixed Parsed float number or FALSE on failure * @api */ public function parseDecimalNumber($numberToParse, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { NumbersReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale, NumbersReader::FORMAT_TYPE_DECIMAL, $formatLength), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode); } /** * Parses percent number using proper format from CLDR. * * @param string $numberToParse Number to be parsed * @param Locale $locale Locale to use * @param string $formatLength One of NumbersReader FORMAT_LENGTH constants * @param boolean $strictMode Work mode (strict when TRUE, lenient when FALSE) * @return mixed Parsed float number or FALSE on failure * @api */ public function parsePercentNumber($numberToParse, Locale $locale, $formatLength = NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = true) { NumbersReader::validateFormatLength($formatLength); return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale, NumbersReader::FORMAT_TYPE_PERCENT, $formatLength), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode); } /** * Parses number using parsed format, in strict or lenient mode. * * @param string $numberToParse Number to be parsed * @param array $parsedFormat Parsed format (from NumbersReader) * @param array $localizedSymbols An array with symbols to use * @param boolean $strictMode Work mode (strict when TRUE, lenient when FALSE) * @return mixed Parsed float number or FALSE on failure */ protected function doParsingWithParsedFormat($numberToParse, array $parsedFormat, array $localizedSymbols, $strictMode) { return ($strictMode) ? $this->doParsingInStrictMode($numberToParse, $parsedFormat, $localizedSymbols) : $this->doParsingInLenientMode($numberToParse, $parsedFormat, $localizedSymbols); } /** * Parses number in strict mode. * * In strict mode parser checks all constraints of provided parsed format, * and if any of them is not fullfiled, parsing fails (FALSE is returned). * * @param string $numberToParse Number to be parsed * @param array $parsedFormat Parsed format (from NumbersReader) * @param array $localizedSymbols An array with symbols to use * @return mixed Parsed float number or FALSE on failure */ protected function doParsingInStrictMode($numberToParse, array $parsedFormat, array $localizedSymbols) { $numberIsNegative = false; if (!empty($parsedFormat['negativePrefix']) && !empty($parsedFormat['negativeSuffix'])) { if (Utility::stringBeginsWith($numberToParse, $parsedFormat['negativePrefix']) && Utility::stringEndsWith($numberToParse, $parsedFormat['negativeSuffix'])) { $numberToParse = substr($numberToParse, strlen($parsedFormat['negativePrefix']), - strlen($parsedFormat['negativeSuffix'])); $numberIsNegative = true; } } elseif (!empty($parsedFormat['negativePrefix']) && Utility::stringBeginsWith($numberToParse, $parsedFormat['negativePrefix'])) { $numberToParse = substr($numberToParse, strlen($parsedFormat['negativePrefix'])); $numberIsNegative = true; } elseif (!empty($parsedFormat['negativeSuffix']) && Utility::stringEndsWith($numberToParse, $parsedFormat['negativeSuffix'])) { $numberToParse = substr($numberToParse, 0, - strlen($parsedFormat['negativeSuffix'])); $numberIsNegative = true; } if (!$numberIsNegative) { if (!empty($parsedFormat['positivePrefix']) && !empty($parsedFormat['positiveSuffix'])) { if (Utility::stringBeginsWith($numberToParse, $parsedFormat['positivePrefix']) && Utility::stringEndsWith($numberToParse, $parsedFormat['positiveSuffix'])) { $numberToParse = substr($numberToParse, strlen($parsedFormat['positivePrefix']), - strlen($parsedFormat['positiveSuffix'])); } else { return false; } } elseif (!empty($parsedFormat['positivePrefix'])) { if (Utility::stringBeginsWith($numberToParse, $parsedFormat['positivePrefix'])) { $numberToParse = substr($numberToParse, strlen($parsedFormat['positivePrefix'])); } else { return false; } } elseif (!empty($parsedFormat['positiveSuffix'])) { if (Utility::stringEndsWith($numberToParse, $parsedFormat['positiveSuffix'])) { $numberToParse = substr($numberToParse, 0, - strlen($parsedFormat['positiveSuffix'])); } else { return false; } } } $positionOfDecimalSeparator = strpos($numberToParse, $localizedSymbols['decimal']); if ($positionOfDecimalSeparator === false) { $numberToParse = str_replace($localizedSymbols['group'], '', $numberToParse); if (strlen($numberToParse) < $parsedFormat['minIntegerDigits']) { return false; } elseif (preg_match(self::PATTERN_MATCH_DIGITS, $numberToParse, $matches) !== 1) { return false; } $integerPart = $numberToParse; $decimalPart = false; } else { if ($positionOfDecimalSeparator === 0 && $positionOfDecimalSeparator === strlen($numberToParse) - 1) { return false; } $numberToParse = str_replace([$localizedSymbols['group'], $localizedSymbols['decimal']], ['', '.'], $numberToParse); $positionOfDecimalSeparator = strpos($numberToParse, '.'); $integerPart = substr($numberToParse, 0, $positionOfDecimalSeparator); $decimalPart = substr($numberToParse, $positionOfDecimalSeparator + 1); } if (strlen($integerPart) < $parsedFormat['minIntegerDigits']) { return false; } elseif (preg_match(self::PATTERN_MATCH_DIGITS, $integerPart, $matches) !== 1) { return false; } $parsedNumber = (int)$integerPart; if ($decimalPart !== false) { $countOfDecimalDigits = strlen($decimalPart); if ($countOfDecimalDigits < $parsedFormat['minDecimalDigits'] || $countOfDecimalDigits > $parsedFormat['maxDecimalDigits']) { return false; } elseif (preg_match(self::PATTERN_MATCH_DIGITS, $decimalPart, $matches) !== 1) { return false; } $parsedNumber = (float)($integerPart . '.' . $decimalPart); } $parsedNumber /= $parsedFormat['multiplier']; if ($parsedFormat['rounding'] !== 0.0 && ($parsedNumber - (int)($parsedNumber / $parsedFormat['rounding']) * $parsedFormat['rounding']) !== 0.0) { return false; } if ($numberIsNegative) { $parsedNumber = 0 - $parsedNumber; } return $parsedNumber; } /** * Parses number in lenient mode. * * Lenient parsing ignores everything that can be ignored, and tries to * extract number from the string, even if it's not well formed. * * Implementation is simple but should work more often than strict parsing. * * Algorithm: * 1. Find first digit * 2. Find last digit * 3. Find decimal separator between first and last digit (if any) * 4. Remove non-digits from integer part * 5. Remove non-digits from decimal part (optional) * 6. Try to match negative prefix before first digit * 7. Try to match negative suffix after last digit * * @param string $numberToParse Number to be parsed * @param array $parsedFormat Parsed format (from NumbersReader) * @param array $localizedSymbols An array with symbols to use * @return mixed Parsed float number or FALSE on failure */ protected function doParsingInLenientMode($numberToParse, array $parsedFormat, array $localizedSymbols) { $numberIsNegative = false; $positionOfFirstDigit = null; $positionOfLastDigit = null; $charactersOfNumberString = str_split($numberToParse); foreach ($charactersOfNumberString as $position => $character) { if (ord($character) >= 48 && ord($character) <= 57) { $positionOfFirstDigit = $position; break; } } if ($positionOfFirstDigit === null) { return false; } krsort($charactersOfNumberString); foreach ($charactersOfNumberString as $position => $character) { if (ord($character) >= 48 && ord($character) <= 57) { $positionOfLastDigit = $position; break; } } $positionOfDecimalSeparator = strrpos($numberToParse, $localizedSymbols['decimal'], $positionOfFirstDigit); if ($positionOfDecimalSeparator === false) { $integerPart = substr($numberToParse, $positionOfFirstDigit, $positionOfLastDigit - $positionOfFirstDigit + 1); $decimalPart = false; } else { $integerPart = substr($numberToParse, $positionOfFirstDigit, $positionOfDecimalSeparator - $positionOfFirstDigit); $decimalPart = substr($numberToParse, $positionOfDecimalSeparator + 1, $positionOfLastDigit - $positionOfDecimalSeparator); } $parsedNumber = (int)preg_replace(self::PATTERN_MATCH_NOT_DIGITS, '', $integerPart); if ($decimalPart !== false) { $decimalPart = (int)preg_replace(self::PATTERN_MATCH_NOT_DIGITS, '', $decimalPart); $parsedNumber = (float)($parsedNumber . '.' . $decimalPart); } $partBeforeNumber = substr($numberToParse, 0, $positionOfFirstDigit); $partAfterNumber = substr($numberToParse, - (strlen($numberToParse) - $positionOfLastDigit - 1)); if (!empty($parsedFormat['negativePrefix']) && !empty($parsedFormat['negativeSuffix'])) { if (Utility::stringEndsWith($partBeforeNumber, $parsedFormat['negativePrefix']) && Utility::stringBeginsWith($partAfterNumber, $parsedFormat['negativeSuffix'])) { $numberIsNegative = true; } } elseif (!empty($parsedFormat['negativePrefix']) && Utility::stringEndsWith($partBeforeNumber, $parsedFormat['negativePrefix'])) { $numberIsNegative = true; } elseif (!empty($parsedFormat['negativeSuffix']) && Utility::stringBeginsWith($partAfterNumber, $parsedFormat['negativeSuffix'])) { $numberIsNegative = true; } $parsedNumber /= $parsedFormat['multiplier']; if ($numberIsNegative) { $parsedNumber = 0 - $parsedNumber; } return $parsedNumber; } }
import Samba import System.Process (createProcess, shell) import Control.Monad (when) main = do putStrLn $ unlines [ "################################################################" , "Instructions: " , "" , "Firstly, ensure your smb.conf have this section:" , "[homes]" , " comment = Home Directories" , " browseable = yes" , " writable = yes" , " read only = no" , " valid users = %S" , "" , "----------------------------------------------------------------" , "To use this program, just enter the names you want to add and the" , "whole process of adding a new user to the system and then to Samba" , "will be done for you. Also the passwords will be generated " , "automatically" , "" , "*Note: remember to restart Samba after changes" , "*Note: remember to add permision to a newSambaUser.bash" , "################################################################" ] createUser createUser :: IO () createUser = do putStrLn "Insert a username" user <- getLine when (user /= "") $ do let pass = dpass user putStrLn $ "The password of the user " ++ user ++ " will be " ++ pass putStrLn "Creating user..." callCommand $ "./newSambaUser.bash \"" ++ user ++ "\" \"" ++ pass ++ "\"" createUser callCommand = createProcess . shell
Or is your name on a book on prosecco, Rome or a Tassie icon? Here at VisitVineyards.com we love showcasing the best of Australian wine, food and travel, and ciders, craft beers and more. Congratulations to all our lucky winners; we hope you enjoy your prizes, courtesy of their respective and much appreciated donors. If your name is on the list, please email [email protected] with prize details and your postal/delivery address. If you enter our competitions please check this page regularly. We do our very best to track down winners as we don't want you to miss out but if you don't reply to claim your prize, sorry but it's back on the prize shelf! Not getting your newsletters? Please add [email protected] to your safe senders's list/address book and check in your junk folder. If you can't find it, please email our friendly webmaster on [email protected] for help. The King Valley is Prosecco's Australian spiritual home and where Innocent Bystander gathers its grapes for this lovely bubbling drop. We think there's always an occasion for Prosecco and we think these winners will agree! Miss A Petersen, Northgate Qld. This is a stunning location in Tasmania's Highlands offering an array of outdoor activities or the chance to just relax in nature. We hope Mr I Rosie of Warradle, SA enjoys it! Whether you know your single malts from your blends or are just stating on the whiskey trail, this book is a great addition to the library. We hope Dr T Gray of Semapore in SA agrees! This celebration of an Australian wine icon is a glorious publication of history and stunning photographs. Henschke will soon be the expert subject for Mr R McCray of Yeronga in Qld! What can be better than winning the prize of your choice? These winners have! Good luck with your tea journey and new cooking inspiration! Missed out on a prize this time? Try your luck again – check out our current competitions where we have great wine, food, books, travel, events tickets and other giveaways . VisitVineyards.com subscribers can enter each competition once.
<?php /* Copyright (C) 2011-2014 Juanjo Menent <[email protected]> * Copyright (C) 2015 Marcos García <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * \file htdocs/compta/localtax/card.php * \ingroup tax * \brief Page of second or third tax payments (like IRPF for spain, ...) */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("compta"); $langs->load("banks"); $langs->load("bills"); $id=GETPOST("id",'int'); $action=GETPOST("action","alpha"); $refund=GETPOST("refund","int"); if (empty($refund)) $refund=0; $lttype=GETPOST('localTaxType', 'int'); // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); $localtax = new Localtax($db); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('localtaxvatcard','globalcard')); /** * Actions */ //add payment of localtax if($_POST["cancel"] == $langs->trans("Cancel")){ header("Location: reglement.php?localTaxType=".$lttype); exit; } if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) { $db->begin(); $datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); $datep=dol_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); $localtax->accountid=$_POST["accountid"]; $localtax->paymenttype=$_POST["paiementtype"]; $localtax->datev=$datev; $localtax->datep=$datep; $localtax->amount=$_POST["amount"]; $localtax->label=$_POST["label"]; $localtax->ltt=$lttype; $ret=$localtax->addPayment($user); if ($ret > 0) { $db->commit(); header("Location: reglement.php?localTaxType=".$lttype); exit; } else { $db->rollback(); setEventMessages($localtax->error, $localtax->errors, 'errors'); $_GET["action"]="create"; } } //delete payment of localtax if ($action == 'delete') { $result=$localtax->fetch($id); if ($localtax->rappro == 0) { $db->begin(); $ret=$localtax->delete($user); if ($ret > 0) { if ($localtax->fk_bank) { $accountline=new AccountLine($db); $result=$accountline->fetch($localtax->fk_bank); if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) } if ($result >= 0) { $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt); exit; } else { $localtax->error=$accountline->error; $db->rollback(); setEventMessages($localtax->error, $localtax->errors, 'errors'); } } else { $db->rollback(); setEventMessages($localtax->error, $localtax->errors, 'errors'); } } else { $mesg='Error try do delete a line linked to a conciliated bank transaction'; setEventMessages($mesg, null, 'errors'); } } /* * View */ llxHeader(); $form = new Form($db); if ($id) { $vatpayment = new Localtax($db); $result = $vatpayment->fetch($id); if ($result <= 0) { dol_print_error($db); exit; } } if ($action == 'create') { print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code)); print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" name="formlocaltax" method="post">'."\n"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="localTaxType" value="'.$lttype.'">'; print '<input type="hidden" name="action" value="add">'; dol_fiche_head(); print '<table class="border" width="100%">'; print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; print $form->select_date($datep,"datep",'','','','add',1,1); print '</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>'; print $form->select_date($datev,"datev",'','','','add',1,1); print '</td></tr>'; // Label print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.($_POST["label"]?$_POST["label"]:$langs->transcountry(($lttype==2?"LT2Payment":"LT1Payment"),$mysoc->country_code)).'"></td></tr>'; // Amount print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>'; if (! empty($conf->banque->enabled)) { print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>'; $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant print '</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>'; $form->select_types_paiements(GETPOST("paiementtype"), "paiementtype"); print "</td>\n"; print "</tr>"; // Number print '<tr><td>'.$langs->trans('Numero'); print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; print '<td><input name="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n"; } // Other attributes $parameters=array('colspan' => ' colspan="1"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print '</table>'; dol_fiche_end(); print '<div class="center">'; print '<input type="submit" class="button" value="'.$langs->trans("Save").'">'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '</div>'; print '</form>'; } /* ************************************************************************** */ /* */ /* Barre d'action */ /* */ /* ************************************************************************** */ if ($id) { $h = 0; $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$vatpayment->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; dol_fiche_head($head, 'card', $langs->trans("VATPayment"), 0, 'payment'); print '<table class="border" width="100%">'; print "<tr>"; print '<td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $vatpayment->ref; print '</td></tr>'; print "<tr>"; print '<td>'.$langs->trans("DatePayment").'</td><td colspan="3">'; print dol_print_date($vatpayment->datep,'day'); print '</td></tr>'; print '<tr><td>'.$langs->trans("DateValue").'</td><td colspan="3">'; print dol_print_date($vatpayment->datev,'day'); print '</td></tr>'; print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>'; if (! empty($conf->banque->enabled)) { if ($vatpayment->fk_account > 0) { $bankline=new AccountLine($db); $bankline->fetch($vatpayment->fk_bank); print '<tr>'; print '<td>'.$langs->trans('BankTransactionLine').'</td>'; print '<td colspan="3">'; print $bankline->getNomUrl(1,0,'showall'); print '</td>'; print '</tr>'; } } // Other attributes $parameters=array('colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook print '</table>'; dol_fiche_end(); /* * Boutons d'actions */ print "<div class=\"tabsAction\">\n"; if ($vatpayment->rappro == 0) print '<a class="butActionDelete" href="card.php?id='.$vatpayment->id.'&action=delete">'.$langs->trans("Delete").'</a>'; else print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConcialitedTransaction").'">'.$langs->trans("Delete").'</a>'; print "</div>"; } llxFooter(); $db->close();
body { text-align: right; direction:rtl; } ul,ol { text-align: right; } .maintitle { padding: 0.2em 0.2em 0.2em 1em; width: 96%; text-align: right; direction:rtl; } .menubar-main { float: right; } .menubar-title { float: right; text-align: right; } .menubar-title-left { float: right; } .menubar-title-right { float: left; } .menubar-left { text-align: right; float: right; } .menubar-left img, .menubar-left a { float: right; } .menubar-right { float: left; } #separator1 { padding-left: 0; padding-right: 3px; } #separator2 { padding-left: 10px; } #separator3, #separator12 { padding-right: 0; padding-left: 0; } #separator4, #separator16 { padding-left: 1px; padding-right: 50px; } div.menubar input { margin-left: 2px; margin-top: 5px; } .header, .formheader, .headertwo { padding-left: 0; padding-right: 1em; text-align: right; } .form30 li, .form44 li { clear: right; } .form44 li label:first-child, .form30 li label:first-child , .form30newtabs li label:first-child { text-align: left; padding-left: 3px; float: right; margin-right: 0; margin-left: 0.5em; } #emailtemplates .ui-tabs-panel .limebutton { margin: 3px 30.5% 10px 20%; } .form30 table { float: none; margin-right: 30%; } #frmglobalsettings table.statisticssummary { margin-right: auto; } #surveydetails td + td, #groupdetails td + td, #questiondetails td + td { text-align: right; } #surveydetails td:first-child, #groupdetails td:first-child, #questiondetails td:first-child { text-align: left; } /* Superfish menu */ .sf-menu { float: right; } .sf-menu li { float:right; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { right:0; left:auto; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { right: 99%; left:auto; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { right:10em; left:auto; } .sf-menu a.sf-with-ul { padding-right: 1em; padding-left: 1.7em; } .sf-sub-indicator { right: auto; left: 0.75em; } .sf-sub-indicator { background-image: url("images/arrows_rtl.png"); } .sf-shadow ul { background-position: left bottom; border-bottom-right-radius: 17px; border-top-left-radius: 17px; border-bottom-left-radius: 0; border-top-right-radius: 0; padding: 0 0 9px 8px; } /* Tabs */ .ui-tabs .ui-tabs-nav li { float: right; margin: 0 0 -1px 0.2em; } /* Question type preview combobox */ .dd { float: right; text-align: right; } .dd .ddTitle span.arrow { float: left; } .dd .ddChild .opta a, .dd .ddChild .opta a:visited { padding-left: 0; padding-right: 10px; } /* Conditions designer */ .condition-tbl-left, .condition-tbl-right { float: right; text-align: right; } .condition-tbl-left { padding: 10px 0 0 1%; text-align: left; } /* Ckeditor */ .cke_skin_office2003, .cke_skin_office2003 .cke_wrapper { float: right !important; } #questionbottom li { clear:both; } .button-list{text-align:right}
<?php if (!defined ('TYPO3_MODE')) die ('Access denied.'); $TCA['tx_devlog'] = array( 'ctrl' => $TCA['tx_devlog']['ctrl'], 'interface' => array( 'showRecordFieldList' => 'severity,extkey,msg,location,data_var' ), 'feInterface' => $TCA['tx_devlog']['feInterface'], 'columns' => array( 'crdate' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.crdate', 'config' => array( 'type' => 'input', 'eval' => 'datetime', 'readOnly' => true ) ), 'severity' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.severity', 'config' => array( 'type' => 'user', 'userFunc' => 'tx_devlog_tceforms->displaySeverity', ) ), 'extkey' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.extkey', 'config' => array( 'type' => 'none' ) ), 'msg' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.msg', 'config' => array( 'type' => 'user', 'userFunc' => 'tx_devlog_tceforms->displayMessage', ) ), 'location' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.location', 'config' => array( 'type' => 'none' ) ), 'line' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.line', 'config' => array( 'type' => 'none' ) ), 'data_var' => array( 'exclude' => 0, 'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.data_var', 'config' => array( 'type' => 'user', 'userFunc' => 'tx_devlog_tceforms->displayAdditionalData', ) ) ), 'types' => array( '0' => array('showitem' => 'crdate;;;;1-1-1, severity;;;;1-1-1, extkey, msg, location;;1, data_var;;;;1-1-1') ), 'palettes' => array( '1' => array('showitem' => 'line', 'canNotCollapse' => true) ) ); ?>
#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdlib.h> BOOL WINAPI DLLMain ( HINSTANCE hInstDLL, DWORD dwReason, LPVOID lpvReserved ) { switch ( dwReason ) { case DLL_PROCESS_ATTACH: { } break; case DLL_THREAD_ATTACH: { } break; case DLL_THREAD_DETACH: { } break; case DLL_PROCESS_DETACH: { } break; } return true; }
Size/Length: To 236 cm (fork length) and 197 kg (commonly to about 180 cm and 100 kg). Texture: Soft to firm, with beautiful coarse grain. Texture aligns with fat content in body segments - belly has higher fat contents and becomes less towards back loin.
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2011.12.13 at 02:20:32 PM CET // package ch.epfl.bbp.uima.xml.pubmed; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) @XmlRootElement(name = "ISSN") public class ISSN { @XmlAttribute(name = "IssnType", required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String issnType; @XmlValue protected String value; /** * Gets the value of the issnType property. * * @return * possible object is * {@link String } * */ public String getIssnType() { return issnType; } /** * Sets the value of the issnType property. * * @param value * allowed object is * {@link String } * */ public void setIssnType(String value) { this.issnType = value; } /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getvalue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setvalue(String value) { this.value = value; } }
As a traveler who likes to dabble with trying new things, I used to go a lot on solo trips, which had been one of the best ways to meet people on the road and make friends: locals and other travelers (most of whom were also traveling alone). I learned a lot of tips from them, including how to stay safe, but I also discovered early on that I should always have these resources available wherever I go: a knife, fire starter, strong cord, compass, and whistle. I admit solo travel hadn’t been easy with its share of challenges since there’s no one else looking out for you to encourage you or cheer you up when things don’t end up as planned, but the opportunities are endless that made it all so memorable and worthwhile. Moving forward, over three decades, I now find myself promoting the same idea of keeping safe and having access to these same important resources in the form of an everyday-carry gear: the Gemstar Survival paracord bracelet. The article below is what I’d consider the most complete there is on paracord as it covers the multiple uses of paracord, its history, how to make paracord bracelets and cool projects, making snare traps, and more interesting tutorials. Paracord is unquestionably one of the greatest tools you can have at your disposal. It is strong, durable, versatile and ideal for multiple tasks indoors or outdoors, and insanely useful for off the grid living. Paracord is a prepper’s best friend. Also called parachute cord it is a strong, versatile, inexpensive, lightweight and easy to carry with you wherever you go. DIY paracord projects are fun to make, and also practical, as making things from 550 cord assures you will always have lots of useful string to make things from in case of emergency. This is why 550 cord survival bracelets are so popular. By wearing a bracelet from this rope, you can assure you always have your ever useful cord handy. The uses for 550 paracord are virtually endless. From clothing to furniture to tools and self-defense, there’s a project to fill just about any survival need you can imagine. It comes in so many colors, we can not possibly name them all. There are also endless numbers of cool projects you can make from this nifty, strong survival cord. Due to its super practical applications and versatility, paracord is one of our favorite items to keep in our survival gear. Over the years we’ve posted a lot of information and tutorials here on Survival Life, so we’ve decided to make a Master Paracord List of information from our site and others. Read on to learn more about the amazing properties of and many uses of this amazing survival material. All these situations and more can be a great opportunity to use paracord. It is known for its flexibility and durability, making it an ideal survival tool for any situation or terrain. Once you realize how many uses this material has, you won’t want to leave home without it. Click here for our list of 80 Uses for Paracord, and check out the video below for a more thorough rundown of what it is, how it works, and what it can be used for. The term paracord comes from the cord used on the soldiers parachutes in WWII. The term 550 simply means that it has a breaking strength of 550 pounds, giving it the name of 550 paracord, or 550 cord. When soldiers landed in the battle fields, they would cut the cord off their parachutes and pack it up for later use. This particular cord would come in handy for the soldiers during battle. Whether it was used to strap gear to humvees, build shelters, or sewing string, the cord could be used in endless ways. Learn more about the history of 550 cord here. You can’t read about survival lately without reading about paracord and projects using it. So what is the big deal with paracord? What makes it different than regular nylon rope? Why does everyone want this cordage as a part of their survival gear? To answer these questions and more, we we need to start with the basics. A paracord survival bracelet is a great tool for any prepper to have around. Having several around is even better. We have seen more cool survival bracelets than we can think of, and it is difficult to say which one is the best to have around. We just prefer to keep an assortment on hand. You can make or buy a paracord bracelet with a fire starter buckle, add a custom emblem (like survival straps) add decorative items to your bracelet like shotgun shells, a compass, and many other useful items. You can even add a watch face to your bracelet and make it into a watchband. Keeping your emergency survival bracelet around your wrist and ready to quickly deploy in the case of an emergency situation is a simple way of being prepared no matter where you are. There are tons of different ways to make a survival bracelet out of paracord. Here are some of our favorite tutorials. Check them out and try making your own survival bracelet. With all the different types of paracord bracelets on this list, you’re sure to find one the meets your needs. We think you will find several paracord projects you love. This goes way beyond personalizing your bracelet with colors. We have 16 options not only look different, but serve different purposes. Check out these different paracord bracelet weaves and pick one that works best for you. Ever wonder how to make paracord bracelets? Here is a list of different paracord bracelet projects for you to make at home. All you need are a few simple supplies and you will be making paracord bracelets for your friends and family. Not to mention your personal outdoor use. There are many different weaves, patterns and knots you can try when braiding the bracelets. Vapor Pens are all the rage these days, but they can be awfully expensive. If you’re prone to being forgetful or clumsy, this Vapor Pen lanyard will keep your loving chemical brother safe and snug around your neck. Even better, you won’t have to dig through your pocket every time you want to use it. Preppers may not be known for the fashion sense, but bracelets can mean the difference between life and death. Paracord survival bracelets, that is. Each bracelet is made with between eight and twenty feet of woven paracord, which can be taken apart and used in various survival situations. Did we mention you can store essential survival gear in these bracelets? When you are in a survival situation, every second counts. This blaze bar paracord bracelet is designed to quickly deploy. How quick you ask? Under 20 seconds! Follow this tutorial to make your very own blaze bar, quick deploy bracelet and be at ease knowing you’re a little more ready for an emergency situation. A paracord survival bracelet is a versatile tool that can come in handy for a number of emergency situations. Whether you are a survivalist, frequent hunter, outdoors person or just value the need to be prepared at all times, paracord bracelets are a great tool to have on at all times. In this tutorial, you will learn how to make the Cobra Survival Bracelet. When made correctly, this Cobra weave will quickly deploy to about 10 feet of paracord! This paracord keychain is a perfect place to keep matches, cash and other essentials with you wherever you go, and to carry it safely and discreetly. Best of all, it’s easy to make yourself. A paracord survival bracelet is a versatile tool that can come in handy for a number of emergency situations. Whether you are a survivalist, frequent hunter, outdoors person or just value the need to be prepared at all times, knowing how to tie a paracord bracelets is an important skill. A paracord bracelet is a good thing to have on hand at all times. A survival bracelet is a versatile tool that can come in handy for a number of emergency situations. Whether you are a survivalist, frequent hunter, outdoors person or just value the need to be prepared at all times, knowing how to tie a paracord bracelet is a great skill. Knowing how to tie several is even better- try making our Cobra Paracord Survival Bracelet and our Tire Tread Survival Bracelet. In order to make something useful out of paracord, you need to know what sort of knot is right for the job. With a little help from our friends over at DIY Ready, we’ve compiled some tutorials to help you master the art of paracord knots, braids and hitches. These tutorials will help you find the right technique for using your 550 cord in any situation. Just remember–practice makes perfect! Sometimes knowing the right knot could save your life. Case in point – you need to escape a POW camp and have a pile of bedsheets in your room (It’s a five star POW camp). What knot would you use to tie the bedsheets together so that you can still take the bedsheets with you to keep you warm during your trek through Siberia? By the end of this post, you’ll know exactly which knot to use. Hint: It’s the Kamikaze Knot. Hint Hint: You should NEVER, EVER USE IT! There’s a reason they call it that. What an insanely useful item for preppers and off the grid living! Make strong knots and hitches with this amazing rope. Our friends at DIY Ready have made an awesome list of all the best knots and hitches. This bracelet is made with 550 paracord. The working cords were guttered so that it would give it a flatter, more feminine look and feel. But, it works just the same without gutting the cord. The middle core is not gutted. This way gives the braid a more rounded look. …#35 Tie straight sticks around a broken limb to make a splint. Make this paracord weave for all sorts of survival gear and tools. This grip will make your tools, gear, and weapons more comfortable and easier to handle. This paracord knife grip from our friends at DIY Ready is an awesome addition for your survival gear. Want to know how to make cool paracord projects? We picked 36 of our favorite 550 cord ideas for you to try out. Our selections offer everything from paracord lanyards and belts to whips and weapons – even a cool paracord keychain with a secret hidden compartment that makes a super tiny survival kit. We love 550 paracord projects, and there are so many to choose from these days. Survival bracelets, belts, watches, monkey fists, lanyards, gear wraps and 100’s of other creative and cool ideas. Super durable and strong, paracord is also stylish and can be found in all colors of the rainbow, plus some super cool camo options ! We chose some of our favorite projects to share with you and we hope you enjoy these step-by-step Do It Yourself tutorials as much as we do. We have learned a lot about paraweaving in the making of these and are happy to be able to share our tips with you. If you have project ideas or additional tips, methods or tricks, please share them! The wallet pictured above is super stylish, and the woven cord makes it super strong and especially durable. We had not thought of making a wallet before and can’t wait to try this one in the color combination of our choice. We will be sure to post pictures when we do. If you make one, please make sure to share photos with us. We would love to see them! There are so many fun projects out there. Right now, our favorite one is this DIY paracord dog collar. It’s the ultimate dog collar made with about 40ft of 550 cord. This DIY dog collar is your best bet if you are looking for a stylish collar that is also super strong and durable. You can make this collar in any color combination you wish, and the same weave can also make a matching, super strong and durable dog leash. If you’ve been following our paracord projects, then you know the Cobra weave is one of the more popular weaves. For this paracord dog collar, we are going to take it one step further and do a King Cobra weave! This weave is super strong and even adds a thickness and padding to the original cobra weave, making the collar more comfortable for pooches of all sizes. These instructions and tutorial will show you how to use paracord and sticks to create a basic snare that will increase your probability of catching something in the wild. It is not nearly as difficult to catch game as you would think it might be, albeit primitive, this trap is effective and a great project to know for emergencies. Let’s get started on this cool paracord project that is one of our favorite survival DIY ideas! These paracord belt instructions and easy to follow instructions show you how to make a DIY paracord rescue belt, my favorite of all the paracord belts I tried. Paracord bracelets can come in handy but only have 8-12 feet of rope, while a belt can have up to 50 feet or more of 550 paracord. In extreme survival situations, 50 feet of rope would be a lot more use for you than 8-12 feet. However, this 550 cord belt gives you at least 50 feet of rope that is quickly accessible, and depending on your waist size, up to 100 ft of strong cord. It is super quick to deploy, you can unravel it in seconds. This particular DIY belt is made with Slatt’s rescue weave and is our favorite one for survival.
Breathtaking custom home that fits a family of all sizes!! The home features interior space with open concept living room/kitchen, separate family room upstairs, 4 bed 2.5 baths. Master Suite has separate sitting room and private deck. Outside features Cedar hand crafted back deck with hot tub, attached garage, custom 3 bay shop that is 42'x42'x15' m/l with bays large enough for a semi-truck!! All this on a private setting on 1+ acre.
# ToothGrowth Assignment: Accessing R Code from a Report Appendix Students often struggle to fit within the three page limit for the ToothGrowth portion of the *Statistical Inference* course project. The instructions and grading criteria for part 2 do not explicitly require inclusion of the code, but it's usually a good idea to include the code so reviewers can see the steps that were taken to generate the content in the report. One technique for fitting into the page limit restriction for the course project while simultaneously including the code is to move it to an Appendix, and use `ref.label` within the report to execute chunks of code as they are needed to support the analysis text. One can suppress printing of code in the report by using `echo=FALSE` in the knitr code to prevent knitr from printing the source code during the report. Since we're allowed to include code in an Appendix of up to 3 pages, I suggest that you include the code in the Appendix as follows. I typically organize my Rmd reports in the following manner: * Write all of the R code in an Appendix section, break it up into components, and give each component a name so I can execute it by reference during the report. * Where I need to run a section of the R code during the report, add code to call it by reference and use echo=FALSE to prevent the code from printing. * Add a \newpage LaTeX command right before the Appendix section to ensure the Appendix starts at the top of a new page. * Optionally, allow the code to print in the Appendix section. Here is how this looks in practice, based on my course project from *Regression Models*, with content redacted to comply with the Coursera Honor Code. First, here is what the Appendix looks like: <img src="./images/statinf-usingKnitrInReports01.png"> Second, here is what the start of the report looks like, where I use `ref.label` to execute named sections of R code that are located in the Appendix: <img src="./images/statinf-usingKnitrInReports02.png"> Third, here is what the output in the beginning of the report looks like: <img src="./images/statinf-usingKnitrInReports03.png"> Notice that 1) there is no echoing of the code between the Executive Summary and the Exploratory Data Analysis headings, even though I executed code to generate descriptive statistics ahead of the EDA section, where at 2) I've retrieved a mean calculated from an R procedure and displayed it in the report. Finally, here is what the appendix looks like, where the code is displayed `echo=TRUE` but not evaluated `eval=FALSE`. <img src="./images/statinf-usingKnitrInReports04.png"> In summary, the techniques above provide a straightforward way simultaneously manage the size of a report, include output from appropriate R functions in the report, and display code in an Appendix with or without executing it.
The annual conference of the European Sustainable Investment Forum (EUROSIF) took place in Brussels on 9th October 2014. Its core theme was Socially Responsible Investing (SRI) and it was attended by some 150 delegates from various sectors related to European financial markets. EMG CSR Consultancy has been a corporate member affiliate of EUROSIF since 2012 and was represented on this occasion by Drs Bjorn Sanders, director of EMG the Netherlands. The conference, which was held a stone’s throw from the European Parliament buildings, was chaired by the EUROSIF president Giuseppe van der Helm. Speakers included Fabio Galli (Chair Corporate Governance Working Group, Pensions Europe), Jeroen Hooijer (Head of Unit, Corporate Governance, Social Responsibility, European Commission), Signe Ratso (Director of Trade Strategy and Analysis and Market Access, DG Trade, European Commission) and Judith Sargentini (European Parliament member). An overview of EUROSIF’s recent activities was provided, and the emergence of soft law and its implications for investors were discussed. Subsequently, delegates debated the Conflict Minerals Disclosure Directive and the EU Shareholder Rights Directive. The highlight of the conference was the presentation of the EUROSIF European Sustainable Investment Study 2014, which indicated Socially Responsible Investing practices and trends in Europe. Exclusions, it emerged, has become a mainstream strategy, while all forms of ESG integration practices grew by 65% in the period 2011 – 2013. All SRI strategies included in the study had been growing at double-digit rates since 2011, and furthermore the European Impact investing market has now grown to an estimated €20 billion market.
Etymology : From Japanese (ken) "modest" and (shin) "truth". Charming creatures, Kenshin and Crescentius are attractive as much for their self-assured, original attitude as for their intellectual talents. Undeniably light-hearted, communicative and playful, they don´t like to talk about themselves and jealously guard their secret garden. Dynamic and self-willed, their trump card is their incredible power of persuasion which makes them apt to lead and is highly instrumental in assuring their success in life. They possess fantastic organization skills and aren´t able to tolerate being a simple subordinate for very long. Of practical intelligence coupled with an analytical mind they often tend to be sceptical, or even sarcastic. The 7 could confer them with an interest in technology but it could also lead them to explore the irrational, possibly even allowing them to use their intuition. This same number (if it is not correctly assimilated) could be the source of feelings of anxiety and fear. As children, they are independent and could be inclined to be introverted and passionate about science-fiction. They prefer solitude to unsatisfactory company. It would be wise to teach them the importance of moderation, cooperation and sharing, since these aren´t among their best qualities. While they are sociable and appear to be open and friendly, Kenshin and Crescentius seek calm and tranquillity first and foremost so that they can study, think, analyse and sometimes even meditate. They are likely to be interested in the avant-garde sciences (information technology) however they could also consider religion and the irrational to be worthy of further investigation. Emotionally, they are reserved and conceal their extreme sensitivity behind a wall of indifference that could make them appear cold and unfeeling. Otherwise, with a pirouette they disguise their anxiety with a superficial attitude. They are of basically sound moral character, enjoy setting an example for others and are as good as their word, which they expect to work both ways. It´s true that Kenshin and Crescentius are undoubtedly authoritarian and bossy, but this is a small price to pay for their upright, genuine and honest nature. The last comments about "Kenshin " Health:Feeling a little under the weather? Make sure you are getting enough vitamins Kenshin .
<!doctype html> <!-- @license Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> <title>ShadowCSS Tests</title> <meta charset="utf-8"> <!-- Mocha/Chai --> <link rel="stylesheet" href="../tools/mocha/mocha.css"> <script src="../tools/mocha/mocha.js"></script> <script src="../tools/chai/chai.js"></script> <script src="../tools/mocha-htmltest.js"></script> <!-- CustomElements --> <script src="../../webcomponents.js"></script> <div id="mocha"></div> <script> mocha.setup({ui: 'tdd', slow: 1000}); </script> <script src="tests.js"></script> <script> document.addEventListener('WebComponentsReady', function() { mocha.run(); }); </script>
Praxity rebranded and redefined its purpose to support its member firms in the best possible way. Growth underlines the global alliance's leading position in the accounting sector. Understanding cultural differences is essential in the workplace, both internally and externally. Following a three-year period of significant growth, UK accounting firm Shorts has joined Praxity Alliance. Plans to tax digital firms have exposed deep divisions around the world. What do we think about think tanks? In a ‘post-truth’ world where debate is just as often framed by emotions as by details of policy, think tanks are under attack. How seriously should we take the warning? China’s mammoth project to create a third global trade axis is taking shape and Hong Kong is ideally positioned to take advantage. The war of words between the US and China over Intellectual Property Rights (IPR) masks a shift in policy that could make China more attractive to international businesses. Public and private sector organisations face a major challenge in understanding and complying with reporting requirements around the world. Accountancy firms face a double-edged sword as they get to grips with President Donald Trump’s sweeping new tax reforms. US tax reform: what does it mean for business? “Something beautiful” is happening to the US tax system according to President Donald Trump. Is he right? China’s bid to create a third global trade axis could be good news for accountancy in more ways than one. If the hype is to be believed, China’s Belt and Road initiative will develop infrastructure and trade in local communities and across vast regions and continents.
You may have noticed that it’s been a ghost town on my blog and social media these days. I don’t like to make big announcements when I go away, so I snuck away quietly to visit family in Ohio. My eldest niece graduated from High School. To celebrate, we had a nice party for her at my parents’ house complete with a pink port-a-potty. Sadly, I did not get a picture which is too bad because my daughter was obsessed with that thing. For me, the highlight was having so much of my family together again. Since my grandma died, we don’t all get together for things like we used to before she died. I miss it. It’s important for my kids to know their family. The best part of any event at home is always riding in the golf cart! The rest of the trip was spent doing various field trips which I will be writing about in the next week or so and spending time with nieces, nephews, cousins, family, and friends. We ended our trip by stopping at my mother-in-law’s on the way home to surprise my husband’s grandma for her birthday with everyone coming together for dinner. Needless to say, we are all exhausted today and taking the day off! I have a lot of great posts planned for the next week and will be starting up the weekly memes next week as well. I hope you all are having a great week and enjoying the summer weather!
/************************************************************\ * Copyright 2014 Lawrence Livermore National Security, LLC * (c.f. AUTHORS, NOTICE.LLNS, COPYING) * * This file is part of the Flux resource manager framework. * For details, see https://github.com/flux-framework. * * SPDX-License-Identifier: LGPL-3.0 \************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif #include <stdbool.h> #include <errno.h> #include <stdio.h> #include <jansson.h> #include <string.h> #include <assert.h> #include "src/common/libflux/message.h" #include "src/common/libtap/tap.h" static bool verbose = false; void check_cornercase (void) { flux_msg_t *msg; flux_msg_t *req, *rsp, *evt, *any; struct flux_msg_cred cred; uint32_t seq, nodeid; uint8_t encodebuf[64]; size_t encodesize = 64; int type, errnum, status; uint32_t tag; uint8_t flags; const char *topic; const void *payload; int payload_size; errno = 0; ok (flux_msg_create (0xFFFF) == NULL && errno == EINVAL, "flux_msg_create fails with EINVAL on invalid type"); if (!(msg = flux_msg_create (FLUX_MSGTYPE_REQUEST))) BAIL_OUT ("flux_msg_create failed"); if (!(req = flux_msg_create (FLUX_MSGTYPE_REQUEST))) BAIL_OUT ("flux_msg_create failed"); if (!(rsp = flux_msg_create (FLUX_MSGTYPE_RESPONSE))) BAIL_OUT ("flux_msg_create failed"); if (!(evt = flux_msg_create (FLUX_MSGTYPE_EVENT))) BAIL_OUT ("flux_msg_create failed"); if (!(any = flux_msg_create (FLUX_MSGTYPE_ANY))) BAIL_OUT ("flux_msg_create failed"); lives_ok ({flux_msg_destroy (NULL);}, "flux_msg_destroy msg=NULL doesnt crash"); errno = 0; ok (flux_msg_aux_set (NULL, "foo", "bar", NULL) < 0 && errno == EINVAL, "flux_msg_aux_set msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_aux_get (NULL, "foo") == NULL && errno == EINVAL, "flux_msg_aux_get msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_copy (NULL, true) == NULL && errno == EINVAL, "flux_msg_copy msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_incref (NULL) == NULL && errno == EINVAL, "flux_msg_incref msg=NULL fails with EINVAL"); lives_ok ({flux_msg_decref (NULL);}, "flux_msg_decref msg=NULL doesnt crash"); errno = 0; ok (flux_msg_encode_size (NULL) < 0 && errno == EINVAL, "flux_msg_encode_size fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_encode (NULL, encodebuf, encodesize) < 0 && errno == EINVAL, "flux_msg_encode fails on EINVAL with msg=NULL"); errno = 0; ok (flux_msg_encode (any, encodebuf, encodesize) < 0 && errno == EPROTO, "flux_msg_encode fails on EPROTO with msg type ANY"); errno = 0; ok (flux_msg_frames (NULL) < 0 && errno == EINVAL, "flux_msg_frames returns -1 errno EINVAL on msg = NULL"); errno = 0; ok (flux_msg_set_type (NULL, 0) < 0 && errno == EINVAL, "flux_msg_set_type fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_type (NULL, &type) < 0 && errno == EINVAL, "flux_msg_get_type fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_set_private (NULL) < 0 && errno == EINVAL, "flux_msg_set_private msg=NULL fails with EINVAL"); ok (flux_msg_is_private (NULL) == true, "flux_msg_is_private msg=NULL returns true"); errno = 0; ok (flux_msg_set_streaming (NULL) < 0 && errno == EINVAL, "flux_msg_set_streaming msg=NULL fails with EINVAL"); ok (flux_msg_is_streaming (NULL) == true, "flux_msg_is_streaming msg=NULL returns true"); errno = 0; ok (flux_msg_set_noresponse (NULL) < 0 && errno == EINVAL, "flux_msg_set_noresponse msg=NULL fails with EINVAL"); ok (flux_msg_is_noresponse (NULL) == true, "flux_msg_is_noresponse msg=NULL returns true"); errno = 0; ok (flux_msg_set_topic (NULL, "foobar") < 0 && errno == EINVAL, "flux_msg_set_topic fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_topic (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_topic fails with EINVAL on in-and-out param = NULL"); errno = 0; ok (flux_msg_get_topic (msg, &topic) < 0 && errno == EPROTO, "flux_msg_get_topic fails with EPROTO on msg w/o topic"); errno = 0; ok (flux_msg_set_payload (NULL, NULL, 0) < 0 && errno == EINVAL, "flux_msg_set_payload msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_payload (NULL, NULL, NULL) < 0 && errno == EINVAL, "flux_msg_get_payload msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_payload (msg, NULL, NULL) < 0 && errno == EINVAL, "flux_msg_get_payload fails with EINVAL on in-and-out params = NULL"); errno = 0; ok (flux_msg_get_payload (msg, &payload, &payload_size) < 0 && errno == EPROTO, "flux_msg_get_payload fails with EPROTO on msg w/o payload"); ok (flux_msg_has_payload (NULL) == false, "flux_msg_has_payload returns false on msg = NULL"); errno = 0; ok (flux_msg_get_flags (NULL, &flags) < 0 && errno == EINVAL, "flux_msg_get_flags msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_flags (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_flags flags=NULL fails with EINVAL"); errno = 0; ok (flux_msg_set_flags (NULL, 0) < 0 && errno == EINVAL, "flux_msg_set_flags msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_set_flags (msg, 0xff) < 0 && errno == EINVAL, "flux_msg_set_flags flags=(invalid) fails with EINVAL"); errno = 0; ok (flux_msg_set_flags (msg, FLUX_MSGFLAG_STREAMING | FLUX_MSGFLAG_NORESPONSE) < 0 && errno == EINVAL, "flux_msg_set_flags streaming|noresponse fails with EINVAL"); errno = 0; ok (flux_msg_pack (NULL, "{s:i}", "foo", 42) < 0 && errno == EINVAL, "flux_msg_pack msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_pack (msg, NULL) < 0 && errno == EINVAL, "flux_msg_pack fails with EINVAL with NULL format"); errno = 0; ok (flux_msg_unpack (NULL, "{s:i}", "type", &type) < 0 && errno == EINVAL, "flux_msg_unpack msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_unpack (msg, NULL) < 0 && errno == EINVAL, "flux_msg_unpack fails with EINVAL with NULL format"); errno = 0; ok (flux_msg_set_nodeid (NULL, 0) < 0 && errno == EINVAL, "flux_msg_set_nodeid fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_nodeid (NULL, &nodeid) < 0 && errno == EINVAL, "flux_msg_get_nodeid fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_nodeid (rsp, &nodeid) < 0 && errno == EPROTO, "flux_msg_get_nodeid fails with PROTO on msg != request type"); errno = 0; ok (flux_msg_get_userid (NULL, &cred.userid) < 0 && errno == EINVAL, "flux_msg_get_userid msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_userid (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_userid userid=NULL fails with EINVAL"); errno = 0; ok (flux_msg_set_userid (NULL, cred.userid) < 0 && errno == EINVAL, "flux_msg_set_userid msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_rolemask (NULL, &cred.rolemask) < 0 && errno == EINVAL, "flux_msg_get_rolemask msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_rolemask (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_rolemask rolemask=NULL fails with EINVAL"); errno = 0; ok (flux_msg_set_rolemask (NULL, cred.rolemask) < 0 && errno == EINVAL, "flux_msg_set_rolemask msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_cred (NULL, &cred) < 0 && errno == EINVAL, "flux_msg_get_cred msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_get_cred (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_cred cred=NULL fails with EINVAL"); errno = 0; ok (flux_msg_set_cred (NULL, cred) < 0 && errno == EINVAL, "flux_msg_set_cred msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_authorize (NULL, 42) < 0 && errno == EINVAL, "flux_msg_authorize msg=NULL fails with EINVAL"); errno = 0; ok (flux_msg_set_errnum (NULL, 42) < 0 && errno == EINVAL, "flux_msg_set_errnum on fails with errno == EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_errnum (NULL, &errnum) < 0 && errno == EINVAL, "flux_msg_get_errnum fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_errnum (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_errnum fails with EINVAL on in-and-out param = NULL"); errno = 0; ok (flux_msg_get_errnum (req, &errnum) < 0 && errno == EPROTO, "flux_msg_get_errnum fails with EPROTO on msg != response type"); errno = 0; ok (flux_msg_set_seq (NULL, 0) < 0 && errno == EINVAL, "flux_msg_set_seq fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_seq (NULL, &seq) < 0 && errno == EINVAL, "flux_msg_get_seq fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_seq (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_seq fails with EINVAL on in-and-out param = NULL"); errno = 0; ok (flux_msg_get_seq (req, &seq) < 0 && errno == EPROTO, "flux_msg_get_seq fails with EPROTO on msg != event type"); errno = 0; ok (flux_msg_set_status (NULL, 0) < 0 && errno == EINVAL, "flux_msg_set_status fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_status (NULL, &status) < 0 && errno == EINVAL, "flux_msg_get_status fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_status (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_status fails with EINVAL on in-and-out param = NULL"); errno = 0; ok (flux_msg_get_status (req, &status) < 0 && errno == EPROTO, "flux_msg_get_status fails with EPROTO on msg != keepalive type"); errno = 0; ok (flux_msg_set_matchtag (NULL, 42) < 0 && errno == EINVAL, "flux_msg_set_matchtag fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_matchtag (NULL, &tag) < 0 && errno == EINVAL, "flux_msg_get_matchtag fails with EINVAL on msg = NULL"); errno = 0; ok (flux_msg_get_matchtag (msg, NULL) < 0 && errno == EINVAL, "flux_msg_get_matchtag fails with EINVAL on in-and-out param = NULL"); errno = 0; ok (flux_msg_get_matchtag (evt, &tag) < 0 && errno == EPROTO, "flux_msg_get_matchtag fails with EPROTO on msg != req/rsp type"); lives_ok ({flux_msg_route_enable (NULL);}, "flux_msg_route_enable msg=NULL doesnt crash"); lives_ok ({flux_msg_route_disable (NULL);}, "flux_msg_route_disable msg=NULL doesnt crash"); lives_ok ({flux_msg_route_clear (NULL);}, "flux_msg_route_clear msg=NULL doesnt crash"); errno = 0; ok (flux_msg_route_push (NULL, "foo") == -1 && errno == EINVAL, "flux_msg_route_push returns -1 errno EINVAL on msg = NULL"); errno = 0; ok (flux_msg_route_push (msg, NULL) == -1 && errno == EINVAL, "flux_msg_route_push returns -1 errno EINVAL on id = NULL"); errno = 0; ok (flux_msg_route_push (msg, "foo") == -1 && errno == EPROTO, "flux_msg_route_push returns -1 errno EPROTO on msg w/o routes enabled"); errno = 0; ok (flux_msg_route_delete_last (NULL) == -1 && errno == EINVAL, "flux_msg_route_delete_last returns -1 errno EINVAL on id = NULL"); errno = 0; ok (flux_msg_route_delete_last (msg) == -1 && errno == EPROTO, "flux_msg_route_delete_last returns -1 errno EPROTO on msg " "w/o routes enabled"); ok (flux_msg_route_first (NULL) == NULL, "flux_msg_route_first returns NULL on msg = NULL"); ok (flux_msg_route_first (msg) == NULL, "flux_msg_route_first returns NULL on msg w/o routes enabled"); ok (flux_msg_route_last (NULL) == NULL, "flux_msg_route_last returns NULL on msg = NULL"); ok (flux_msg_route_last (msg) == NULL, "flux_msg_route_last returns NULL on msg w/o routes enabled"); errno = 0; ok ((flux_msg_route_count (NULL) == -1 && errno == EINVAL), "flux_msg_route_count returns -1 errno EINVAL on msg = NULL"); errno = 0; ok ((flux_msg_route_count (msg) == -1 && errno == EPROTO), "flux_msg_route_count returns -1 errno EPROTO on msg " "w/o routes enabled"); errno = 0; ok ((flux_msg_route_string (NULL) == NULL && errno == EINVAL), "flux_msg_route_string returns NULL errno EINVAL on msg = NULL"); errno = 0; ok ((flux_msg_route_string (msg) == NULL && errno == EPROTO), "flux_msg_route_string returns NULL errno EPROTO on msg " "w/o routes enabled"); flux_msg_destroy (msg); } /* flux_msg_route_first, flux_msg_route_last, * flux_msg_route_count on message with variable number of * routing frames */ void check_routes (void) { flux_msg_t *msg; const char *route; char *s; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL && flux_msg_frames (msg) == 1, "flux_msg_create works and creates msg with 1 frame"); flux_msg_route_clear (msg); ok (flux_msg_frames (msg) == 1, "flux_msg_route_clear works, is no-op on msg w/o routes enabled"); flux_msg_route_disable (msg); ok (flux_msg_frames (msg) == 1, "flux_msg_route_disable works, is no-op on msg w/o routes enabled"); flux_msg_route_enable (msg); ok (flux_msg_frames (msg) == 2, "flux_msg_route_enable works, adds one frame on msg w/ routes enabled"); ok ((flux_msg_route_count (msg) == 0), "flux_msg_route_count returns 0 on msg w/o routes"); ok ((route = flux_msg_route_first (msg)) == NULL, "flux_msg_route_first returns NULL on msg w/o routes"); ok ((route = flux_msg_route_last (msg)) == NULL, "flux_msg_route_last returns NULL on msg w/o routes"); ok (flux_msg_route_push (msg, "sender") == 0 && flux_msg_frames (msg) == 3, "flux_msg_route_push works and adds a frame"); ok ((flux_msg_route_count (msg) == 1), "flux_msg_route_count returns 1 on msg w/ id1"); ok ((route = flux_msg_route_first (msg)) != NULL, "flux_msg_route_first works"); like (route, "sender", "flux_msg_route_first returns id on msg w/ id1"); ok ((route = flux_msg_route_last (msg)) != NULL, "flux_msg_route_last works"); like (route, "sender", "flux_msg_route_last returns id on msg w/ id1"); ok ((s = flux_msg_route_string (msg)) != NULL, "flux_msg_route_string works"); like (s, "sender", "flux_msg_route_string returns correct string on msg w/ id1"); free (s); ok (flux_msg_route_push (msg, "router") == 0 && flux_msg_frames (msg) == 4, "flux_msg_route_push works and adds a frame"); ok ((flux_msg_route_count (msg) == 2), "flux_msg_route_count returns 2 on msg w/ id1+id2"); ok ((route = flux_msg_route_first (msg)) != NULL, "flux_msg_route_first works"); like (route, "sender", "flux_msg_route_first returns id1 on msg w/ id1+id2"); ok ((route = flux_msg_route_last (msg)) != NULL, "flux_msg_route_last works"); like (route, "router", "flux_msg_route_last returns id2 on message with id1+id2"); ok ((s = flux_msg_route_string (msg)) != NULL, "flux_msg_route_string works"); like (s, "sender!router", "flux_msg_route_string returns correct string on msg w/ id1+id2"); free (s); ok (flux_msg_route_delete_last (msg) == 0 && flux_msg_frames (msg) == 3, "flux_msg_route_delete_last works and removed a frame"); ok (flux_msg_route_count (msg) == 1, "flux_msg_route_count returns 1 on message w/ id1"); flux_msg_route_clear (msg); ok (flux_msg_route_count (msg) == 0, "flux_msg_route_clear clear routing frames"); ok (flux_msg_frames (msg) == 2, "flux_msg_route_clear did not disable routing frames"); ok (flux_msg_route_push (msg, "foobar") == 0 && flux_msg_frames (msg) == 3, "flux_msg_route_push works and adds a frame after flux_msg_route_clear()"); ok ((flux_msg_route_count (msg) == 1), "flux_msg_route_count returns 1 on msg w/ id1"); flux_msg_route_disable (msg); ok (flux_msg_frames (msg) == 1, "flux_msg_route_disable clear routing frames"); ok (flux_msg_route_push (msg, "boobar") < 0 && errno == EPROTO, "flux_msg_route_push fails with EPROTO after flux_msg_route_disable()"); flux_msg_destroy (msg); } /* flux_msg_get_topic, flux_msg_set_topic on message with and without routes */ void check_topic (void) { flux_msg_t *msg; const char *s; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); ok (flux_msg_set_topic (msg, "blorg") == 0, "flux_msg_set_topic works"); ok (flux_msg_get_topic (msg, &s) == 0, "flux_msg_get_topic works on msg w/topic"); like (s, "blorg", "and we got back the topic string we set"); flux_msg_route_enable (msg); ok (flux_msg_route_push (msg, "id1") == 0, "flux_msg_route_push works"); ok (flux_msg_get_topic (msg, &s) == 0, "flux_msg_get_topic still works, with routes"); like (s, "blorg", "and we got back the topic string we set"); flux_msg_destroy (msg); } void check_payload_json (void) { const char *s; flux_msg_t *msg; json_t *o; int i; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); s = (char *)msg; ok (flux_msg_get_string (msg, &s) == 0 && s == NULL, "flux_msg_get_string returns success with no payload"); ok (strlen(flux_msg_last_error (msg)) == 0, "flux_msg_last_error() returns empty string before pack/unpack"); is (flux_msg_last_error (NULL), "msg object is NULL", "flux_msg_last_error() returns 'msg object is NULL' on NULL arg"); /* Unpack on a message with invalid string payload should be an error */ errno = 0; ok (flux_msg_set_payload (msg, "fluffy", 6) == 0, "set invalid string payload on msg"); errno = 0; ok (flux_msg_unpack (msg, "{s:i}", "foo", &i) < 0 && errno == EPROTO, "flux_msg_unpack() on message with invalid payload returns EPROTO"); is (flux_msg_last_error (msg), "flux_msg_get_string: Protocol error", "flux_msg_last_error reports '%s'", flux_msg_last_error(msg)); /* RFC 3 - json payload must be an object * Encoding should return EINVAL. */ errno = 0; ok (flux_msg_pack (msg, "[1,2,3]") < 0 && errno == EINVAL, "flux_msg_pack array fails with EINVAL"); ok (strlen(flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); errno = 0; ok (flux_msg_pack (msg, "3.14") < 0 && errno == EINVAL, "flux_msg_pack scalar fails with EINVAL"); ok (strlen(flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); /* Sneak in a malformed JSON payloads and test decoding. * 1) array */ if (flux_msg_set_string (msg, "[1,2,3]") < 0) BAIL_OUT ("flux_msg_set_string failed"); errno = 0; ok (flux_msg_unpack (msg, "o", &o) < 0 && errno == EPROTO, "flux_msg_unpack array fails with EPROTO"); ok (strlen(flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); /* 2) bare value */ if (flux_msg_set_string (msg, "3.14") < 0) BAIL_OUT ("flux_msg_set_string failed"); errno = 0; ok (flux_msg_unpack (msg, "o", &o) < 0 && errno == EPROTO, "flux_msg_unpack scalar fails with EPROTO"); ok (strlen(flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); /* 3) malformed object (no trailing }) */ if (flux_msg_set_string (msg, "{\"a\":42") < 0) BAIL_OUT ("flux_msg_set_string failed"); errno = 0; ok (flux_msg_unpack (msg, "o", &o) < 0 && errno == EPROTO, "flux_msg_unpack malformed object fails with EPROTO"); ok (strlen(flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); ok (flux_msg_pack (msg, "{s:i}", "foo", 42) == 0, "flux_msg_pack works"); ok (strlen(flux_msg_last_error (msg)) == 0, "flux_msg_last_error returns empty string after ok pack"); i = 0; ok (flux_msg_unpack (msg, "{s:i}", "foo", &i) == 0 && i == 42, "flux_msg_unpack returns payload intact"); ok (strlen(flux_msg_last_error (msg)) == 0, "flux_msg_last_error returns empty string after ok unpack"); flux_msg_destroy (msg); } void check_payload_json_formatted (void) { flux_msg_t *msg; int i; const char *s; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); errno = 0; ok (flux_msg_unpack (msg, "{}") < 0 && errno == EPROTO, "flux_msg_unpack fails with EPROTO with no payload"); ok (strlen (flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); errno = 0; ok (flux_msg_pack (msg, "[i,i,i]", 1,2,3) < 0 && errno == EINVAL, "flux_msg_pack array fails with EINVAL"); is (flux_msg_last_error (msg), "payload is not a JSON object", "flux_msg_last_error: %s", flux_msg_last_error (msg)); errno = 0; ok (flux_msg_pack (msg, "i", 3.14) < 0 && errno == EINVAL, "flux_msg_pack scalar fails with EINVAL"); ok (strlen (flux_msg_last_error (msg)) > 0, "flux_msg_last_error: %s", flux_msg_last_error (msg)); ok (flux_msg_pack (msg, "{s:i, s:s}", "foo", 42, "bar", "baz") == 0, "flux_msg_pack object works"); ok (strlen (flux_msg_last_error (msg)) == 0, "flux_msg_last_error is empty string after ok pack"); i = 0; s = NULL; ok (flux_msg_unpack (msg, "{s:i, s:s}", "foo", &i, "bar", &s) == 0, "flux_msg_unpack object works"); ok (strlen (flux_msg_last_error (msg)) == 0, "flux_msg_last_error is empty string after ok unpack"); ok (i == 42 && s != NULL && !strcmp (s, "baz"), "decoded content matches encoded content"); /* reset payload */ ok (flux_msg_pack (msg, "{s:i, s:s}", "foo", 43, "bar", "smurf") == 0, "flux_msg_pack can replace JSON object payload"); i = 0; s = NULL; ok (flux_msg_unpack (msg, "{s:i, s:s}", "foo", &i, "bar", &s) == 0, "flux_msg_unpack object works"); ok (i == 43 && s != NULL && !strcmp (s, "smurf"), "decoded content matches new encoded content"); i = 0; s = NULL; ok (flux_msg_unpack (msg, "{s:s, s:i}", "bar", &s, "foo", &i) == 0, "flux_msg_unpack object works out of order"); ok (i == 43 && s != NULL && !strcmp (s, "smurf"), "decoded content matches new encoded content"); ok (strlen (flux_msg_last_error (msg)) == 0, "flux_msg_last_error is empty string on EINVAL"); errno = 0; ok (flux_msg_unpack (msg, "") < 0 && errno == EINVAL, "flux_msg_unpack fails with EINVAL with \"\" format"); ok (strlen (flux_msg_last_error (msg)) == 0, "flux_msg_last_error is empty string on EINVAL"); errno = 0; ok (flux_msg_unpack (msg, "{s:s}", "nope", &s) < 0 && errno == EPROTO, "flux_msg_unpack fails with EPROTO with nonexistent key"); ok (strlen (flux_msg_last_error (msg)) > 0, "flux_msg_last_error is %s", flux_msg_last_error (msg)); /* flux_msg_pack/unpack doesn't reject packed NUL chars */ char buf[4] = "foo"; char *result = NULL; size_t len = -1; ok (flux_msg_pack (msg, "{ss#}", "result", buf, 4) == 0, "flux_msg_pack with NUL char works"); ok (flux_msg_unpack (msg, "{ss%}", "result", &result, &len) == 0, "flux_msg_unpack with NUL char works"); ok (len == 4, "flux_msg_unpack returned correct length"); ok (memcmp (buf, result, 4) == 0, "original buffer and result match"); flux_msg_destroy (msg); } /* flux_msg_get_payload, flux_msg_set_payload * on message with and without routes, with and without topic string */ void check_payload (void) { flux_msg_t *msg; const void *buf; void *pay[1024]; int plen = sizeof (pay), len; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); errno = 0; ok (flux_msg_set_payload (msg, NULL, 0) == 0 && errno == 0, "flux_msg_set_payload NULL works with no payload"); errno = 0; ok (flux_msg_get_payload (msg, &buf, &len) < 0 && errno == EPROTO, "flux_msg_get_payload still fails"); errno = 0; memset (pay, 42, plen); ok (flux_msg_set_payload (msg, pay, plen) == 0 && flux_msg_frames (msg) == 2, "flux_msg_set_payload works"); len = 0; buf = NULL; errno = 0; ok (flux_msg_get_payload (msg, &buf, &len) == 0 && buf && len == plen && errno == 0, "flux_msg_get_payload works"); cmp_mem (buf, pay, len, "and we got back the payload we set"); ok (flux_msg_set_topic (msg, "blorg") == 0 && flux_msg_frames (msg) == 3, "flux_msg_set_topic works"); len = 0; buf = NULL; errno = 0; ok (flux_msg_get_payload (msg, &buf, &len) == 0 && buf && len == plen && errno == 0, "flux_msg_get_payload works with topic"); cmp_mem (buf, pay, len, "and we got back the payload we set"); ok (flux_msg_set_topic (msg, NULL) == 0 && flux_msg_frames (msg) == 2, "flux_msg_set_topic NULL works"); flux_msg_route_enable (msg); ok (flux_msg_frames (msg) == 3, "flux_msg_route_enable works"); ok (flux_msg_route_push (msg, "id1") == 0 && flux_msg_frames (msg) == 4, "flux_msg_route_push works"); len = 0; buf = NULL; errno = 0; ok (flux_msg_get_payload (msg, &buf, &len) == 0 && buf && len == plen && errno == 0, "flux_msg_get_payload still works, with routes"); cmp_mem (buf, pay, len, "and we got back the payload we set"); ok (flux_msg_set_topic (msg, "blorg") == 0 && flux_msg_frames (msg) == 5, "flux_msg_set_topic works"); len = 0; buf = NULL; errno = 0; ok (flux_msg_get_payload (msg, &buf, &len) == 0 && buf && len == plen && errno == 0, "flux_msg_get_payload works, with topic and routes"); cmp_mem (buf, pay, len, "and we got back the payload we set"); errno = 0; ok (flux_msg_set_payload (msg, buf, len - 1) < 0 && errno == EINVAL, "flux_msg_set_payload detects reuse of payload fragment and fails with EINVAL"); ok (flux_msg_set_payload (msg, buf, len) == 0, "flux_msg_set_payload detects payload echo and works"); ok (flux_msg_get_payload (msg, &buf, &len) == 0 && buf && len == plen, "flux_msg_get_payload works"); cmp_mem (buf, pay, len, "and we got back the payload we set"); errno = 0; ok (flux_msg_set_payload (msg, NULL, 0) == 0 && errno == 0, "flux_msg_set_payload NULL works"); errno = 0; ok (flux_msg_get_payload (msg, &buf, &len) < 0 && errno == EPROTO, "flux_msg_get_payload now fails with EPROTO"); flux_msg_destroy (msg); } /* flux_msg_set_type, flux_msg_get_type * flux_msg_set_nodeid, flux_msg_get_nodeid * flux_msg_set_errnum, flux_msg_get_errnum * */ void check_proto (void) { flux_msg_t *msg; uint32_t nodeid; int errnum; int type; ok ((msg = flux_msg_create (FLUX_MSGTYPE_ANY)) != NULL, "flux_msg_create works"); ok (flux_msg_get_type (msg, &type) == 0 && type == FLUX_MSGTYPE_ANY, "flux_msg_get_type works with type FLUX_MSGTYPE_ANY"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_RESPONSE)) != NULL, "flux_msg_create works"); ok (flux_msg_get_type (msg, &type) == 0 && type == FLUX_MSGTYPE_RESPONSE, "flux_msg_get_type works and returns what we set"); ok (flux_msg_set_type (msg, FLUX_MSGTYPE_REQUEST) == 0, "flux_msg_set_type works"); ok (flux_msg_get_type (msg, &type) == 0 && type == FLUX_MSGTYPE_REQUEST, "flux_msg_get_type works and returns what we set"); ok (flux_msg_get_nodeid (msg, &nodeid) == 0 && nodeid == FLUX_NODEID_ANY, "flux_msg_get_nodeid works on request and default is sane"); nodeid = 42; ok (flux_msg_set_nodeid (msg, nodeid) == 0, "flux_msg_set_nodeid works on request"); nodeid = 0; ok (flux_msg_get_nodeid (msg, &nodeid) == 0 && nodeid == 42, "flux_msg_get_nodeid works and returns what we set"); errno = 0; ok (flux_msg_set_errnum (msg, 42) < 0 && errno == EINVAL, "flux_msg_set_errnum on non-response fails with errno == EINVAL"); ok (flux_msg_set_type (msg, FLUX_MSGTYPE_RESPONSE) == 0, "flux_msg_set_type works"); ok (flux_msg_get_type (msg, &type) == 0 && type == FLUX_MSGTYPE_RESPONSE, "flux_msg_get_type works and returns what we set"); ok (flux_msg_set_errnum (msg, 43) == 0, "flux_msg_set_errnum works on response"); errno = 0; ok (flux_msg_set_nodeid (msg, 0) < 0 && errno == EINVAL, "flux_msg_set_nodeid on non-request fails with errno == EINVAL"); errnum = 0; ok (flux_msg_get_errnum (msg, &errnum) == 0 && errnum == 43, "flux_msg_get_errnum works and returns what we set"); ok (flux_msg_set_type (msg, FLUX_MSGTYPE_REQUEST) == 0, "flux_msg_set_type works"); errno = 0; ok (flux_msg_set_nodeid (msg, FLUX_NODEID_UPSTREAM) < 0 && errno == EINVAL, "flux_msg_set_nodeid FLUX_NODEID_UPSTREAM fails with EINVAL"); flux_msg_destroy (msg); } void check_matchtag (void) { flux_msg_t *msg; uint32_t t; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); ok (flux_msg_get_matchtag (msg, &t) == 0 && t == FLUX_MATCHTAG_NONE, "flux_msg_get_matchtag returns FLUX_MATCHTAG_NONE when uninitialized"); ok (flux_msg_set_matchtag (msg, 42) == 0, "flux_msg_set_matchtag works"); ok (flux_msg_get_matchtag (msg, &t) == 0, "flux_msg_get_matchtag works"); ok (t == 42, "flux_msg_get_matchtag returns set value"); ok (flux_msg_cmp_matchtag (msg, 42) && !flux_msg_cmp_matchtag (msg, 0), "flux_msg_cmp_matchtag works"); flux_msg_destroy (msg); } void check_security (void) { flux_msg_t *msg; struct flux_msg_cred cred; struct flux_msg_cred user_9 = { .rolemask = FLUX_ROLE_USER, .userid = 9 }; struct flux_msg_cred owner_2 = { .rolemask = FLUX_ROLE_OWNER, .userid = 2 }; struct flux_msg_cred user_unknown = { .rolemask = FLUX_ROLE_USER, .userid = FLUX_USERID_UNKNOWN }; struct flux_msg_cred none_9 = { .rolemask = FLUX_ROLE_NONE, .userid = 9 }; /* Accessors work */ ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); ok (flux_msg_get_userid (msg, &cred.userid) == 0 && cred.userid == FLUX_USERID_UNKNOWN, "message created with userid=FLUX_USERID_UNKNOWN"); ok (flux_msg_get_rolemask (msg, &cred.rolemask) == 0 && cred.rolemask == FLUX_ROLE_NONE, "message created with rolemask=FLUX_ROLE_NONE"); ok (flux_msg_set_userid (msg, 4242) == 0 && flux_msg_get_userid (msg, &cred.userid) == 0 && cred.userid == 4242, "flux_msg_set_userid 4242 works"); ok (flux_msg_set_rolemask (msg, FLUX_ROLE_ALL) == 0 && flux_msg_get_rolemask (msg, &cred.rolemask) == 0 && cred.rolemask == FLUX_ROLE_ALL, "flux_msg_set_rolemask FLUX_ROLE_ALL works"); memset (&cred, 0, sizeof (cred)); ok (flux_msg_get_cred (msg, &cred) == 0 && cred.userid == 4242 && cred.rolemask == FLUX_ROLE_ALL, "flux_msg_get_cred works"); ok (flux_msg_set_cred (msg, user_9) == 0 && flux_msg_get_cred (msg, &cred) == 0 && cred.userid == user_9.userid && cred.rolemask == user_9.rolemask, "flux_msg_set_cred works"); /* Simple authorization works */ ok (flux_msg_cred_authorize (owner_2, 2) == 0, "flux_msg_cred_authorize allows owner when userids match"); ok (flux_msg_cred_authorize (owner_2, 4) == 0, "flux_msg_cred_authorize allows owner when userids mismatch"); ok (flux_msg_cred_authorize (user_9, 9) == 0, "flux_msg_cred_authorize allows guest when userids match"); errno = 0; ok (flux_msg_cred_authorize (user_9, 10) < 0 && errno == EPERM, "flux_msg_cred_authorize denies guest (EPERM) when userids mismatch"); errno = 0; ok (flux_msg_cred_authorize (user_unknown, FLUX_USERID_UNKNOWN) < 0 && errno == EPERM, "flux_msg_cred_authorize denies guest (EPERM) when userids=UNKNOWN"); errno = 0; ok (flux_msg_cred_authorize (none_9, 9) < 0 && errno == EPERM, "flux_msg_cred_authorize denies guest (EPERM) when role=NONE"); /* Repeat with the message version */ if (flux_msg_set_cred (msg, owner_2) < 0) BAIL_OUT ("flux_msg_set_cred failed"); ok (flux_msg_authorize (msg, 2) == 0, "flux_msg_authorize allows owner when userid's match"); ok (flux_msg_authorize (msg, 4) == 0, "flux_msg_authorize allows owner when userid's mismatch"); if (flux_msg_set_cred (msg, user_9) < 0) BAIL_OUT ("flux_msg_set_cred failed"); ok (flux_msg_authorize (msg, 9) == 0, "flux_msg_authorize allows guest when userid's match"); errno = 0; ok (flux_msg_authorize (msg, 10) < 0 && errno == EPERM, "flux_msg_authorize denies guest (EPERM) when userid's mismatch"); if (flux_msg_set_cred (msg, user_unknown) < 0) BAIL_OUT ("flux_msg_set_cred failed"); errno = 0; ok (flux_msg_authorize (msg, FLUX_USERID_UNKNOWN) < 0 && errno == EPERM, "flux_msg_authorize denies guest (EPERM) when userids=UNKNOWN"); if (flux_msg_set_cred (msg, none_9) < 0) BAIL_OUT ("flux_msg_set_cred failed"); errno = 0; ok (flux_msg_authorize (msg, 9) < 0 && errno == EPERM, "flux_msg_authorize denies guest (EPERM) when role=NONE"); flux_msg_destroy (msg); } void check_cmp (void) { struct flux_match match = FLUX_MATCH_ANY; flux_msg_t *msg; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); ok (flux_msg_cmp (msg, match), "flux_msg_cmp all-match works"); match.typemask = FLUX_MSGTYPE_RESPONSE; ok (!flux_msg_cmp (msg, match), "flux_msg_cmp with request type not in mask works"); match.typemask |= FLUX_MSGTYPE_REQUEST; ok (flux_msg_cmp (msg, match), "flux_msg_cmp with request type in mask works"); ok (flux_msg_set_topic (msg, "hello.foo") == 0, "flux_msg_set_topic works"); match.topic_glob = "hello.foobar"; ok (!flux_msg_cmp (msg, match), "flux_msg_cmp with unmatched topic works"); match.topic_glob = "hello.foo"; ok (flux_msg_cmp (msg, match), "flux_msg_cmp with exact topic works"); match.topic_glob = "hello.*"; ok (flux_msg_cmp (msg, match), "flux_msg_cmp with globbed '*' topic works"); match.topic_glob = "hello.fo?"; ok (flux_msg_cmp (msg, match), "flux_msg_cmp with globbed '?' topic works"); match.topic_glob = "hello.fo[op]"; ok (flux_msg_cmp (msg, match), "flux_msg_cmp with globbed '[' topic works"); flux_msg_destroy (msg); } void check_encode (void) { flux_msg_t *msg, *msg2; uint8_t smallbuf[1]; void *buf; size_t size; const char *topic; int type; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "flux_msg_create works"); ok (flux_msg_set_topic (msg, "foo.bar") == 0, "flux_msg_set_topic works"); errno = 0; ok (flux_msg_encode (msg, smallbuf, 1) < 0 && errno == EINVAL, "flux_msg_encode fails on EINVAL with buffer too small"); size = flux_msg_encode_size (msg); ok (size > 0, "flux_msg_encode_size works"); buf = malloc (size); assert (buf != NULL); ok (flux_msg_encode (msg, buf, size) == 0, "flux_msg_encode works"); ok ((msg2 = flux_msg_decode (buf, size)) != NULL, "flux_msg_decode works"); free (buf); ok (flux_msg_get_type (msg2, &type) == 0 && type == FLUX_MSGTYPE_REQUEST, "decoded expected message type"); ok (flux_msg_get_topic (msg2, &topic) == 0 && !strcmp (topic, "foo.bar"), "decoded expected topic string"); ok (flux_msg_has_payload (msg2) == false, "decoded expected (lack of) payload"); flux_msg_destroy (msg); flux_msg_destroy (msg2); } void *myfree_arg = NULL; void myfree (void *arg) { myfree_arg = arg; } void check_aux (void) { flux_msg_t *msg; char *test_data = "Hello"; ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created test message"); ok (flux_msg_aux_set (msg, "test", test_data, myfree) == 0, "hang aux data member on message with destructor"); ok (flux_msg_aux_get (msg, "incorrect") == NULL, "flux_msg_aux_get for unknown key returns NULL"); ok (flux_msg_aux_get (msg, "test") == test_data, "flux_msg_aux_get aux data memeber key returns orig pointer"); flux_msg_destroy (msg); ok (myfree_arg == test_data, "destroyed message and aux destructor was called"); } void check_copy (void) { flux_msg_t *msg, *cpy; int type; const char *topic; int cpylen; const char buf[] = "xxxxxxxxxxxxxxxxxx"; const void *cpybuf; const char *s; ok ((msg = flux_msg_create (FLUX_MSGTYPE_KEEPALIVE)) != NULL, "created no-payload keepalive"); ok ((cpy = flux_msg_copy (msg, true)) != NULL, "flux_msg_copy works"); flux_msg_destroy (msg); type = -1; ok (flux_msg_get_type (cpy, &type) == 0 && type == FLUX_MSGTYPE_KEEPALIVE && !flux_msg_has_payload (cpy) && flux_msg_route_count (cpy) < 0 && flux_msg_get_topic (cpy, &topic) < 0, "copy is keepalive: no routes, topic, or payload"); flux_msg_destroy (cpy); ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created request"); flux_msg_route_enable (msg); ok (flux_msg_route_push (msg, "first") == 0, "added route 1"); ok (flux_msg_route_push (msg, "second") == 0, "added route 2"); ok (flux_msg_set_topic (msg, "foo") == 0, "set topic string"); ok (flux_msg_set_payload (msg, buf, sizeof (buf)) == 0, "added payload"); ok ((cpy = flux_msg_copy (msg, true)) != NULL, "flux_msg_copy works"); type = -1; ok (flux_msg_get_type (cpy, &type) == 0 && type == FLUX_MSGTYPE_REQUEST && flux_msg_has_payload (cpy) && flux_msg_get_payload (cpy, &cpybuf, &cpylen) == 0 && cpylen == sizeof (buf) && memcmp (cpybuf, buf, cpylen) == 0 && flux_msg_route_count (cpy) == 2 && flux_msg_get_topic (cpy, &topic) == 0 && !strcmp (topic,"foo"), "copy is request: w/routes, topic, and payload"); ok ((s = flux_msg_route_last (cpy)) != NULL, "flux_msg_route_last gets route from copy"); like (s, "second", "flux_msg_route_last returns correct second route"); ok (flux_msg_route_delete_last (cpy) == 0, "flux_msg_route_delete_last removes second route"); ok ((s = flux_msg_route_last (cpy)) != NULL, "flux_msg_route_last pops route from copy"); like (s, "first", "flux_msg_route_last returns correct first route"); ok (flux_msg_route_delete_last (cpy) == 0, "flux_msg_route_delete_last removes first route"); flux_msg_destroy (cpy); ok ((cpy = flux_msg_copy (msg, false)) != NULL, "flux_msg_copy works (payload=false)"); type = -1; ok (flux_msg_get_type (cpy, &type) == 0 && type == FLUX_MSGTYPE_REQUEST && !flux_msg_has_payload (cpy) && flux_msg_route_count (cpy) == 2 && flux_msg_get_topic (cpy, &topic) == 0 && !strcmp (topic,"foo"), "copy is request: w/routes, topic, and no payload"); flux_msg_destroy (cpy); flux_msg_destroy (msg); } void check_print (void) { flux_msg_t *msg; char *strpayload = "a.special.payload"; char buf[] = "xxxxxxxx"; char buf_long[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; FILE *f = verbose ? stderr : fopen ("/dev/null", "w"); if (!f) BAIL_OUT ("cannot open /dev/null for writing"); ok ((msg = flux_msg_create (FLUX_MSGTYPE_KEEPALIVE)) != NULL, "created test message"); lives_ok ({flux_msg_fprint_ts (f, msg, 0.);}, "flux_msg_fprint_ts doesn't segfault on keepalive"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_EVENT)) != NULL, "created test message"); ok (flux_msg_set_topic (msg, "foo.bar") == 0, "set topic string"); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on event with topic"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created test message"); ok (flux_msg_set_topic (msg, "foo.bar") == 0, "set topic string"); flux_msg_route_enable (msg); ok (flux_msg_route_push (msg, "id1") == 0, "added one route"); ok (flux_msg_set_payload (msg, buf, strlen (buf)) == 0, "added payload"); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on fully loaded request"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created test message"); ok (flux_msg_set_userid (msg, 42) == 0, "set userid"); ok (flux_msg_set_rolemask (msg, FLUX_ROLE_OWNER) == 0, "set rolemask"); ok (flux_msg_set_nodeid (msg, 42) == 0, "set nodeid"); ok (flux_msg_set_string (msg, strpayload) == 0, "added payload"); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on request settings #1"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created test message"); ok (flux_msg_set_rolemask (msg, FLUX_ROLE_USER) == 0, "set rolemask"); ok (flux_msg_set_flags (msg, FLUX_MSGFLAG_NORESPONSE | FLUX_MSGFLAG_UPSTREAM) == 0, "set new flags"); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on request settings #2"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created test message"); ok (flux_msg_set_rolemask (msg, FLUX_ROLE_ALL) == 0, "set rolemask"); ok (flux_msg_set_flags (msg, FLUX_MSGFLAG_PRIVATE | FLUX_MSGFLAG_STREAMING) == 0, "set new flags"); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on request settings #3"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_REQUEST)) != NULL, "created test message"); ok (flux_msg_set_payload (msg, buf_long, strlen (buf_long)) == 0, "added long payload"); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on long payload"); flux_msg_destroy (msg); ok ((msg = flux_msg_create (FLUX_MSGTYPE_RESPONSE)) != NULL, "created test message"); flux_msg_route_enable (msg); lives_ok ({flux_msg_fprint (f, msg);}, "flux_msg_fprint doesn't segfault on response with empty route stack"); flux_msg_destroy (msg); fclose (f); } void check_flags (void) { flux_msg_t *msg; uint8_t flags; if (!(msg = flux_msg_create (FLUX_MSGTYPE_REQUEST))) BAIL_OUT ("flux_msg_create failed"); ok (flux_msg_get_flags (msg, &flags) == 0, "flux_msg_get_flags works"); ok (flags == 0, "flags are initially zero"); /* FLUX_MSGFLAG_PRIVATE */ ok (flux_msg_is_private (msg) == false, "flux_msg_is_private = false"); ok (flux_msg_set_private (msg) == 0, "flux_msg_set_private_works"); ok (flux_msg_is_private (msg) == true, "flux_msg_is_private = true"); /* FLUX_MSGFLAG_STREAMING */ ok (flux_msg_is_streaming (msg) == false, "flux_msg_is_streaming = false"); ok (flux_msg_set_streaming (msg) == 0, "flux_msg_set_streaming_works"); ok (flux_msg_is_streaming (msg) == true, "flux_msg_is_streaming = true"); /* FLUX_MSGFLAG_NORESPONSE */ ok (flux_msg_is_noresponse (msg) == false, "flux_msg_is_noresponse = false"); ok (flux_msg_set_noresponse (msg) == 0, "flux_msg_set_noresponse_works"); ok (flux_msg_is_noresponse (msg) == true, "flux_msg_is_noresponse = true"); /* noresponse and streaming are mutually exclusive */ ok (flux_msg_set_streaming (msg) == 0 && flux_msg_set_noresponse (msg) == 0 && flux_msg_is_streaming (msg) == false && flux_msg_is_noresponse (msg) == true, "flux_msg_set_noresponse clears streaming flag"); ok (flux_msg_set_noresponse (msg) == 0 && flux_msg_set_streaming (msg) == 0 && flux_msg_is_noresponse (msg) == false && flux_msg_is_streaming (msg) == true, "flux_msg_set_streaming clears noresponse flag"); ok (flux_msg_set_topic (msg, "foo") == 0 && flux_msg_get_flags (msg, &flags) == 0 && (flags & FLUX_MSGFLAG_TOPIC), "flux_msg_set_topic sets FLUX_MSGFLAG_TOPIC"); ok (flux_msg_set_payload (msg, "foo", 3) == 0 && flux_msg_get_flags (msg, &flags) == 0 && (flags & FLUX_MSGFLAG_PAYLOAD), "flux_msg_set_payload sets FLUX_MSGFLAG_PAYLOAD"); flux_msg_route_enable (msg); ok (flux_msg_get_flags (msg, &flags) == 0 && (flags & FLUX_MSGFLAG_ROUTE), "flux_msg_route_enable sets FLUX_MSGFLAG_ROUTE"); flux_msg_destroy (msg); } void check_refcount (void) { flux_msg_t *msg; const flux_msg_t *p; int type; if (!(msg = flux_msg_create (FLUX_MSGTYPE_KEEPALIVE))) BAIL_OUT ("failed to create test message"); p = flux_msg_incref (msg); ok (p == msg, "flux_msg_incref returns pointer to original"); flux_msg_destroy (msg); ok (flux_msg_get_type (p, &type) == 0 && type == FLUX_MSGTYPE_KEEPALIVE, "reference remains valid after destroy"); flux_msg_decref (p); } int main (int argc, char *argv[]) { int opt; while ((opt = getopt (argc, argv, "v")) != -1) { if (opt == 'v') verbose = true; } plan (NO_PLAN); check_cornercase (); check_proto (); check_routes (); check_topic (); check_payload (); check_payload_json (); check_payload_json_formatted (); check_matchtag (); check_security (); check_aux (); check_copy (); check_flags (); check_cmp (); check_encode (); check_refcount(); check_print (); done_testing(); return (0); } /* * vi:tabstop=4 shiftwidth=4 expandtab */
/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var gTestfile = 'regress-351497.js'; //----------------------------------------------------------------------------- var BUGNUMBER = 351497; var summary = 'Do not assert for(let (w) x in y)'; var actual = 'No Crash'; var expect = 'No Crash'; //----------------------------------------------------------------------------- test(); //----------------------------------------------------------------------------- function test() { enterFunc ('test'); printBugNumber(BUGNUMBER); printStatus (summary); expect = /SyntaxError: (invalid for\/in left-hand side|missing variable name)/; try { eval('for(let (w) x in y) { }'); } catch(ex) { actual = ex + ''; } reportMatch(expect, actual, summary); exitFunc ('test'); }
The European Microfinance Day (EMD) aims to raise awareness of microfinance as a tool to fight social and financial exclusion in Europe. In this edition of the EMD, EMN and MFC organise a panel debate involving several practitioners, an impact investor and a public authority representative to debate on the social impact of microfinance and how can this impact be further developed. The support of innovative funding sources (either public or private) will be fundamental for the further & good development of the sector and creating new opportunities for the “missing entrepreneurs”. The panel debate will be followed by the launching ceremony of Helenos, the first private equity fund for inclusive finance in Europe.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Chapter 13. Cookie Scheme</title> <link rel="stylesheet" href="style.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.73.2"> <link rel="start" href="index.html" title="LiveJournal Server"> <link rel="up" href="ljp.internals.html" title="Part II. Internals"> <link rel="prev" href="ljp.int.portal_modules.html" title="Chapter 12. Portal Modules"> <link rel="next" href="ljp.int.oh_crumbs.html" title="Chapter 14. Creating &amp; Using Breadcrumbs"> <meta name="date" content="2008-Sep-26"> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr><th colspan="3" align="center">Chapter 13. Cookie Scheme</th></tr> <tr> <td width="20%" align="left"> <a accesskey="p" href="ljp.int.portal_modules.html">Prev</a> </td> <th width="60%" align="center">Part II. Internals</th> <td width="20%" align="right"> <a accesskey="n" href="ljp.int.oh_crumbs.html">Next</a> </td> </tr> </table> <hr> </div> <div class="chapter" lang="en" id="ljp.int.cookie_scheme"> <div class="titlepage"><div><div><h2 class="title">Chapter 13. Cookie Scheme</h2></div></div></div> <p><b>Old cookie format: </b></p> <pre class="synopsis"> *.$LJ::DOMAIN = ws:&lt;user&gt;:&lt;sessid&gt;:&lt;auth&gt;:&lt;flags&gt; </pre> <div class="itemizedlist"><ul type="disc"> <li><p>Insecure.</p></li> <li><p>Own one cookie, own an account.</p></li> <li><p>But, still used if <a class="link" href="lj.install.ljconfig.vars.html#ljconfig.only_user_vhosts">$LJ::ONLY_USER_VHOSTS</a> is <span class="emphasis"><em>not</em></span> enabled.</p></li> </ul></div> <p><b>New cookie format: </b></p> <pre class="synopsis"> 2 + n cookies </pre> <p>The <span class="emphasis"><em>2</em></span> cookies work like this:</p> <div class="variablelist"><dl> <dt><span class="term">ljmastersession</span></dt> <dd> <p> </p> <div class="itemizedlist"><ul type="disc"> <li><p>Master session cookie. We control this one tightly.</p></li> <li><p>Bound to: www.$LJ::DOMAIN. No user content is on www.*</p></li> </ul></div> <p> </p> <div class="itemizedlist"><ul type="disc"><li> <p> <span class="strong"><strong>Format:</strong></span> </p> <pre class="synopsis"> v&lt;version&gt;:u&lt;uid&gt;:s&lt;sessionid&gt;:a&lt;auth&gt;:f&lt;flags&gt;//&lt;generation/poetry&gt; </pre> <p> </p> <div class="itemizedlist"><ul type="circle"> <li><p>The <code class="literal">version</code> number is a code-wise version number.</p></li> <li><p><code class="literal">uid</code> is used now, now instead of <code class="literal">user</code>.</p></li> <li><p><code class="literal">session</code>/<code class="literal">auth</code>/<code class="literal">flags</code> all work as before.</p></li> <li><p><code class="literal">generation/poetry</code> is free-form text/poetry, so you can write a haiku and go after people for subverting security to steal copyrighted, perhaps poetic, material.</p></li> </ul></div> <p> </p> </li></ul></div> <p> </p> </dd> <dt><span class="term">ljloggedin</span></dt> <dd> <p>The &#8220;<span class="quote">I'm logged in!</span>&#8221; cookie. This one advertised to all subdomains that the user is logged in. If it is stolen, it does not matter. It is only used to bridge the two cookies. It is useless by itself.</p> <p>Form: not present (not logged in), or:</p> <pre class="synopsis"> u&lt;uid&gt;:s&lt;sessionid&gt; </pre> </dd> </dl></div> <p>The <span class="emphasis"><em><em class="replaceable"><code>n</code></em></em></span> cookies work like this:</p> <p>The &#8220;<span class="quote">n</span>&#8221; cookies are 1-per-user account. They are bound to &lt;subdomain&gt;.$LJ::DOMAIN optionally with a path=/username/ restriction when &lt;subdomain&gt; is not a username, and is actually &#8220;<span class="quote">users</span>&#8221; or &#8220;<span class="quote">communities</span>&#8221;.</p> <pre class="screen">&#8220;<span class="quote">ljdomsess.&lt;subdomain&gt;</span>&#8221; or ljdomsess.bob &#8220;<span class="quote">ljdomsess.&lt;subdomain&gt;.&lt;user&gt;</span>&#8221; or ljdomsess.community.knitting ljdomsess.users._underscoreman</pre> <p>The format of this cookie is:</p> <pre class="synopsis"> v&lt;version&gt;:u&lt;userid&gt;:s&lt;sessid&gt;:t&lt;unixtimestamp&gt;:g&lt;signature&gt;//&lt;gen/poetry&gt; </pre> <p>Where:</p> <div class="itemizedlist"><ul type="disc"> <li><p><code class="literal">t</code> = <span class="application"><code class="systemitem">Unix</code></span> timestamp updated from LJ::get_secret(), <span class="application">LiveJournal</span>'s rolling server-secret that is updated every 30/60 minutes. This <code class="literal">t</code> value is the key into which server secret we are using.</p></li> <li><pre class="synopsis"> <code class="literal">g</code> = HMAC-SHA1(key = server-secret(t), value = JOIN("-", session-auth(u, sessid), domain, uid, sessid, time)) </pre></li> </ul></div> <p>So, cookie is valid if:</p> <div class="itemizedlist"><ul type="disc"> <li><p><code class="literal">v</code> is supported version</p></li> <li><p><code class="literal">gen/poetry</code> is current generation/poetry in <code class="literal">$LJ::COOKIE_GEN_POETRY</code></p></li> <li><p><code class="literal">session</code>(uid, sessid) is still valid/logged in</p></li> <li><p><code class="literal">g</code> is correct signature</p></li> <li><p><code class="literal">t</code> is not older than <em class="replaceable"><code>$N</code></em> hours (48?)</p></li> </ul></div> <p>The cookie should expire every 24 hours.</p> <p>Future: cookies are bound to first two octets of <acronym class="acronym">IP</acronym> address.</p> <div class="procedure"> <a name="id3422637"></a><p class="title"><b>Procedure 13.1. Cookie re-direction</b></p> <ol type="1"> <li> <p>If cookie is not present, but ljloggedin=1 cookie is present, then redirect user to:</p> <p><code class="uri">http://www.$LJ::DOMAIN/set-domain-cookie.bml?redir=&lt;source_url&gt;</code></p> </li> <li> <p>which will make a &#8220;<span class="quote">ljdomsess_*</span>&#8221; cookie, then redirect them to:</p> <p><code class="uri">http://subdomain.$LJ::DOMAIN/__setcookie?redir=&lt;source_url&gt;&amp;domsess=&lt;domsess_cookie&gt; </code></p> </li> <li><p>which will then redirect them to &lt;source_url&gt;.</p></li> </ol> </div> <p><b>Mapping to Paths. </b> <a class="link" href="ljp.api.lj.get_remote.html" title="LJ::get_remote">LJ::get_remote()</a> needs to be modified to respect the right cookie based on the current hostname.</p> <p>For <code class="filename">talkscreen.bml</code> or any <acronym class="acronym">XML</acronym>HTTPRequest that goes to a userdomain, that endpoint has to make sure it only operates on data owned by the current hostname/path.</p> <div class="task"> <a name="task-ljp-cookie_steal"></a><p class="title"><b>Cookie Permissions</b></p> <div class="procedure"><ol type="1"> <li><p><code class="uri"><em class="replaceable"><code>attacker.lj.com</code></em></code> does malicious style.</p></li> <li><p>goodguy visits <code class="uri"><em class="replaceable"><code>attacker.lj.com</code></em></code>, gets ljdomsess stolen.</p></li> </ol></div> <div class="taskrelated"> <p>Attacker <span class="strong"><strong>should not</strong></span> be able to use goodguy's ljdomsess cookie to manipulate goodguy's data using, say, <code class="filename">delcomment.bml</code> with args of <em class="replaceable"><code>?user=goodguy&amp;jtalkid=&lt;commentid&gt;</code></em>.</p> <p><code class="filename">delcomment.bml</code> and other endpoints should verify that the <em class="replaceable"><code>user=&lt;user&gt;</code></em> argument matches the current hostname/path.</p> <p>This means: <em class="replaceable"><code>&lt;sub&gt;.lj.com/&lt;user&gt;</code></em> should do <acronym class="acronym">XML</acronym>HTTPRequests not to <em class="replaceable"><code>&lt;sub&gt;.lj.com/endpoint.bml</code></em>, but to <em class="replaceable"><code>&lt;sub&gt;.lj.com/&lt;user&gt;/endpoint.bml</code></em> (otherwise ambiguous).</p> </div> </div> </div> <div class="navfooter"> <hr> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"> <a accesskey="p" href="ljp.int.portal_modules.html">Prev</a> </td> <td width="20%" align="center"><a accesskey="u" href="ljp.internals.html">Up</a></td> <td width="40%" align="right"> <a accesskey="n" href="ljp.int.oh_crumbs.html">Next</a> </td> </tr> <tr> <td width="40%" align="left" valign="top">Chapter 12. Portal Modules </td> <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td> <td width="40%" align="right" valign="top"> Chapter 14. Creating &amp; Using Breadcrumbs</td> </tr> </table> </div> </body> </html>
The next version of Windows 10, apparently called Redstone 5 which is scheduled to release in October is about to get finalized. Microsoft released Build 17763 from Redstone 5 branch to the Fast ring last week. Apparently, the blog post said, “we are not done ” but it looks like it is. Build 17763 has also been pushed to the slow ring last night. The public name would be Windows 10 October 2018 update. The Redstone 5 release is bringing a number of changes since the last stable release but no new big features. Some of the big changes are namely dark File explorer, More acrylic, new Snip and sketch tool etc. [Fixed] an issue where touching a Flash element in Microsoft Edge with two or more fingers could result in the tab crashing. [Fixed] an issue where thumbnails and icons might not be rendered if there were any video files saved to the desktop. [Fixed] an issue where certain Bluetooth audio devices wouldn’t play sound in apps that also used the microphone. [Fixed] an issue resulting in an unexpectedly increased use of battery recently when using certain apps like OneNote. [Fixed] an issue in PowerShell where it wasn’t displaying characters correctly in Japanese. [Fixed] an issue resulting in display scaling factors not being applied correctly (so the UI was smaller than expected) when viewing a full screen remote desktop window on a monitor set to certain display scalings. I hope Build 17763 would hit release preview ring by the end of this week.
namespace GiveCRM.Models { public class PhoneNumber { public int Id { get; set; } public int MemberId { get; set; } public PhoneNumberType PhoneNumberType { get; set; } public string Number { get; set; } public override string ToString() { return PhoneNumberType + " " + Number; } } }
Our March Break Program will operate from 9:00am-3:15pm daily, with campers being picked up and dropped off at to the camp site (5999 Chippewa Road in Mount Hope) between the hours of 7:30am-5:00pm. The March Break Program, for campers age 4 – 12 years old, will operate one, five day session at a cost of $160.00 per session. The session will run from Monday, March 11- Friday, March 15, 2019. Unfortunately, due to timelines, the Christmas Break Program will not operate in 2018/2019.
var Sequelize = require('sequelize') var attributes = { username: { type: Sequelize.STRING, allowNull: false, unique: true, validate: { is: /^[a-z0-9\_\-\.]+$/i, } }, email: { type: Sequelize.STRING, validate: { isEmail: true } }, firstName: { type: Sequelize.STRING, }, lastName: { type: Sequelize.STRING, }, password: { type: Sequelize.STRING, }, salt: { type: Sequelize.STRING } } var options = { freezeTableName: true } module.exports.attributes = attributes module.exports.options = options
class Analog < Formula desc "Logfile analyzer" homepage "https://tracker.debian.org/pkg/analog" # The previous long-time homepage and url are stone-cold dead. Using Debian instead. # homepage "http://analog.cx" url "https://mirrors.kernel.org/debian/pool/main/a/analog/analog_6.0.orig.tar.gz" sha256 "31c0e2bedd0968f9d4657db233b20427d8c497be98194daf19d6f859d7f6fcca" revision 1 bottle do revision 1 sha1 "499ddf1e97314126055e0f695f2af7e4a5325839" => :yosemite sha1 "0b74be8dfd6706d330c65a9407d99470ac5c9ccf" => :mavericks sha1 "4c9f29b3324e2229ec4c7dc8be46b638507d23ee" => :mountain_lion end depends_on "gd" depends_on "jpeg" depends_on "libpng" def install system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "DEFS='-DLANGDIR=\"#{share/"analog/lang/"}\"' -DHAVE_ZLIB", "LIBS=-lz", "OS=OSX" bin.install "analog" (share/"analog").install "examples", "how-to", "images", "lang" (share/"analog").install "analog.cfg" => "analog.cfg-dist" man1.install "analog.man" => "analog.1" end test do system "\"#{bin}/analog\" > /dev/null" end end
you know Earx early game "Neurobotix" for Falcon. This is a quite similar thing. crouch and overall is heavy armed. predecessor was already of quite good quality and so it goes on. different enemies, like static cannons and ugly green robots do as well. flickering and not only a boring static screen. your robot crouch. Not the best solution but ok. a sirene that informs you about low shield energy, but those FX are very ok. with joystick on the real machine! ammo for example, and several other gimmicks that make a game interesting. Something more to say except of the final words? take some blasting rounds... it's really worth a try.
# MilliSim MilliSim was initially designed as a simulator for [THE iDOLM@STER Million Live! Theater Days](https://millionlive.idolmaster.jp/theaterdays/). It has become a general, plugin-based simulator framework. **This repository now only contains the framework itself. For the Theater Days simulator, an example for using this framework, check out [TheaterDaysSim](https://github.com/hozuki/TheaterDaysSim).** Older binaries and assets in this repository are still kept for archiving. It can be extended to support other games, such as [Arcaea](https://arcaea.lowiro.com) ([ArcaeaSim](https://github.com/hozuki/ArcaeaSim2)). Demo videos (Theater Days): | Title | Beatmap Author | Branch | |---|---|---| | [Death by Glamour](https://www.bilibili.com/video/av15612246/) | [hozuki](https://github.com/hozuki) | v0.2 | | [dear...](https://www.bilibili.com/video/av16069466/) | MinamiKaze | v0.2 | | [茜ちゃんメーカー](http://www.nicovideo.jp/watch/sm32977985) | [Sacno](https://twitter.com/Sacno3) | v0.3 | | Downloads | Status | |--|--| | [GitHub Releases](https://github.com/hozuki/MilliSim/releases) | ![GitHub (pre-)release](https://img.shields.io/github/release/hozuki/MilliSim/all.svg) ![Github All Releases](https://img.shields.io/github/downloads/hozuki/MilliSim/total.svg) | | [AppVeyor](https://ci.appveyor.com/api/projects/hozuki/MilliSim/artifacts/millisim-appveyor-latest.zip) | (latest development build) | | Build Status | | |--|--| | <del>Travis</del> (not maintained) | [![Travis](https://img.shields.io/travis/hozuki/MilliSim.svg)](https://travis-ci.org/hozuki/MilliSim) | | AppVeyor | [![AppVeyor](https://img.shields.io/appveyor/ci/hozuki/MilliSim.svg)](https://ci.appveyor.com/project/hozuki/MilliSim) | **Stage:** alpha **Miscellaneous:** [![GitHub contributors](https://img.shields.io/github/contributors/hozuki/MilliSim.svg)](https://github.com/hozuki/MilliSim/graphs/contributors) [![Libraries.io for GitHub](https://img.shields.io/librariesio/github/hozuki/MilliSim.svg)](https://github.com/hozuki/MilliSim) [![license](https://img.shields.io/github/license/hozuki/MilliSim.svg)](LICENSE.txt) ## Usage **Requirements:** - Operating System: - Windows: Windows 7 SP1 or later - [.NET Framework 4.5](https://www.microsoft.com/en-us/download/details.aspx?id=42642) - macOS and Linux: macOS 10.8 / Ubuntu 16.04 or later - and latest [Wine](https://wiki.winehq.org/Download) (will download `wine-mono` on launch) - [Visual C++ 2015 Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=53587) - OpenAL (bundled OpenAL-Soft Win32 build in newer releases) OpenGL builds (`TheaterDays.OpenGL.exe`) can run on all platforms, but it is problematic. DirectX builds (`TheaterDays.Direct3D11.exe`) can only run on Windows. ### Note: Video Playback Support If you want to play videos as the background, you must download FFmpeg binaries (version 3.4.1) from [here](https://ffmpeg.zeranoe.com/builds/), and place the binaries into `x64` and `x86` directories correspondingly. Due to license restrictions, MilliSim builds cannot include FFmpeg binaries, so you have to download them yourself. [File structure](https://github.com/hozuki/MonoGame.Extended2/tree/master/Sources/MonoGame.Extended.VideoPlayback#usage): ```plain TheaterDays.*.exe x64/ avcodec-57.dll avdevice-57.dll ... x86/ avcodec-57.dll avdevice-57.dll ... ``` Without FFmpeg, you must either: 1. disable background video (comment out `plugin.component_factory.background_video` in `Contents/plugins.yml`), or 2. leave video file path as empty (`data`-`video` section in `Contents/config/background_video.yml`). ### Note: If MilliSim Applications Cannot Launch To enable debug mode, use [Command Prompt](https://en.wikipedia.org/wiki/Cmd.exe) to run MilliSim like: ```cmd MilliSimApp.exe --debug ``` When MilliSim encounters problems (e.g. app crash), it will write a debug log in `log-file.txt`. Please open the log and submit it by [opening an issue](https://github.com/hozuki/MilliSim/issues). <table style="display: flex; display: -webkit-flex; align-items: center; border: none;"> <tbody> <tr style="border: none;"> <td style="border: none;"> A common problem of MilliSim not starting may relate to error 0x80131515. Since MilliSim uses a plugin architecture, it will scan and load plugin DLLs under its directory. That error code means it is not authorized to access those DLLs. Please make sure: <ol> <li>if you run MilliSim in <code>C</code> drive, it must be place somewhere inside your user directory (i.e. <code>C:\Users\YOUR_USER_NAME\SOME_DIR\</code>);</li> <li>you must unblock the downloaded ZIP file before you extract the EXEs and DLLs (shown as the picture on the right). (thanks <a href="https://twitter.com/Sacno3">@Sacno3</a>)</li> </ol> </td> <td style="border: none;"> <img src="docs/img/windows-unblock-zip.jpg" width="120" /> </td> </tr> </tbody> </table> ## Building Please read [Building.md](docs/Building.md). ## Developing Plugins MilliSim is designed to support plugins. Please read the [wiki page](https://github.com/hozuki/MilliSim/wiki/Creating-Plugins) for more information. (Note: this is mainly about version 0.2 so it may be deprecated. Proceed with caution. Help is appreciated!) <del>You can find precompiled NuGet packages for plugin development [here](https://www.nuget.org/packages?q=MilliSim).</del> (Suspended; help needed.) ## Other ### Wiki MilliSim has a [wiki](https://github.com/hozuki/MilliSim/wiki) on GitHub. It is still under construction but you may find some useful information there. ### Naming The name is an abbreviation of **Milli**on Live **Sim**ulator. According to English traditions, it should be written and read as *MilliSim*. Corresponding Japanese version should be *ミリシミュ* (MilliSimu/*mirisimyu*). Both versions are acceptable. ## License MIT
We continued our 2015 trend of having more people come to Hope Pregnancy Care Center in July 2015 than did in July 2014! We had 40 visitors come through our doors this month. We had folks come from King, Walnut Cove, Pinnacle,Pilot Mountain and Winston-Salem. We gave one pregnancy test that was negative. 2 people received maternity clothes, 4 received baby clothing, 1 received some baby toys, 1 received some baby food, 33 received some baby wipes. Other items given out were baby bath lotion and shampoo, a stroller, baby shoes and some baby bottles. Our diaper bank was very busy this month as we gave out 86 New Born diapers, 138, Size 2 Diapers, 652 Size 3 diapers, 460 Size 4 diapers, 625 Size 5 diapers and 30 Size 6 diapers. We gave a total of 1,906 diapers out. We are grateful to our partner the NC Diaper Bank-Triad and our local church partners who supplied us with the diapers we are able to give out. We are grateful to all of our volunteers who continue to keep us open on Monday, Thursday and Saturday. We have had the pleasure of a summer volunteer, Lori and we have a brand new volunteer Paulina, that will begin helping on Thursdays really soon. We are thankful that folks continue to give generously the baby items we are able to give and to the churches who had baby showers that supplied us with items we really need….especially the wipes for the little tushes!
#!/usr/bin/perl # # DW::Hooks::PrivList # # This module implements the listing of valid arguments for each # known user privilege in dw-free. Any site that defines a different # set of privs or privargs must create additional hooks to supplement # this list. # # Authors: # Jen Griffin <[email protected]> # # Copyright (c) 2011-2014 by Dreamwidth Studios, LLC. # # This program is free software; you may redistribute it and/or modify it under # the same terms as Perl itself. For a copy of the license, please reference # 'perldoc perlartistic' or 'perldoc perlgpl'. # package DW::Hooks::PrivList; use strict; use LJ::Hooks; use LJ::DB; use LJ::Lang; use LJ::Support; LJ::Hooks::register_hook( 'privlist-add', sub { my ( $priv ) = @_; return unless defined $priv; my $hr = {}; # valid admin privargs are the same as defined DB privs if ( $priv eq 'admin' ) { my $dbr = LJ::get_db_reader(); $hr = $dbr->selectall_hashref( 'SELECT privcode, privname FROM priv_list', 'privcode' ); # unfold result $hr->{$_} = $hr->{$_}->{privname} foreach keys %$hr; # add subprivs for supporthelp my $cats = LJ::Support::load_cats(); $hr->{"supporthelp/$_"} = "$hr->{supporthelp} for $_" foreach map { $_->{catkey} } values %$cats; } # valid support* privargs are the same as support cats if ( my ( $sup ) = ( $priv =~ /^support(.*)$/ ) ) { my $cats = LJ::Support::load_cats(); my @catkeys = map { $_->{catkey} } values %$cats; if ( $priv eq 'supportread' ) { $hr->{"$_+"} = "Extended $sup privs for $_ category" foreach @catkeys; } $sup = $priv eq 'supporthelp' ? 'All' : ucfirst $sup; $hr->{$_} = "$sup privs for $_ category" foreach @catkeys; $hr->{''} = "$sup privs for public categories"; } # valid faqadd/faqedit privargs are the same as faqcats if ( $priv eq 'faqadd' or $priv eq 'faqedit' ) { my $dbr = LJ::get_db_reader(); $hr = $dbr->selectall_hashref( 'SELECT faqcat, faqcatname FROM faqcat', 'faqcat' ); # unfold result $hr->{$_} = $hr->{$_}->{faqcatname} foreach keys %$hr; } # valid translate privargs are the same as defined languages if ( $priv eq 'translate' ) { my %langs = @{ LJ::Lang::get_lang_names() }; $hr->{$_} = "Can translate $langs{$_}" foreach keys %langs; # plus a couple of extras $hr->{'[itemdelete]'} = "Can delete translation strings"; $hr->{'[itemrename]'} = "Can rename translation strings"; } # have to manually maintain the other lists $hr = { entryprops => "Access to /admin/entryprops", sessions => "Access to admin mode on /manage/logins", subscriptions => "Access to admin mode on notification settings", suspended => "Access to suspended journal content", userlog => "Access to /admin/userlog", userprops => "Access to /admin/propedit", } if $priv eq 'canview'; $hr = { codetrace => "Access to /admin/invites/codetrace", infohistory => "Access to infohistory console command", } if $priv eq 'finduser'; # extracted from grep -r statushistory_add if ( $priv eq 'historyview' ) { my @shtypes = qw/ account_level_change b2lid_remap capedit change_journal_type comment_action communityxfer create_from_invite create_from_promo entry_action email_changed expunge_userpic impersonate journal_status logout_user mass_privacy paid_from_invite paidstatus privadd privdel rename_token reset_email reset_password s2lid_remap set_badpassword shop_points suspend sysban_add sysban_mod synd_create synd_edit synd_merge sysban_add sysban_modify sysban_trig unsuspend vgifts viewall /; $hr->{$_} = "Access to statushistory for $_ logs" foreach @shtypes; } $hr = { commentview => "Access to /admin/recent_comments", emailqueue => "Access to /tools/recent_email", entry_redirect => "Access to /misc/entry_redirect", invites => "Access to some invites functionality under /admin/invites", largefeedsize => "Overrides synsuck_max_size for a feed", memcacheclear => "Access to /admin/memcache_clear", memcacheview => "Access to /admin/memcache", mysqlstatus => "Access to /admin/mysql_status", propedit => "Allow to change userprops for other users", rename => "Access to rename_opts console command", sendmail => "Access to /admin/sendmail", spamreports => "Access to /admin/spamreports", styleview => "Access to private styles on /customize/advanced", support => "Access to /admin/supportcat", themes => "Access to /admin/themes", theschwartz => "Access to /admin/theschwartz", usernames => "Bypasses is_protected_username check", userpics => "Access to expunge_userpic console command", users => "Access to change_journal_status console command", vgifts => "Access to approval functions on /admin/vgifts", oauth => "Modify some settings on OAuth consumers", } if $priv eq 'siteadmin'; $hr = { openid => "Only allowed to suspend OpenID accounts", } if $priv eq 'suspend'; # extracted from LJ::Sysban::validate $hr = { email => "Can ban specific email addresses", email_domain => "Can ban entire email domains", invite_email => "Can ban invites for email addresses", invite_user => "Can ban invites for users", ip => "Can ban connections from specific IPs", lostpassword => "Can ban requests for lost passwords", noanon_ip => "Can ban anonymous comments from specific IPs", oauth_consumer => "Can ban specific users from having OAuth consumers", pay_cc => "Can ban payments from specific credit cards", pay_email => "Can ban payments from specific emails", pay_uniq => "Can ban payments from specific sessions", pay_user => "Can ban payments from specific users", spamreport => "Can ban spam reports from specific users", support_email => "Can ban support requests from emails", support_uniq => "Can ban support requests from sessions", support_user => "Can ban support requests from users", talk_ip_test => "Can force IPs to complete CAPTCHA to leave comments", uniq => "Can ban specific browser sessions", user => "Can ban specific users", } if $priv eq 'sysban'; return $hr; } ); 1;
In 1913...columnist & TV panellist Dorothy Kilgallen was born in Chicago. For 27 years she wrote a gossip column for Hearst’s New York Herald American, halfway through which time she achieved national fame as a panellist on Goodson Todman’s Sunday night TV institutuion, What’s My Line? Beginning in 1945, she co-hosted a long-running breakfast radio talk show on WOR, with her husband Richard Kollmar. She died after an alcohol-and-seconal-fuelled heart attack Nov. 8 1965, just 12 hours after her weekly TV game show, dead at age 52. In 1939…Chic Young's comic strip character "Blondie" became a radio sitcom, initially as a summer replacement for "The Eddie Cantor Show" on CBS. When Cantor did not return in the fall, "Blondie" continued on the air and bounced between several networks until 1950. In 1940…In 1940, the legendary comedy team of Bud Abbott and Lou Costello debuted their own network radio show on NBC. After two years of wowing the audience of the Kate Snith Show the duo replaced Fred Allen for the summer months. In the fall of ’42 they began a seven year run with their own Thursday night show. In 1952 Abbott and Costello produced 52 episodes of one of the most successful and repeated programs in TV history. A cartoon version of The Abbott & Costello Show followed in 1966. In 1955...Tom Clay, a Buffalo DJ on WWOL-AM, staged a famous billboard publicity stunt in Shelton Squareconducts his famous Billboard stunt in Buffalo's Shelton Square. Clay in the 1950s was a popular radio personality in the Detroit area on WJBK-AM both as a DJ, and for his on-air comic characterizations. In the early 1950s Clay, using the pseudonym "Guy King," worked for WWOL-AM/FM in Buffalo, New York; on July 3, 1955, he conducted the stunt in which he played "Rock Around the Clock" by Bill Haley & His Comets repeatedly from atop a billboard in Buffalo's Shelton Square, an incident that led to his firing and arrest. In the mid-1950s he moved to Cincinnati, Ohio and was equally popular. He was caught up in the payola scandal of the late 1950s, and admitted to having accepted thousands of dollars for playing certain records. After being fired from WJBK, Clay worked at the short-lived Detroit Top 40 station WQTE (now WRDT 560 AM) only to be fired again when the station changed format to easy listening music in 1961. After moving to Los Angeles and becoming a popular personality on KDAY and KRLA, Clay returned to the Detroit area and found work at CKLW in neighboring Windsor, Ontario, at the time one of the foremost Top 40 AM stations in North America. Clay is best remembered for his single on Motown's MoWest label "What the World Needs Now Is Love"/"Abraham, Martin and John", a compilation of clips from the two popular records, interviews, and speeches of Jack and Bobby Kennedy and Martin Luther King emphasizing tolerance and civil rights. It went to #8 on the Billboard Hot 100. It sold over one million copies, and was awarded a gold disc. Clay died of stomach and lung cancer at the age of 66, in Valley Village, Los Angeles, California in 1995. In 1961...Dan Ingram did his first show on WABC 770 AM, New York. He filled in for Chuck Dunaway. In 1971...Rock Hall of Fame rock singer Jim Morrison of The Doors died of heart failure. He was 27. In 1972...Bob Crane went back to radio - but only for one week. In 1973...KMEN 1290 AM San Bernardino, CA broadcasts an “all-girl” day on Wednesday of this week. Guest DJ’s heard – Jackie DeShannon, Donna Fargo, Sylvia, April Stevens, Jean Knight, Carla Thomas and Maureen McCormick of the Brady Bunch. In 1976...The Los Angeles comedy radio team of Hudson and Landry split. In 1978...Supreme Court ruled 5-4, FCC had a right to reprimand NY radio station WBAI for broadcasting George Carlin's "Filthy Words". In 1983...KNX-FM – Soft rock in Los Angeles changes calls and format to KKHR (Hit Radio). Looks like it’ll be direct competition for KIIS-FM. In 1986...depression era singer and bandleader Rudy Vallee died following a heart attack at age 84. He had a succession of popular radio variety shows beginning in the late 20’s, introducing a succession of future stars. His biggest hit was the “Stein Song (University of Maine)” in 1930. In 1986...It was announced that Howard Stern, the often controversial New York City DJ/talker, will be syndicated by DIR to other stations. Stern, who joined rocker WXRK (New York) late last year, has seen his ratings rise from a 1.2 to a 3.4 and up to a 5.2 share in the recent ratings. “The Howard Stern Show” will mix music and talk equally. At WXRK, Stern plays about 6 songs per hour. The national show will be weekly only. Stern is following a pattern with high-profile DJ’s and national weekly shows: Rick Dees at KIIS-FM, John Lander at KKBQ Houston and Scott Shannon from Z-100 all have national weekly shows, but Stern’s will present or lean heavy personality and will not emphasize the music. In 1987...Tom Snyder will move from TV to radio this fall to host a national call-in talk show announced this week by the ABC Radio Networks. Look for it early September. In 1993…Sports broadcaster (ABC, Superstars, Wild World of Sports, NBC, Los Angeles Dodgers, Chicago White Sox, California Angels, Texas Rangers, Montreal Expos, Los Angeles Rams)/syndicated radio show host (Radio Baseball Cards)/Baseball Hall of Famer Don Drysdale died following a heart attack at age 56. Despite the legal questions raised by this week's private meeting between Attorney General Loretta Lynch and Bill Clinton, many in the press have said they accept that the impromptu 30-minute exchange was totally innocent, and won't bias the probe into Hillary Clinton's email scandal, reports The Washington Examiner. "I take [Lynch] & [Clinton] at their word that their convo in Phoenix didn't touch on probe. But foolish to create such optics," CNN contributor David Axelrod said on social media. Bloomberg News' John Heilemann mused in a panel discussion this week on CBS News, "[N]one of us will never know if all [Clinton] did was just go and say hello. So, I take them for their word it was all perfectly innocent." Lynch met privately with Clinton in Arizona Monday evening for an off-the-record exchange. Their conversation, which took place aboard Clinton's jet, was first noticed and reported by a local ABC News affiliate, KNXV-TV. The Attorney General confirmed the exchange Wednesday, but maintained it was purely social. Democratic and Republican lawmakers have criticized the meeting as inappropriate, explaining it's not a good look for Democratic front-runner Hillary Clinton, who is under FBI investigation for her use of an unauthorized and unsecured private email server when she worked at the State Department. Lynch said Friday that she would go along with whatever recommendation the FBI comes up with in its investigation of Clinton's private emails. Despite the bipartisan criticism from top lawmakers, however, reporters and media pundits have shrugged at the controversy, with many suggesting that the conversation was indeed nothing more than harmless banter about family. MSNBC's Chris Matthews, for example, dismissed the controversy, and suggested Friday that the conversation took place mostly because Clinton is just that friendly. The New York Times, which failed to mention the story in the first 24 hours after it broke, echoed Matthews' suggestion that the meetup was the result of the former president's overly-friendly personality. ABC and NBC News were also slow to cover the controversy, and made no mention of the issue Wednesday evening (when the story broke) or Thursday morning. CBS News touched on the story Thursday morning, but its coverage also involved host Charlie Rose characterizing the meet-up as "innocent." His co-host Gayle King asked, "They are at the airport at the same time … Why can't he just go over and say hello?" On Friday, Bloomberg News' Mark Halperin said the easiest explanation for why Lynch met privately with Clinton is that the former president is a "really social guy." First of all, it isn’t the FBI’s job to tell journalists or private citizens they can’t take photographs of a former president and the Attorney General. What were the agents going to do, arrest people for taking a picture or video? If there was nothing wrong with the meeting and it was totally innocent, why were federal agents instructed to demand no one take a picture? After more than 20 years as a pop-adult contemporary station, Modesto’s KOSO 92.9 FM B93 FM has abruptly changed to a country format. According to The Modesto Bee, the shift came at noon July 1, with those tuning in to its 92.9 FM signal finding “The Big Dog” on the dial instead. Parent company iHeartMedia moved it to a “new country” format, which includes largely current Top 40 country hits without much classic country. KOSO-B93 FM had been one of the area’s leading adult contemporary stations over the years. In the late 1990s and early 2000s the broadcaster was behind large, high-profile events like Summerfest and Acoustic Christmas which attracted thousands. The format flip now puts The Big Dog directly in competition with KAT Country 103 FM, the region’s popular country station. Owned by iHeartMedia rival company Cumulus Media, KAT has long been the area’s highest-rated station, according to Nielsen Audio. Negrete would not say if naming the station “The Big Dog” was a reference to its new competitor KAT. “The 92.9 The Big Dog name conveys the strength and power of the iHeartCountry brand. It’s the perfect name for the home of our nationally acclaimed morning personality Bobby Bones. We look forward to being Modesto’s exclusive hot new country station,” he said. (Reuters) -- Apple Inc fought back on Friday against Spotify's claims that the U.S. tech giant had hampered competition in music streaming by rejecting an update to the Swedish service's iPhone app. Apple's entry into the field sparked concerns from music streaming companies such as Spotify, which have argued that the 30 percent cut Apple takes of subscriptions in its App Store give its own service an unfair advantage. Spotify General Counsel Horacio Gutierrez reiterated those concerns in a letter to Apple first reported on Thursday as he protested the rejection of the latest version of the Spotify app. But Apple General Counsel Bruce Sewell countered that the company deserves a cut of transactions in the App Store for its work operating the marketplace, according to a copy of a letter to Gutierrez seen by Reuters. Sewell insisted that Apple was treating Spotify as it would any other app maker, in keeping with antitrust law. "We understand that you want special treatment and protections from competition, but we simply will not do that because we firmly adhere to the principle of treating all developers fairly and equitably," Sewell wrote. Gutierrez claimed Apple's rejection of Spotify's app raised "serious concerns" under competition law in the United States and Europe and the move was causing "grave harm to Spotify and its customers," according to technology publication Recode. A Spotify spokeswoman confirmed the accuracy of the report. A spokesman for Apple declined to comment. Launched a decade ago, Spotify is the world's biggest paid music streaming service with about 30 million paying users in 59 markets while Apple Music has some 13 million. Companies such as Spotify have sought to sidestep Apple's App Store cut by encouraging consumers to sign up for their services online. Apple forbids developers from promoting alternative payment methods within their apps. In late May, Spotify submitted a version of its app that removed the in-app purchase feature, which triggers Apple's cut, and included an account sign-up feature that violated Apple's rules, Sewell wrote. Apple rejected the app and asked Spotify to submit again, but the new version had the same problems, Sewell said. Music streaming is a crowded field. Alphabet's Google Music and YouTube also compete with Spotify and Apple Music to attract users prepared to pay for music, as does Pandora Media Inc and rapper Jay Z's Tidal. Amazon.com Inc is also preparing a standalone streaming service, sources have told Reuters. Donald Trump's standing in the polls has taken a hit in recent weeks, and if his comments Thursday to radio host Mike Gallagher are any indication, he does not have a firm answer as to why. The presumptive Republican nominee has faced down news coverage of everything from his criticism of a federal judge for being "Mexican" and thus unfit to oversee Trump University litigation because of his stated goal to construct a wall on the U.S.-Mexico border as president to the high-profile firing of campaign manager Corey Lewandowski. Trump has trailed Hillary Clinton in most every national poll since he effectively clinched the Republican nomination, though Gallagher noted two recent polls that show Trump gaining ground or even leading, despite most other polls showing Clinton with more significant leads. A Fox News poll released Wednesday evening showed Clinton with a 6-point advantage nationwide, widening her advantage from earlier in June. "The tide is going to turn and people are going to wake up," Gallagher nonetheless predicted. “Well, you know, I really feel it, Mike. I go to Ohio, we were there two days ago, and Pennsylvania and near Pittsburgh and we — I was in West Virginia, the crowds are massive. And you know, I walked out of one, and I said, ‘I don’t see how I’m not leading,'" Trump said, invoking the size of his crowds. CBS Sunday Morning, the nation's #1 Sunday morning news program, delivered its largest 2nd quarter audience in at least 28 years, according to Nielsen most current ratings for 2nd quarter 2016. The period marked the fourth consecutive 2nd quarter of year-over-year growth and the first time the broadcast finished the ratings period with 6 million viewers. During 2nd quarter 2016, CBS Sunday Morning delivered 6 million viewers and a 1.3/07 in adults 25-54, the demographic that matters most to those who advertise in news. Year-to-date Sunday Morning is seen by 6.01 million viewers every Sunday. That’s greater than the weekday editions of Good Morning America, Today and CBS This Morning. CBS Sunday Morning was up +4% in viewers (from 5.79m) and even in adults 25-54 compared to 2nd Quarter 2015. CBS Sunday Morning has posted viewer gains in each 2nd quarter since 2013 and has +1.06m viewers since 2nd quarter 2012 (from 4.94m, +21%). CBS Sunday Morning closed out the quarter on June 26 as the #1 Sunday morning news program by delivering 5.51m viewers (+2% from 5.40m) and a 1.2/08 in adults 25-54 (+9% from 1.1/07), compared to the same day last year. Television year-to-date, CBS SUNDAY MORNING is the #1 Sunday morning news program, with 6.01 million viewers and a 1.3/07 with adults 25-54. Longtime media executive Terry O’Reilly has been named president and CEO of Pittsburgh Community Broadcasting Corporation, owner of the FM radio stations WYEP 91.3 FM and WESA 90.5 FM. A veteran of commercial, entrepreneurial and public media, he will join PCBC on August 1, 2016, according to WESA. O’Reilly’s appointment follows the recent consolidation of WESA and WYEP governance into a single public media entity positioned for continued growth in broadcast audience, digital distribution, and community engagement. WYEP and WESA are Pittsburgh’s only independent public radio stations covering the adult album alternative (AAA) music format and NPR news and information. “We are excited that Terry will lead the team we’ve built at Pittsburgh Community Broadcasting Corporation,” said Harris Jones, PCBC board president. A multiple award-winning producer, journalist and executive, O’Reilly has more than four decades of media experience. He comes to PCBC from Minneapolis, where he served most recently as senior vice president and chief content officer for Twin Cities PBS, one of America’s most innovative and influential public media institutions. Prior to joining Twin Cities PBS in 2009, O’Reilly spent three decades in the commercial television industry, with experience in senior positions at two national cable TV networks (ReelzChannel and The Weather Channel), along with involvement in a pair of entrepreneurial media startups. For as long as most people living in the lakes area can remember, Andy Lia has been the “Voice of the Lakers,” calling just about every Detroit Lakes High School football, basketball, volleyball, hockey and golf game for KDLM 1340 AM and K226KA 93.1 FM in Detroit Lakes, MN since 1980. He’s also been a fixture of the local station’s morning programming, with his radio show running from 5:30 a.m. to 10 a.m. every Monday through Friday. But this past Thursday, Lia signed off from his show for the last time, reports dl-oneline.com. Lia also says that after 36 years of getting up at 4:15 a.m. every weekday and going into the station for his radio show, plus traveling all over the region to call games for dozens of area sports teams at all hours of the day and evening, it’s not nearly as much fun as it used to be. So what’s next? When asked that question, Lia grins and pantomimes taking a swing at an imaginary golf ball. “I want to golf, fish, hopefully do a little traveling,” he said, adding that he and his wife Sandy “got the bug” to travel after a trip to Europe last year, and he hopes to get some time to visit with his sisters in Tampa, Fla., and Phoenix, Ariz., as well as his other two sisters in Minnesota, along with son Craig and daughter Andrea, who live in Rochester and Mora, Minn., respectively. He also has four grandchildren that he hopes to spend more time with. After graduating from Detroit Lakes High School in 1959, he went on to get his one-year degree in radio broadcasting from Brown Institute in the Twin Cities. But it wasn’t necessarily his first choice. “I was going to be a teacher at one time, but when college fell through, I went to radio school,” Lia said in a 2009 interview, prior to his induction into the Minnesota Museum of Broadcasting Hall of Fame. Lia got his first job as a radio announcer at KTRF in Thief River Falls, in the fall of 1960. He stayed at KTRF for two years, and while there, was given the opportunity to call a few games. His next job was at KPRM in Park Rapids, as a sports announcer and program director. After just a year at Park Rapids, he moved on to KLIZ in Brainerd, where he was given his first job as sports director. He returned to KTRF in Thief River Falls, where he stayed for “about six or seven years” before taking a job as the sports director, FM operations manager and AM morning announcer at KDLM in Detroit Lakes in 1975. In 1916...Radio personality Barry Gray was born, generally considered the father of the "Call-In" Radio format. In 1939…In 1939, The Aldrich Family debuted as the summer replacement for Jack Benny Sunday nights at 7 on NBC radio. In 1941...the lighthearted comedy-mystery The Adventures of the Thin Man, based on the Nick & Nora Charles movie series of the same name, debuted on NBC radio. Claudia Morgan delightfully played Nora throughout the ten year run, while Les Damon was the first of four radio actors to play Nick. In 1945...The Marlin Hurt & Beulah Show made its debut on CBS radio. Marlin Hurt had first introduced his Beulah character (a black maid) while a cast member of the Fibber McGee & Molly Show. In 1946…Arthur Godfrey was signed by CBS Radio to host a weekly nighttime show called "Talent Scouts." In 1951...Bob & Ray show premieres on NBC radio network. In 2012…Broadcasting executive Julian Goodman, president of NBC (1966-1974), died at age 90. In 2015…Veteran CBS Radio News correspondent David Jackson died of cancer at 70. Greater Media has officially unveiled the All New 105.1 The Bounce… Detroit’s Throwback Hip Hop and R&B. WMGC 105.1 FM The Bounce features throwback hip hop and R&B songs from the 90’s and 2000’s, including artists that span from 2Pac and Ice Cube to Drake and Rihanna. The station officially kicked off the new format today at noon by unveiling the first of 10,000 songs in a row. The new on-air line-up will be announced in the near future. “We’re thrilled that our great Detroit cluster is adding a new brand for our audience and our customers,” said Greater Media Senior Vice President of Program Development Buzz Knight. The Bounce will remain the flagship for the NBA’s Detroit Pistons for the 2016-17 season. WMGC joined the sports-talk format in August 2013 and had originally set out on a five-year plan to build an audience and take some of the ad revenue from sports-talk leader, 97.1 The Ticket (WXYT-FM). But the plug was pulled after less than three years, amid no significant progress in the ratings. Employees at WMGC were told about the switch during a meeting at 6 p.m. Wednesday, when the flip was made. The Pistons have said they will remain on WMGC, though they can opt out of the final year of the guaranteed deal if they choose. Cumulus Media announces that its Columbia, SC, radio station WOMG 98.5 FM launched today as “Columbia’s Classic Hits 98.5 WOMG”. The station kicked off its Classic Hits programming at 2PM EST today. Popular on-air personality Benji Norton will join 98.5 WOMG as host of the “Breakfast With Benji” morning show, airing from 6-9AM EST weekdays, beginning Monday, July 11, 2016. Norton has anchored the morning show on Cumulus Media’s sports station WNKT 107. FM5 The Game for the past nine years. Rupert Murdoch’s News Corporation has made an unexpected move into radio with the $292.7M acquisition of U.K. media giant Wireless Group, the owner of Premier League soccer broadcaster Talksport. Variety reports the all-cash deal, which marks the first time News Corp. has entered the broadcast arena since it split from 21st Century Fox in 2013, saw the company take a 70% premium on Wireless’ price when the London stock market closed Thursday. Wireless Group, which was known until last year as UTV, owns Virgin Radio and a host of local radio stations across the Britain and Ireland. It was founded originally by Kelvin MacKenzie, former editor and current columnist of News Corp.-owned tabloid The Sun, who sold it to UTV in 2005 for $130 million. News Corp was a 30% shareholder in Wireless, while John Malone’s Liberty Global held a 28% share when UTV acquired the company. News Corp. said the deal represents “an excellent strategic fit” for the company. The move gives Murdoch’s empire a major presence across all major media platforms. Talksport has the majority of Premier League radio rights in Britain, with the rest being held by the BBC. It also holds exclusive international rights for the league outside of Europe. Walt Disney Co. agreed to acquire a one-third stake in the video-streaming unit of MLB Advanced Media, in a deal that values the business at about $3.5 billion, according to Bloomberg. Disney, the owner of ESPN and ABC, will also obtain a four-year option to buy an additional 33 percent stake in the digital arm of Major League Baseball, said a source, who asked not to be identified because the information isn’t public. The deal underscores the importance of the video-streaming business to the future of ESPN, which has been losing viewers and advertising dollars to online media. ESPN has toyed with the idea of selling Web-only packages outside of the traditional cable-TV package, and Disney Chief Executive Officer Robert Iger is making deals to offer ESPN on Internet services such as Sling TV. The unit of MLB, which is jointly owned by the 30 baseball teams, is poised to grow as online viewership increases and more sports leagues and content owners like ESPN look to offer their programming directly to fans in an online format. It already handles video streaming for WatchESPN, where cable-TV subscribers can see live broadcasts and other content online. It also runs World Wrestling Entertainment Inc.’s WWE Network, a $9.99-a-month online service. “MLBAM has some great assets that could help ESPN build a robust over-the-top offering,” said Bernard Gershon, a media consultant based in New York. Cumulus Media announces that it has re-branded its Toledo Hot AC station WWWM 105.5 FM, formerly known as Channel 105.5, to Q105.5 using the calls WQQO-FM. The station will continue to be programmed as a Hot AC station, and there are no personnel changes. Q105.5 continues to feature popular on-air personalities Denny Schaffer on Q105.5 Mornings, Tim Graves on Q105.5 Middays, Johny D on Q105.5 Afternoons, and Adam Bomb on Q105.5 Nights. It was announced today that the Tom Joyner Morning Show returns to Orlando’s hit station for today’s R&B and throwbacks, WCFB STAR 94.5 FM as of Monday, July 11th. The Tom Joyner Morning Show airs weekdays from 6:00am – 10:00am ET. Start 94.5 dropped Joyney in December 2015 in favor of the Steve Harvey Show. The 2016 Allstate Family Reunion with feature concerts from headliners including Jill Scott, The Bar-Kays, ConFunkShun, Chrisette Michele, El DeBarge, Erica Campbell and many more along with a daily expo that is open to the public with shopping, empowerment, and celebrities. The Tom Joyner Morning Show is distributed by REACH Media Inc, a part of the Radio One family. Democrats targeting content and control of the Internet, especially from conservative sources, are pushing hard to layer on new regulations and even censorship under the guise of promoting diversity while policing bullying, warn commissioners from the Federal Communications Commission and Federal Election Commission, according to The Washington Examiner. The Examiner reports Pai and Goodman cited political correctness campaigns by Democrats as a threat. Both also said their agencies are becoming politicized and the liberals are using their power to push regulations that impact business and conservative outlets and voices. “One of the things that is critical for this country is to reassert the value of the First Amendment, the fact that robust discourse, that is sometimes cacophonous, is nonetheless a value, in fact it creates value,” said Pai. Pai added that at the FCC, “bipartisan consensus has unraveled over the last couple of years,” most notably the recent vote on net neutrality. Democrats are in control, 3-2. (Reuters) --A Massachusetts judge presiding over a case hinging on Sumner Redstone's mental condition on Thursday peppered attorneys on both sides of the dispute with questions about the 93-year-old media mogul's state of mind and how he communicates with people. Judge George Phelan decided, however, not to hear arguments about whether Redstone should be subject to a medical examination immediately, and did not rule on whether the case should continue in Massachusetts - or even if it should continue at all - leaving the legal tussle over Redstone's $40 billion media empire no closer to being resolved. "Obviously I have a lot of information to digest in just the motion to dismiss itself," Phelan said on Thursday after a hearing that lasted more than five hours. "It's going to take me a while to grasp all of that." The hearing was the latest episode in the legal wrangle over the fate of Redstone's controlling stake in Viacom Inc and CBS Corp, which has been playing out on both U.S. coasts over the past several months. The main issue before Phelan on Thursday was whether Redstone knew what he was doing when he removed Viacom Chief Executive Philippe Dauman and Viacom board member George Abrams from the seven-person trust that will control Redstone's holdings when he dies or is incapacitated. The trust, officially called the Sumner M. Redstone National Amusements Inc Trust, owns about 80 percent of Redstone's privately held movie theater company, National Amusements Inc, which in turn owns 80 percent of the voting rights in both Viacom and CBS. In an effort to shed light on the matter, Phelan asked attorneys at Thursday's hearing how Redstone communicated with his secretary, how his speech therapist understood what he was saying and whether she had expertise in doing so. “Since October 2015, how does information get to Sumner Redstone ... who is providing it?” Phelan asked attorneys for Sumner and Shari Redstone. He asked if intermediaries were involved, and how Redstone's directions are conveyed to outside people. Redstone's attorneys said the case should be moved as most of the witnesses, including all of Redstone's nurses, were in California. Phelan noted that their testimony could be taken through affidavits. Phelan at one point seemed to question the California's judge's decision in that case and asked to see all of the depositions from both Herzer and Shari Redstone that were taken into account during that trial. The result of the Massachusetts case also has implications for Viacom's board. Earlier this month, Redstone and National Amusements moved to oust five of Viacom's directors, including Dauman and lead independent director Frederic Salerno, asking a court in Delaware - the state where Viacom is incorporated - to rule that the changes were valid. That same day, Salerno fired back with is own lawsuit challenging the removal. Last week, Judge Andre Bouchard of the Court of Chancery of Delaware said he planned to hold a hearing in July to listen to arguments about whether the move was valid, but indicated he hoped that the Massachusetts court would decide on Redstone's competence. Marissa Mayer, Yahoo president and CEO, told investors at the company's annual shareholders' meeting Thursday that its management team and board are fully aligned with one clear priority — "delivering shareholder value to all of you" through strategic alternatives, business and capital allocations. "We have no announcements today, but continue to make great progress on our process," Mayer said, referring to a possible divestiture of its core businesses, including search. "On a personal note, I will say I've been very heartened by the level of interest in Yahoo. It validates our business processes as well as our achievements to date." According to MediaPost, the first question from one investor involved the future of Yahoo and Yahoo shares. "Can you elaborate more on the sale of Yahoo or if there's a way to keep Yahoo?" he asked. "I'd rather have Yahoo shares, if that's possible." Mayer said that pursuing the separation of its equity assets from its operating business, the Internet business with products and services — search, mobile and others — will unlock "substantial value." Grace first informed CNN executive vp Ken Jautz, the same man who lured her to the fledgling network, then called CNN Headline News, back in 2005, of her decision in early June. While her ratings are nowhere near the staggering highs of years past — her afternoon broadcast following the reading of famed filicide suspect Anthony's not-guilty verdict on July 5, 2011, drew 4.57 million viewers — the lightning-rod legal crusader remains the most-watched and talked-about personality on HLN. A Montgomery County, MD judge on Thursday refused to extend a temporary protective order against radio personality Peter Deibler, better known as Kane on iHeartMedia's WIHT 99.5 FM ”The Kane Show", which is also syndicated in several markets. In court, Deibler and his wife, Natasha Deibler — who are enmeshed in a bitter divorce — offered wildly different versions of a May 25 incident that prompted her to seek the order and to file second-degree assault charges against him. According to The Washington Post, Natasha Deibler, 36, said that when she arrived to pick up the couple’s two children from his apartment that night, her husband threw her against a wall, but Peter Deibler, 39, contended that he used the door to move her back when she attempted to enter without his permission, and that she fell. Circuit Court Judge Terrence McGann found that Natasha Deibler hadn’t met the burden of proof needed to keep in place the order, which barred the radio host from from contacting his wife or entering the Potomac home where she lives. In testimony on Thursday, each spouse accused the other of substance abuse and other erratic behavior. Peter Deibler said when his wife called to say she would be late picking up the girls, “She sounded slurred and not coherent,” he said. Tom Mazawey and Sean Baligian, two show hosts at Detroit Sports WMGC 105.1 FM, explained Thursday some of the mistakes and failures that led to the station discontinuing its sports-talk format Wednesday after a 34-month run. The Detroit Free-Press reports questionable programming decisions, failing to provide a Detroit-centric morning show and the handling of the station’s key personality, Drew Lane, were among the key problems. But the biggest nail in the coffin came last fall, according to Mazawey. That’s when WMGC, owned by Greater Media, lost a bid for the Detroit Tigers' radio broadcast rights to The Ticket WXYT 97.1 FM. Mazawey said it wasn’t a fair negotiation after two Tigers executives broke a promise to make it a sealed-bid offer and tipped off The Ticket executives about the offer from Greater Media and WMGC, although a source close to the negotiations on the team's side told the Free Press late Thursday that there was never a sealed-bid offer as part of the process but declined further comment. In February, Baligian began hosting the 6 a.m. to 10 a.m. show with Mazawey and Marc Fellhauer. But for the first 30 months of its existence, WMGC, an ESPN affiliate, carried ESPN’s syndicated show “Mike and Mike.” Baligian said that didn’t cut it in a town crazy about its Detroit teams. “My goodness, when you think about it, for the 34 months that the station existed, 30 of those months had a national show, quite frankly, a New York-based show. I just don’t think that’s a good business model at all. I think by the time they learned that, I guess in retrospect, it was probably too late. Another problem was trying to make Drew Lane, a longtime Detroit radio personality known for his general banter, take a more sports-centric tack. Lane’s contract was not renewed in October. “Drew Lane was our linchpin,” Mazawey said. “We built the station around him, and then they go and tell him, ‘Well, you know what? We want you to change your show after 30 years in the business,’ or whatever he’s been at it. CBS Radio's WYCD 99.5 FM announced that award winning personality Linda Lee celebrates her 20th year on WYCD Thursday, making her the longest consecutive female country music air personality in Detroit history. Lee began her career at WYCD as a member of the morning show, and then later teamed up with co-host Chuck Edwards for the long running “Edwards & Lee” afternoon drive show. The pair were together on WYCD for 16 years, gathering many accolades along the way including the 2010 & 2015 Michigan Association of Broadcasters (MAB) “Personality of the Year”, the 2014 Gracie Award for “Outstanding Morning/Afternoon Personality” and 2011 CMA for “Personalities of the Year”. When Edwards moved to mornings in late 2015, Lee teamed with Rob Stone for the “Rob & Linda” show, which can currently be heard from 3:00 pm to 7:00 pm over-the-air, online at www.wycd.com or via the Radio.com app for mobile devices. Apple Inc. is in talks to acquire Tidal, a streaming-music service run by rap mogul Jay Z, according to people familiar with the matter. The Wall Street Journal is reporting Apple is exploring the idea of bringing on Tidal to bolster its Apple Music service because of Tidal’s strong ties to popular artists such as Kanye West and Madonna. Jay Z bought the service in March 2015 for $56 million from Swedish company Aspiro, which had created the brand Tidal. He has given 19 famous artists and bands small stakes in Tidal and promised each millions of dollars worth of marketing, according to people familiar with the matter. Tidal charges $20 a month for a high-fidelity version of its 40 million-song catalog or $10 a month for standard-quality sound. Tidal said it has 4.2 million paying subscribers, most of whom it amassed this year with a string of exclusive releases from stars including Mr. West, Rihanna and Beyoncé. Tidal is also the only service offering the catalog of the late pop star Prince, who was wary of other streaming services but had a close relationship with Jay Z. Prince died in April at the age of 57 of an overdose. But the company has experienced management turmoil, churning through three chief executives, one of them interim and one appointed by prior management, in less than a year. Jeff Toig, former chief business officer of SoundCloud, a Berlin-based audio-sharing service, has been CEO since January. Though it hasn’t generated significant revenue for the industry given its relatively low subscriber numbers, Tidal has an artist-friendly reputation, thanks to its artist ownership, high-quality sound and the fact that it only offers paid subscriptions, which generate far more for the industry than ad-supported services. The Justice Department dealt a blow to the music industry this week when it declined to change the longstanding regulatory agreements that govern ASCAP and BMI, two of the industry’s oldest and largest clearinghouses for royalties, according to The NY Times. The two agencies have argued that modifying their consent decrees, which have been in place since 1941 and have not been updated in more than a decade, was urgently needed to adapt to the new world of online music, and the agencies’ petitions followed several years of conflict and litigation with Pandora Media over royalty rates. Music publishers have warned that the streaming era has led to a precipitous decline in songwriters’ income, with the consent decrees partly to blame. Although the Justice Department’s recommendation carries great weight, any alterations to the consent decrees must be approved by two federal judges overseeing the cases, and the performing rights organizations could object to the changes in court. After a two-year review, the Justice Department this week denied a series of requests by ASCAP and BMI, including the ability for publishers to have more control over licensing their music to digital services. And in a move that has caused widespread worry throughout the music publishing world — the side of the business that deals with the lucrative copyrights for songwriting — the government has also said that, according to its interpretation of the consent decrees, the music agencies must change a major aspect of how they license music. The agencies must now adopt a policy known as “100 percent licensing,” which means that any party who controls part of a composition can issue a license for the whole thing. In the case of major pop hits, which tend to have many songwriters, there can sometimes be a dozen or more parties involved. Democrats on the Federal Election Commission voted in secret to punish Fox News' sponsorship of a Republican presidential debate, using an obscure law to charge the network with helping those on stage. It is the first time in history that members of the FEC voted to punish a media outlet's debate sponsorship, and it follows several years of Democratic threats against conservative media and websites like the Drudge Report. A Republican FEC commissioner leading that fight, Lee E. Goodman, revealed the vote to the Washington Examiner Wednesday. Goodman has led the fight against several other efforts to censor conservative media by Democrats on the FEC. "The government should not punish any newsroom's editorial decision on how best to provide the public information about candidates for office," he said. "All press organizations should be concerned when the government asserts regulatory authority to punish and censor news coverage." At issue was the Aug. 6, 2015 Fox presidential debate. Initially, the network planned to host one debate featuring 10 candidates. But as the date got close and the nearly two dozen GOP presidential candidates were close in the polls, Fox added a second debate that included seven other candidates. Redstone: Viacom CEO Attempts "Futile" R.I.P.: Former Station Owner Louis Appell Jr.
using ApartmentManager.Annotations; using System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Runtime.CompilerServices; namespace ApartmentManager.Model { public class Defect : INotifyPropertyChanged { public int DefectId { get; set; } public int ApartmentId { get; set; } public string Name { get; set; } public DateTime UploadDate { get; set; } public string Description { get; set; } public string Status { get; set; } private ObservableCollection<DefectPicture> _pictures; private ObservableCollection<DefectComment> _comments; public ObservableCollection<DefectPicture> Pictures { get => _pictures; set { _pictures = value; OnPropertyChanged(nameof(Pictures)); } } public ObservableCollection<DefectComment> Comments { get => _comments; set { _comments = value; OnPropertyChanged(nameof(Comments)); } } public event PropertyChangedEventHandler PropertyChanged; [NotifyPropertyChangedInvocator] protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } }
/* Copyright 2015 The TensorFlow Authors. 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 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 "tensorflow/core/lib/io/inputbuffer.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/platform/logging.h" namespace tensorflow { namespace io { InputBuffer::InputBuffer(RandomAccessFile* file, size_t buffer_bytes) : file_(file), file_pos_(0), size_(buffer_bytes), buf_(new char[size_]), pos_(buf_), limit_(buf_) {} InputBuffer::~InputBuffer() { delete[] buf_; } Status InputBuffer::FillBuffer() { StringPiece data; Status s = file_->Read(file_pos_, size_, &data, buf_); if (data.data() != buf_) { memmove(buf_, data.data(), data.size()); } pos_ = buf_; limit_ = pos_ + data.size(); file_pos_ += data.size(); return s; } template <typename T> Status InputBuffer::ReadLine(T* result) { result->clear(); Status s; do { size_t buf_remain = limit_ - pos_; char* newline = static_cast<char*>(memchr(pos_, '\n', buf_remain)); if (newline != nullptr) { size_t result_len = newline - pos_; result->append(pos_, result_len); pos_ = newline + 1; if (!result->empty() && result->back() == '\r') { result->resize(result->size() - 1); } return Status::OK(); } if (buf_remain > 0) result->append(pos_, buf_remain); // Get more data into buffer s = FillBuffer(); DCHECK_EQ(pos_, buf_); } while (limit_ != buf_); if (!result->empty() && result->back() == '\r') { result->resize(result->size() - 1); } if (errors::IsOutOfRange(s) && !result->empty()) { return Status::OK(); } return s; } template Status InputBuffer::ReadLine<std::string>(std::string* result); template Status InputBuffer::ReadLine<tstring>(tstring* result); Status InputBuffer::ReadNBytes(int64 bytes_to_read, std::string* result) { result->clear(); if (bytes_to_read < 0) { return errors::InvalidArgument("Can't read a negative number of bytes: ", bytes_to_read); } result->resize(bytes_to_read); size_t bytes_read = 0; Status status = ReadNBytes(bytes_to_read, &(*result)[0], &bytes_read); if (bytes_read < bytes_to_read) result->resize(bytes_read); return status; } Status InputBuffer::ReadNBytes(int64 bytes_to_read, char* result, size_t* bytes_read) { if (bytes_to_read < 0) { return errors::InvalidArgument("Can't read a negative number of bytes: ", bytes_to_read); } Status status; *bytes_read = 0; while (*bytes_read < static_cast<size_t>(bytes_to_read)) { if (pos_ == limit_) { // Get more data into buffer. status = FillBuffer(); if (limit_ == buf_) { break; } } // Do not go over the buffer boundary. const int64 bytes_to_copy = std::min<int64>(limit_ - pos_, bytes_to_read - *bytes_read); // Copies buffered data into the destination. memcpy(result + *bytes_read, pos_, bytes_to_copy); pos_ += bytes_to_copy; *bytes_read += bytes_to_copy; } if (errors::IsOutOfRange(status) && (*bytes_read == static_cast<size_t>(bytes_to_read))) { return Status::OK(); } return status; } Status InputBuffer::ReadVarint32Fallback(uint32* result) { Status s = ReadVarintFallback(result, core::kMaxVarint32Bytes); if (errors::IsDataLoss(s)) { return errors::DataLoss("Stored data is too large to be a varint32."); } return s; } Status InputBuffer::ReadVarint64Fallback(uint64* result) { Status s = ReadVarintFallback(result, core::kMaxVarint64Bytes); if (errors::IsDataLoss(s)) { return errors::DataLoss("Stored data is too large to be a varint64."); } return s; } template <typename T> Status InputBuffer::ReadVarintFallback(T* result, int max_bytes) { uint8 scratch = 0; auto* p = reinterpret_cast<char*>(&scratch); size_t unused_bytes_read = 0; *result = 0; for (int index = 0; index < max_bytes; index++) { int shift = 7 * index; TF_RETURN_IF_ERROR(ReadNBytes(1, p, &unused_bytes_read)); *result |= (static_cast<T>(scratch) & 127) << shift; if (!(scratch & 128)) return Status::OK(); } return errors::DataLoss("Stored data longer than ", max_bytes, " bytes."); } Status InputBuffer::SkipNBytes(int64 bytes_to_skip) { if (bytes_to_skip < 0) { return errors::InvalidArgument("Can only skip forward, not ", bytes_to_skip); } int64 bytes_skipped = 0; Status s; while (bytes_skipped < bytes_to_skip) { if (pos_ == limit_) { // Get more data into buffer s = FillBuffer(); if (limit_ == buf_) { break; } } const int64 bytes_to_advance = std::min<int64>(limit_ - pos_, bytes_to_skip - bytes_skipped); bytes_skipped += bytes_to_advance; pos_ += bytes_to_advance; } if (errors::IsOutOfRange(s) && bytes_skipped == bytes_to_skip) { return Status::OK(); } return s; } Status InputBuffer::Seek(int64 position) { if (position < 0) { return errors::InvalidArgument("Seeking to a negative position: ", position); } // Position of the buffer within file. const int64 bufpos = file_pos_ - static_cast<int64>(limit_ - buf_); if (position >= bufpos && position < file_pos_) { // Seeks to somewhere inside the buffer. pos_ = buf_ + (position - bufpos); DCHECK(pos_ >= buf_ && pos_ < limit_); } else { // Seeks to somewhere outside. Discards the buffered data. pos_ = limit_ = buf_; file_pos_ = position; } return Status::OK(); } Status InputBuffer::Hint(int64 bytes_to_read) { if (bytes_to_read < 0) { return errors::InvalidArgument("Can't read a negative number of bytes: ", bytes_to_read); } // The internal buffer is too small. Do nothing. if (bytes_to_read > size_) { return Status::OK(); } const int64 bytes_remain_in_buf = static_cast<int64>(limit_ - pos_); // There are enough data in the buffer. Do nothing. if (bytes_to_read <= bytes_remain_in_buf) { return Status::OK(); } // Additional read from file is necessary. Make some room. memmove(buf_, pos_, bytes_remain_in_buf); pos_ = buf_; limit_ = buf_ + bytes_remain_in_buf; bytes_to_read -= bytes_remain_in_buf; // Read the remaining bytes from file. StringPiece data; Status s = file_->Read(file_pos_, bytes_to_read, &data, limit_); if (data.data() != limit_) { memmove(limit_, data.data(), data.size()); } limit_ += data.size(); file_pos_ += data.size(); if (errors::IsOutOfRange(s) && data.size() == bytes_to_read) { return Status::OK(); } else { return s; } } } // namespace io } // namespace tensorflow
Deliver your loads and get paid same day. Pick up your load and get a same day fuel advance. Get big lines of Credit, savings at the pump, and much more.
CFLAGS += -I../.. LDFLAGS += -L../../framework -lmlt -lm -lpthread include ../../../config.mak TARGET = ../libmltcore$(LIBSUF) OBJS = factory.o \ producer_colour.o \ producer_consumer.o \ producer_hold.o \ producer_loader.o \ producer_melt.o \ producer_noise.o \ producer_timewarp.o \ producer_tone.o \ filter_audiochannels.o \ filter_audiomap.o \ filter_audioconvert.o \ filter_audiowave.o \ filter_brightness.o \ filter_channelcopy.o \ filter_crop.o \ filter_data_feed.o \ filter_data_show.o \ filter_fieldorder.o \ filter_gamma.o \ filter_greyscale.o \ filter_imageconvert.o \ filter_luma.o \ filter_mirror.o \ filter_mono.o \ filter_obscure.o \ filter_panner.o \ filter_region.o \ filter_rescale.o \ filter_resize.o \ filter_transition.o \ filter_watermark.o \ transition_composite.o \ transition_luma.o \ transition_mix.o \ transition_region.o \ transition_matte.o \ consumer_multi.o \ consumer_null.o ifdef SSE2_FLAGS ifdef ARCH_X86_64 OBJS += composite_line_yuv_sse2_simple.o endif endif ASM_OBJS = SRCS := $(OBJS:.o=.c) ifeq ($(targetos), MinGW) CFLAGS += -I../../win32 OBJS += ../../win32/fnmatch.o SRCS += ../../win32/fnmatch.c endif all: $(TARGET) $(TARGET): $(OBJS) $(ASM_OBJS) $(CC) $(SHFLAGS) -o $@ $(OBJS) $(ASM_OBJS) $(LDFLAGS) composite_line_yuv_mmx.o: composite_line_yuv_mmx.S $(CC) -o $@ -c composite_line_yuv_mmx.S depend: $(SRCS) $(CC) -MM $(CFLAGS) $^ 1>.depend distclean: clean rm -f .depend clean: rm -f $(OBJS) $(ASM_OBJS) $(TARGET) install: all install -m 755 $(TARGET) "$(DESTDIR)$(moduledir)" install -d "$(DESTDIR)$(mltdatadir)/core" install -m 644 data_fx.properties "$(DESTDIR)$(mltdatadir)/core" install -m 644 loader.dict "$(DESTDIR)$(mltdatadir)/core" install -m 644 loader.ini "$(DESTDIR)$(mltdatadir)/core" install -m 644 *.yml "$(DESTDIR)$(mltdatadir)/core" ifneq ($(wildcard .depend),) include .depend endif
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="it"> <head> <!-- Generated by javadoc (version 1.7.0_60) on Fri Feb 13 15:30:16 CET 2015 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>gameshop.advance.ui.swing.manager</title> <meta name="date" content="2015-02-13"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <h1 class="bar"><a href="../../../../../gameshop/advance/ui/swing/manager/package-summary.html" target="classFrame">gameshop.advance.ui.swing.manager</a></h1> <div class="indexContainer"> <h2 title="Classes">Classes</h2> <ul title="Classes"> <li><a href="FornitureMenu.html" title="class in gameshop.advance.ui.swing.manager" target="classFrame">FornitureMenu</a></li> <li><a href="ManagerMenu.html" title="class in gameshop.advance.ui.swing.manager" target="classFrame">ManagerMenu</a></li> </ul> </div> </body> </html>
You can’t miss this friendly, family run restaurant & inn in Monmouth, with its blue Georgian frontage. It’s right next to the river at the start of the main street, and as a point of interest, it’s by the medieval Monnow Bridge which is the only remaining fortified bridge in the UK, dating back to around 1277 AD! Inside it’s rather quirky and colourful with period features and outside there’s a big balcony with views over the river. Food is fresh and home cooked and there’s quite a choice – house burgers, mixed bean and lentil casserole, bangers & mash, and slow braised shank of lamb are on the winter menu. Just what you need.
Need Anti-Virus? Computer support? New computer? We have got you covered. Thank you for choosing Bandon IT (Information Technology) Bandon’s provider of computer support services for small business and residential customers, locally veteran owned and operated since 2015. We have a host of commercial services to fit your needs from local and offsite data retention, business continuity services, workstation and server maintenance, to remote and onsite diagnostics and troubleshooting. We work primarily with PC (Windows) and Mac (OSX) software and hardware. For residential customers we also provide remote and on-site computer repair, as well as proactive maintenance to assist in keeping your computers from having to be worked on again in the near future. Cracked screen repair for iPhones, laptops, and iPads is a common specialty as well as DC jack replacement. Contact Bandon IT today at toll free at 888.236.3228 or 1.541.223.7745 or stop by our office at 780 2nd St SE Suite 2 to let us handle the ‘technical’ part of your technology. You have better things to do with your time than battle computers and networks all day. We help you get your business done. Let us stay on top of IT. Bandon IT is located directly on Hwy 101 (also known as 2nd Street SE) just up the hill from Facerock Creamery, located on the same side. We are in the two story gray Riverview Complex building on the first floor, next to Chas Waldrop.
<!DOCTYPE html> <html lang="en" ng-app="demo"> <head> <meta charset="utf-8"> <title>Angular Fullcalendar Directive</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.5.1/fullcalendar.min.css"> <link rel="stylesheet" href="demo.css"> <!-- angular-fullcalendar files files --> <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.5.1/fullcalendar.min.js"></script> <script src="angular-fullcalendar.min.js"></script> <script> var app = angular.module('demo', ['angular-fullcalendar']); app.controller('CalendarCtrl', ['$scope',function($scope) { $scope.calendarOptions = { }; $scope.events = [ { title: 'My Event', start: new moment().add(-1,'days'), description: 'This is a cool event', color:'#5f6dd0' }, { title: 'My Event', start: new moment().add(1,'days'), description: 'This is a cool event', color:'#af6dd0' } ]; $scope.addEvent = addEvent; var count = 0; function addEvent(){ $scope.events.push({ title: 'Event '+ count, start: new moment(), description: 'This is a cool event', color:'#5f6dd0' }); count++; } }]); </script> </head> <body class=""> <div class="header-title"> <section class="container header-title-container "> <i class="title-icon glyphicon glyphicon-calendar"></i> <h1 class="title">Angular Fullcalendar</h1> <p class="header-description">A simple light directive</p> <a href="https://github.com/JavyMB/angular-fullcalendar" class="header-link">Code on github</a> </section> </div> <div class="demo-container"> <section ng-controller="CalendarCtrl" class="container demo"> <button type="button" name="button" class="btn btn-fullcalendar-primary" ng-click="addEvent()">Add Today Event</button> <p></p> <div class="demo-calendar"> <div fc fc-options="calendarOptions" ng-model="events" class="calendar"> </div> </div> </section> </div> <div class="container"> <section> <h3>How do I use it ?</h3> <p>As an attribute </p> <pre> &lt;div fc fc-options=&quot;calendarOoptions&quot; ng-model=&quot;events&quot; &gt; &lt;/div&gt; </pre> <p>Then in your controller just add the calendar options and the list of events</p> <pre class="prettyprint"> $scope.calendarOoptions = { //.. Fullcalendar.js options click here to view details }; $scope.events = [ { title: 'My Event', start: new Date(),// :) how you can use Date description: 'This is a cool event', color:'#5f6dd0' }, { title: 'My Event', start: new moment().add(1,'days'), // :) or MomentJS description: 'This is a cool event', color:'#af6dd0' } ]; </section> <section> <h3>Requirements</h3> <p> - AngularJS (1.6.x) <br> - MomentJS<br> - Fullcalendar.js 3.0 and its dependencies<br> - gcal-plugin (optional)<br> </p> </section> <section class="footer"> <h3>Contribute <i class="glyphicon glyphicon-heart-empty"></i></h3> <p>If you have suggestions and ideas on how to make it more simple please fork the repository and submit your Pull request</p> <a href="https://twitter.com/JavyMB"><img src="https://camo.githubusercontent.com/9e91f88ad27d530dd2b0c6f8575d4f2c9fd6ea91/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6a6176796d622e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77" alt="Twitter Follow" data-canonical-src="https://img.shields.io/twitter/follow/javymb.svg?style=social&amp;label=Follow" style="max-width:100%;"></a> </section> </div> </body> </html>
// OpenVPN -- An application to securely tunnel IP networks // over a single port, with support for SSL/TLS-based // session authentication and key exchange, // packet encryption, packet authentication, and // packet compression. // // Copyright (C) 2012-2017 OpenVPN Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License Version 3 // as published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program in the COPYING file. // If not, see <http://www.gnu.org/licenses/>. // Sanitize certain kinds of strings before they are output to the log file. #ifndef OPENVPN_OPTIONS_SANITIZE_H #define OPENVPN_OPTIONS_SANITIZE_H #include <string> #include <cstring> #include <openvpn/common/exception.hpp> #include <openvpn/common/options.hpp> namespace openvpn { inline std::string render_options_sanitized(const OptionList& opt, const unsigned int render_flags) { std::ostringstream out; for (size_t i = 0; i < opt.size(); i++) { const Option& o = opt[i]; #ifndef OPENVPN_SHOW_SESSION_TOKEN if (o.get_optional(0, 0) == "auth-token") out << i << " [auth-token] ..." << std::endl; else #endif out << i << ' ' << o.render(render_flags) << std::endl; } return out.str(); } // Remove security-sensitive strings from control message // so that they will not be output to log file. inline std::string sanitize_control_message(const std::string& src_str) { #ifdef OPENVPN_SHOW_SESSION_TOKEN return src_str; #else const char *src = src_str.c_str(); char *ret = new char[src_str.length()+1]; char *dest = ret; bool redact = false; int skip = 0; for (;;) { const char c = *src; if (c == '\0') break; if (c == 'S' && !::strncmp(src, "SESS_ID_", 8)) { skip = 7; redact = true; } else if (c == 'e' && !::strncmp(src, "echo ", 5)) { skip = 4; redact = true; } if (c == ',') /* end of redacted item? */ { skip = 0; redact = false; } if (redact) { if (skip > 0) { --skip; *dest++ = c; } } else *dest++ = c; ++src; } *dest = '\0'; const std::string ret_str(ret); delete [] ret; return ret_str; #endif } } #endif