code
stringlengths
4
1.01M
from django.conf.urls import url, include from rest_framework.routers import DefaultRouter from rest_framework_swagger.views import get_swagger_view from . import views, views_api # Django REST framework router = DefaultRouter() router.register(r'election', views_api.ElectionInterface) router.register(r'district', views_api.DistrictInterface) router.register(r'municipality', views_api.MunicipalityInterface) router.register(r'party', views_api.PartyInterface) router.register(r'polling_station', views_api.PollingStationInterface) router.register(r'list', views_api.ListInterface) router.register(r'result', views_api.PollingStationResultInterface) router.register(r'regional_electoral_district', views_api.RegionalElectoralDistrictInterface) # Django OpenAPI Swagger schema_view = get_swagger_view(title='Offene Wahlen API') urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^loaderio-eac9628bcae9be5601e1f3c62594d162.txt$', views.load_test, name='load_test'), url(r'^api/', include(router.urls)), url(r'^api/docs$', schema_view) ]
<div class="container login-form"> <div class="row"> <div class="col-sm-12 text-center"> <img src="<?php echo base_url('img/logo.png'); ?>"> </div> </div> <br /> <div class="row"> <div class="col-sm-4 col-sm-offset-4"> <?php echo $validation_errors; ?> <div class="well"> <?php echo form_open('admin/auth'); ?> <div class="form-group"> <label for="adminuser">Username:</label> <input type="text" class="form-control" id="adminuser" name="adminuser" /> </div> <div class="form-group"> <label for="adminpass">Password:</label> <input type="password" class="form-control" id="adminpass" name="adminpass" /> </div> <div class="text-right"> <button type="submit" class="btn btn-success">Log in</button> </div> </form> </div> </div> </div> </div>
/* * CocosBuilder: http://www.CocosBuilder.com * * Copyright (c) 2012 Zynga Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #import "cocos2d.h" #import "CCScale9Sprite.h" @interface RulersLayer : CCLayer { CCScale9Sprite* bgHorizontal; CCScale9Sprite* bgVertical; CCNode* marksVertical; CCNode* marksHorizontal; CCSprite* mouseMarkHorizontal; CCSprite* mouseMarkVertical; CGSize winSize; CGPoint stageOrigin; float zoom; CCLabelAtlas* lblX; CCLabelAtlas* lblY; } - (void) updateWithSize:(CGSize)winSize stageOrigin:(CGPoint)stageOrigin zoom:(float)zoom; - (void)mouseEntered:(NSEvent *)event; - (void)mouseExited:(NSEvent *)event; - (void)updateMousePos:(CGPoint)pos; @end
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin dragonfly freebsd netbsd openbsd rumprun package syscall import ( "runtime" "unsafe" ) var ( freebsdConfArch string // "machine $arch" line in kern.conftxt on freebsd minRoutingSockaddrLen = rsaAlignOf(0) ) // Round the length of a raw sockaddr up to align it properly. func rsaAlignOf(salen int) int { salign := sizeofPtr if darwin64Bit { // Darwin kernels require 32-bit aligned access to // routing facilities. salign = 4 } else if netbsd32Bit { // NetBSD 6 and beyond kernels require 64-bit aligned // access to routing facilities. salign = 8 } else if runtime.GOOS == "freebsd" { // In the case of kern.supported_archs="amd64 i386", // we need to know the underlying kernel's // architecture because the alignment for routing // facilities are set at the build time of the kernel. if freebsdConfArch == "amd64" { salign = 8 } } if salen == 0 { return salign } return (salen + salign - 1) & ^(salign - 1) } // parseSockaddrLink parses b as a datalink socket address. func parseSockaddrLink(b []byte) (*SockaddrDatalink, error) { if len(b) < 8 { return nil, EINVAL } sa, _, err := parseLinkLayerAddr(b[4:]) if err != nil { return nil, err } rsa := (*RawSockaddrDatalink)(unsafe.Pointer(&b[0])) sa.Len = rsa.Len sa.Family = rsa.Family sa.Index = rsa.Index return sa, nil } // parseLinkLayerAddr parses b as a datalink socket address in // conventional BSD kernel form. func parseLinkLayerAddr(b []byte) (*SockaddrDatalink, int, error) { // The encoding looks like the following: // +----------------------------+ // | Type (1 octet) | // +----------------------------+ // | Name length (1 octet) | // +----------------------------+ // | Address length (1 octet) | // +----------------------------+ // | Selector length (1 octet) | // +----------------------------+ // | Data (variable) | // +----------------------------+ type linkLayerAddr struct { Type byte Nlen byte Alen byte Slen byte } lla := (*linkLayerAddr)(unsafe.Pointer(&b[0])) l := 4 + int(lla.Nlen) + int(lla.Alen) + int(lla.Slen) if len(b) < l { return nil, 0, EINVAL } b = b[4:] sa := &SockaddrDatalink{Type: lla.Type, Nlen: lla.Nlen, Alen: lla.Alen, Slen: lla.Slen} for i := 0; len(sa.Data) > i && i < l-4; i++ { sa.Data[i] = int8(b[i]) } return sa, rsaAlignOf(l), nil } // parseSockaddrInet parses b as an internet socket address. func parseSockaddrInet(b []byte, family byte) (Sockaddr, error) { switch family { case AF_INET: if len(b) < SizeofSockaddrInet4 { return nil, EINVAL } rsa := (*RawSockaddrAny)(unsafe.Pointer(&b[0])) return anyToSockaddr(rsa) case AF_INET6: if len(b) < SizeofSockaddrInet6 { return nil, EINVAL } rsa := (*RawSockaddrAny)(unsafe.Pointer(&b[0])) return anyToSockaddr(rsa) default: return nil, EINVAL } } const ( offsetofInet4 = int(unsafe.Offsetof(RawSockaddrInet4{}.Addr)) offsetofInet6 = int(unsafe.Offsetof(RawSockaddrInet6{}.Addr)) ) // parseNetworkLayerAddr parses b as an internet socket address in // conventional BSD kernel form. func parseNetworkLayerAddr(b []byte, family byte) (Sockaddr, error) { // The encoding looks similar to the NLRI encoding. // +----------------------------+ // | Length (1 octet) | // +----------------------------+ // | Address prefix (variable) | // +----------------------------+ // // The differences between the kernel form and the NLRI // encoding are: // // - The length field of the kernel form indicates the prefix // length in bytes, not in bits // // - In the kernel form, zero value of the length field // doesn't mean 0.0.0.0/0 or ::/0 // // - The kernel form appends leading bytes to the prefix field // to make the <length, prefix> tuple to be conformed with // the routing message boundary l := int(rsaAlignOf(int(b[0]))) if len(b) < l { return nil, EINVAL } // Don't reorder case expressions. // The case expressions for IPv6 must come first. switch { case b[0] == SizeofSockaddrInet6: sa := &SockaddrInet6{} copy(sa.Addr[:], b[offsetofInet6:]) return sa, nil case family == AF_INET6: sa := &SockaddrInet6{} if l-1 < offsetofInet6 { copy(sa.Addr[:], b[1:l]) } else { copy(sa.Addr[:], b[l-offsetofInet6:l]) } return sa, nil case b[0] == SizeofSockaddrInet4: sa := &SockaddrInet4{} copy(sa.Addr[:], b[offsetofInet4:]) return sa, nil default: // an old fashion, AF_UNSPEC or unknown means AF_INET sa := &SockaddrInet4{} if l-1 < offsetofInet4 { copy(sa.Addr[:], b[1:l]) } else { copy(sa.Addr[:], b[l-offsetofInet4:l]) } return sa, nil } } // RouteRIB returns routing information base, as known as RIB, // which consists of network facility information, states and // parameters. // // Deprecated: Use golang.org/x/net/route instead. func RouteRIB(facility, param int) ([]byte, error) { mib := []_C_int{CTL_NET, AF_ROUTE, 0, 0, _C_int(facility), _C_int(param)} // Find size. n := uintptr(0) if err := sysctl(mib, nil, &n, nil, 0); err != nil { return nil, err } if n == 0 { return nil, nil } tab := make([]byte, n) if err := sysctl(mib, &tab[0], &n, nil, 0); err != nil { return nil, err } return tab[:n], nil } // RoutingMessage represents a routing message. // // Deprecated: Use golang.org/x/net/route instead. type RoutingMessage interface { sockaddr() ([]Sockaddr, error) } const anyMessageLen = int(unsafe.Sizeof(anyMessage{})) type anyMessage struct { Msglen uint16 Version uint8 Type uint8 } // RouteMessage represents a routing message containing routing // entries. // // Deprecated: Use golang.org/x/net/route instead. type RouteMessage struct { Header RtMsghdr Data []byte } func (m *RouteMessage) sockaddr() ([]Sockaddr, error) { var sas [RTAX_MAX]Sockaddr b := m.Data[:] family := uint8(AF_UNSPEC) for i := uint(0); i < RTAX_MAX && len(b) >= minRoutingSockaddrLen; i++ { if m.Header.Addrs&(1<<i) == 0 { continue } rsa := (*RawSockaddr)(unsafe.Pointer(&b[0])) switch rsa.Family { case AF_LINK: sa, err := parseSockaddrLink(b) if err != nil { return nil, err } sas[i] = sa b = b[rsaAlignOf(int(rsa.Len)):] case AF_INET, AF_INET6: sa, err := parseSockaddrInet(b, rsa.Family) if err != nil { return nil, err } sas[i] = sa b = b[rsaAlignOf(int(rsa.Len)):] family = rsa.Family default: sa, err := parseNetworkLayerAddr(b, family) if err != nil { return nil, err } sas[i] = sa b = b[rsaAlignOf(int(b[0])):] } } return sas[:], nil } // InterfaceMessage represents a routing message containing // network interface entries. // // Deprecated: Use golang.org/x/net/route instead. type InterfaceMessage struct { Header IfMsghdr Data []byte } func (m *InterfaceMessage) sockaddr() ([]Sockaddr, error) { var sas [RTAX_MAX]Sockaddr if m.Header.Addrs&RTA_IFP == 0 { return nil, nil } sa, err := parseSockaddrLink(m.Data[:]) if err != nil { return nil, err } sas[RTAX_IFP] = sa return sas[:], nil } // InterfaceAddrMessage represents a routing message containing // network interface address entries. // // Deprecated: Use golang.org/x/net/route instead. type InterfaceAddrMessage struct { Header IfaMsghdr Data []byte } func (m *InterfaceAddrMessage) sockaddr() ([]Sockaddr, error) { var sas [RTAX_MAX]Sockaddr b := m.Data[:] family := uint8(AF_UNSPEC) for i := uint(0); i < RTAX_MAX && len(b) >= minRoutingSockaddrLen; i++ { if m.Header.Addrs&(1<<i) == 0 { continue } rsa := (*RawSockaddr)(unsafe.Pointer(&b[0])) switch rsa.Family { case AF_LINK: sa, err := parseSockaddrLink(b) if err != nil { return nil, err } sas[i] = sa b = b[rsaAlignOf(int(rsa.Len)):] case AF_INET, AF_INET6: sa, err := parseSockaddrInet(b, rsa.Family) if err != nil { return nil, err } sas[i] = sa b = b[rsaAlignOf(int(rsa.Len)):] family = rsa.Family default: sa, err := parseNetworkLayerAddr(b, family) if err != nil { return nil, err } sas[i] = sa b = b[rsaAlignOf(int(b[0])):] } } return sas[:], nil } // ParseRoutingMessage parses b as routing messages and returns the // slice containing the RoutingMessage interfaces. // // Deprecated: Use golang.org/x/net/route instead. func ParseRoutingMessage(b []byte) (msgs []RoutingMessage, err error) { nmsgs, nskips := 0, 0 for len(b) >= anyMessageLen { nmsgs++ any := (*anyMessage)(unsafe.Pointer(&b[0])) if any.Version != RTM_VERSION { b = b[any.Msglen:] continue } if m := any.toRoutingMessage(b); m == nil { nskips++ } else { msgs = append(msgs, m) } b = b[any.Msglen:] } // We failed to parse any of the messages - version mismatch? if nmsgs != len(msgs)+nskips { return nil, EINVAL } return msgs, nil } // ParseRoutingSockaddr parses msg's payload as raw sockaddrs and // returns the slice containing the Sockaddr interfaces. // // Deprecated: Use golang.org/x/net/route instead. func ParseRoutingSockaddr(msg RoutingMessage) ([]Sockaddr, error) { sas, err := msg.sockaddr() if err != nil { return nil, err } return sas, nil }
namespace myplayer { partial class PlayerForm { /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// 清理所有正在使用的资源。 /// </summary> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要修改 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlayerForm)); DMPlay.Item item1 = new DMPlay.Item(); this.metroContextMenu2 = new DMSkin.Metro.Controls.MetroContextMenu(this.components); this.打开文件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.打开文件夹ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.删除当前项ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.清空列表ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.Btnplay = new DMSkin.Controls.DMLabel(); this.listShowOrHide = new DMSkin.Controls.DMLabel(); this.openFile = new DMSkin.Controls.DMLabel(); this.dmLabel4 = new DMSkin.Controls.DMLabel(); this.volLbl = new DMSkin.Controls.DMLabel(); this.dmVolumeProgress = new DMSkin.Controls.DMProgressBar(); this.mirrorBtn = new DMSkin.Controls.DMLabel(); this.dmProgressBar = new DMSkin.Controls.DMProgressBar(); this.metroContextMenu1 = new DMSkin.Metro.Controls.MetroContextMenu(this.components); this.你好啊ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.打开文件ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.打开文件夹ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.截取ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.播放暂停enterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.音量ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.音量ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.音量ToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); this.aB循环ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.设置A点ctrl1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.设置B点ctrl2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.取消循环ctrlcToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.播放速度ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.常速ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.增加01ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.减少01ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.倍ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.倍ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.倍ToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); this.倍ToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); this.倍ToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); this.进度ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.快进5秒ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.快退5秒ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.截取ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.截图altsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.连续截图altwToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.播放列表ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuPanel = new System.Windows.Forms.Panel(); this.mirrorPanel = new System.Windows.Forms.Panel(); this.mBtn3 = new System.Windows.Forms.Button(); this.mBtn2 = new System.Windows.Forms.Button(); this.mBtn1 = new System.Windows.Forms.Button(); this.bLbl = new System.Windows.Forms.Label(); this.ALbl = new System.Windows.Forms.Label(); this.posLbl = new System.Windows.Forms.Label(); this.speed01 = new System.Windows.Forms.Label(); this.speed02 = new System.Windows.Forms.Label(); this.speed03 = new System.Windows.Forms.Label(); this.speedLbl = new System.Windows.Forms.Label(); this.dmLabel1 = new DMSkin.Controls.DMLabel(); this.topPanel = new System.Windows.Forms.Panel(); this.titleLbl = new System.Windows.Forms.Label(); this.settingBtn = new DMSkin.Controls.DMLabel(); this.minBtn = new DMSkin.Controls.DMButtonMinLight(); this.CloseBtn = new DMSkin.Controls.DMButtonCloseLight(); this.panel2 = new System.Windows.Forms.Panel(); this.playerPanel = new System.Windows.Forms.Panel(); this.masterPanel = new System.Windows.Forms.Panel(); this.player = new AxAPlayer3Lib.AxPlayer(); this.vicePanel = new System.Windows.Forms.Panel(); this.vicePlayer = new AxAPlayer3Lib.AxPlayer(); this.rightPanel = new System.Windows.Forms.Panel(); this.listTitleLbl = new System.Windows.Forms.Label(); this.playListGrid = new DMPlay.DMControl(); this.metroContextMenu2.SuspendLayout(); this.metroContextMenu1.SuspendLayout(); this.menuPanel.SuspendLayout(); this.mirrorPanel.SuspendLayout(); this.topPanel.SuspendLayout(); this.panel2.SuspendLayout(); this.playerPanel.SuspendLayout(); this.masterPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.player)).BeginInit(); this.vicePanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.vicePlayer)).BeginInit(); this.rightPanel.SuspendLayout(); this.SuspendLayout(); // // metroContextMenu2 // this.metroContextMenu2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.打开文件ToolStripMenuItem, this.打开文件夹ToolStripMenuItem, this.删除当前项ToolStripMenuItem, this.清空列表ToolStripMenuItem}); this.metroContextMenu2.Name = "metroContextMenu2"; this.metroContextMenu2.Size = new System.Drawing.Size(137, 92); // // 打开文件ToolStripMenuItem // this.打开文件ToolStripMenuItem.Name = "打开文件ToolStripMenuItem"; this.打开文件ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); this.打开文件ToolStripMenuItem.Text = "打开文件"; this.打开文件ToolStripMenuItem.Click += new System.EventHandler(this.打开文件ToolStripMenuItem_Click); // // 打开文件夹ToolStripMenuItem // this.打开文件夹ToolStripMenuItem.Name = "打开文件夹ToolStripMenuItem"; this.打开文件夹ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); this.打开文件夹ToolStripMenuItem.Text = "打开文件夹"; this.打开文件夹ToolStripMenuItem.Click += new System.EventHandler(this.打开文件夹ToolStripMenuItem_Click); // // 删除当前项ToolStripMenuItem // this.删除当前项ToolStripMenuItem.Name = "删除当前项ToolStripMenuItem"; this.删除当前项ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); this.删除当前项ToolStripMenuItem.Text = "删除当前项"; this.删除当前项ToolStripMenuItem.Click += new System.EventHandler(this.删除当前项ToolStripMenuItem_Click); // // 清空列表ToolStripMenuItem // this.清空列表ToolStripMenuItem.Name = "清空列表ToolStripMenuItem"; this.清空列表ToolStripMenuItem.Size = new System.Drawing.Size(136, 22); this.清空列表ToolStripMenuItem.Text = "清空列表"; this.清空列表ToolStripMenuItem.Click += new System.EventHandler(this.清空列表ToolStripMenuItem_Click); // // Btnplay // this.Btnplay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.Btnplay.BackColor = System.Drawing.Color.Transparent; this.Btnplay.Cursor = System.Windows.Forms.Cursors.Hand; this.Btnplay.DM_Color = System.Drawing.Color.White; this.Btnplay.DM_Font_Size = 14F; this.Btnplay.DM_Key = DMSkin.Controls.DMLabelKey.播放; this.Btnplay.DM_Text = ""; this.Btnplay.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Btnplay.Location = new System.Drawing.Point(120, 44); this.Btnplay.Name = "Btnplay"; this.Btnplay.Size = new System.Drawing.Size(21, 19); this.Btnplay.TabIndex = 29; this.Btnplay.Text = "dmLabel1"; this.Btnplay.Click += new System.EventHandler(this.Btnplay_Click); this.Btnplay.MouseEnter += new System.EventHandler(this.btns_MouseEnter); this.Btnplay.MouseHover += new System.EventHandler(this.btns_MouseLeave); // // listShowOrHide // this.listShowOrHide.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.listShowOrHide.BackColor = System.Drawing.Color.Transparent; this.listShowOrHide.Cursor = System.Windows.Forms.Cursors.Hand; this.listShowOrHide.DM_Color = System.Drawing.Color.White; this.listShowOrHide.DM_Font_Size = 13F; this.listShowOrHide.DM_Key = DMSkin.Controls.DMLabelKey.菜单; this.listShowOrHide.DM_Text = ""; this.listShowOrHide.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.listShowOrHide.Location = new System.Drawing.Point(626, 44); this.listShowOrHide.Name = "listShowOrHide"; this.listShowOrHide.Size = new System.Drawing.Size(17, 18); this.listShowOrHide.TabIndex = 29; this.listShowOrHide.Text = "dmLabel1"; this.listShowOrHide.Click += new System.EventHandler(this.ListShowOrHide_Click); this.listShowOrHide.MouseEnter += new System.EventHandler(this.btns_MouseEnter); this.listShowOrHide.MouseLeave += new System.EventHandler(this.btns_MouseLeave); // // openFile // this.openFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.openFile.BackColor = System.Drawing.Color.Transparent; this.openFile.Cursor = System.Windows.Forms.Cursors.Hand; this.openFile.DM_Color = System.Drawing.Color.White; this.openFile.DM_Font_Size = 14F; this.openFile.DM_Key = DMSkin.Controls.DMLabelKey.打开; this.openFile.DM_Text = ""; this.openFile.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.openFile.ForeColor = System.Drawing.Color.White; this.openFile.Location = new System.Drawing.Point(23, 43); this.openFile.Name = "openFile"; this.openFile.Size = new System.Drawing.Size(23, 20); this.openFile.TabIndex = 29; this.openFile.Text = "dmLabel1"; this.openFile.Click += new System.EventHandler(this.OpenFile_Click); this.openFile.MouseEnter += new System.EventHandler(this.btns_MouseEnter); this.openFile.MouseLeave += new System.EventHandler(this.btns_MouseLeave); // // dmLabel4 // this.dmLabel4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.dmLabel4.BackColor = System.Drawing.Color.Transparent; this.dmLabel4.Cursor = System.Windows.Forms.Cursors.Hand; this.dmLabel4.DM_Color = System.Drawing.Color.White; this.dmLabel4.DM_Font_Size = 13F; this.dmLabel4.DM_Key = DMSkin.Controls.DMLabelKey.停止; this.dmLabel4.DM_Text = ""; this.dmLabel4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dmLabel4.Location = new System.Drawing.Point(88, 44); this.dmLabel4.Name = "dmLabel4"; this.dmLabel4.Size = new System.Drawing.Size(18, 19); this.dmLabel4.TabIndex = 29; this.dmLabel4.Text = "dmLabel1"; this.dmLabel4.Click += new System.EventHandler(this.dmLabel4_Click); this.dmLabel4.MouseEnter += new System.EventHandler(this.btns_MouseEnter); this.dmLabel4.MouseLeave += new System.EventHandler(this.btns_MouseLeave); // // volLbl // this.volLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.volLbl.BackColor = System.Drawing.Color.Transparent; this.volLbl.DM_Color = System.Drawing.Color.White; this.volLbl.DM_Font_Size = 15F; this.volLbl.DM_Key = DMSkin.Controls.DMLabelKey.音量_小; this.volLbl.DM_Text = ""; this.volLbl.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.volLbl.Location = new System.Drawing.Point(473, 42); this.volLbl.Name = "volLbl"; this.volLbl.Size = new System.Drawing.Size(27, 21); this.volLbl.TabIndex = 29; this.volLbl.Text = "dmLabel1"; // // dmVolumeProgress // this.dmVolumeProgress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.dmVolumeProgress.BackColor = System.Drawing.Color.LightCoral; this.dmVolumeProgress.DM_BackColor = System.Drawing.Color.Silver; this.dmVolumeProgress.DM_BlockColor = System.Drawing.Color.White; this.dmVolumeProgress.DM_BufferColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); this.dmVolumeProgress.DM_BufferValue = 0D; this.dmVolumeProgress.DM_DrawRound = true; this.dmVolumeProgress.DM_RoundColor = System.Drawing.Color.White; this.dmVolumeProgress.DM_RoundSize = 10; this.dmVolumeProgress.DM_RoundX = 2; this.dmVolumeProgress.DM_RoundY = 6; this.dmVolumeProgress.DM_Value = 0D; this.dmVolumeProgress.Location = new System.Drawing.Point(500, 40); this.dmVolumeProgress.Name = "dmVolumeProgress"; this.dmVolumeProgress.Size = new System.Drawing.Size(80, 23); this.dmVolumeProgress.TabIndex = 30; this.dmVolumeProgress.Text = "dmProgressBar1"; this.dmVolumeProgress.Click += new System.EventHandler(this.dmVolumeProgress_Click); this.dmVolumeProgress.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dmVolumeProgress_MouseDown); this.dmVolumeProgress.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dmVolumeProgress_MouseMove); this.dmVolumeProgress.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dmVolumeProgress_MouseUp); // // mirrorBtn // this.mirrorBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.mirrorBtn.BackColor = System.Drawing.Color.Transparent; this.mirrorBtn.Cursor = System.Windows.Forms.Cursors.Hand; this.mirrorBtn.DM_Color = System.Drawing.Color.White; this.mirrorBtn.DM_Font_Size = 13F; this.mirrorBtn.DM_Key = DMSkin.Controls.DMLabelKey.拉伸_放大; this.mirrorBtn.DM_Text = ""; this.mirrorBtn.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.mirrorBtn.Location = new System.Drawing.Point(652, 43); this.mirrorBtn.Name = "mirrorBtn"; this.mirrorBtn.Size = new System.Drawing.Size(19, 19); this.mirrorBtn.TabIndex = 29; this.mirrorBtn.Text = "fullBtn"; this.mirrorBtn.Click += new System.EventHandler(this.fullBtn_Click); this.mirrorBtn.MouseEnter += new System.EventHandler(this.btns_MouseEnter); this.mirrorBtn.MouseLeave += new System.EventHandler(this.btns_MouseLeave); // // dmProgressBar // this.dmProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dmProgressBar.BackColor = System.Drawing.Color.LightCoral; this.dmProgressBar.Cursor = System.Windows.Forms.Cursors.Hand; this.dmProgressBar.DM_BackColor = System.Drawing.Color.Gainsboro; this.dmProgressBar.DM_BlockColor = System.Drawing.Color.LightPink; this.dmProgressBar.DM_BufferColor = System.Drawing.Color.Empty; this.dmProgressBar.DM_BufferValue = 0D; this.dmProgressBar.DM_DrawRound = true; this.dmProgressBar.DM_RoundColor = System.Drawing.Color.WhiteSmoke; this.dmProgressBar.DM_RoundSize = 10; this.dmProgressBar.DM_RoundX = 6; this.dmProgressBar.DM_RoundY = 8; this.dmProgressBar.DM_Value = 0D; this.dmProgressBar.ForeColor = System.Drawing.SystemColors.MenuHighlight; this.dmProgressBar.Location = new System.Drawing.Point(8, 6); this.dmProgressBar.Margin = new System.Windows.Forms.Padding(0); this.dmProgressBar.Name = "dmProgressBar"; this.dmProgressBar.Size = new System.Drawing.Size(670, 26); this.dmProgressBar.TabIndex = 28; this.dmProgressBar.Text = "dmProgressBar1"; this.dmProgressBar.SizeChanged += new System.EventHandler(this.dmProgressBar_SizeChanged); this.dmProgressBar.Click += new System.EventHandler(this.dmProgressBar_Click); this.dmProgressBar.Paint += new System.Windows.Forms.PaintEventHandler(this.dmProgressBar_Paint); this.dmProgressBar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dmProgressBar_MouseDown); this.dmProgressBar.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dmProgressBar_MouseMove); this.dmProgressBar.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dmProgressBar_MouseUp); // // metroContextMenu1 // this.metroContextMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.你好啊ToolStripMenuItem, this.截取ToolStripMenuItem, this.截取ToolStripMenuItem1, this.播放列表ToolStripMenuItem, this.设置ToolStripMenuItem}); this.metroContextMenu1.Name = "metroContextMenu1"; this.metroContextMenu1.Size = new System.Drawing.Size(144, 114); // // 你好啊ToolStripMenuItem // this.你好啊ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.打开文件ToolStripMenuItem1, this.打开文件夹ToolStripMenuItem1}); this.你好啊ToolStripMenuItem.Name = "你好啊ToolStripMenuItem"; this.你好啊ToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.你好啊ToolStripMenuItem.Text = "文件"; // // 打开文件ToolStripMenuItem1 // this.打开文件ToolStripMenuItem1.Name = "打开文件ToolStripMenuItem1"; this.打开文件ToolStripMenuItem1.Size = new System.Drawing.Size(185, 22); this.打开文件ToolStripMenuItem1.Text = "打开文件 (O)"; this.打开文件ToolStripMenuItem1.Click += new System.EventHandler(this.打开文件ToolStripMenuItem_Click); // // 打开文件夹ToolStripMenuItem1 // this.打开文件夹ToolStripMenuItem1.Name = "打开文件夹ToolStripMenuItem1"; this.打开文件夹ToolStripMenuItem1.Size = new System.Drawing.Size(185, 22); this.打开文件夹ToolStripMenuItem1.Text = "打开文件夹 (ctrl+O)"; this.打开文件夹ToolStripMenuItem1.Click += new System.EventHandler(this.打开文件夹ToolStripMenuItem_Click); // // 截取ToolStripMenuItem // this.截取ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.播放暂停enterToolStripMenuItem, this.音量ToolStripMenuItem, this.aB循环ToolStripMenuItem, this.播放速度ToolStripMenuItem, this.进度ToolStripMenuItem}); this.截取ToolStripMenuItem.Name = "截取ToolStripMenuItem"; this.截取ToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.截取ToolStripMenuItem.Text = "播放"; // // 播放暂停enterToolStripMenuItem // this.播放暂停enterToolStripMenuItem.Name = "播放暂停enterToolStripMenuItem"; this.播放暂停enterToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.播放暂停enterToolStripMenuItem.Text = "播放/暂停 (enter)"; this.播放暂停enterToolStripMenuItem.Click += new System.EventHandler(this.Btnplay_Click); // // 音量ToolStripMenuItem // this.音量ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.音量ToolStripMenuItem1, this.音量ToolStripMenuItem2}); this.音量ToolStripMenuItem.Name = "音量ToolStripMenuItem"; this.音量ToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.音量ToolStripMenuItem.Text = "音量"; // // 音量ToolStripMenuItem1 // this.音量ToolStripMenuItem1.Name = "音量ToolStripMenuItem1"; this.音量ToolStripMenuItem1.Size = new System.Drawing.Size(127, 22); this.音量ToolStripMenuItem1.Text = "音量+ (↑)"; this.音量ToolStripMenuItem1.Click += new System.EventHandler(this.音量ToolStripMenuItem1_Click); // // 音量ToolStripMenuItem2 // this.音量ToolStripMenuItem2.Name = "音量ToolStripMenuItem2"; this.音量ToolStripMenuItem2.Size = new System.Drawing.Size(127, 22); this.音量ToolStripMenuItem2.Text = "音量- (↓)"; this.音量ToolStripMenuItem2.Click += new System.EventHandler(this.音量ToolStripMenuItem2_Click); // // aB循环ToolStripMenuItem // this.aB循环ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.设置A点ctrl1ToolStripMenuItem, this.设置B点ctrl2ToolStripMenuItem, this.取消循环ctrlcToolStripMenuItem}); this.aB循环ToolStripMenuItem.Name = "aB循环ToolStripMenuItem"; this.aB循环ToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.aB循环ToolStripMenuItem.Text = "AB循环"; // // 设置A点ctrl1ToolStripMenuItem // this.设置A点ctrl1ToolStripMenuItem.Name = "设置A点ctrl1ToolStripMenuItem"; this.设置A点ctrl1ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.设置A点ctrl1ToolStripMenuItem.Text = "设置A点(ctrl+1)"; this.设置A点ctrl1ToolStripMenuItem.Click += new System.EventHandler(this.设置A点ctrl1ToolStripMenuItem_Click); // // 设置B点ctrl2ToolStripMenuItem // this.设置B点ctrl2ToolStripMenuItem.Name = "设置B点ctrl2ToolStripMenuItem"; this.设置B点ctrl2ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.设置B点ctrl2ToolStripMenuItem.Text = "设置B点(ctrl+2)"; this.设置B点ctrl2ToolStripMenuItem.Click += new System.EventHandler(this.设置B点ctrl2ToolStripMenuItem_Click); // // 取消循环ctrlcToolStripMenuItem // this.取消循环ctrlcToolStripMenuItem.Name = "取消循环ctrlcToolStripMenuItem"; this.取消循环ctrlcToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.取消循环ctrlcToolStripMenuItem.Text = "取消循环(ctrl+3)"; this.取消循环ctrlcToolStripMenuItem.Click += new System.EventHandler(this.取消循环ctrlcToolStripMenuItem_Click); // // 播放速度ToolStripMenuItem // this.播放速度ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.常速ToolStripMenuItem, this.增加01ToolStripMenuItem, this.减少01ToolStripMenuItem, this.倍ToolStripMenuItem, this.倍ToolStripMenuItem1, this.倍ToolStripMenuItem2, this.倍ToolStripMenuItem3, this.倍ToolStripMenuItem4}); this.播放速度ToolStripMenuItem.Name = "播放速度ToolStripMenuItem"; this.播放速度ToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.播放速度ToolStripMenuItem.Text = "播放速度"; // // 常速ToolStripMenuItem // this.常速ToolStripMenuItem.Name = "常速ToolStripMenuItem"; this.常速ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); this.常速ToolStripMenuItem.Text = "常速 (R)"; this.常速ToolStripMenuItem.Click += new System.EventHandler(this.常速ToolStripMenuItem_Click); // // 增加01ToolStripMenuItem // this.增加01ToolStripMenuItem.Name = "增加01ToolStripMenuItem"; this.增加01ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); this.增加01ToolStripMenuItem.Text = "增加0.1 (ctrl +)"; this.增加01ToolStripMenuItem.Click += new System.EventHandler(this.增加01ToolStripMenuItem_Click); // // 减少01ToolStripMenuItem // this.减少01ToolStripMenuItem.Name = "减少01ToolStripMenuItem"; this.减少01ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); this.减少01ToolStripMenuItem.Text = "减少0.1 (ctrl -)"; this.减少01ToolStripMenuItem.Click += new System.EventHandler(this.减少01ToolStripMenuItem_Click); // // 倍ToolStripMenuItem // this.倍ToolStripMenuItem.Name = "倍ToolStripMenuItem"; this.倍ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); this.倍ToolStripMenuItem.Text = "0.1倍"; this.倍ToolStripMenuItem.Click += new System.EventHandler(this.倍ToolStripMenuItem_Click); // // 倍ToolStripMenuItem1 // this.倍ToolStripMenuItem1.Name = "倍ToolStripMenuItem1"; this.倍ToolStripMenuItem1.Size = new System.Drawing.Size(160, 22); this.倍ToolStripMenuItem1.Text = "0.5倍"; this.倍ToolStripMenuItem1.Click += new System.EventHandler(this.倍ToolStripMenuItem1_Click); // // 倍ToolStripMenuItem2 // this.倍ToolStripMenuItem2.Name = "倍ToolStripMenuItem2"; this.倍ToolStripMenuItem2.Size = new System.Drawing.Size(160, 22); this.倍ToolStripMenuItem2.Text = "1.5倍"; this.倍ToolStripMenuItem2.Click += new System.EventHandler(this.倍ToolStripMenuItem2_Click); // // 倍ToolStripMenuItem3 // this.倍ToolStripMenuItem3.Name = "倍ToolStripMenuItem3"; this.倍ToolStripMenuItem3.Size = new System.Drawing.Size(160, 22); this.倍ToolStripMenuItem3.Text = "2倍"; this.倍ToolStripMenuItem3.Click += new System.EventHandler(this.倍ToolStripMenuItem3_Click); // // 倍ToolStripMenuItem4 // this.倍ToolStripMenuItem4.Name = "倍ToolStripMenuItem4"; this.倍ToolStripMenuItem4.Size = new System.Drawing.Size(160, 22); this.倍ToolStripMenuItem4.Text = "3倍"; this.倍ToolStripMenuItem4.Click += new System.EventHandler(this.倍ToolStripMenuItem4_Click); // // 进度ToolStripMenuItem // this.进度ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.快进5秒ToolStripMenuItem, this.快退5秒ToolStripMenuItem}); this.进度ToolStripMenuItem.Name = "进度ToolStripMenuItem"; this.进度ToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.进度ToolStripMenuItem.Text = "进度"; // // 快进5秒ToolStripMenuItem // this.快进5秒ToolStripMenuItem.Name = "快进5秒ToolStripMenuItem"; this.快进5秒ToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.快进5秒ToolStripMenuItem.Text = "快进5秒 (→)"; this.快进5秒ToolStripMenuItem.Click += new System.EventHandler(this.快进5秒ToolStripMenuItem_Click); // // 快退5秒ToolStripMenuItem // this.快退5秒ToolStripMenuItem.Name = "快退5秒ToolStripMenuItem"; this.快退5秒ToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.快退5秒ToolStripMenuItem.Text = "快退5秒 (←)"; this.快退5秒ToolStripMenuItem.Click += new System.EventHandler(this.快退5秒ToolStripMenuItem_Click); // // 截取ToolStripMenuItem1 // this.截取ToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.截图altsToolStripMenuItem, this.连续截图altwToolStripMenuItem}); this.截取ToolStripMenuItem1.Name = "截取ToolStripMenuItem1"; this.截取ToolStripMenuItem1.Size = new System.Drawing.Size(143, 22); this.截取ToolStripMenuItem1.Text = "截取"; // // 截图altsToolStripMenuItem // this.截图altsToolStripMenuItem.Name = "截图altsToolStripMenuItem"; this.截图altsToolStripMenuItem.Size = new System.Drawing.Size(174, 22); this.截图altsToolStripMenuItem.Text = "截图(ctrl + A)"; this.截图altsToolStripMenuItem.Click += new System.EventHandler(this.截图altsToolStripMenuItem_Click); // // 连续截图altwToolStripMenuItem // this.连续截图altwToolStripMenuItem.Name = "连续截图altwToolStripMenuItem"; this.连续截图altwToolStripMenuItem.Size = new System.Drawing.Size(174, 22); this.连续截图altwToolStripMenuItem.Text = "连续截图(ctrl + S)"; this.连续截图altwToolStripMenuItem.Click += new System.EventHandler(this.连续截图altwToolStripMenuItem_Click); // // 播放列表ToolStripMenuItem // this.播放列表ToolStripMenuItem.Name = "播放列表ToolStripMenuItem"; this.播放列表ToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.播放列表ToolStripMenuItem.Text = "播放列表 (P)"; this.播放列表ToolStripMenuItem.Click += new System.EventHandler(this.ListShowOrHide_Click); // // 设置ToolStripMenuItem // this.设置ToolStripMenuItem.Name = "设置ToolStripMenuItem"; this.设置ToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.设置ToolStripMenuItem.Text = "设置 (S)"; this.设置ToolStripMenuItem.Click += new System.EventHandler(this.settingBtn_Click); // // menuPanel // this.menuPanel.BackColor = System.Drawing.Color.LightCoral; this.menuPanel.Controls.Add(this.mirrorPanel); this.menuPanel.Controls.Add(this.bLbl); this.menuPanel.Controls.Add(this.ALbl); this.menuPanel.Controls.Add(this.posLbl); this.menuPanel.Controls.Add(this.speed01); this.menuPanel.Controls.Add(this.speed02); this.menuPanel.Controls.Add(this.speed03); this.menuPanel.Controls.Add(this.speedLbl); this.menuPanel.Controls.Add(this.dmProgressBar); this.menuPanel.Controls.Add(this.listShowOrHide); this.menuPanel.Controls.Add(this.Btnplay); this.menuPanel.Controls.Add(this.volLbl); this.menuPanel.Controls.Add(this.dmLabel1); this.menuPanel.Controls.Add(this.mirrorBtn); this.menuPanel.Controls.Add(this.dmVolumeProgress); this.menuPanel.Controls.Add(this.dmLabel4); this.menuPanel.Controls.Add(this.openFile); this.menuPanel.Dock = System.Windows.Forms.DockStyle.Bottom; this.menuPanel.Location = new System.Drawing.Point(3, 373); this.menuPanel.Margin = new System.Windows.Forms.Padding(100); this.menuPanel.Name = "menuPanel"; this.menuPanel.Size = new System.Drawing.Size(684, 78); this.menuPanel.TabIndex = 35; this.menuPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.menuPanel_Paint); this.menuPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.canMove_Panel_MouseDown); this.menuPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.canMove_Panel_MouseMove); // // mirrorPanel // this.mirrorPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.mirrorPanel.BackColor = System.Drawing.Color.LightCoral; this.mirrorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.mirrorPanel.Controls.Add(this.mBtn3); this.mirrorPanel.Controls.Add(this.mBtn2); this.mirrorPanel.Controls.Add(this.mBtn1); this.mirrorPanel.ForeColor = System.Drawing.SystemColors.GradientActiveCaption; this.mirrorPanel.Location = new System.Drawing.Point(535, 33); this.mirrorPanel.Name = "mirrorPanel"; this.mirrorPanel.Size = new System.Drawing.Size(136, 32); this.mirrorPanel.TabIndex = 37; this.mirrorPanel.Visible = false; this.mirrorPanel.MouseLeave += new System.EventHandler(this.mirrorPanel_MouseLeave); // // mBtn3 // this.mBtn3.BackColor = System.Drawing.Color.PapayaWhip; this.mBtn3.ForeColor = System.Drawing.Color.DarkGray; this.mBtn3.Location = new System.Drawing.Point(89, 1); this.mBtn3.Name = "mBtn3"; this.mBtn3.Size = new System.Drawing.Size(43, 28); this.mBtn3.TabIndex = 1; this.mBtn3.Text = "镜面"; this.mBtn3.UseVisualStyleBackColor = false; this.mBtn3.Click += new System.EventHandler(this.mBtn3_Click); this.mBtn3.MouseEnter += new System.EventHandler(this.mBtn1_MouseEnter); // // mBtn2 // this.mBtn2.BackColor = System.Drawing.Color.PapayaWhip; this.mBtn2.ForeColor = System.Drawing.Color.MediumSeaGreen; this.mBtn2.Location = new System.Drawing.Point(47, 1); this.mBtn2.Name = "mBtn2"; this.mBtn2.Size = new System.Drawing.Size(40, 28); this.mBtn2.TabIndex = 1; this.mBtn2.Text = "正常"; this.mBtn2.UseVisualStyleBackColor = false; this.mBtn2.Click += new System.EventHandler(this.mBtn2_Click); this.mBtn2.MouseEnter += new System.EventHandler(this.mBtn1_MouseEnter); // // mBtn1 // this.mBtn1.BackColor = System.Drawing.Color.PapayaWhip; this.mBtn1.CausesValidation = false; this.mBtn1.ForeColor = System.Drawing.Color.DarkGray; this.mBtn1.Location = new System.Drawing.Point(2, 1); this.mBtn1.Name = "mBtn1"; this.mBtn1.Size = new System.Drawing.Size(43, 28); this.mBtn1.TabIndex = 0; this.mBtn1.Text = "分镜"; this.mBtn1.UseVisualStyleBackColor = false; this.mBtn1.Click += new System.EventHandler(this.mBtn1_Click); this.mBtn1.MouseEnter += new System.EventHandler(this.mBtn1_MouseEnter); // // bLbl // this.bLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.bLbl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.bLbl.ForeColor = System.Drawing.Color.FloralWhite; this.bLbl.Location = new System.Drawing.Point(658, 1); this.bLbl.Name = "bLbl"; this.bLbl.Size = new System.Drawing.Size(12, 12); this.bLbl.TabIndex = 34; this.bLbl.Text = "B"; this.bLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.bLbl.Visible = false; this.bLbl.Click += new System.EventHandler(this.label1_Click); // // ALbl // this.ALbl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.ALbl.ForeColor = System.Drawing.Color.BlanchedAlmond; this.ALbl.Location = new System.Drawing.Point(110, 1); this.ALbl.Name = "ALbl"; this.ALbl.Size = new System.Drawing.Size(12, 12); this.ALbl.TabIndex = 34; this.ALbl.Text = "A"; this.ALbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.ALbl.Visible = false; this.ALbl.Click += new System.EventHandler(this.label1_Click); // // posLbl // this.posLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.posLbl.AutoSize = true; this.posLbl.ForeColor = System.Drawing.Color.White; this.posLbl.Location = new System.Drawing.Point(177, 47); this.posLbl.Name = "posLbl"; this.posLbl.Size = new System.Drawing.Size(83, 12); this.posLbl.TabIndex = 32; this.posLbl.Text = "00:00 / 00:00"; // // speed01 // this.speed01.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.speed01.Cursor = System.Windows.Forms.Cursors.Hand; this.speed01.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.speed01.ForeColor = System.Drawing.Color.LightPink; this.speed01.Location = new System.Drawing.Point(312, 42); this.speed01.Name = "speed01"; this.speed01.Size = new System.Drawing.Size(28, 21); this.speed01.TabIndex = 31; this.speed01.Text = "0.1"; this.speed01.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.speed01.Visible = false; this.speed01.Click += new System.EventHandler(this.倍ToolStripMenuItem_Click); this.speed01.MouseEnter += new System.EventHandler(this.speedLbl_MouseEnter); // // speed02 // this.speed02.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.speed02.Cursor = System.Windows.Forms.Cursors.Hand; this.speed02.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.speed02.ForeColor = System.Drawing.Color.LightPink; this.speed02.Location = new System.Drawing.Point(349, 42); this.speed02.Name = "speed02"; this.speed02.Size = new System.Drawing.Size(30, 21); this.speed02.TabIndex = 31; this.speed02.Text = "0.2"; this.speed02.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.speed02.Visible = false; this.speed02.Click += new System.EventHandler(this.倍ToolStripMenuItem02_Click); this.speed02.MouseEnter += new System.EventHandler(this.speedLbl_MouseEnter); // // speed03 // this.speed03.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.speed03.Cursor = System.Windows.Forms.Cursors.Hand; this.speed03.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.speed03.ForeColor = System.Drawing.Color.LightPink; this.speed03.Location = new System.Drawing.Point(388, 41); this.speed03.Name = "speed03"; this.speed03.Size = new System.Drawing.Size(29, 22); this.speed03.TabIndex = 31; this.speed03.Text = "0.5"; this.speed03.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.speed03.Visible = false; this.speed03.Click += new System.EventHandler(this.倍ToolStripMenuItem1_Click); this.speed03.MouseEnter += new System.EventHandler(this.speedLbl_MouseEnter); // // speedLbl // this.speedLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.speedLbl.Cursor = System.Windows.Forms.Cursors.Hand; this.speedLbl.Font = new System.Drawing.Font("宋体", 9F); this.speedLbl.ForeColor = System.Drawing.Color.White; this.speedLbl.Location = new System.Drawing.Point(421, 39); this.speedLbl.Name = "speedLbl"; this.speedLbl.Size = new System.Drawing.Size(50, 27); this.speedLbl.TabIndex = 31; this.speedLbl.Text = "常速"; this.speedLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.speedLbl.Click += new System.EventHandler(this.speedLbl_Click); this.speedLbl.MouseEnter += new System.EventHandler(this.speedLbl_MouseEnter); // // dmLabel1 // this.dmLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.dmLabel1.BackColor = System.Drawing.Color.Transparent; this.dmLabel1.Cursor = System.Windows.Forms.Cursors.Hand; this.dmLabel1.DM_Color = System.Drawing.Color.White; this.dmLabel1.DM_Font_Size = 13F; this.dmLabel1.DM_Key = DMSkin.Controls.DMLabelKey.刷新; this.dmLabel1.DM_Text = ""; this.dmLabel1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dmLabel1.Location = new System.Drawing.Point(594, 43); this.dmLabel1.Name = "dmLabel1"; this.dmLabel1.Size = new System.Drawing.Size(19, 19); this.dmLabel1.TabIndex = 29; this.dmLabel1.Text = "fullBtn"; this.dmLabel1.Click += new System.EventHandler(this.mirrorBtn_Click); this.dmLabel1.MouseEnter += new System.EventHandler(this.btns_MouseEnter); this.dmLabel1.MouseLeave += new System.EventHandler(this.btns_MouseLeave); // // topPanel // this.topPanel.BackColor = System.Drawing.Color.LightCoral; this.topPanel.Controls.Add(this.titleLbl); this.topPanel.Controls.Add(this.settingBtn); this.topPanel.Controls.Add(this.minBtn); this.topPanel.Controls.Add(this.CloseBtn); this.topPanel.Dock = System.Windows.Forms.DockStyle.Top; this.topPanel.Location = new System.Drawing.Point(3, 3); this.topPanel.Name = "topPanel"; this.topPanel.Size = new System.Drawing.Size(684, 38); this.topPanel.TabIndex = 36; this.topPanel.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.topPanel_MouseDoubleClick); this.topPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.canMove_Panel_MouseDown); this.topPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.canMove_Panel_MouseMove); // // titleLbl // this.titleLbl.AutoSize = true; this.titleLbl.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.titleLbl.ForeColor = System.Drawing.Color.White; this.titleLbl.Location = new System.Drawing.Point(10, 6); this.titleLbl.Name = "titleLbl"; this.titleLbl.Size = new System.Drawing.Size(58, 22); this.titleLbl.TabIndex = 33; this.titleLbl.Text = "吾爱舞"; // // settingBtn // this.settingBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.settingBtn.BackColor = System.Drawing.Color.Transparent; this.settingBtn.Cursor = System.Windows.Forms.Cursors.Hand; this.settingBtn.DM_Color = System.Drawing.Color.White; this.settingBtn.DM_Font_Size = 13F; this.settingBtn.DM_Key = DMSkin.Controls.DMLabelKey.设置; this.settingBtn.DM_Text = ""; this.settingBtn.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.settingBtn.Location = new System.Drawing.Point(591, 7); this.settingBtn.Name = "settingBtn"; this.settingBtn.Size = new System.Drawing.Size(19, 19); this.settingBtn.TabIndex = 32; this.settingBtn.Text = "settingBtn"; this.settingBtn.Click += new System.EventHandler(this.settingBtn_Click); // // minBtn // this.minBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.minBtn.BackColor = System.Drawing.Color.Transparent; this.minBtn.Location = new System.Drawing.Point(616, -1); this.minBtn.Name = "minBtn"; this.minBtn.Size = new System.Drawing.Size(30, 27); this.minBtn.TabIndex = 31; this.minBtn.Click += new System.EventHandler(this.minBtn_Click); // // CloseBtn // this.CloseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.CloseBtn.BackColor = System.Drawing.Color.Transparent; this.CloseBtn.Location = new System.Drawing.Point(652, -1); this.CloseBtn.MaximumSize = new System.Drawing.Size(30, 27); this.CloseBtn.MinimumSize = new System.Drawing.Size(30, 27); this.CloseBtn.Name = "CloseBtn"; this.CloseBtn.Size = new System.Drawing.Size(30, 27); this.CloseBtn.TabIndex = 30; this.CloseBtn.Click += new System.EventHandler(this.CloseBtn_Click); // // panel2 // this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panel2.Controls.Add(this.playerPanel); this.panel2.Controls.Add(this.rightPanel); this.panel2.Location = new System.Drawing.Point(3, 41); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(684, 332); this.panel2.TabIndex = 37; // // playerPanel // this.playerPanel.Controls.Add(this.masterPanel); this.playerPanel.Controls.Add(this.vicePanel); this.playerPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.playerPanel.Location = new System.Drawing.Point(0, 0); this.playerPanel.Name = "playerPanel"; this.playerPanel.Size = new System.Drawing.Size(484, 332); this.playerPanel.TabIndex = 1; this.playerPanel.Resize += new System.EventHandler(this.playerPanel_Resize); // // masterPanel // this.masterPanel.Controls.Add(this.player); this.masterPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.masterPanel.Location = new System.Drawing.Point(0, 0); this.masterPanel.Name = "masterPanel"; this.masterPanel.Size = new System.Drawing.Size(242, 332); this.masterPanel.TabIndex = 1; // // player // this.player.Dock = System.Windows.Forms.DockStyle.Fill; this.player.Enabled = true; this.player.Location = new System.Drawing.Point(0, 0); this.player.Name = "player"; this.player.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("player.OcxState"))); this.player.Size = new System.Drawing.Size(242, 332); this.player.TabIndex = 0; this.player.OnMessage += new AxAPlayer3Lib._IPlayerEvents_OnMessageEventHandler(this.player_OnMessage); this.player.OnEvent += new AxAPlayer3Lib._IPlayerEvents_OnEventEventHandler(this.player_OnEvent); this.player.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.player_PreviewKeyDown); // // vicePanel // this.vicePanel.Controls.Add(this.vicePlayer); this.vicePanel.Dock = System.Windows.Forms.DockStyle.Right; this.vicePanel.Location = new System.Drawing.Point(242, 0); this.vicePanel.Name = "vicePanel"; this.vicePanel.Size = new System.Drawing.Size(242, 332); this.vicePanel.TabIndex = 0; // // vicePlayer // this.vicePlayer.Dock = System.Windows.Forms.DockStyle.Fill; this.vicePlayer.Enabled = true; this.vicePlayer.Location = new System.Drawing.Point(0, 0); this.vicePlayer.Name = "vicePlayer"; this.vicePlayer.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("vicePlayer.OcxState"))); this.vicePlayer.Size = new System.Drawing.Size(242, 332); this.vicePlayer.TabIndex = 0; this.vicePlayer.OnMessage += new AxAPlayer3Lib._IPlayerEvents_OnMessageEventHandler(this.vicePlayer_OnMessage); this.vicePlayer.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.player_PreviewKeyDown); // // rightPanel // this.rightPanel.BackColor = System.Drawing.Color.PapayaWhip; this.rightPanel.Controls.Add(this.listTitleLbl); this.rightPanel.Controls.Add(this.playListGrid); this.rightPanel.Dock = System.Windows.Forms.DockStyle.Right; this.rightPanel.Location = new System.Drawing.Point(484, 0); this.rightPanel.Name = "rightPanel"; this.rightPanel.Size = new System.Drawing.Size(200, 332); this.rightPanel.TabIndex = 0; // // listTitleLbl // this.listTitleLbl.AutoSize = true; this.listTitleLbl.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.listTitleLbl.Location = new System.Drawing.Point(7, 9); this.listTitleLbl.Name = "listTitleLbl"; this.listTitleLbl.Size = new System.Drawing.Size(63, 14); this.listTitleLbl.TabIndex = 1; this.listTitleLbl.Text = "视频列表"; // // playListGrid // this.playListGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.playListGrid.ArrowColor = System.Drawing.Color.Empty; this.playListGrid.BackColor = System.Drawing.SystemColors.HighlightText; this.playListGrid.ForeColor = System.Drawing.SystemColors.Control; this.playListGrid.ItemColor = System.Drawing.Color.CornflowerBlue; this.playListGrid.ItemMouseOnColor = System.Drawing.Color.Empty; item1.Bounds = new System.Drawing.Rectangle(0, 0, 20, 20); item1.Font = new System.Drawing.Font("微软雅黑", 9F); item1.ForeColor = System.Drawing.Color.Black; item1.Height = 20; item1.Image = null; item1.Index = null; item1.MouseBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); item1.OnLine = false; item1.OwnerChatListBox = this.playListGrid; item1.Text = "你好啊你好啊动力科技反垃圾"; item1.Url = null; item1.Width = 20; this.playListGrid.Items.AddRange(new DMSkin.Controls.DMControlItem[] { item1}); this.playListGrid.Location = new System.Drawing.Point(1, 32); this.playListGrid.Name = "playListGrid"; this.playListGrid.ScrollArrowBackColor = System.Drawing.Color.Transparent; this.playListGrid.ScrollArrowColor = System.Drawing.Color.Silver; this.playListGrid.ScrollBackColor = System.Drawing.Color.DarkSlateGray; this.playListGrid.ScrollSliderDefaultColor = System.Drawing.Color.DimGray; this.playListGrid.ScrollSliderDownColor = System.Drawing.SystemColors.WindowFrame; this.playListGrid.SelectItem = null; this.playListGrid.Size = new System.Drawing.Size(197, 303); this.playListGrid.SubItemColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.playListGrid.SubItemMouseOnColor = System.Drawing.Color.Maroon; this.playListGrid.SubItemSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.playListGrid.TabIndex = 0; this.playListGrid.Text = "dmControl1"; this.playListGrid.ItemClick += new System.EventHandler(this.playListGrid_ItemClick); this.playListGrid.rightItemClick += new System.EventHandler(this.playListGrid_rightItemClick); this.playListGrid.Click += new System.EventHandler(this.playListGrid_Click); this.playListGrid.MouseClick += new System.Windows.Forms.MouseEventHandler(this.playListGrid_MouseClick); // // PlayerForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.LightCoral; this.CanResize = true; this.ClientSize = new System.Drawing.Size(690, 454); this.Controls.Add(this.panel2); this.Controls.Add(this.topPanel); this.Controls.Add(this.menuPanel); this.ForeColor = System.Drawing.SystemColors.ButtonShadow; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.ImeMode = System.Windows.Forms.ImeMode.Disable; this.MinimumSize = new System.Drawing.Size(600, 400); this.Name = "PlayerForm"; this.Opacity = 0.2D; this.Padding = new System.Windows.Forms.Padding(3); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PlayerForm_FormClosing); this.Load += new System.EventHandler(this.Form1_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PlayerForm_KeyDown); this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.PlayerForm_KeyPress); this.metroContextMenu2.ResumeLayout(false); this.metroContextMenu1.ResumeLayout(false); this.menuPanel.ResumeLayout(false); this.menuPanel.PerformLayout(); this.mirrorPanel.ResumeLayout(false); this.topPanel.ResumeLayout(false); this.topPanel.PerformLayout(); this.panel2.ResumeLayout(false); this.playerPanel.ResumeLayout(false); this.masterPanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.player)).EndInit(); this.vicePanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.vicePlayer)).EndInit(); this.rightPanel.ResumeLayout(false); this.rightPanel.PerformLayout(); this.ResumeLayout(false); } #endregion private DMSkin.Controls.DMLabel Btnplay; private DMSkin.Controls.DMLabel listShowOrHide; private DMSkin.Controls.DMLabel openFile; private DMSkin.Controls.DMLabel dmLabel4; private DMSkin.Controls.DMLabel volLbl; private DMSkin.Controls.DMProgressBar dmVolumeProgress; private DMSkin.Controls.DMLabel mirrorBtn; private DMSkin.Controls.DMProgressBar dmProgressBar; private DMSkin.Metro.Controls.MetroContextMenu metroContextMenu1; private System.Windows.Forms.ToolStripMenuItem 你好啊ToolStripMenuItem; private System.Windows.Forms.Panel menuPanel; private System.Windows.Forms.Panel topPanel; private DMSkin.Controls.DMLabel settingBtn; private DMSkin.Controls.DMButtonMinLight minBtn; private DMSkin.Controls.DMButtonCloseLight CloseBtn; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel rightPanel; private DMPlay.DMControl playListGrid; private System.Windows.Forms.Label listTitleLbl; private DMSkin.Metro.Controls.MetroContextMenu metroContextMenu2; private System.Windows.Forms.ToolStripMenuItem 打开文件ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 打开文件夹ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 删除当前项ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 清空列表ToolStripMenuItem; private System.Windows.Forms.Label speedLbl; private DMSkin.Controls.DMLabel dmLabel1; private System.Windows.Forms.ToolStripMenuItem 截取ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 截取ToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem 设置ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 打开文件ToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem 打开文件夹ToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem 截图altsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 连续截图altwToolStripMenuItem; private System.Windows.Forms.Label posLbl; private System.Windows.Forms.Label ALbl; private System.Windows.Forms.Label bLbl; private System.Windows.Forms.ToolStripMenuItem aB循环ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 设置A点ctrl1ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 设置B点ctrl2ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 取消循环ctrlcToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 播放暂停enterToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 音量ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 音量ToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem 播放速度ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 音量ToolStripMenuItem2; private System.Windows.Forms.ToolStripMenuItem 进度ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 快进5秒ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 快退5秒ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 播放列表ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 常速ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 增加01ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 减少01ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 倍ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 倍ToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem 倍ToolStripMenuItem2; private System.Windows.Forms.ToolStripMenuItem 倍ToolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem 倍ToolStripMenuItem4; private System.Windows.Forms.Panel playerPanel; // private AxAPlayer3Lib.AxPlayer player; private System.Windows.Forms.Label titleLbl; private System.Windows.Forms.Panel vicePanel; private System.Windows.Forms.Panel masterPanel; private AxAPlayer3Lib.AxPlayer player; private AxAPlayer3Lib.AxPlayer vicePlayer; private System.Windows.Forms.Panel mirrorPanel; private System.Windows.Forms.Button mBtn1; private System.Windows.Forms.Button mBtn3; private System.Windows.Forms.Button mBtn2; private System.Windows.Forms.Label speed03; private System.Windows.Forms.Label speed01; private System.Windows.Forms.Label speed02; } }
@test iscyclic(permcycs((1,2,3))) @test iscyclic(permcycs((42,100,3))) @test !iscyclic(permcycs((1,2), (3,4)))
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; namespace DNK.PriceListImport.MetroClubLoader { public class DateRange { private DateTime? _start; private DateTime? _end; public DateTime? Start { get { return _start; } } public DateTime? End { get { return _end; } } public DateRange() { _start = null; _end = null; } public DateRange(DateTime start, DateTime end) : this() { _start = start; _end = end; } public DateRange(string source) : this() { DateRange dateRange = GetDatesFromRange(source); if (dateRange != null) { _start = dateRange.Start; _end = dateRange.End; } } public static DateRange GetDatesFromRange(string source) { string[] strArray = source.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries); for (int j = 0; j < strArray.Length; j++) { strArray[j] = strArray[j].Trim(); } if (strArray.Length == 2) { DateTime now = DateTime.Now; DateTime result = DateTime.Now; if (DateTime.TryParseExact(strArray[0], "dd.MM.yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out now) && DateTime.TryParseExact(strArray[1], "dd.MM.yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result)) { return new DateRange(now, result); } } return null; } } }
// -------------------------------------------------------------------- // © Copyright 2013 Hewlett-Packard Development Company, L.P. //-------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using ICSharpCode.Core; namespace UserDefinedToolbarAddin { public class SearchPathDoozer : IDoozer { public bool HandleConditions { get { return false; } } public object BuildItem(BuildItemArgs args) { Codon codon = args.Codon; return new SearchPathDescriptor(codon.Properties["path"], codon.Properties["category"]); } } }
@extends('layouts.main') @section('title') {{lang('Add New Language')}} @stop @section('content') <div class="row"> <div class="col-sm-4 col-sm-offset-4"> {!! Form::open(['url' => 'admin/language/']) !!} <strong>{{lang('Name')}}</strong> <input type="text" class="form-control" name="name" value="{{\Request::old('name')}}"/> <hr/> <h4 align="center">{{lang('Translations')}}</h4> @foreach(\App\Models\Language::find(option('language'))->translations()->where('post_id', 0)->where('page_id',0)->where('category_id',0)->where('menu_item_id',0)->get() as $tr) <strong>{{$tr->key}}</strong> <input class="form-control tr" type="text" name="translations[{{$tr->key}}]" value="{{\Request::old('translations.'.$tr->нещ)?\Request::old('translations.'.$tr->key):$tr->value}}"/> @endforeach <br/> <button type="submit" class="btn btn-success"><i class="fa fa-save"></i> {{lang('Update')}}</button> {!! Form::close() !!} </div> </div> @stop
/* * Copyright 2008-2011 Don Brown * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.twdata.maven.mojoexecutor; import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.BuildPluginManager; import org.apache.maven.plugin.InvalidPluginDescriptorException; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.PluginConfigurationException; import org.apache.maven.plugin.PluginDescriptorParsingException; import org.apache.maven.plugin.PluginManagerException; import org.apache.maven.plugin.PluginNotFoundException; import org.apache.maven.plugin.PluginResolutionException; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.Xpp3DomUtils; import static org.twdata.maven.mojoexecutor.PlexusConfigurationUtils.toXpp3Dom; /** * Executes an arbitrary mojo using a fluent interface. This is meant to be executed within the * context of a Maven 2 mojo. * <p/> * Here is an execution that invokes the dependency plugin: * <pre> * executeMojo( * plugin( * groupId("org.apache.maven.plugins"), * artifactId("maven-dependency-plugin"), * version("2.0") * ), * goal("copy-dependencies"), * configuration( * element( * name("outputDirectory"), "${project.build.directory}/foo") * ), * executionEnvironment( * project, * session, * pluginManager * ) * ); * </pre> */ public class MojoExecutor { /** * Entry point for executing a mojo * * @param plugin The plugin to execute * @param goal The goal to execute * @param configuration The execution configuration * @param env The execution environment * @throws MojoExecutionException If there are any exceptions locating or executing the mojo */ public static void executeMojo(Plugin plugin, String goal, Xpp3Dom configuration, ExecutionEnvironment env) throws MojoExecutionException { if (configuration == null) { throw new NullPointerException("configuration may not be null"); } try { String executionId = null; if (goal != null && goal.length() > 0 && goal.indexOf('#') > -1) { int pos = goal.indexOf('#'); executionId = goal.substring(pos + 1); goal = goal.substring(0, pos); } MavenSession session = env.getMavenSession(); PluginDescriptor pluginDescriptor = env.getPluginManager().loadPlugin( plugin, env.getMavenProject().getRemotePluginRepositories(), session.getRepositorySession()); MojoDescriptor mojoDescriptor = pluginDescriptor.getMojo(goal); if (mojoDescriptor == null) { throw new MojoExecutionException("Could not find goal '" + goal + "' in plugin " + plugin.getGroupId() + ":" + plugin.getArtifactId() + ":" + plugin.getVersion()); } MojoExecution exec = mojoExecution(mojoDescriptor, executionId, configuration); env.getPluginManager().executeMojo(session, exec); } catch (PluginNotFoundException | PluginResolutionException | PluginDescriptorParsingException | InvalidPluginDescriptorException | MojoExecutionException | MojoFailureException | PluginConfigurationException | PluginManagerException e) { throw new MojoExecutionException("Unable to execute mojo", e); } } private static MojoExecution mojoExecution(MojoDescriptor mojoDescriptor, String executionId, Xpp3Dom configuration) { if (executionId != null) { return new MojoExecution(mojoDescriptor, executionId); } else { configuration = Xpp3DomUtils.mergeXpp3Dom(configuration, toXpp3Dom(mojoDescriptor.getMojoConfiguration())); return new MojoExecution(mojoDescriptor, configuration); } } /** * Constructs the {@link ExecutionEnvironment} instance fluently * * @param mavenProject The current Maven project * @param mavenSession The current Maven session * @param pluginManager The Build plugin manager * @return The execution environment * @throws NullPointerException if mavenProject, mavenSession or pluginManager are null */ public static ExecutionEnvironment executionEnvironment(MavenProject mavenProject, MavenSession mavenSession, BuildPluginManager pluginManager) { return new ExecutionEnvironment(mavenProject, mavenSession, pluginManager); } /** * Builds the configuration for the goal using Elements * * @param elements A list of elements for the configuration section * @return The elements transformed into the Maven-native XML format */ public static Xpp3Dom configuration(Element... elements) { Xpp3Dom dom = new Xpp3Dom("configuration"); for (Element e : elements) { dom.addChild(e.toDom()); } return dom; } /** * Defines the plugin without its version * * @param groupId The group id * @param artifactId The artifact id * @return The plugin instance */ public static Plugin plugin(String groupId, String artifactId) { return plugin(groupId, artifactId, null); } /** * Defines a plugin * * @param groupId The group id * @param artifactId The artifact id * @param version The plugin version * @return The plugin instance */ public static Plugin plugin(String groupId, String artifactId, String version) { Plugin plugin = new Plugin(); plugin.setArtifactId(artifactId); plugin.setGroupId(groupId); plugin.setVersion(version); return plugin; } /** * Wraps the group id string in a more readable format * * @param groupId The value * @return The value */ public static String groupId(String groupId) { return groupId; } /** * Wraps the artifact id string in a more readable format * * @param artifactId The value * @return The value */ public static String artifactId(String artifactId) { return artifactId; } /** * Wraps the version string in a more readable format * * @param version The value * @return The value */ public static String version(String version) { return version; } /** * Wraps the goal string in a more readable format * * @param goal The value * @return The value */ public static String goal(String goal) { return goal; } /** * Wraps the element name string in a more readable format * * @param name The value * @return The value */ public static String name(String name) { return name; } /** * Constructs the element with a textual body * * @param name The element name * @param value The element text value * @return The element object */ public static Element element(String name, String value) { return new Element(name, value); } /** * Constructs the element containing child elements * * @param name The element name * @param elements The child elements * @return The Element object */ public static Element element(String name, Element... elements) { return new Element(name, elements); } /** * Element wrapper class for configuration elements */ public static class Element { private final Element[] children; private final String name; private final String text; public Element(String name, Element... children) { this(name, null, children); } public Element(String name, String text, Element... children) { this.name = name; this.text = text; this.children = children; } public Xpp3Dom toDom() { Xpp3Dom dom = new Xpp3Dom(name); if (text != null) { dom.setValue(text); } for (Element e : children) { dom.addChild(e.toDom()); } return dom; } } /** * Collects Maven execution information */ public static class ExecutionEnvironment { private final MavenProject mavenProject; private final MavenSession mavenSession; private final BuildPluginManager pluginManager; public ExecutionEnvironment(MavenProject mavenProject, MavenSession mavenSession, BuildPluginManager pluginManager) { if (mavenProject == null) { throw new NullPointerException("mavenProject may not be null"); } if (mavenSession == null) { throw new NullPointerException("mavenSession may not be null"); } if (pluginManager == null) { throw new NullPointerException("pluginManager may not be null"); } this.mavenProject = mavenProject; this.mavenSession = mavenSession; this.pluginManager = pluginManager; } public MavenProject getMavenProject() { return mavenProject; } public MavenSession getMavenSession() { return mavenSession; } public BuildPluginManager getPluginManager() { return pluginManager; } } }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_131) on Tue Apr 30 13:34:40 PDT 2019 --> <title>TriplestoreIndexer</title> <meta name="date" content="2019-04-30"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="TriplestoreIndexer"; } } catch(err) { } //--> var methods = {"i0":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Class</li> <li>Next&nbsp;Class</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.html" target="_top">Frames</a></li> <li><a href="TriplestoreIndexer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.org.apache.camel.builder.RouteBuilder">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">ca.islandora.alpaca.indexing.triplestore</div> <h2 title="Class TriplestoreIndexer" class="title">Class TriplestoreIndexer</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.apache.camel.builder.BuilderSupport</li> <li> <ul class="inheritance"> <li>org.apache.camel.builder.RouteBuilder</li> <li> <ul class="inheritance"> <li>ca.islandora.alpaca.indexing.triplestore.TriplestoreIndexer</li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>org.apache.camel.RoutesBuilder</dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">TriplestoreIndexer</span> extends org.apache.camel.builder.RouteBuilder</pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.org.apache.camel.builder.RouteBuilder"> <!-- --> </a> <h3>Fields inherited from class&nbsp;org.apache.camel.builder.RouteBuilder</h3> <code>log</code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.html#TriplestoreIndexer--">TriplestoreIndexer</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.html#configure--">configure</a></span>()</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.apache.camel.builder.RouteBuilder"> <!-- --> </a> <h3>Methods inherited from class&nbsp;org.apache.camel.builder.RouteBuilder</h3> <code>addRoutes, addRoutesToCamelContext, checkInitialized, configureRest, configureRests, configureRoute, configureRoutes, createContainer, errorHandler, from, from, from, from, fromF, getContext, getRestCollection, getRestConfigurations, getRouteCollection, includeRoutes, intercept, interceptFrom, interceptFrom, interceptSendToEndpoint, onCompletion, onException, onException, populateRests, populateRoutes, populateTransformers, populateValidators, propertyInject, rest, rest, restConfiguration, restConfiguration, setErrorHandlerBuilder, setRestCollection, setRouteCollection, toString, transformer, validator</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.apache.camel.builder.BuilderSupport"> <!-- --> </a> <h3>Methods inherited from class&nbsp;org.apache.camel.builder.BuilderSupport</h3> <code>bean, bean, bean, bean, body, body, bodyAs, constant, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, defaultErrorHandler, endpoint, endpoint, endpoints, endpoints, exceptionMessage, exchangeProperty, faultBody, faultBodyAs, getErrorHandlerBuilder, header, language, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, method, method, method, method, noErrorHandler, outBody, outBody, property, regexReplaceAll, regexReplaceAll, sendTo, setContext, setContext, simple, simple, simpleF, simpleF, systemProperty, systemProperty, xpath, xpath</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="TriplestoreIndexer--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>TriplestoreIndexer</h4> <pre>public&nbsp;TriplestoreIndexer()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="configure--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>configure</h4> <pre>public&nbsp;void&nbsp;configure()</pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code>configure</code>&nbsp;in class&nbsp;<code>org.apache.camel.builder.RouteBuilder</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Class</li> <li>Next&nbsp;Class</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.html" target="_top">Frames</a></li> <li><a href="TriplestoreIndexer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.org.apache.camel.builder.RouteBuilder">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
<!DOCTYPE html> <html> <head> <title>React | Search</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.css" type="text/css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.7.3/css/bootstrap-select.css" type="text/css"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <div id="map-container"></div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.devbridge-autocomplete/1.2.23/jquery.autocomplete.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.7.3/js/bootstrap-select.js"></script> <script src="https://fb.me/react-0.13.3.js"></script> <script src="https://fb.me/JSXTransformer-0.13.3.js"></script> <script type="text/jsx" src="Map.jsx"></script> <script type="text/jsx" src="SearchInput.jsx"></script> <script type="text/jsx" src="ImageList.jsx"></script> <script type="text/jsx"> React.render(<Map/>,document.getElementById('map-container')); </script> </body> </html>
/** * token.h * * Define all token types. */ #ifndef TOKEN_H #define TOKEN_H /* The following enum contains all token names with the names 'TOK_*' */ enum { #define X(x) x, # include "token.include" #undef X __token_dummy__ /* Dummy element for trailing comma */ }; /* These names can be indexed via the above enum and make debugging slightly * easier */ static const char *__token_names[] = { #define X(x) #x, # include "token.include" #undef X "__token_dummy__" }; /* The token type. These tokens are generated within the lexer, but knowledge * of this type is also required in the parser. * * This may be moved into the lexer since it makes more sense there. */ typedef struct { int type; int is_literal; union { int id; char *literal; }; } token_t; #endif
class AlertList def initialize(zipcode) @response = HTTParty.get("http://api.wunderground.com/api/#{ENV["WUNDERGROUND_KEY"]}/alerts/q/#{zipcode}.json") end def all_alerts @response["alerts"].map {|a| Alert.new(a)} end end class Alert def initialize(json) @alert = json end def alert_type @alert["type"] end def alert_description @alert["description"] end def alert_date @alert["date"] end def alert_expires @alert["expires"] end def alert_message @alert["message"] end end # def test_alerts # list = AlertList.new(50301) # a = list.all_alerts.first # assert_equal "FLO", a.alert_type # assert_equal "Flood Warning", a.alert_description # assert_equal "3:32 PM CST on February 22, 2016", a.alert_date # assert_equal "6:00 AM CST on February 26, 2016", a.alert_expires # assert_equal "\n...Flood Warning now in effect until Thursday morning...\n\nThe Flood Warning continues for\n the Des Moines River at Des Moines se 6th St...or from below the \n center street dam...to Runnells.\n* Until Thursday morning.\n* At 3:00 PM Monday the stage was 23.3 feet...or 0.7 feet below \n flood stage.\n* Flood stage is 24.0 feet.\n* No flooding is occurring and minor flooding is forecast.\n* Forecast...rise to flood stage late this evening. Continue rising \n to 24.3 feet...or 0.3 feet above flood stage...midday Tuesday. \n Then begin falling and go below flood stage Thursday morning.\n* Impact...at 24.0 feet...the bike trail is closed east of Water \n Street. Portions of other bike trails are also affected.\n\n\nLat...Lon 4159 9356 4152 9333 4145 9333 4154 9356\n 4159 9366 4159 9356 \n\n\n\n\n", a.alert_message # end
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace ChoPGP4Win { public sealed class PGPDecryptFileOptions : INotifyPropertyChanged { private string inputFilePath; public string InputFilePath { get { return inputFilePath; } set { if (inputFilePath != value) { inputFilePath = System.IO.Path.GetFullPath(value); NotifyPropertyChanged(); } } } private string outputFilePath; public string OutputFilePath { get { return outputFilePath; } set { if (outputFilePath != value) { outputFilePath = System.IO.Path.GetFullPath(value); ; NotifyPropertyChanged(); } } } private string _privateKeyFilePath; public string PrivateKeyFilePath { get { return _privateKeyFilePath; } set { if (_privateKeyFilePath != value) { _privateKeyFilePath = System.IO.Path.GetFullPath(value); ; NotifyPropertyChanged(); } } } private string _passPhrase; public string PassPhrase { get { return _passPhrase; } set { if (_passPhrase != value) { _passPhrase = value; NotifyPropertyChanged(); } } } public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged([CallerMemberName] string propName = null) { PropertyChangedEventHandler propertyChanged = PropertyChanged; if (propertyChanged != null) propertyChanged(this, new PropertyChangedEventArgs(propName)); } public PGPDecryptFileOptions() { #if DEBUG InputFilePath = @"SampleData.pgp"; OutputFilePath = @"SampleData.out"; PrivateKeyFilePath = @"Sample_pri.asc"; PassPhrase = @"Test123"; #endif } } }
Base.bits(b::Ubound) = string("$(bits(b.lower)) -> $(bits(b.upper))") function Base.show{ESS,FSS}(io::IO, x::Ubound{ESS,FSS}) @typenames print(io, "$bname($(x.lower), $(x.upper))") end
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef CANNABISDARKCOIN_ALLOCATORS_H #define CANNABISDARKCOIN_ALLOCATORS_H #include <string.h> #include <string> #include <boost/thread/mutex.hpp> #include <map> #ifdef WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX #endif #include <windows.h> // This is used to attempt to keep keying material out of swap // Note that VirtualLock does not provide this as a guarantee on Windows, // but, in practice, memory that has been VirtualLock'd almost never gets written to // the pagefile except in rare circumstances where memory is extremely low. #else #include <sys/mman.h> #include <limits.h> // for PAGESIZE #include <unistd.h> // for sysconf #endif /** * Thread-safe class to keep track of locked (ie, non-swappable) memory pages. * * Memory locks do not stack, that is, pages which have been locked several times by calls to mlock() * will be unlocked by a single call to munlock(). This can result in keying material ending up in swap when * those functions are used naively. This class simulates stacking memory locks by keeping a counter per page. * * @note By using a map from each page base address to lock count, this class is optimized for * small objects that span up to a few pages, mostly smaller than a page. To support large allocations, * something like an interval tree would be the preferred data structure. */ template <class Locker> class LockedPageManagerBase { public: LockedPageManagerBase(size_t page_size): page_size(page_size) { // Determine bitmask for extracting page from address assert(!(page_size & (page_size-1))); // size must be power of two page_mask = ~(page_size - 1); } // For all pages in affected range, increase lock count void LockRange(void *p, size_t size) { boost::mutex::scoped_lock lock(mutex); if(!size) return; const size_t base_addr = reinterpret_cast<size_t>(p); const size_t start_page = base_addr & page_mask; const size_t end_page = (base_addr + size - 1) & page_mask; for(size_t page = start_page; page <= end_page; page += page_size) { Histogram::iterator it = histogram.find(page); if(it == histogram.end()) // Newly locked page { locker.Lock(reinterpret_cast<void*>(page), page_size); histogram.insert(std::make_pair(page, 1)); } else // Page was already locked; increase counter { it->second += 1; } } } // For all pages in affected range, decrease lock count void UnlockRange(void *p, size_t size) { boost::mutex::scoped_lock lock(mutex); if(!size) return; const size_t base_addr = reinterpret_cast<size_t>(p); const size_t start_page = base_addr & page_mask; const size_t end_page = (base_addr + size - 1) & page_mask; for(size_t page = start_page; page <= end_page; page += page_size) { Histogram::iterator it = histogram.find(page); assert(it != histogram.end()); // Cannot unlock an area that was not locked // Decrease counter for page, when it is zero, the page will be unlocked it->second -= 1; if(it->second == 0) // Nothing on the page anymore that keeps it locked { // Unlock page and remove the count from histogram locker.Unlock(reinterpret_cast<void*>(page), page_size); histogram.erase(it); } } } // Get number of locked pages for diagnostics int GetLockedPageCount() { boost::mutex::scoped_lock lock(mutex); return histogram.size(); } private: Locker locker; boost::mutex mutex; size_t page_size, page_mask; // map of page base address to lock count typedef std::map<size_t,int> Histogram; Histogram histogram; }; /** Determine system page size in bytes */ static inline size_t GetSystemPageSize() { size_t page_size; #if defined(WIN32) SYSTEM_INFO sSysInfo; GetSystemInfo(&sSysInfo); page_size = sSysInfo.dwPageSize; #elif defined(PAGESIZE) // defined in limits.h page_size = PAGESIZE; #else // assume some POSIX OS page_size = sysconf(_SC_PAGESIZE); #endif return page_size; } /** * OS-dependent memory page locking/unlocking. * Defined as policy class to make stubbing for test possible. */ class MemoryPageLocker { public: /** Lock memory pages. * addr and len must be a multiple of the system page size */ bool Lock(const void *addr, size_t len) { #ifdef WIN32 return VirtualLock(const_cast<void*>(addr), len); #else return mlock(addr, len) == 0; #endif } /** Unlock memory pages. * addr and len must be a multiple of the system page size */ bool Unlock(const void *addr, size_t len) { #ifdef WIN32 return VirtualUnlock(const_cast<void*>(addr), len); #else return munlock(addr, len) == 0; #endif } }; /** * Singleton class to keep track of locked (ie, non-swappable) memory pages, for use in * std::allocator templates. */ class LockedPageManager: public LockedPageManagerBase<MemoryPageLocker> { public: static LockedPageManager instance; // instantiated in util.cpp private: LockedPageManager(): LockedPageManagerBase<MemoryPageLocker>(GetSystemPageSize()) {} }; // // Allocator that locks its contents from being paged // out of memory and clears its contents before deletion. // template<typename T> struct secure_allocator : public std::allocator<T> { // MSVC8 default copy constructor is broken typedef std::allocator<T> base; typedef typename base::size_type size_type; typedef typename base::difference_type difference_type; typedef typename base::pointer pointer; typedef typename base::const_pointer const_pointer; typedef typename base::reference reference; typedef typename base::const_reference const_reference; typedef typename base::value_type value_type; secure_allocator() throw() {} secure_allocator(const secure_allocator& a) throw() : base(a) {} template <typename U> secure_allocator(const secure_allocator<U>& a) throw() : base(a) {} ~secure_allocator() throw() {} template<typename _Other> struct rebind { typedef secure_allocator<_Other> other; }; T* allocate(std::size_t n, const void *hint = 0) { T *p; p = std::allocator<T>::allocate(n, hint); if (p != NULL) LockedPageManager::instance.LockRange(p, sizeof(T) * n); return p; } void deallocate(T* p, std::size_t n) { if (p != NULL) { memset(p, 0, sizeof(T) * n); LockedPageManager::instance.UnlockRange(p, sizeof(T) * n); } std::allocator<T>::deallocate(p, n); } }; // // Allocator that clears its contents before deletion. // template<typename T> struct zero_after_free_allocator : public std::allocator<T> { // MSVC8 default copy constructor is broken typedef std::allocator<T> base; typedef typename base::size_type size_type; typedef typename base::difference_type difference_type; typedef typename base::pointer pointer; typedef typename base::const_pointer const_pointer; typedef typename base::reference reference; typedef typename base::const_reference const_reference; typedef typename base::value_type value_type; zero_after_free_allocator() throw() {} zero_after_free_allocator(const zero_after_free_allocator& a) throw() : base(a) {} template <typename U> zero_after_free_allocator(const zero_after_free_allocator<U>& a) throw() : base(a) {} ~zero_after_free_allocator() throw() {} template<typename _Other> struct rebind { typedef zero_after_free_allocator<_Other> other; }; void deallocate(T* p, std::size_t n) { if (p != NULL) memset(p, 0, sizeof(T) * n); std::allocator<T>::deallocate(p, n); } }; // This is exactly like std::string, but with a custom allocator. typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString; #endif
require "test_helper" require "helpers/network_helper" describe "Fog::OpenStack::Network | vpn_service" do describe "success" do before do @instance = network.vpn_services.create( :subnet_id => 'foo', :router_id => 'bar', :name => 'test', :description => 'test', :admin_state_up => true, :tenant_id => 'tenant' ) end it "#create" do @instance.status.must_equal "ACTIVE" end it "#update" do @instance.subnet_id = 'new' @instance.router_id = 'new' @instance.name = 'rename' @instance.description = 'new' @instance.admin_state_up = false @instance.tenant_id = 'baz' @instance.update.status.must_equal "ACTIVE" end it "#destroy" do @instance.destroy.must_equal true end end end
HorseRanch ========== This is a game made by my 8 year old daughter using Construct 2. It is a work in progress. There is nothing to play yet, only the scene composition can be viewed. Star the repo to stay up to date on the progress. [Play it in a browser](https://dl.dropboxusercontent.com/u/33122639/HorseRanch/index.html)
export { default } from 'ember-fhir/models/parameters';
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="layoutclass_pic"><div class="layoutclass_first_pic"><table class="fmt0table"><tr><th class="zt1"><b><font class=""></font></b></th><td class="zc1">家徒壁立</td></tr> </td></tr></table></div> <!-- layoutclass_first_pic --><div class="layoutclass_second_pic"></div> <!-- layoutclass_second_pic --></div> <!-- layoutclass_pic --></td></tr></table>
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), errorHandler = require('./errors'), Book = mongoose.model('Book'), _ = require('lodash'); // , // googleapi = require('node-google-api')('AIzaSyAffzxPYpgZ14gieEE04_u4U-5Y26UQ8_0'); // exports.gbooks = function(req, res) { // googleapi.build(function(api) { // for(var k in api){ // console.log(k); // } // }); // var favoriteslist = req.favoriteslist; // favoriteslist.googleapi.build(function(err, api){ // }) // googleapi.build(function(api) { // api.books.mylibrary.bookshelves.list({ // userId: '114705319517394488779', // source: 'gbs_lp_bookshelf_list' // }, function(result){ // if(result.error) { // console.log(result.error); // } else { // for(var i in result.items) { // console.log(result.items[i].summary); // } // } // }); // }); // }; /** * Create a Book */ exports.create = function(req, res) { var book = new Book(req.body); book.user = req.user; book.save(function(err) { if (err) { return res.status(400).send({ message: errorHandler.getErrorMessage(err) }); } else { res.jsonp(book); } }); }; /** * Show the current Book */ exports.read = function(req, res) { res.jsonp(req.book); }; /** * Update a Book */ exports.update = function(req, res) { var book = req.book ; book = _.extend(book , req.body); book.save(function(err) { if (err) { return res.status(400).send({ message: errorHandler.getErrorMessage(err) }); } else { res.jsonp(book); } }); }; /** * Delete an Book */ exports.delete = function(req, res) { var book = req.book ; book.remove(function(err) { if (err) { return res.status(400).send({ message: errorHandler.getErrorMessage(err) }); } else { res.jsonp(book); } }); }; /** * List of Books */ exports.list = function(req, res) { Book.find().sort('-created').populate('user', 'displayName').exec(function(err, books) { if (err) { return res.status(400).send({ message: errorHandler.getErrorMessage(err) }); } else { res.jsonp(books); } }); }; /** * Book middleware */ exports.bookByID = function(req, res, next, id) { Book.findById(id).populate('user', 'displayName').exec(function(err, book) { if (err) return next(err); if (! book) return next(new Error('Failed to load Book ' + id)); req.book = book ; next(); }); }; /** * Book authorization middleware */ exports.hasAuthorization = function(req, res, next) { if (req.book.user.id !== req.user.id) { return res.status(403).send('User is not authorized'); } next(); };
# NewRelic Plugins Hive [![Build Status](https://api.travis-ci.org/elad-maimon/newrelic_plugins_hive.png?branch=master,develop)](https://api.travis-ci.org/elad-maimon/newrelic_plugins_hive.png?branch=master,develop) [![Coverage Status](https://coveralls.io/repos/elad-maimon/newrelic_plugins_hive/badge.png?branch=master)](https://coveralls.io/r/elad-maimon/newrelic_plugins_hive?branch=master,develop) [![endorse](https://api.coderwall.com/elad-maimon/endorsecount.png)](https://coderwall.com/elad-maimon) Without this gem, if you're using more then one plugin for NewRelic you need to download each plugin, configure it in different files and repositories, deploy it separately and run different process for each plugin (including monitor those processes etc...) NewRelic Plugins Hive allow you to easily download, configure and deploy multiple NewRelic plugins and run them all in one process! ## Installation Install the gem: $ gem install newrelic_plugins_hive Create a new hive application (this will create a new folder with the name you specified and the default folder structure and files): $ hive new <APP_NAME> ## Configure the hive First, you need to configure which New Relic plugins you want to use in the hive. To do that open the file `config/newrelic_hive.yml` and add for each plugin its github repository and a path to the agent file in the repository. Example structure of the file: plugins: sidekiq: github: https://github.com/eksoverzero/newrelic_sidekiq_agent agent_path: newrelic_sidekiq_agent rabbitmq: github: https://github.com/gopivotal/newrelic_pivotal_agent agent_path: plugins/pivotal_rabbitmq_plugin/pivotal_rabbitmq_plugin.rb redis: github: https://github.com/gopivotal/newrelic_pivotal_agent agent_path: plugins/pivotal_redis_plugin/pivotal_redis_plugin.rb It is enough that `agent_path` attribute will specify a unique filname in the repository. So in the example above you can just use this `agent_path` for redis: agent_path: pivotal_redis_plugin.rb #### Install the plugins in the hive This will download and extract the plugin agents that specified in `config/newrelic_hive.yml`: $ hive install ## Configure each plugin Configuring the plugins in the hive requires 3 simple steps: 1. Add your New Relic license key to `config/newrelic_plugin.yml` 2. For each plugin, add the plugin specific configuration to `config/newrelic_plugin.yml` under the section `agents` 3. Add additional gems to your Gemfile, if the plugins in the hive require it. __Example:__ The RabbitMQ plugin has a configuration to specify the rabbitmq url, as well as the Sidekiq plugins that requires the Redis uri, so example `config/newrelic_plugin.yml` will look like: newrelic: license_key: 'YOUR_LICENSE_KEY_HERE' # Set to '1' for verbose output, remove for normal output. verbose: 1 agents: rabbitmq: management_api_url: http://user:password@hostname:55672 sidekiq_status_agent: - instance_name: "Name" uri: "redis://localhost:6379" namespace: "namespace" This example combine in the same `config/newrelic_plugin.yml` configurations from two different plugins (rabbitMQ and Sidekiq). You must look at your plugin documentation and follow the instructions how to configure it. ## Usage Run the agent: $ hive run Or, as a maemon: $ hive run -d start # Start the daemon $ hive run -d stop # Stop the daemon ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
#include "kk_dictionary.h" namespace penciloid { namespace kakuro { Dictionary::Dictionary() : data_(nullptr) { } Dictionary::~Dictionary() { if (data_ != nullptr) delete[] data_; } void Dictionary::CreateDefault() { Release(); data_ = new unsigned int[kDictionarySize]; for (int n_cells = 0; n_cells <= kMaxCellValue; ++n_cells) { for (int n_sum = 0; n_sum <= kMaxGroupSum; ++n_sum) { for (int bits = 0; bits < (1 << kMaxCellValue); ++bits) { int idx = GetIndex(n_cells, n_sum, bits); if (n_cells == 0) { data_[idx] = 0; continue; } else if (n_cells == 1) { if (1 <= n_sum && n_sum <= kMaxCellValue && (bits & (1 << (n_sum - 1)))) { data_[idx] = 1 << (n_sum - 1); } else { data_[idx] = 0; } continue; } data_[idx] = 0; for (int n = 1; n <= kMaxCellValue; ++n) if (bits & (1 << (n - 1))) { int cand = data_[GetIndex(n_cells - 1, n_sum - n, bits ^ (1 << (n - 1)))]; if (cand != 0) { data_[idx] |= cand | (1 << (n - 1)); } } } } } } void Dictionary::Release() { if (data_) delete[] data_; } } }
<?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Ducats</source> <translation>Apie Ducats</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Ducats&lt;/b&gt; version</source> <translation>&lt;b&gt;Ducats&lt;/b&gt; versija</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation>Tai eksperimentinė programa. Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.opensource.org/licenses/mit-license.php. Šiame produkte yra OpenSSL projekto kuriamas OpenSSL Toolkit (http://www.openssl.org/), Eric Young parašyta kriptografinė programinė įranga bei Thomas Bernard sukurta UPnP programinė įranga.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The Ducats Developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Adresų knygelė</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Spragtelėkite, kad pakeistumėte adresą arba žymę</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Sukurti naują adresą</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Kopijuoti esamą adresą į mainų atmintį</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;Naujas adresas</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Ducats addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>Tai yra jūsų Ducats adresai mokėjimų gavimui. Galite duoti skirtingus adresus atskiriems siuntėjams, kad galėtumėte sekti, kas jums moka.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>&amp;Kopijuoti adresą</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Rodyti &amp;QR kodą</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Ducats address</source> <translation>Pasirašykite žinutę, kad įrodytume, jog esate Ducats adreso savininkas</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Registruoti praneši&amp;mą</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Ducats address</source> <translation>Patikrinkite žinutę, jog įsitikintumėte, kad ją pasirašė nurodytas Ducats adresas</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>&amp;Tikrinti žinutę</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Trinti</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Ducats addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>Kopijuoti ž&amp;ymę</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Keisti</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>Eksportuoti adresų knygelės duomenis</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kableliais išskirtas failas (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Eksportavimo klaida</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Nepavyko įrašyti į failą %1.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Žymė</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresas</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(nėra žymės)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Slaptafrazės dialogas</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Įvesti slaptafrazę</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Nauja slaptafrazė</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Pakartokite naują slaptafrazę</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Įveskite naują piniginės slaptafrazę.&lt;br/&gt;Prašome naudoti slaptafrazę iš &lt;b&gt; 10 ar daugiau atsitiktinių simbolių&lt;/b&gt; arba &lt;b&gt;aštuonių ar daugiau žodžių&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Užšifruoti piniginę</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Ši operacija reikalauja jūsų piniginės slaptafrazės jai atrakinti.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Atrakinti piniginę</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Ši operacija reikalauja jūsų piniginės slaptafrazės jai iššifruoti.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Iššifruoti piniginę</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Pakeisti slaptafrazę</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Įveskite seną ir naują piniginės slaptafrazes.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Patvirtinkite piniginės užšifravimą</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR Ducats&lt;/b&gt;!</source> <translation>Dėmesio: jei užšifruosite savo piniginę ir pamesite slaptafrazę, jūs&lt;b&gt;PRARASITE VISUS SAVO DucatsCOINUS&lt;/b&gt;! </translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Ar tikrai norite šifruoti savo piniginę?</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Įspėjimas: įjungtas Caps Lock klavišas!</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Piniginė užšifruota</translation> </message> <message> <location line="-56"/> <source>Ducats will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your Ducatss from being stolen by malware infecting your computer.</source> <translation>Ducats dabar užsidarys šifravimo proceso pabaigai. Atminkite, kad piniginės šifravimas negali pilnai apsaugoti Ducatsų vagysčių kai tinkle esančios kenkėjiškos programos patenka į jūsų kompiuterį.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Nepavyko užšifruoti piniginę</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Dėl vidinės klaidos nepavyko užšifruoti piniginę.Piniginė neužšifruota.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>Įvestos slaptafrazės nesutampa.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Nepavyko atrakinti piniginę</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Neteisingai įvestas slaptažodis piniginės iššifravimui.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Nepavyko iššifruoti piniginės</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Piniginės slaptažodis sėkmingai pakeistas.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Pasirašyti ži&amp;nutę...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Sinchronizavimas su tinklu ...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Apžvalga</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Rodyti piniginės bendrą apžvalgą</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Sandoriai</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Apžvelgti sandorių istoriją</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>Redaguoti išsaugotus adresus bei žymes</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Parodyti adresų sąraša mokėjimams gauti</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>&amp;Išeiti</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Išjungti programą</translation> </message> <message> <location line="+4"/> <source>Show information about Ducats</source> <translation>Rodyti informaciją apie Ducats</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Apie &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Rodyti informaciją apie Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Parinktys...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>&amp;Užšifruoti piniginę...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Backup piniginę...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Keisti slaptafrazę...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a Ducats address</source> <translation>Siųsti monetas Ducats adresui</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Ducats</source> <translation>Keisti Ducats konfigūracijos galimybes</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Daryti piniginės atsarginę kopiją</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Pakeisti slaptafrazę naudojamą piniginės užšifravimui</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp;Derinimo langas</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Atverti derinimo ir diagnostikos konsolę</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>&amp;Tikrinti žinutę...</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>Ducats</source> <translation>Ducats</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Piniginė</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About Ducats</source> <translation>&amp;Apie Ducats</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Rodyti / Slėpti</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Ducats addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Ducats addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;Failas</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Nustatymai</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>&amp;Pagalba</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Kortelių įrankinė</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testavimotinklas]</translation> </message> <message> <location line="+47"/> <source>Ducats client</source> <translation>Ducats klientas</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Ducats network</source> <translation><numerusform>%n Ducats tinklo aktyvus ryšys</numerusform><numerusform>%n Ducats tinklo aktyvūs ryšiai</numerusform><numerusform>%n Ducats tinklo aktyvūs ryšiai</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Atnaujinta</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Vejamasi...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Patvirtinti sandorio mokestį</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Sandoris nusiųstas</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Ateinantis sandoris</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Data: %1 Suma: %2 Tipas: %3 Adresas: %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>URI apdorojimas</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Ducats address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Piniginė &lt;b&gt;užšifruota&lt;/b&gt; ir šiuo metu &lt;b&gt;atrakinta&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Piniginė &lt;b&gt;užšifruota&lt;/b&gt; ir šiuo metu &lt;b&gt;užrakinta&lt;/b&gt;</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. Ducats can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Tinklo įspėjimas</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Keisti adresą</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>Ž&amp;ymė</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Žymė yra susieta su šios adresų knygelęs turiniu</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adresas</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>Adresas yra susietas su šios adresų knygelęs turiniu. Tai gali būti keičiama tik siuntimo adresams.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>Naujas gavimo adresas</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Naujas siuntimo adresas</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Keisti gavimo adresą</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Keisti siuntimo adresą</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Įvestas adresas „%1“ jau yra adresų knygelėje.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Ducats address.</source> <translation>Įvestas adresas „%1“ nėra galiojantis Ducats adresas.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Nepavyko atrakinti piniginės.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Naujo rakto generavimas nepavyko.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Ducats-Qt</source> <translation>Ducats-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>versija</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Naudojimas:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>komandinės eilutės parametrai</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>Naudotoji sąsajos parametrai</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Nustatyti kalbą, pavyzdžiui &quot;lt_LT&quot; (numatyta: sistemos kalba)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Paleisti sumažintą</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Parinktys</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Pagrindinės</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>&amp;Mokėti sandorio mokestį</translation> </message> <message> <location line="+31"/> <source>Automatically start Ducats after logging in to the system.</source> <translation>Automatiškai paleisti Bitkoin programą įjungus sistemą.</translation> </message> <message> <location line="+3"/> <source>&amp;Start Ducats on system login</source> <translation>&amp;Paleisti Ducats programą su window sistemos paleidimu</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>&amp;Tinklas</translation> </message> <message> <location line="+6"/> <source>Automatically open the Ducats client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Automatiškai atidaryti Ducats kliento prievadą maršrutizatoriuje. Tai veikia tik tada, kai jūsų maršrutizatorius palaiko UPnP ir ji įjungta.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Persiųsti prievadą naudojant &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the Ducats network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Jungtis į Bitkoin tinklą per socks proxy (pvz. jungiantis per Tor)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>&amp;Jungtis per SOCKS tarpinį serverį:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Tarpinio serverio &amp;IP:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>Tarpinio serverio IP adresas (pvz. 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Prievadas:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Tarpinio serverio preivadas (pvz, 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;versija:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>Tarpinio serverio SOCKS versija (pvz., 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Langas</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Po programos lango sumažinimo rodyti tik programos ikoną.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;M sumažinti langą bet ne užduočių juostą</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>Uždarant langą neuždaryti programos. Kai ši parinktis įjungta, programa bus uždaryta tik pasirinkus meniu komandą Baigti.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>&amp;Sumažinti uždarant</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Rodymas</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>Naudotojo sąsajos &amp;kalba:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Ducats.</source> <translation>Čia gali būti nustatyta naudotojo sąsajos kalba. Šis nustatymas įsigalios iš naujo paleidus Ducats.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Vienetai, kuriais rodyti sumas:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Rodomų ir siunčiamų monetų kiekio matavimo vienetai</translation> </message> <message> <location line="+9"/> <source>Whether to show Ducats addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Rodyti adresus sandorių sąraše</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;Gerai</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Atšaukti</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>&amp;Pritaikyti</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>numatyta</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>Įspėjimas</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Ducats.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Nurodytas tarpinio serverio adresas negalioja.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Forma</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Ducats network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Balansas:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Nepatvirtinti:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Piniginė</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>Nepribrendę:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Naujausi sandoriai&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Jūsų einamasis balansas</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>Iš viso sandorių, įskaitant tuos kurie dar turi būti patvirtinti, ir jie dar nėra įskaičiuotii į einamosios sąskaitos balansą</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start Ducats: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>QR kodo dialogas</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Prašau išmokėti</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Suma:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Žymė:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Žinutė:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>Į&amp;rašyti kaip...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Klaida, koduojant URI į QR kodą.</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>Įvesta suma neteisinga, prašom patikrinti.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>Įrašyti QR kodą</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>PNG paveikslėliai (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Kliento pavadinimas</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>nėra</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Kliento versija</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Informacija</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Naudojama OpenSSL versija</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Paleidimo laikas</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Tinklas</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Prisijungimų kiekis</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>Testnete</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Blokų grandinė</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Dabartinis blokų skaičius</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Paskutinio bloko laikas</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Atverti</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Komandinės eilutės parametrai</translation> </message> <message> <location line="+7"/> <source>Show the Ducats-Qt help message to get a list with possible Ducats command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp;Rodyti</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konsolė</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Kompiliavimo data</translation> </message> <message> <location line="-104"/> <source>Ducats - Debug window</source> <translation>Ducats - Derinimo langas</translation> </message> <message> <location line="+25"/> <source>Ducats Core</source> <translation>Ducats branduolys</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Derinimo žurnalo failas</translation> </message> <message> <location line="+7"/> <source>Open the Ducats debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Išvalyti konsolę</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Ducats RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Siųsti monetas</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>Siųsti keliems gavėjams vienu metu</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>&amp;A Pridėti gavėją</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Pašalinti visus sandorio laukus</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Išvalyti &amp;viską</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Balansas:</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 BTC</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Patvirtinti siuntimo veiksmą</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Siųsti</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Patvirtinti monetų siuntimą</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Ar tikrai norite siųsti %1?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation> ir </translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>Negaliojantis gavėjo adresas. Patikrinkite.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Apmokėjimo suma turi būti didesnė nei 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Suma viršija jūsų balansą.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Jei pridedame sandorio mokestį %1 bendra suma viršija jūsų balansą.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Rastas adreso dublikatas.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Klaida: sandoris buvo atmestas.Tai gali įvykti, jei kai kurios monetos iš jūsų piniginėje jau buvo panaudotos, pvz. jei naudojote wallet.dat kopiją ir monetos buvo išleistos kopijoje, bet nepažymėtos kaip skirtos išleisti čia.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Forma</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Su&amp;ma:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Mokėti &amp;gavėjui:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>Įveskite žymę šiam adresui kad galėtumėte įtraukti ją į adresų knygelę</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>Ž&amp;ymė:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Pasirinkite adresą iš adresų knygelės</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Įvesti adresą iš mainų atminties</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>Pašalinti šį gavėją</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Ducats address (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>Įveskite bitkoinų adresą (pvz. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;Pasirašyti žinutę</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>Įveskite bitkoinų adresą (pvz. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Pasirinkite adresą iš adresų knygelės</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>Įvesti adresą iš mainų atminties</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>Įveskite pranešimą, kurį norite pasirašyti čia</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Ducats address</source> <translation>Registruotis žinute įrodymuii, kad turite šį adresą</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Išvalyti &amp;viską</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>&amp;Patikrinti žinutę</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>Įveskite bitkoinų adresą (pvz. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Ducats address</source> <translation>Patikrinkite žinutę, jog įsitikintumėte, kad ją pasirašė nurodytas Ducats adresas</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Ducats address (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>Įveskite bitkoinų adresą (pvz. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Spragtelėkite &quot;Registruotis žinutę&quot; tam, kad gauti parašą</translation> </message> <message> <location line="+3"/> <source>Enter Ducats signature</source> <translation>Įveskite Ducats parašą</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Įvestas adresas negalioja.</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>Prašom patikrinti adresą ir bandyti iš naujo.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Piniginės atrakinimas atšauktas.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Žinutės pasirašymas nepavyko.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Žinutė pasirašyta.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Nepavyko iškoduoti parašo.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Prašom patikrinti parašą ir bandyti iš naujo.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Parašas neatitinka žinutės.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Žinutės tikrinimas nepavyko.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Žinutė patikrinta.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Ducats Developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testavimotinklas]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Atidaryta iki %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/neprisijungęs</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/nepatvirtintas</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 patvirtinimų</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Būsena</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Šaltinis</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Sugeneruotas</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Nuo</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Kam</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>savo adresas</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>žymė</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Kreditas</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>nepriimta</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Debitas</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Sandorio mokestis</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Neto suma</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Žinutė</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Komentaras</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Sandorio ID</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 40 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>Išgautos monetos turi sulaukti 40 blokų, kol jos gali būti naudojamos. Kai sukūrėte šį bloką, jis buvo transliuojamas tinkle ir turėjo būti įtrauktas į blokų grandinę. Jei nepavyksta patekti į grandinę, bus pakeista į &quot;nepriėmė&quot;, o ne &quot;vartojamas&quot;. Tai kartais gali atsitikti, jei kitas mazgas per keletą sekundžių sukuria bloką po jūsų bloko.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Derinimo informacija</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Sandoris</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Suma</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>tiesa</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>netiesa</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, transliavimas dar nebuvo sėkmingas</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>nežinomas</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Sandorio detelės</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Šis langas sandorio detalų aprašymą</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Tipas</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresas</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Suma</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Atidaryta iki %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Atjungta (%1 patvirtinimai)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>Nepatvirtintos (%1 iš %2 patvirtinimų)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Patvirtinta (%1 patvirtinimai)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Šis blokas negautas nė vienu iš mazgų ir matomai nepriimtas</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Išgauta bet nepriimta</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Gauta su</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Gauta iš</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Siųsta </translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Mokėjimas sau</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Išgauta</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>nepasiekiama</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Sandorio būklė. Užvedus pelės žymeklį ant šios srities matysite patvirtinimų skaičių.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Sandorio gavimo data ir laikas</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Sandorio tipas.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Sandorio paskirties adresas</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Suma pridėta ar išskaičiuota iš balanso</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>Visi</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Šiandien</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Šią savaitę</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Šį mėnesį</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Paskutinį mėnesį</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Šiais metais</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Intervalas...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Gauta su</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Išsiųsta</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Skirta sau</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Išgauta</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Kita</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Įveskite adresą ar žymę į paiešką</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Minimali suma</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Kopijuoti adresą</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Kopijuoti žymę</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Kopijuoti sumą</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Taisyti žymę</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Rodyti sandėrio detales</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Sandorio duomenų eksportavimas</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kableliais atskirtų duomenų failas (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Patvirtintas</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Tipas</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Žymė</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adresas</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Suma</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Eksportavimo klaida</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Neįmanoma įrašyti į failą %1.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Grupė:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>skirta</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>Siųsti monetas</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>Ducats-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>Ducats version</source> <translation>Ducats versija</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Naudojimas:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or Ducatsd</source> <translation>Siųsti komandą serveriui arba Ducatsd</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>Komandų sąrašas</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Suteikti pagalba komandai</translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Parinktys:</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: Ducats.conf)</source> <translation>Nurodyti konfigūracijos failą (pagal nutylėjimąt: Ducats.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: Ducatsd.pid)</source> <translation>Nurodyti pid failą (pagal nutylėjimą: Ducatsd.pid)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Nustatyti duomenų aplanką</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 25858 or testnet: 25859)</source> <translation>Sujungimo klausymas prijungčiai &lt;port&gt; (pagal nutylėjimą: 25858 arba testnet: 25859)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Palaikyti ne daugiau &lt;n&gt; jungčių kolegoms (pagal nutylėjimą: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Atjungimo dėl netinkamo kolegų elgesio riba (pagal nutylėjimą: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Sekundžių kiekis eikiamas palaikyti ryšį dėl lygiarangių nestabilumo (pagal nutylėjimą: 86.400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source> <translation>Klausymas JSON-RPC sujungimui prijungčiai &lt;port&gt; (pagal nutylėjimą: 8332 or testnet: 18332)</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Priimti komandinę eilutę ir JSON-RPC komandas</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Dirbti fone kaip šešėlyje ir priimti komandas</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Naudoti testavimo tinklą</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=Ducatsrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Ducats Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Ducats is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>Įspėjimas: -paytxfee yra nustatytas per didelis. Tai sandorio mokestis, kurį turėsite mokėti, jei siųsite sandorį.</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Ducats will not work properly.</source> <translation>Įspėjimas: Patikrinkite, kad kompiuterio data ir laikas yra teisingi.Jei Jūsų laikrodis neteisingai nustatytas Ducats, veiks netinkamai.</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Prisijungti tik prie nurodyto mazgo</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Neteisingas tor adresas: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maksimalus buferis priėmimo sujungimui &lt;n&gt;*1000 bitų (pagal nutylėjimą: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maksimalus buferis siuntimo sujungimui &lt;n&gt;*1000 bitų (pagal nutylėjimą: 1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Išvesti papildomą derinimo informaciją. Numanomi visi kiti -debug* parametrai</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Išvesti papildomą tinklo derinimo informaciją</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>Prideėti laiko žymę derinimo rezultatams</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the Ducats Wiki for SSL setup instructions)</source> <translation>SSL opcijos (žr.e Ducats Wiki for SSL setup instructions)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Siųsti atsekimo/derinimo info į konsolę vietoj debug.log failo</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Siųsti sekimo/derinimo info derintojui</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Nustatyti sujungimo trukmę milisekundėmis (pagal nutylėjimą: 5000)</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 1 when listening)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Vartotojo vardas JSON-RPC jungimuisi</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Slaptažodis JSON-RPC sujungimams</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Leisti JSON-RPC tik iš nurodytų IP adresų</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Siųsti komandą mazgui dirbančiam &lt;ip&gt; (pagal nutylėjimą: 127.0.0.1)</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Atnaujinti piniginę į naujausią formatą</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Nustatyti rakto apimties dydį &lt;n&gt; (pagal nutylėjimą: 100)</translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Ieškoti prarastų piniginės sandorių blokų grandinėje</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Naudoti OpenSSL (https) jungimuisi JSON-RPC </translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Serverio sertifikato failas (pagal nutylėjimą: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Serverio privatus raktas (pagal nutylėjimą: server.pem)</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Priimtini šifrai (pagal nutylėjimą: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>Pagelbos žinutė</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Nepavyko susieti šiame kompiuteryje prievado %s (bind returned error %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Jungtis per socks tarpinį serverį</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Leisti DNS paiešką sujungimui ir mazgo pridėjimui</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Užkraunami adresai...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation> wallet.dat pakrovimo klaida, wallet.dat sugadintas</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Ducats</source> <translation> wallet.dat pakrovimo klaida, wallet.dat reikalauja naujasnės Ducats versijos</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Ducats to complete</source> <translation>Piniginė turi būti prrašyta: įvykdymui perkraukite Ducats</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation> wallet.dat pakrovimo klaida</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Neteisingas proxy adresas: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Neteisinga suma -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Neteisinga suma</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Nepakanka lėšų</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Įkeliamas blokų indeksas...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Pridėti mazgą prie sujungti su and attempt to keep the connection open</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Ducats is probably already running.</source> <translation>Nepavyko susieti šiame kompiuteryje prievado %s. Ducats tikriausiai jau veikia.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Įtraukti mokestį už kB siunčiamiems sandoriams</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Užkraunama piniginė...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Peržiūra</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Įkėlimas baigtas</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Error</source> <translation>Klaida</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
# Requests for new Features Edit this document for any suggestions on features you would like added. Feel free to open an issue as well, but this helps us consolidate new features and details. It also can act as a TODO list. #### The basic template (loose): Detail Explanations: detail Please fill out as much information as you find applicable, this may include commands you would like to be implemented. ## Examples **Completed** New Feature: dry run Explanations: run through commands to see what will be cleaned before removing anything. Desired Flags: -n, --dry-run `docker-clean --dry-run` **Completed** New Feature: clean networking Explanation: networks should also have the option to be cleaned. Desired Flags: -net, --networks `docker-clean -net` ## New Features Below
.polygon { display: flex; justify-content: center; align-items: center; color: gray; font-size: .9rem; }
import { Mongo } from 'meteor/mongo' export const Saved = new Mongo.Collection('saved'); if (Meteor.isClient) { Meteor.subscribe('saved') } if (Meteor.isServer) { Meteor.publish('saved', function savedPublication() { return Saved.find() }) }
'use babel'; import moment from 'moment'; import openUrl from 'opn'; const addError = ({ project, branch, build, endDate, commit }) => { const relativeTime = moment(endDate).fromNow(); atom.notifications.addError(`Build #${build.id} has failed`, { buttons: [ { onDidClick() { openUrl(`https://app.codeship.com/projects/${project.id}/builds/${build.id}`); this.model.dismiss(); }, text: 'View Details', }, { text: 'Dismiss', onDidClick() { this.model.dismiss(); }, }, ], description: `**branch:** ${branch}<br />**commit:** ${commit.message}`, detail: `The build for ${project.name} failed ${relativeTime}, view details to find out why.`, dismissable: true, icon: 'alert', }); }; const addStart = () => {}; const addSuccess = () => {}; export { addError, addStart, addSuccess };
<?php namespace Symfony\Tests\Component\Form; require_once __DIR__ . '/DateTimeTestCase.php'; use Symfony\Component\Form\DateField; use Symfony\Component\Form\FormConfiguration; class DateFieldTest extends DateTimeTestCase { protected function setUp() { FormConfiguration::setDefaultLocale('de_AT'); } public function testBind_fromInput_dateTime() { $field = new DateField('name', array('widget' => 'input', 'type' => DateField::DATETIME)); $field->bind('2.6.2010'); $this->assertDateTimeEquals(new \DateTime('2010-06-02 UTC'), $field->getData()); $this->assertEquals('02.06.2010', $field->getDisplayedData()); } public function testBind_fromInput_string() { $field = new DateField('name', array('widget' => 'input', 'type' => DateField::STRING)); $field->bind('2.6.2010'); $this->assertEquals('2010-06-02', $field->getData()); $this->assertEquals('02.06.2010', $field->getDisplayedData()); } public function testBind_fromInput_timestamp() { $field = new DateField('name', array('widget' => 'input', 'type' => DateField::TIMESTAMP)); $field->bind('2.6.2010'); $dateTime = new \DateTime('2010-06-02 UTC'); $this->assertEquals($dateTime->format('U'), $field->getData()); $this->assertEquals('02.06.2010', $field->getDisplayedData()); } public function testBind_fromInput_raw() { $field = new DateField('name', array( 'data_timezone' => 'UTC', 'user_timezone' => 'UTC', 'widget' => 'input', 'type' => DateField::RAW, )); $field->bind('2.6.2010'); $output = array( 'day' => '2', 'month' => '6', 'year' => '2010', ); $this->assertEquals($output, $field->getData()); $this->assertEquals('02.06.2010', $field->getDisplayedData()); } public function testBind_fromChoice() { $field = new DateField('name', array('widget' => DateField::CHOICE)); $input = array( 'day' => '2', 'month' => '6', 'year' => '2010', ); $field->bind($input); $dateTime = new \DateTime('2010-06-02 UTC'); $this->assertDateTimeEquals($dateTime, $field->getData()); $this->assertEquals($input, $field->getDisplayedData()); } public function testBind_fromChoice_empty() { $field = new DateField('name', array('widget' => DateField::CHOICE, 'required' => false)); $input = array( 'day' => '', 'month' => '', 'year' => '', ); $field->bind($input); $this->assertSame(null, $field->getData()); $this->assertEquals($input, $field->getDisplayedData()); } public function testSetData_differentTimezones() { $field = new DateField('name', array( 'data_timezone' => 'America/New_York', 'user_timezone' => 'Pacific/Tahiti', // don't do this test with DateTime, because it leads to wrong results! 'type' => DateField::STRING, 'widget' => 'input', )); $field->setData('2010-06-02'); $this->assertEquals('01.06.2010', $field->getDisplayedData()); } public function testIsYearWithinRange_returnsTrueIfWithin() { $field = new DateField('name', array( 'widget' => 'input', 'years' => array(2010, 2011), )); $field->bind('2.6.2010'); $this->assertTrue($field->isYearWithinRange()); } public function testIsYearWithinRange_returnsTrueIfEmpty() { $field = new DateField('name', array( 'widget' => 'input', 'years' => array(2010, 2011), )); $field->bind(''); $this->assertTrue($field->isYearWithinRange()); } public function testIsYearWithinRange_returnsFalseIfNotContained() { $field = new DateField('name', array( 'widget' => 'input', 'years' => array(2010, 2012), )); $field->bind('2.6.2011'); $this->assertFalse($field->isYearWithinRange()); } public function testIsMonthWithinRange_returnsTrueIfWithin() { $field = new DateField('name', array( 'widget' => 'input', 'months' => array(6, 7), )); $field->bind('2.6.2010'); $this->assertTrue($field->isMonthWithinRange()); } public function testIsMonthWithinRange_returnsTrueIfEmpty() { $field = new DateField('name', array( 'widget' => 'input', 'months' => array(6, 7), )); $field->bind(''); $this->assertTrue($field->isMonthWithinRange()); } public function testIsMonthWithinRange_returnsFalseIfNotContained() { $field = new DateField('name', array( 'widget' => 'input', 'months' => array(6, 8), )); $field->bind('2.7.2010'); $this->assertFalse($field->isMonthWithinRange()); } public function testIsDayWithinRange_returnsTrueIfWithin() { $field = new DateField('name', array( 'widget' => 'input', 'days' => array(6, 7), )); $field->bind('6.6.2010'); $this->assertTrue($field->isDayWithinRange()); } public function testIsDayWithinRange_returnsTrueIfEmpty() { $field = new DateField('name', array( 'widget' => 'input', 'days' => array(6, 7), )); $field->bind(''); $this->assertTrue($field->isDayWithinRange()); } public function testIsDayWithinRange_returnsFalseIfNotContained() { $field = new DateField('name', array( 'widget' => 'input', 'days' => array(6, 8), )); $field->bind('7.6.2010'); $this->assertFalse($field->isDayWithinRange()); } }
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta name="description"> <meta name="keywords" content="static content generator,static site generator,static site,HTML,web development,.NET,C#,Razor,Markdown,YAML"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="/OpenTl.Schema/assets/img/favicon.ico" type="image/x-icon"> <link rel="icon" href="/OpenTl.Schema/assets/img/favicon.ico" type="image/x-icon"> <title>OpenTl.Schema - API - TSecureValueError.Type Property</title> <link href="/OpenTl.Schema/assets/css/mermaid.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/highlight.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/bootstrap/bootstrap.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/adminlte/AdminLTE.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/theme/theme.css" rel="stylesheet"> <link href="//fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,400i,700,700i" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="/OpenTl.Schema/assets/css/override.css" rel="stylesheet"> <script src="/OpenTl.Schema/assets/js/jquery-2.2.3.min.js"></script> <script src="/OpenTl.Schema/assets/js/bootstrap.min.js"></script> <script src="/OpenTl.Schema/assets/js/app.min.js"></script> <script src="/OpenTl.Schema/assets/js/highlight.pack.js"></script> <script src="/OpenTl.Schema/assets/js/jquery.slimscroll.min.js"></script> <script src="/OpenTl.Schema/assets/js/jquery.sticky-kit.min.js"></script> <script src="/OpenTl.Schema/assets/js/mermaid.min.js"></script> <!--[if lt IE 9]> <script src="/OpenTl.Schema/assets/js/html5shiv.min.js"></script> <script src="/OpenTl.Schema/assets/js/respond.min.js"></script> <![endif]--> </head> <body class="hold-transition wyam layout-boxed "> <div class="top-banner"></div> <div class="wrapper with-container"> <!-- Header --> <header class="main-header"> <a href="/OpenTl.Schema/" class="logo"> <span>OpenTl.Schema</span> </a> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle visible-xs-block" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle side menu</span> <i class="fa fa-chevron-circle-right"></i> </a> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse"> <span class="sr-only">Toggle side menu</span> <i class="fa fa-chevron-circle-down"></i> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse pull-left" id="navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="/OpenTl.Schema/about.html">About This Project</a></li> <li class="active"><a href="/OpenTl.Schema/api">API</a></li> </ul> </div> <!-- /.navbar-collapse --> <!-- Navbar Right Menu --> </nav> </header> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar "> <section class="infobar" data-spy="affix" data-offset-top="60" data-offset-bottom="200"> <div id="infobar-headings"><h6>On This Page</h6><p><a href="#Syntax">Syntax</a></p> <p><a href="#Attributes">Attributes</a></p> <p><a href="#Value">Value</a></p> <hr class="infobar-hidden"> </div> </section> <section class="sidebar"> <script src="/OpenTl.Schema/assets/js/lunr.min.js"></script> <script src="/OpenTl.Schema/assets/js/searchIndex.js"></script> <div class="sidebar-form"> <div class="input-group"> <input type="text" name="search" id="search" class="form-control" placeholder="Search Types..."> <span class="input-group-btn"> <button class="btn btn-flat"><i class="fa fa-search"></i></button> </span> </div> </div> <div id="search-results"> </div> <script> function runSearch(query){ $("#search-results").empty(); if( query.length < 2 ){ return; } var results = searchModule.search("*" + query + "*"); var listHtml = "<ul class='sidebar-menu'>"; listHtml += "<li class='header'>Type Results</li>"; if(results.length == 0 ){ listHtml += "<li>No results found</li>"; } else { for(var i = 0; i < results.length; ++i){ var res = results[i]; listHtml += "<li><a href='" + res.url + "'>" + htmlEscape(res.title) + "</a></li>"; } } listHtml += "</ul>"; $("#search-results").append(listHtml); } $(document).ready(function(){ $("#search").on('input propertychange paste', function() { runSearch($("#search").val()); }); }); function htmlEscape(html) { return document.createElement('div') .appendChild(document.createTextNode(html)) .parentNode .innerHTML; } </script> <hr> <ul class="sidebar-menu"> <li class="header">Namespace</li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema">OpenTl<wbr>.Schema</a></li> <li class="header">Type</li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError">TSecureValueError</a></li> <li role="separator" class="divider"></li> <li class="header">Property Members</li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError/91054A81.html">Hash</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError/EEC0796B.html">Text</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError/B12893B5.html">TextAsBinary</a></li> <li class="selected"><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError/00302CDC.html">Type</a></li> </ul> </section> </aside> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <section class="content-header"> <h3><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError">TSecureValueError</a>.</h3> <h1>Type <small>Property</small></h1> </section> <section class="content"> <div class="panel panel-default"> <div class="panel-body"> <dl class="dl-horizontal"> <dt>Namespace</dt> <dd><a href="/OpenTl.Schema/api/OpenTl.Schema">OpenTl<wbr>.Schema</a></dd> <dt>Containing Type</dt> <dd><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError">TSecureValueError</a></dd> </dl> </div> </div> <h1 id="Syntax">Syntax</h1> <pre><code>[SerializationOrder(0)] public ISecureValueType Type { get; set; }</code></pre> <h1 id="Attributes">Attributes</h1> <div class="box"> <div class="box-body no-padding table-responsive"> <table class="table table-striped table-hover two-cols"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody><tr> <td>Serialization<wbr>Order<wbr>Attribute</td> <td></td> </tr> </tbody></table> </div> </div> <h1 id="Value">Value</h1> <div class="box"> <div class="box-body no-padding table-responsive"> <table class="table table-striped table-hover two-cols"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody><tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureValueType">ISecureValueType</a></td> <td></td> </tr> </tbody></table> </div> </div> </section> </div> <!-- Footer --> <footer class="main-footer"> </footer> </div> <div class="wrapper bottom-wrapper"> <footer class="bottom-footer"> Generated by <a href="https://wyam.io">Wyam</a> </footer> </div> <a href="javascript:" id="return-to-top"><i class="fa fa-chevron-up"></i></a> <script> // Close the sidebar if we select an anchor link $(".main-sidebar a[href^='#']:not('.expand')").click(function(){ $(document.body).removeClass('sidebar-open'); }); $(document).load(function() { mermaid.initialize( { flowchart: { htmlLabels: false, useMaxWidth:false } }); mermaid.init(undefined, ".mermaid") $('svg').addClass('img-responsive'); $('pre code').each(function(i, block) { hljs.highlightBlock(block); }); }); hljs.initHighlightingOnLoad(); // Back to top $(window).scroll(function() { if ($(this).scrollTop() >= 200) { // If page is scrolled more than 50px $('#return-to-top').fadeIn(1000); // Fade in the arrow } else { $('#return-to-top').fadeOut(1000); // Else fade out the arrow } }); $('#return-to-top').click(function() { // When arrow is clicked $('body,html').animate({ scrollTop : 0 // Scroll to top of body }, 500); }); </script> </body></html>
#!/usr/local/bin/perl -w =head1 NAME load_clones_from_fpc.pl - Populates a core Ensembl DB with FPC clone data =head1 SYNOPSIS perl load_clones_from_fpc.pl [options] fpc_file Options: -h --help -m --man -r --registry_file -s --species -f --fasta_file -c --cb_to_bp -n --no_insert =head1 OPTIONS Reads the B<fpc_file>, and uses its clone data to load feature tables (dna_align_feature at the moment). Should be run after the fpc assembly has been loaded using the load_assembly_from_fpc.pl script. B<-h --help> Print a brief help message and exits. B<-m --man> Print man page and exit B<-r --registry_file> Use this Ensembl registry file for database connection info. Default is <ENSEMBLHOME>/conf/ensembl.registry B<-s --species> Use this species entry from the registry file [REQUIRED]. B<-f --fasta_file> Fasta file (GenBank dump) containing sequences for all accessioned clones [REQUIRED]. TODO: Get sqeuences from GenBank at runtime using Entrez? B<-c --cb_to_bp> Conversion factor to convert native (cb) fpc coordinated into basepairs. Calculated by hand by comparison with coordinates shown on AGI browser. Default: 4096. B<-n --no_insert> Do not insert anything into the database. I.e. read-only mode. Useful for debug. =head1 DESCRIPTION B<This program> Populates a core Ensembl DB with FPC clone mappings. Could do with additional description! A good place to look for clone sequences is; /usr/local/data/fpc/<species>/<species>.fpc Maintained by Will Spooner <whs@ebi.ac.uk> =cut use strict; use warnings; use Getopt::Long; use Pod::Usage; use Data::Dumper qw(Dumper); # For debug use DBI; use FindBin qw( $Bin ); use File::Basename qw( dirname ); use vars qw( $BASEDIR ); BEGIN{ # Set the perl libraries $BASEDIR = dirname($Bin); unshift @INC, $BASEDIR.'/ensembl-live/ensembl/modules'; unshift @INC, $BASEDIR.'/bioperl-live'; } use Bio::EnsEMBL::Registry; use Bio::EnsEMBL::MiscFeature; use Bio::EnsEMBL::MiscSet; use Bio::EnsEMBL::Attribute; use Bio::EnsEMBL::SimpleFeature; use Bio::EnsEMBL::Analysis; use Bio::MapIO; use Bio::SeqIO; use Bio::EnsEMBL::Map::Marker; use Bio::EnsEMBL::Map::MarkerSynonym; use Bio::EnsEMBL::Map::MarkerFeature; use vars qw( $I $ENS_DBA $FPC_MAP $SCALING_FACTOR $SEQ_IO ); BEGIN{ #Argument Processing my $help=0; my $man=0; my( $species, $file, $cb_to_bp, $fasta_file, $no_insert ); GetOptions ( "help|?" => \$help, "man" => \$man, "species=s" => \$species, "registry_file=s" => \$file, "fasta_file=s" => \$fasta_file, "cb_to_bp=s" => \$cb_to_bp, "no_insert" => \$no_insert, ) or pod2usage(2); pod2usage(-verbose => 2) if $man; pod2usage(1) if $help; $I = $no_insert ? 0 : 1; # Put stuff in the database? # CB to BP scaling foctor. Calculated from AGI site. # Can we get this programatically? $SCALING_FACTOR = $cb_to_bp || 4096; # Validate file paths $file ||= $BASEDIR.'/conf/ensembl.registry'; my $fpc_file = shift @ARGV; $fpc_file || ( warn( "Need the path to an FPC file\n" ) && pod2usage(1)); $fasta_file || ( warn( "Need a --fasta_file" ) && pod2usage(1)); map{ -e $_ || ( warn( "File $_ does not exist\n" ) && pod2usage(1) ); -r $_ || ( warn( "Cannot read $_\n" ) && pod2usage(1) ); -f $_ || ( warn( "File $_ is not plain-text\n" ) && pod2usage(1) ); -s $_ || ( warn( "File $_ is empty\n" ) && pod2usage(1) ); } $file, $fpc_file, $fasta_file; # Set the FASTA_FILE warn( "Found a FASTA file: $fasta_file. Loading...\n" ); $SEQ_IO = Bio::SeqIO->new(-file=>$fasta_file, -format=>'fasta'); # Load the ensembl file $species || ( warn( "Need a --species\n" ) && pod2usage(1) ); Bio::EnsEMBL::Registry->load_all( $file ); $ENS_DBA = Bio::EnsEMBL::Registry->get_DBAdaptor( $species, 'core' ); $ENS_DBA || ( warn( "No core DB for $species set in $file\n" ) && pod2usage(1) ); # Load the FPC file warn( "Found an FPC file: $fpc_file. Loading...\n" ); my $mapio = new Bio::MapIO(-format => "fpc", -file => "$fpc_file", -readcor => 0, -verbose => 0); $FPC_MAP = $mapio->next_map(); # Single map per FPC file } #warn Dumper( $fpcmap ); #&list_contigs_by_chromosome($fpcmap); my $meta = $ENS_DBA->get_MetaContainer(); my $species = $meta->get_Species || die( "Cannot find the species in the meta table of the DB" ); my $common_name = $species->common_name || die( "Cannot find the species common name in the meta table of the DB" ); $common_name = ucfirst( $common_name ); ########### # Prepare some Ensembl adaptors #my $analysis = &fetch_analysis( $common_name."_BAC_FPC" ); my $marker_analysis = &fetch_analysis( $common_name."_marker" ); my $sl_adapt = $ENS_DBA->get_adaptor('Slice'); my $f_adapt = $ENS_DBA->get_adaptor('SimpleFeature'); my $mf_adapt = $ENS_DBA->get_adaptor('MiscFeature'); ########### # Process the BAC sequence file from GenBank to map clone names to # accessions my %accessions_by_name; my %accessioned_length; my %all_accessions; # Keep tally for reporting warn( "Processing fasta file containing accessioned clones" ); while ( my $seq = $SEQ_IO->next_seq() ) { my $name = $seq->display_name; my $description = $seq->description; my( $accession, $version, $clone_name ); if( $name =~ m/^gi\|\d+\|gb\|(\w+)\.(\d+)\|.*$/ ){ # Parse genbank header $accession = $1; $version = $2; $all_accessions{$accession} = 0; $accessioned_length{$accession} = $seq->length; $accessions_by_name{$accession} = $accession; $accessions_by_name{$version} = $accession; } else { warn( "Cannot determine accession from $name" ); next; } foreach my $clone ( $description =~ /clone ([A-Z]+(\w+))/ ){ # Clone names can be prefixed with library. Try both with and without $accessions_by_name{$1} = $accession; $accessions_by_name{$2} = $accession; } } ########### # Establish the different classes of feature. Similar to analysis my $misc_set_fpc = Bio::EnsEMBL::MiscSet->new (-code => 'superctgs', # Must conform to Ensembl for display -name => 'FPC Contig', -description => '', -longest_feature => 8000000 ); my $misc_set_bac = Bio::EnsEMBL::MiscSet->new (-code => 'bac_map', # Must conform to Ensembl for display -name => 'BAC map', -description => 'Full list of FPC BAC clones', -longest_feature => 250000 ); my $misc_set_accbac = Bio::EnsEMBL::MiscSet->new (-code => 'acc_bac_map', # Must conform to Ensembl for display -name => 'Accessioned BAC map', -description => 'List of mapped and accessioned BAC clones', -longest_feature => 250000 ); ########### # Loop through each FPC contig foreach my $ctgid( sort $FPC_MAP->each_contigid ){ $ctgid || next; # Skip ctg 0 # last; # Create a slice from the FPC contig my $ctg_name = "ctg$ctgid"; my $ctg_slice = $sl_adapt->fetch_by_region(undef,$ctg_name); $ctg_slice || die( "FPC Contig $ctg_name was not found in the Ensembl DB" ); warn( "Processing $ctg_name at ",$ctg_slice->name ); # Load the FPC as a misc feature my $fpc_feature = Bio::EnsEMBL::MiscFeature->new ( -start => $ctg_slice->start, -end => $ctg_slice->end, -strand => 1, -slice => $ctg_slice, ); my $fpcname_attrib = Bio::EnsEMBL::Attribute->new ( -VALUE => $ctg_slice->seq_region_name, -CODE => 'name', -NAME => 'name' ); $fpc_feature->add_MiscSet($misc_set_fpc); $fpc_feature->add_Attribute($fpcname_attrib); $fpc_feature = $fpc_feature->transform('chromosome'); $mf_adapt->store( $fpc_feature ) if $I; # Process each clone on FPC my $ctg = $FPC_MAP->get_contigobj( $ctgid ); my @clones = $ctg->each_cloneid; warn( " Num clones on $ctg_name: ",scalar(@clones) ); foreach my $cloneid( sort $ctg->each_cloneid ){ my $clone = $FPC_MAP->get_cloneobj( $cloneid ); #my $clone_tmpl = " Clone %s at Ctg %s:%s-%s\n"; #printf( $clone_tmpl, $clone->name, $clone->contigid, # $clone->range->start, $clone->range->end ); my $start = $SCALING_FACTOR * $clone->range->start; my $end = $SCALING_FACTOR * $clone->range->end; my $clone_name = $clone->name; my $feature = Bio::EnsEMBL::MiscFeature->new ( -start => $start, -end => $end, -strand => 1, -slice => $ctg_slice, ); # Populate the feature with a variety of attributes $feature->add_MiscSet($misc_set_bac); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -VALUE => $clone_name, -CODE => 'name', -NAME => 'name' ) ); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -VALUE => $ctg_name, -CODE => 'superctg', -NAME => 'FPC contig name' ) ); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -VALUE => $start, -CODE => 'inner_start', -NAME => 'Max start value' ) ); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -VALUE => $end, -CODE => 'inner_end', -NAME => 'Min end value' ) ); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -VALUE => $end-$start+1, -CODE => 'fp_size', -NAME => 'FP size' ) ); if( my $acc = $accessions_by_name{$clone_name} ){ # This is an accessioned clone $all_accessions{$acc} ++; $feature->add_MiscSet($misc_set_accbac); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -CODE => 'state', -NAME => 'Current state of clone', -VALUE => '12:Accessioned' ) ); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -CODE => 'embl_acc', -NAME => 'Accession number', -VALUE => "$acc" ) ); $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -CODE => 'seq_len', -NAME => 'Accession length', -VALUE => $accessioned_length{$acc} ) ); } else { # This is a free-state clone $feature->add_Attribute( Bio::EnsEMBL::Attribute->new ( -CODE => 'state', -NAME => 'Current state of clone', -VALUE => '06:Free' ) ); } # Store $feature = $feature->transform('chromosome'); $mf_adapt->store( $feature ) if $I; } } ########### # Loop through each marker. my $marker_feature_adaptor = $ENS_DBA->get_adaptor('MarkerFeature'); my $marker_adaptor = $ENS_DBA->get_adaptor('Marker'); my @markers = $FPC_MAP->each_markerid(); warn( " Num markers: ",scalar(@markers) ); foreach my $marker( @markers ){ # last; my $markerobj = $FPC_MAP->get_markerobj($marker); my $type = $markerobj->type; # STS, eMRK, Probe, OVERGO my $ensmarker = Bio::EnsEMBL::Map::Marker->new(); $ensmarker->display_MarkerSynonym ( Bio::EnsEMBL::Map::MarkerSynonym->new(undef,$type,$marker) ); $ensmarker->priority(100); #Ensure marker displays # get all the contigs where this marker hit my @contigs = $markerobj->each_contigid(); foreach my $ctgid( @contigs ) { $ctgid || next; # Skip empty contig # Create a slice from the FPC contig my $ctg_name = "ctg$ctgid"; my $ctg_slice = $sl_adapt->fetch_by_region(undef,$ctg_name); $ctg_slice || die( "FPC $ctg_name was not found in the Ensembl DB" ); # Create the marker feature my $maploc = $markerobj->position($ctgid); my $marker_feature = Bio::EnsEMBL::Map::MarkerFeature->new ( undef, #DBid undef, #MarkerFeatureAdaptor $maploc * $SCALING_FACTOR, # Start ($maploc+1) * $SCALING_FACTOR, # End - assume length=SCALING_FACTOR $ctg_slice, # Slice $marker_analysis, # Analysis undef, # Marker ID? scalar( @contigs ), # map weight $ensmarker, # Ensembl Marker ); $marker_feature = $marker_feature->transform('chromosome') || ( warn("No chr mapping for $marker!") && next ); $marker_feature_adaptor->store( $marker_feature ) if $I; } } warn( "Found ", scalar( grep{$_} values %all_accessions ), " accessioned clones in FPC\n" ); warn( "Lost ", scalar( grep{! $_} values %all_accessions ), " accessioned clones from FPC\n" ); exit; #====================================================================== sub list_contigs_by_chromosome{ my $FPC_MAP = shift; my %chr_data; my %lengths; my $scaler = $SCALING_FACTOR || 4096; foreach my $ctgname( $FPC_MAP->each_contigid ){ $ctgname || next; # Skip empty my $ctgobj = $FPC_MAP->get_contigobj($ctgname); my $ctgpos = $ctgobj->position+0 || 0; my $ctgstart = $ctgobj->range->start || 0; my $ctgend = $ctgobj->range->end || 0; my $ctgbasepair = $ctgend * $scaler; my $chr = $ctgobj->group || ''; $chr_data{$chr} ||= []; push @{$chr_data{$chr}}, [ $ctgname, sprintf( "%.2f", $ctgpos ), #$ctgstart, $ctgend , $ctgbasepair, ]; my $l_n = length($ctgname); my $l_p = length($ctgpos); my $l_s = length($ctgstart); my $l_e = length($ctgend); my $l_b = length($ctgbasepair); if( $l_n > ($lengths{name} ||0) ){ $lengths{name} = $l_n } if( $l_p > ($lengths{pos} ||0) ){ $lengths{pos} = $l_p } if( $l_s > ($lengths{start}||0) ){ $lengths{start}= $l_s } if( $l_e > ($lengths{end} ||0) ){ $lengths{end} = $l_e } if( $l_b > ($lengths{bp} ||0) ){ $lengths{bp} = $l_b } } my $num_per_line = 3; $lengths{name} += 3; # Allow for ctg prefix my $entry_t = join( " ", "|", "%-${lengths{name}}s", "%${lengths{pos}}s", #"%${lengths{start}}s", "%${lengths{end}}s", "%${lengths{bp}}s", "|" ); my $tmpl = " ". ( $entry_t x $num_per_line ) . "\n"; # Loop through each chromosome and print FPC data foreach my $chr( sort{$a<=>$b} keys %chr_data ){ my @ctgs = sort{$a->[0]<=>$b->[0]} @{$chr_data{$chr}}; map{ $_->[0] = "Ctg".$_->[0] } @ctgs; my $total_length = 0; map{ $total_length += $_->[3] } @ctgs; my $num_ctgs = scalar( @ctgs ); print( "Chr: $chr ($num_ctgs FPCs, $total_length bp)\n" ); while( my @entries = splice( @ctgs, 0, $num_per_line ) ){ my @data = ( map{defined($_) ? $_ : ''} map{@{$entries[$_-1]||[]}[0..3]} (1..$num_per_line) ); #warn Dumper( @data ); printf( $tmpl, @data ); } } } #====================================================================== # Returns an Analysis object; either fetched from the DB if one exists, # or created fresh, in which case it is stored to the DB. sub fetch_analysis{ my $logic_name = shift || die("Need a logic_name" ); my $db_file = shift || ''; my $adaptor = $ENS_DBA->get_adaptor('Analysis'); my %args = ( -logic_name=>$logic_name, $db_file ? (-db_file=>$db_file) : () ); # Hard-coded nastyness to make analyses correspond to Ensembl # None needed for now if( $logic_name eq 'MyAnalysis' ){ $args{-logic_name} = 'MyLogic'; $args{-db} = 'MyDB'; $args{-program} = 'MyProgram'; } my $analysis; if( $analysis = $adaptor->fetch_by_logic_name($args{-logic_name}) ){ # Analysis found in database already; use this. return $analysis; } # No analysis - create one from scratch $analysis = Bio::EnsEMBL::Analysis->new(%args); $adaptor->store($analysis) if $I; return $analysis; } #====================================================================== 1;
<!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>hilary_mason_data 2009 knowledge graph</title> </head> <body> <p><a title="hilary_mason_data" href="../hilary_mason_data_home.html">hilary_mason_data</a> <a title="hilary_mason_data-2009" href="#">hilary_mason_data-2009</a> knowledge-graph by maker-knowledge-mining</p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- maker adsense --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-5027806277543591" data-ad-slot="4192012269"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <h1>hilary_mason_data 2009 knowledge graph</h1> <br/><h3>similar blogs computed by tfidf model</h3><br/><h3>similar blogs computed by <a title="lsi-model" href="./hilary_mason_data_lsi.html">lsi model</a></h3><br/><h3>similar blogs computed by <a title="lda-model" href="./hilary_mason_data_lda.html">lda model</a></h3><br/><h2>blogs list:</h2><p>1 <a title="hilary_mason_data-2009-38" href="../hilary_mason_data-2009/hilary_mason_data-2009-12-24-IgniteNYC%3A_The_video%21.html">hilary mason data-2009-12-24-IgniteNYC: The video!</a></p> <p>Introduction: IgniteNYC: The video! Posted: December 24, 2009 | Author: hilary | Filed under: academics , blog | Tags: presentation , python | 15 Comments » The video of my IgniteNYC presentation is up, and has gotten a great response! I’m working on removing the me-specific bits from the code and I’ll be posting it as open-source very soon!</p><p>2 <a title="hilary_mason_data-2009-37" href="../hilary_mason_data-2009/hilary_mason_data-2009-11-25-IgniteNYC%3A_How_to_Replace_Yourself_with_a_Very_Small_Shell_Script.html">hilary mason data-2009-11-25-IgniteNYC: How to Replace Yourself with a Very Small Shell Script</a></p> <p>Introduction: IgniteNYC: How to Replace Yourself with a Very Small Shell Script Posted: November 25, 2009 | Author: hilary | Filed under: blog , Presentations | Tags: email , ignitenyc , presentations , scripts | 15 Comments » I recently gave a talk at IgniteNYC on How to Replace Yourself with a Very Small Shell Script . The Ignite events are a fun blend of performance, technology, and speaking skill. Each presenter gives a five minute talk with twenty slides that auto-advance after 15 seconds. The title of my talk is a classic geek reference (you can get the t-shirt ). I’m very interested in developing automated techniques for handling the massive and growing amounts of information that we all have to deal with. I started with e-mail and twitter, both of which are easy to access programmatically (via IMAP and the Twitter API ). In the talk, I went through several of the simple and successful e-mail management scripts that I’ve developed. I decided to</p><p>3 <a title="hilary_mason_data-2009-36" href="../hilary_mason_data-2009/hilary_mason_data-2009-11-10-My_code_is_on_TV_%28and_so_am_I%29%21.html">hilary mason data-2009-11-10-My code is on TV (and so am I)!</a></p> <p>Introduction: My code is on TV (and so am I)! Posted: November 10, 2009 | Author: hilary | Filed under: academics , blog , Media | Tags: code , media , press , television | 5 Comments » FoxNY did a piece featuring me and Diana as hackers who use our technical powers for good, not evil. There are way too few female technologists on television, and I’m happy to do what I can to show that women kick ass with code! Look for my mischievous I’m-writing-infinite-nested-loops grin in the clip where I’m programming. If this looks like fun to you, come join us at NYC Resistor (where the segment was filmed!) for Thursday night craft nights or for one of many awesome classes .</p><p>4 <a title="hilary_mason_data-2009-35" href="../hilary_mason_data-2009/hilary_mason_data-2009-10-17-Yahoo_OpenHackNYC%3A_The_Del.icio.us_Cake.html">hilary mason data-2009-10-17-Yahoo OpenHackNYC: The Del.icio.us Cake</a></p> <p>Introduction: Yahoo OpenHackNYC: The Del.icio.us Cake Posted: October 17, 2009 | Author: hilary | Filed under: blog , projects | Tags: api , cake , conference , delicious , hack , openhacknyc | 4 Comments » Last weekend Yahoo came to New York for an Open Hack Day , and it was great! I was invited to speak on a panel on semantic metadata , moderated by Paul Ford (harpers.org) along with Marco Neumann (KONA) and Paul Tarjan (Yahoo/Search Monkey). The panel was a lively discussion, and we got some great questions from the audience. After the panel, I stayed around to participate in the hack competition. Yahoo! provided a fantastic space, with free-flowing coffee, snacks, comfy chairs and plenty of Yahoo folks and other hackers around to give advice and play foosball with. I teamed up with Diana Eng , Alicia Gibb , and Bill Ward to create the Del.icio.us Cake! The cake is attached to a laptop via USB. A program running on the laptop accepts a delicious</p><p>5 <a title="hilary_mason_data-2009-34" href="../hilary_mason_data-2009/hilary_mason_data-2009-10-16-Data%3A_first_and_last_names_from_the_US_Census.html">hilary mason data-2009-10-16-Data: first and last names from the US Census</a></p> <p>Introduction: Data: first and last names from the US Census Posted: October 16, 2009 | Author: hilary | Filed under: blog | Tags: data , dataset , mysql , sql | 1 Comment » I’ve found myself in need of a name distribution for a few projects recently, so I thought I would post it here so I won’t have to go looking for it again. The data is available from the US Census Bureau (from 1990 census) here , and I have it here in a friendly MySQL *.sql format (it will create the tables and insert the data). There are three tables: male first names, female first names, and surnames. I’ve noted several issues in the data that are likely the result of typos, so make sure to do your own validation if your application requires it. The format is simple: the name frequency (percentage of people in the sampled population with that name) cumulative frequency (as you read down the list, the percentage of total population covered) rank If you want to use this to generate</p><p>6 <a title="hilary_mason_data-2009-33" href="../hilary_mason_data-2009/hilary_mason_data-2009-10-03-Hadoop_World_NYC.html">hilary mason data-2009-10-03-Hadoop World NYC</a></p> <p>Introduction: Hadoop World NYC Posted: October 3, 2009 | Author: hilary | Filed under: academics , blog | Tags: conference , data analysis , hadoop | 9 Comments » Yesterday, I attended the first Hadoop World NYC conference. Hadoop is a platform for scalable distributed computing. In essence, it makes analyzing large quantities of data much faster, and analyzing very large quantities of data possible. Cloudera did a great job organizing the conference, and managed to assemble a diverse set of speakers. The sessions covered everything from academic research to fraud detection to bioinformatics and even helping people fall in love (eHarmony uses Hadoop)! I’m not going to review every session, but I saw several themes emerging from the content and conversations. Hadoop is Getting Easier New integrated UIs like Cloudera Desktop and Karmasphere mean that developers will no longer be required to use a command-line interface to configure and execute Hadoop job</p><p>7 <a title="hilary_mason_data-2009-32" href="../hilary_mason_data-2009/hilary_mason_data-2009-08-29-Do_you_do_human_subject_research%3F.html">hilary mason data-2009-08-29-Do you do human subject research?</a></p> <p>Introduction: Do you do human subject research? Posted: August 29, 2009 | Author: hilary | Filed under: academics , blog | Tags: headlamp , human , research , science | 2 Comments » Dear friends and colleagues, Do you do research that involves gathering data from human participants? This can be anything from marketing surveys to psychology experiments to medical science. If so, please take a short (5 to 10 minute) survey: research tool survey The results of the survey will help us design a new platform for online human research ! I’m very excited about this project and would very much appreciate your input. If you have colleagues who do this kind of work, please pass it on. Thank you!</p><p>8 <a title="hilary_mason_data-2009-31" href="../hilary_mason_data-2009/hilary_mason_data-2009-08-12-My_NYC_Python_Meetup_Presentation%3A_Practical_Data_Analysis_in_Python.html">hilary mason data-2009-08-12-My NYC Python Meetup Presentation: Practical Data Analysis in Python</a></p> <p>Introduction: My NYC Python Meetup Presentation: Practical Data Analysis in Python Posted: August 12, 2009 | Author: hilary | Filed under: blog | Tags: data , data analysis , nltk , presentations , python , spam , twitter | Leave a comment » I gave a talk at the NYC Python Meetup on July 29 on Practical Data Analysis in Python . I tend to use my slides for visual representations of the concepts I’m discussing, so there’s a lot of content that was in the presentation that you unfortunately won’t see here. The talk starts with the immense opportunities for knowledge derived from data. I spent some time showing data systems ‘in the wild’ along with the appropriate algorithmic vocabulary (for example, amazon.com ‘s ‘books you might like’ feature is a recommender system ). Once we can describe the problems properly, we can look for tools, and Python has many! Finally, in the fun part of the presentation, I demoed working code that uses NLTK to build a Twitter sp</p><p>9 <a title="hilary_mason_data-2009-30" href="../hilary_mason_data-2009/hilary_mason_data-2009-06-01-My_Barcamp_Presentation%3A_Have_Data%3F_What_Now%3F%21.html">hilary mason data-2009-06-01-My Barcamp Presentation: Have Data? What Now?!</a></p> <p>Introduction: My Barcamp Presentation: Have Data? What Now?! Posted: June 1, 2009 | Author: hilary | Filed under: blog | Tags: barcamp , barcampnyc , classifier , clustering , conference , data , presentations | Leave a comment » I gave a talk at BarCampNYC4 on Saturday on common data problems and a very light overview of algorithms that address them. My talk at barcampnyc4 - photo courtesy of dynamist on flickr. I delivered the majority of the content verbally, by talking through examples of problems and how to solve them, so there’s no guarantee that these slides will make sense, but they might be funny! Have data? What now?! View more presentations from Hilary Mason . Sanford took some excellent notes during the presentation. There were some very nice comments on twitter. The discussion was so lively and engaging that I’m planning to expand on this content — I really welcome your suggestions and comments!</p><p>10 <a title="hilary_mason_data-2009-29" href="../hilary_mason_data-2009/hilary_mason_data-2009-05-07-I%E2%80%99m_on_Jon_Udell%E2%80%99s_Interviews_with_Innovators%21.html">hilary mason data-2009-05-07-I’m on Jon Udell’s Interviews with Innovators!</a></p> <p>Introduction: I’m on Jon Udell’s Interviews with Innovators! Posted: May 7, 2009 | Author: hilary | Filed under: blog | Tags: media , path101 , podcast | Leave a comment » Jon Udell hosted Charlie and I on his Interviews with Innovators podcast. We discussed Path101 ‘s approach to career advice through data, and how the high availability of data is changing the way we make decisions. Listen here .</p><p>11 <a title="hilary_mason_data-2009-28" href="../hilary_mason_data-2009/hilary_mason_data-2009-04-28-LSL%3A_AOL_IM_Status_Indicator.html">hilary mason data-2009-04-28-LSL: AOL IM Status Indicator</a></p> <p>Introduction: LSL: AOL IM Status Indicator Posted: April 28, 2009 | Author: hilary | Filed under: blog | Tags: aim , lsl , second life | 3 Comments » I think this might be my very first LSL script, from back in 2005! This script indicates whether your AIM (AOL Instant Messenger) account is online by changing the color of an object. You can configure it to either share your AIM ID publicly, or keep it private. AIM Indicators in Second LIfe This script uses the AIM web services API to check your online status — you only need to give it your username, not your password! This is not a proxy service. You can’t send messages through this script, just show your online status in SL. To use this script, create an object in your favorite shape, create a new script inside of it, paste this code into it and save . key request_id; string aim_id; string av_name; key data_card; integer nLine = 0; integer public = TRUE; default { state_entry() { llSetText(</p><p>12 <a title="hilary_mason_data-2009-27" href="../hilary_mason_data-2009/hilary_mason_data-2009-04-02-From_the_ACM%3A_Learning_More_About_Active_Learning.html">hilary mason data-2009-04-02-From the ACM: Learning More About Active Learning</a></p> <p>Introduction: From the ACM: Learning More About Active Learning Posted: April 2, 2009 | Author: hilary | Filed under: blog | Tags: acm , active learning , machine learning | 2 Comments Âť The April edition of Communications of the ACM has an interesting article on recent advances in active learning by Graeme Stemp-Morlock. In passive learning (a more traditional approach), you build a large training set of classified data by (often) manually assigning labels. This data is used as the basis of your analysis. In the real world, we find that generating these large sets of labeled data is often expensive and time consuming. With active learning , you identify the most ambiguous data to label, resulting in a much higher payoff for each label defined (and fewer headaches for your labelers). The article goes on to mention that active learning is being used in practice with excellent results (for example in music identification, text classification, and even bioinfo</p><p>13 <a title="hilary_mason_data-2009-26" href="../hilary_mason_data-2009/hilary_mason_data-2009-02-28-LSL%3A_Newspaper_Stand_%28Pull_Data_From_an_API_and_Display_it_in_Second_Life%29.html">hilary mason data-2009-02-28-LSL: Newspaper Stand (Pull Data From an API and Display it in Second Life)</a></p> <p>Introduction: LSL: Newspaper Stand (Pull Data From an API and Display it in Second Life) Posted: February 28, 2009 | Author: hilary | Filed under: blog | Tags: edtech , lsl , news , rss , second life , virtualworlds , xml , yahoo | 6 Comments » Second Life news stand One of the more popular objects that I created in Second Life is the News Stand. This charming device takes any query term and displays the two latest headlines from Yahoo! News. Clicking the news stand will load the top news story for the topic in a web browser. I’ve gotten more requests to customize the script than I can possibly keep up with, so I’ve decided to release the code under a creative commons license. I hope you find it useful! Please let me know if you make improvements, so that I can link to them from here. Unfortunately, parsing XML at all and RSS feeds in particular is extremely messy in LSL. This script doesn’t contain a general RSS feed parser — the parsing code was written s</p><p>14 <a title="hilary_mason_data-2009-25" href="../hilary_mason_data-2009/hilary_mason_data-2009-02-10-JWU_Guest_Lecture%3A_Introduction_to_JavaScript_and_AJAX.html">hilary mason data-2009-02-10-JWU Guest Lecture: Introduction to JavaScript and AJAX</a></p> <p>Introduction: JWU Guest Lecture: Introduction to JavaScript and AJAX Posted: February 10, 2009 | Author: hilary | Filed under: blog | Tags: ajax , javascript , jwu , presentations | Leave a comment » JWU Guest Talk: JavaScript and AJAX View more presentations from Hilary Mason . (tags: javascript jwu ) I was invited to give a talk at JWU for an audience of graphic design students on how to enhance their XHTML/CSS skills with JavaScript and AJAX. Enjoy the slides, and I’m looking forward to part 2!</p><p>15 <a title="hilary_mason_data-2009-24" href="../hilary_mason_data-2009/hilary_mason_data-2009-01-31-WordPress_tip%3A_Move_comments_from_one_post_to_another_post.html">hilary mason data-2009-01-31-WordPress tip: Move comments from one post to another post</a></p> <p>Introduction: WordPress tip: Move comments from one post to another post Posted: January 31, 2009 | Author: hilary | Filed under: blog | Tags: tips , wordpress | 3 Comments » I recently ended up with two posts on this site about the same project — one was a short summary, and the other a long, detailed article. I decided to consolidate them into the longer article, but I didn’t want to lose the six comments that had been posted to the short article. I couldn’t find a way in the WordPress UI to move comments from one post to another, so I jumped into the database. If you run WordPress on a host, they probably provide a MySQL management tool like PHPMyAdmin, or you can log in with a mysql client. First, find the table that contains the posts for your blog (the table name usually ends in _posts ). Find the ID that matches the post you want to move comments from , and the ID for the post that you want to move comments to . Note: An easy way to do this is to search by t</p><p>16 <a title="hilary_mason_data-2009-23" href="../hilary_mason_data-2009/hilary_mason_data-2009-01-01-Twitter%3A_A_greasemonkey_script_to_show_who_follows_you.html">hilary mason data-2009-01-01-Twitter: A greasemonkey script to show who follows you</a></p> <p>Introduction: Twitter: A greasemonkey script to show who follows you Posted: January 1, 2009 | Author: hilary | Filed under: blog | Tags: extension , firefox , greasemonkey , script , socialmedia , status , twitter | 9 Comments » A couple of days ago I saw @skap5′s comment : “Dear Twitter Is it too much to ask to add a follower marker so I can know if someone is following me and not just if I am following them?” I think that Twitter could benefit from displaying more information on the home page, and this idea was easy enough to code up. It should save some time and make the Twitter homepage that much more useful. The script displays a tiny icon on top of the portrait of people who are following you back on your Twitter home page. It leaves your non-followers alone, though it would be easy enough to develop a version that puts silly mustaches on them. This is only a first version, and I welcome your comments and suggestions. If you already have Greasemo</p><br/><br/><br/> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-48522588-1', 'makerhacker.github.io'); ga('send', 'pageview'); </script> </body> </html>
require File.expand_path('../authorization_helper', __FILE__) describe '02: authorization.rb with platform overrides' do before do set_environment load_platform_configs(file: __FILE__, file_ext: '02_*') register_framework_and_platform register_engine @auth = @env.authorization end it '02: should be valid' do assert_kind_of Hash, @auth.platforms refute_empty @auth.platforms, 'Authorization should be populated.' end it '02: should have framework' do refute_empty @auth.platform('test_framework'), 'Framework test_framework should be populated.' end it '02: should have platform' do refute_empty @auth.platform('test_platform'), 'Platform test_platform should be populated.' end it '02: authorize by' do assert_equal 'overcan', @auth.current_authorize_by(user) end it '02: ability class' do assert_equal framework_ability, @auth.current_ability_class(user) end it '02: serializer include modules in order' do expect = [Test::Framework::Ability, Test::Framework::Authorize, Test::Framework::ActiveModelSerializer] assert_equal expect, @auth.current_serializer_include_modules(user) end it '02: serializer defaults' do expect = {authorize_action: 'destroy', ability_actions: ['read', 'update', 'destroy'], another: 'another default'} assert_equal expect, @auth.current_serializer_defaults(user) end if debug_on it '02: debug' do puts "\n" puts "02: Authorization platforms: #{@auth.platforms.inspect}" end end end
''' Created on Jan 15, 2014 @author: Jose Borreguero ''' from setuptools import setup setup( name = 'dsfinterp', packages = ['dsfinterp','dsfinterp/test' ], version = '0.1', description = 'Cubic Spline Interpolation of Dynamics Structure Factors', long_description = open('README.md').read(), author = 'Jose Borreguero', author_email = 'jose@borreguero.com', url = 'https://github.com/camm-sns/dsfinterp', download_url = 'http://pypi.python.org/pypi/dsfinterp', keywords = ['AMBER', 'mdend', 'energy', 'molecular dynamics'], classifiers = [ 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Scientific/Engineering :: Physics', ], )
using System; using ExpenseManager.Entity.Enums; namespace ExpenseManager.BusinessLogic.TransactionServices.Models { public class TransactionServiceModel { /// <summary> /// Unique id of transaction /// </summary> public Guid Id { get; set; } /// <summary> /// Bool representing if transaction is expense /// </summary> public bool Expense { get; set; } /// <summary> /// Amount of money in transaction /// </summary> public decimal Amount { get; set; } /// <summary> /// Date when transaction occurred /// </summary> public DateTime Date { get; set; } /// <summary> /// Short description of transaction /// </summary> public string Description { get; set; } /// <summary> /// Id of wallet where transaction belongs /// </summary> public Guid WalletId { get; set; } /// <summary> /// Id of budget where transaction belongs /// </summary> public Guid? BudgetId { get; set; } /// <summary> /// Id of currency which was used for transaction /// </summary> public Guid CurrencyId { get; set; } /// <summary> /// Id of category where transaction belongs /// </summary> public Guid CategoryId { get; set; } /// <summary> /// Bool representing if transaction is repeatable /// </summary> public bool IsRepeatable { get; set; } /// <summary> /// How often should transaction repeat /// </summary> public int? NextRepeat { get; set; } /// <summary> /// Type of repetition /// </summary> public FrequencyType FrequencyType { get; set; } /// <summary> /// Date until which transaction should repeat /// </summary> public DateTime? LastOccurrence { get; set; } } }
<?php namespace DMS\Filter\Rules; /** * RegExp Rule * * Filter using preg_replace and unicode or non-unicode patterns * * @package DMS * @subpackage Filter * * @Annotation */ class RegExp extends Rule { /** * Unicode version of Pattern * * @var string */ public $unicodePattern; /** * Reg Exp Pattern * * @var string */ public $pattern; }
class ErrorFactory { getError(errorName: string, status: number): any { class NestedError extends Error { errorMessages: any; status: number; constructor(msg: any) { super(`${errorName}: ${msg.toString()}`); if (!(msg instanceof String) && msg instanceof Array) { this.errorMessages = msg; } if (undefined !== status) { this.status = status; } } } return NestedError; } } const errorArr = [ { name: 'NoEmailError', code: 401 }, { name: 'PasswordMismatchError', code: 401 }, { name: 'DuplicatedEntryError', code: 409 }, { name: 'InvalidArgumentError', code: 400 }, { name: 'InsufficientPermissionError', code: 403 }, { name: 'NotFoundError', code: 404 }, { name: 'NotAllowedError', code: 405 }, { name: 'DuplicatedIssueError', code: 400 }, ]; const errors: any = {}; const errorFactory = new ErrorFactory(); errorArr.forEach((error) => { errors[error.name] = errorFactory.getError(error.name, error.code); }); export { errors as Errors };
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0) on Sun Feb 09 15:21:29 PST 2014 --> <title>javax.lang.model.type</title> <meta name="date" content="2014-02-09"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <h1 class="bar"><a href="../../../../javax/lang/model/type/package-summary.html" target="classFrame">javax.lang.model.type</a></h1> <div class="indexContainer"> <h2 title="Interfaces">Interfaces</h2> <ul title="Interfaces"> <li><a href="ArrayType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">ArrayType</span></a></li> <li><a href="DeclaredType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">DeclaredType</span></a></li> <li><a href="ErrorType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">ErrorType</span></a></li> <li><a href="ExecutableType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">ExecutableType</span></a></li> <li><a href="IntersectionType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">IntersectionType</span></a></li> <li><a href="NoType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">NoType</span></a></li> <li><a href="NullType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">NullType</span></a></li> <li><a href="PrimitiveType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">PrimitiveType</span></a></li> <li><a href="ReferenceType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">ReferenceType</span></a></li> <li><a href="TypeMirror.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">TypeMirror</span></a></li> <li><a href="TypeVariable.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">TypeVariable</span></a></li> <li><a href="TypeVisitor.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">TypeVisitor</span></a></li> <li><a href="UnionType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">UnionType</span></a></li> <li><a href="WildcardType.html" title="interface in javax.lang.model.type" target="classFrame"><span class="interfaceName">WildcardType</span></a></li> </ul> <h2 title="Enums">Enums</h2> <ul title="Enums"> <li><a href="TypeKind.html" title="enum in javax.lang.model.type" target="classFrame">TypeKind</a></li> </ul> <h2 title="Exceptions">Exceptions</h2> <ul title="Exceptions"> <li><a href="MirroredTypeException.html" title="class in javax.lang.model.type" target="classFrame">MirroredTypeException</a></li> <li><a href="MirroredTypesException.html" title="class in javax.lang.model.type" target="classFrame">MirroredTypesException</a></li> <li><a href="UnknownTypeException.html" title="class in javax.lang.model.type" target="classFrame">UnknownTypeException</a></li> </ul> </div> </body> </html>
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {IMinimatch, Minimatch} from 'minimatch'; /** Map that holds patterns and their corresponding Minimatch globs. */ const patternCache = new Map<string, IMinimatch>(); /** * Context that is provided to conditions. Conditions can use various helpers * that PullApprove provides. We try to mock them here. Consult the official * docs for more details: https://docs.pullapprove.com/config/conditions. */ const conditionContext = { 'len': (value: any[]) => value.length, 'contains_any_globs': (files: PullApproveArray, patterns: string[]) => { // Note: Do not always create globs for the same pattern again. This method // could be called for each source file. Creating glob's is expensive. return files.some(f => patterns.some(pattern => getOrCreateGlob(pattern).match(f))); } }; /** * Converts a given condition to a function that accepts a set of files. The returned * function can be called to check if the set of files matches the condition. */ export function convertConditionToFunction(expr: string): (files: string[]) => boolean { // Creates a dynamic function with the specified expression. The first parameter will // be `files` as that corresponds to the supported `files` variable that can be accessed // in PullApprove condition expressions. The followed parameters correspond to other // context variables provided by PullApprove for conditions. const evaluateFn = new Function('files', ...Object.keys(conditionContext), ` return (${transformExpressionToJs(expr)}); `); // Create a function that calls the dynamically constructed function which mimics // the condition expression that is usually evaluated with Python in PullApprove. return files => { const result = evaluateFn(new PullApproveArray(...files), ...Object.values(conditionContext)); // If an array is returned, we consider the condition as active if the array is not // empty. This matches PullApprove's condition evaluation that is based on Python. if (Array.isArray(result)) { return result.length !== 0; } return !!result; }; } /** * Transforms a condition expression from PullApprove that is based on python * so that it can be run inside JavaScript. Current transformations: * 1. `not <..>` -> `!<..>` */ function transformExpressionToJs(expression: string): string { return expression.replace(/not\s+/g, '!'); } /** * Superset of a native array. The superset provides methods which mimic the * list data structure used in PullApprove for files in conditions. */ class PullApproveArray extends Array<string> { constructor(...elements: string[]) { super(...elements); // Set the prototype explicitly because in ES5, the prototype is accidentally // lost due to a limitation in down-leveling. // https://github.com/Microsoft/TypeScript/wiki/FAQ#why-doesnt-extending-built-ins-like-error-array-and-map-work. Object.setPrototypeOf(this, PullApproveArray.prototype); } /** Returns a new array which only includes files that match the given pattern. */ include(pattern: string): PullApproveArray { return new PullApproveArray(...this.filter(s => getOrCreateGlob(pattern).match(s))); } /** Returns a new array which only includes files that did not match the given pattern. */ exclude(pattern: string): PullApproveArray { return new PullApproveArray(...this.filter(s => !getOrCreateGlob(pattern).match(s))); } } /** * Gets a glob for the given pattern. The cached glob will be returned * if available. Otherwise a new glob will be created and cached. */ function getOrCreateGlob(pattern: string) { if (patternCache.has(pattern)) { return patternCache.get(pattern)!; } const glob = new Minimatch(pattern, {dot: true}); patternCache.set(pattern, glob); return glob; }
using System.Threading.Tasks; using JetBrains.Annotations; namespace System { public static class DelegateExtensions { public static async Task InvokeAsync([NotNull] this Action action) { if (action == null) throw new ArgumentNullException(nameof(action)); await Task.Run(() => action.Invoke()); } public static async void BeginInvoke([NotNull] this Action action) { if (action == null) throw new ArgumentNullException(nameof(action)); await InvokeAsync(action); } public static async Task<T> InvokeAsync<T>([NotNull] this Func<T> func) { if (func == null) throw new ArgumentNullException(nameof(func)); return await Task.Run(() => func.Invoke()); } public static async void BeginInvoke<T>([NotNull] this Func<T> func) { if (func == null) throw new ArgumentNullException(nameof(func)); await InvokeAsync(func); } } }
<script type="text/javascript"> $(document).ready(function(){ $(".contentbox fieldset").each(function(){ $('.jqTransformInputWrapper', $(this)).width('100%'); if(!$(".sf_admin_form_row", $(this)).length) { $('a[href=#' + $(this).attr('id') + ']').parent().remove(); } }); $(".sf_admin_form fieldset").each(function(){ if(!$(".sf_admin_form_row", $(this)).length) { $(this).remove(); } }); }); </script> <?php use_helper('I18N', 'Date') ?> <?php $sf_response->addMeta('title', 'Administration | '.__('Utilisateurs', array(), 'messages').' | '.__('Nouvel utilisateur', array(), 'messages')) ?> <?php slot('breadcrumb', array(array('url' => '@sf_guard_user', 'label' => __('Utilisateurs', array(), 'messages')), array('url' => '@sf_guard_user_new', 'label' => __('Nouvel utilisateur', array(), 'messages')))) ?> <?php include_partial('sfGuardUser/assets') ?> <?php include_partial('sfGuardUser/flashes') ?> <div class="contentcontainer"> <div class="headings"> <h2><?php echo __('Nouvel utilisateur', array(), 'messages') ?></h2> </div> <?php include_partial('sfGuardUser/form_header', array('sf_guard_user' => $sf_guard_user, 'form' => $form, 'configuration' => $configuration)) ?> <div class="contentbox sf_admin_form"> <?php echo form_tag_for($form, '@sf_guard_user') ?> <?php include_partial('sfGuardUser/form_header', array('sf_guard_user' => $sf_guard_user, 'form' => $form, 'configuration' => $configuration)) ?> <?php echo $form->renderHiddenFields(false) ?> <div class="left"> <?php include_partial('sfGuardUser/form', array('sf_guard_user' => $sf_guard_user, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?> </div> <div class="right"> <?php foreach ($configuration->getFormFields($form, 'metas') as $fieldset => $fields): ?> <?php foreach ($fields as $name => $field): ?> <?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?> <li> <?php include_partial('sfGuardUser/form_field', array( 'name' => $name, 'attributes' => $field->getConfig('attributes', array()), 'label' => $field->getConfig('label'), 'help' => $field->getConfig('help'), 'form' => $form, 'field' => $field, 'class' => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name, )) ?> </li> <?php endforeach; ?> <?php endforeach; ?> </div> <div class="clear"></div> <?php include_partial('sfGuardUser/form_footer', array('sf_guard_user' => $sf_guard_user, 'form' => $form, 'configuration' => $configuration)) ?> </form> </div> </div>
// Copyright (c) 2011-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include "guiconstants.h" #include "walletmodel.h" #include "support/allocators/secure.h" #include <QKeyEvent> #include <QMessageBox> #include <QPushButton> extern bool fWalletUnlockStakingOnly; AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : QDialog(parent), ui(new Ui::AskPassphraseDialog), mode(mode), model(0), fCapsLock(false) { ui->setupUi(this); ui->passEdit1->setMinimumSize(ui->passEdit1->sizeHint()); ui->passEdit2->setMinimumSize(ui->passEdit2->sizeHint()); ui->passEdit3->setMinimumSize(ui->passEdit3->sizeHint()); ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE); ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE); ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE); // Setup Caps Lock detection. ui->passEdit1->installEventFilter(this); ui->passEdit2->installEventFilter(this); ui->passEdit3->installEventFilter(this); ui->stakingCheckBox->setChecked(fWalletUnlockStakingOnly); ui->stakingCheckBox->hide(); switch(mode) { case Encrypt: // Ask passphrase x2 ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.")); ui->passLabel1->hide(); ui->passEdit1->hide(); setWindowTitle(tr("Encrypt wallet")); break; case UnlockStaking: ui->stakingCheckBox->setChecked(true); ui->stakingCheckBox->show(); case Unlock: // Ask passphrase ui->stakingCheckBox->setChecked(false); ui->stakingCheckBox->show(); ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet.")); ui->passLabel2->hide(); ui->passEdit2->hide(); ui->passLabel3->hide(); ui->passEdit3->hide(); setWindowTitle(tr("Unlock wallet")); break; case Decrypt: // Ask passphrase ui->warningLabel->setText(tr("This operation needs your wallet passphrase to decrypt the wallet.")); ui->passLabel2->hide(); ui->passEdit2->hide(); ui->passLabel3->hide(); ui->passEdit3->hide(); setWindowTitle(tr("Decrypt wallet")); break; case ChangePass: // Ask old passphrase + new passphrase x2 setWindowTitle(tr("Change passphrase")); ui->warningLabel->setText(tr("Enter the old passphrase and new passphrase to the wallet.")); break; } textChanged(); connect(ui->toggleShowPasswordButton, SIGNAL(toggled(bool)), this, SLOT(toggleShowPassword(bool))); connect(ui->passEdit1, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); connect(ui->passEdit2, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); connect(ui->passEdit3, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); } AskPassphraseDialog::~AskPassphraseDialog() { // Attempt to overwrite text so that they do not linger around in memory secureClearPassFields(); delete ui; } void AskPassphraseDialog::setModel(WalletModel *model) { this->model = model; } void AskPassphraseDialog::accept() { SecureString oldpass, newpass1, newpass2; if(!model) return; oldpass.reserve(MAX_PASSPHRASE_SIZE); newpass1.reserve(MAX_PASSPHRASE_SIZE); newpass2.reserve(MAX_PASSPHRASE_SIZE); // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make this input mlock()'d to begin with. oldpass.assign(ui->passEdit1->text().toStdString().c_str()); newpass1.assign(ui->passEdit2->text().toStdString().c_str()); newpass2.assign(ui->passEdit3->text().toStdString().c_str()); secureClearPassFields(); switch(mode) { case Encrypt: { if(newpass1.empty() || newpass2.empty()) { // Cannot encrypt with empty passphrase break; } QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"), tr("Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!") + "<br><br>" + tr("Are you sure you wish to encrypt your wallet?"), QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Cancel); if(retval == QMessageBox::Yes) { if(newpass1 == newpass2) { if(model->setWalletEncrypted(true, newpass1)) { QMessageBox::warning(this, tr("Wallet encrypted"), "<qt>" + tr("Bitcoin Core will close now to finish the encryption process. " "Remember that encrypting your wallet cannot fully protect " "your bitcoins from being stolen by malware infecting your computer.") + "<br><br><b>" + tr("IMPORTANT: Any previous backups you have made of your wallet file " "should be replaced with the newly generated, encrypted wallet file. " "For security reasons, previous backups of the unencrypted wallet file " "will become useless as soon as you start using the new, encrypted wallet.") + "</b></qt>"); QApplication::quit(); } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted.")); } QDialog::accept(); // Success } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("The supplied passphrases do not match.")); } } else { QDialog::reject(); // Cancelled } } break; case UnlockStaking: case Unlock: if(!model->setWalletLocked(false, oldpass)) { QMessageBox::critical(this, tr("Wallet unlock failed"), tr("The passphrase entered for the wallet decryption was incorrect.")); } else { fWalletUnlockStakingOnly = ui->stakingCheckBox->isChecked(); QDialog::accept(); // Success } break; case Decrypt: if(!model->setWalletEncrypted(false, oldpass)) { QMessageBox::critical(this, tr("Wallet decryption failed"), tr("The passphrase entered for the wallet decryption was incorrect.")); } else { QDialog::accept(); // Success } break; case ChangePass: if(newpass1 == newpass2) { if(model->changePassphrase(oldpass, newpass1)) { QMessageBox::information(this, tr("Wallet encrypted"), tr("Wallet passphrase was successfully changed.")); QDialog::accept(); // Success } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("The passphrase entered for the wallet decryption was incorrect.")); } } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("The supplied passphrases do not match.")); } break; } } void AskPassphraseDialog::textChanged() { // Validate input, set Ok button to enabled when acceptable bool acceptable = false; switch(mode) { case Encrypt: // New passphrase x2 acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); break; case UnlockStaking: case Unlock: // Old passphrase x1 case Decrypt: acceptable = !ui->passEdit1->text().isEmpty(); break; case ChangePass: // Old passphrase x1, new passphrase x2 acceptable = !ui->passEdit1->text().isEmpty() && !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); break; } ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(acceptable); } bool AskPassphraseDialog::event(QEvent *event) { // Detect Caps Lock key press. if (event->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(event); if (ke->key() == Qt::Key_CapsLock) { fCapsLock = !fCapsLock; } if (fCapsLock) { ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else { ui->capsLabel->clear(); } } return QWidget::event(event); } void AskPassphraseDialog::toggleShowPassword(bool show) { ui->toggleShowPasswordButton->setDown(show); const auto mode = show ? QLineEdit::Normal : QLineEdit::Password; ui->passEdit1->setEchoMode(mode); ui->passEdit2->setEchoMode(mode); ui->passEdit3->setEchoMode(mode); } bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event) { /* Detect Caps Lock. * There is no good OS-independent way to check a key state in Qt, but we * can detect Caps Lock by checking for the following condition: * Shift key is down and the result is a lower case character, or * Shift key is not down and the result is an upper case character. */ if (event->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(event); QString str = ke->text(); if (str.length() != 0) { const QChar *psz = str.unicode(); bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; if ((fShift && *psz >= 'a' && *psz <= 'z') || (!fShift && *psz >= 'A' && *psz <= 'Z')) { fCapsLock = true; ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else if (psz->isLetter()) { fCapsLock = false; ui->capsLabel->clear(); } } } return QDialog::eventFilter(object, event); } static void SecureClearQLineEdit(QLineEdit* edit) { // Attempt to overwrite text so that they do not linger around in memory edit->setText(QString(" ").repeated(edit->text().size())); edit->clear(); } void AskPassphraseDialog::secureClearPassFields() { SecureClearQLineEdit(ui->passEdit1); SecureClearQLineEdit(ui->passEdit2); SecureClearQLineEdit(ui->passEdit3); }
/* Copyright (c) 2012, 2013 Kajetan Swierk <k0zmo@outlook.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #include "clw/Prerequisites.h" #include "clw/MemoryObject.h" namespace clw { // !TODO: Add new classes to reflect changes in OpenCL 1.2 enum class EChannelOrder { R = 0x10B0, A = 0x10B1, RG = 0x10B2, RA = 0x10B3, RGB = 0x10B4, RGBA = 0x10B5, BGRA = 0x10B6, ARGB = 0x10B7, Intensity = 0x10B8, Luminance = 0x10B9, Rx = 0x10BA, RGx = 0x10BB, RGBx = 0x10BC }; enum class EChannelType { Normalized_Int8 = 0x10D0, Normalized_Int16 = 0x10D1, Normalized_UInt8 = 0x10D2, Normalized_UInt16 = 0x10D3, Normalized_565 = 0x10D4, Normalized_555 = 0x10D5, Normalized_101010 = 0x10D6, Unnormalized_Int8 = 0x10D7, Unnormalized_Int16 = 0x10D8, Unnormalized_Int32 = 0x10D9, Unnormalized_UInt8 = 0x10DA, Unnormalized_UInt16 = 0x10DB, Unnormalized_UInt32 = 0x10DC, HalfFloat = 0x10DD, Float = 0x10DE }; struct CLW_EXPORT ImageFormat { EChannelOrder order; EChannelType type; ImageFormat() : order(EChannelOrder(0)), type(EChannelType(0)) {} ImageFormat(EChannelOrder order, EChannelType type) : order(order), type(type) {} bool isNull() const { return order == EChannelOrder(0) || type == EChannelType(0); } bool operator==(const ImageFormat& other) const { return order == other.order && type == other.type; } bool operator!=(const ImageFormat& other) const { return !operator==(other); } }; class CLW_EXPORT Image2D : public MemoryObject { public: Image2D() {} Image2D(Context* ctx, cl_mem id) : MemoryObject(ctx, id) {} Image2D(const Image2D& other); Image2D& operator=(const Image2D& other); Image2D(Image2D&& other); Image2D& operator=(Image2D&& other); ImageFormat format() const; int width() const; int height() const; int bytesPerElement() const; int bytesPerLine() const; private: mutable ImageFormat _fmt; }; class CLW_EXPORT Image3D : public MemoryObject { public: Image3D() {} Image3D(Context* ctx, cl_mem id) : MemoryObject(ctx, id) {} Image3D(const Image3D& other); Image3D& operator=(const Image3D& other); Image3D(Image3D&& other); Image3D& operator=(Image3D&& other); ImageFormat format() const; int width() const; int height() const; int depth() const; int bytesPerElement() const; int bytesPerLine() const; int bytesPerSlice() const; private: mutable ImageFormat _fmt; }; #define CASE(X) case X: return string(#X); inline string channelTypeName(EChannelType type) { switch(type) { CASE(EChannelType::Normalized_Int8); CASE(EChannelType::Normalized_Int16); CASE(EChannelType::Normalized_UInt8); CASE(EChannelType::Normalized_UInt16); CASE(EChannelType::Normalized_565); CASE(EChannelType::Normalized_555); CASE(EChannelType::Normalized_101010); CASE(EChannelType::Unnormalized_Int8); CASE(EChannelType::Unnormalized_Int16); CASE(EChannelType::Unnormalized_Int32); CASE(EChannelType::Unnormalized_UInt8); CASE(EChannelType::Unnormalized_UInt16); CASE(EChannelType::Unnormalized_UInt32); CASE(EChannelType::HalfFloat); CASE(EChannelType::Float); default: return "Undefined"; } } inline string channelOrderName(EChannelOrder order) { switch(order) { CASE(EChannelOrder::R); CASE(EChannelOrder::A); CASE(EChannelOrder::RG); CASE(EChannelOrder::RA); CASE(EChannelOrder::RGB); CASE(EChannelOrder::RGBA); CASE(EChannelOrder::BGRA); CASE(EChannelOrder::ARGB); CASE(EChannelOrder::Intensity); CASE(EChannelOrder::Luminance); CASE(EChannelOrder::Rx); CASE(EChannelOrder::RGx); CASE(EChannelOrder::RGBx); default: return "Undefined"; } } #undef CASE }
<fieldset> <legend class=" {{#if isLegendHidden}} visuallyhidden {{else}} form-title heading-large {{/if}}" id="{{legendId}}">{{{legend}}}</legend> {{#EL_ROW}} {{#EL_2FA}} <div class="two-fa"> <img src="{{@root.assetPath}}images/logo_mot.gif" width="56" height="53" alt="MOT" class="two-fa__logo"> {{text}} {{#if pin }} <strong class="two-fa__pin">{{pin}}</strong> {{/if}} </div> {{/EL_2FA}} {{#if EL_CRITERIA}} {{#EL_CRITERIA}} <div id="{{name}}" class="module-criteria"> <span>{{text}}</span> <ul class="criteria__list"> <li data-criteria-param="8" data-criteria="minLength" class="criteria__criterion">8, or more, characters</li> <li data-criteria="hasNumeric" class="criteria__criterion">1, or more, numbers</li> <li data-criteria="hasMixedCase" class="criteria__criterion">upper and lower case letters</li> </ul> {{#if userId}} <span>and, must not</span> <ul class="criteria__list"> <li data-criteria-param="{{userId}}" data-criteria="notMatch" class="criteria__criterion">match your username</li> </ul> {{/if}} </div> {{/EL_CRITERIA}} {{else}} <div class=" form-group {{#if EL_TOUCH.isInline}}inline{{/if}} {{#if EL_2FA}}two-fa__input{{/if}} {{#if error}} has-error {{else}} {{#if EL_INPUT.isCompound}}form-group-compound{{/if}} {{/if}} "> {{#if isFieldset }} <fieldset> <legend class="form-label {{#if mod }}{{mod}}{{/if }}"> {{> atom_question}} </legend> {{#EL_DATE}} <div class="form-date"> <div class="form-group form-group-day"> <label for="{{../name}}-day">Day</label> <input type="{{type}}" id="{{../name}}-day" value="{{valueDay}}" class="form-control"> </div> <div class="form-group form-group-month"> <label for="{{../name}}-month">Month</label> <input type="{{type}}" id="{{../name}}-month" value="{{valueMonth}}" class="form-control"> </div> <div class="form-group form-group-year"> <label for="{{../name}}-year">Year</label> <input type="{{type}}" id="{{../name}}-year" value="{{valueYear}}" class="form-control"> </div> </div> {{/EL_DATE}} {{#EL_TIME}} <div class="form-time"> <div class="form-group form-group-hour"> <label for="{{../name}}-hour" class="visuallyhidden">Hours</label> <input type="{{type}}" id="{{../name}}-hour" value="{{valueHour}}" class="form-control"> </div> <div class="form-group form-group-delimeter"> : </div> <div class="form-group form-group-minutes"> <label for="{{../name}}-minutes" class="visuallyhidden">Minutes</label> <input type="{{type}}" id="{{../name}}-minutes" value="{{valueMinutes}}" class="form-control"> </div> <div class="form-group form-group-ampm"> <label for="{{../name}}-ampm" class="visuallyhidden">am or pm</label> <select id="{{../name}}-ampm" class="form-control"> <option value="am">am</option> <option value="pm">pm</option> </select> </div> </div> {{/EL_TIME}} {{#EL_PIN}} <div class="form-pin"> <div class="form-group form-group-pin"> <label for="{{../name}}-1">{{digit1}}</label> <input type="{{type}}" id="{{../name}}-1" value="{{value1}}" class="form-control"> </div> <div class="form-group form-group-pin"> <label for="{{../name}}-2">{{digit2}}</label> <input type="{{type}}" id="{{../name}}-2" value="{{value2}}" class="form-control"> </div> <div class="form-group form-group-pin"> <label for="{{../name}}-3">{{digit3}}</label> <input type="{{type}}" id="{{../name}}-3" value="{{value3}}" class="form-control"> </div> </div> {{/EL_PIN}} {{#EL_TOUCH}} {{#each options}} {{#if blockText}} <p class="form-block">{{blockText}}</p> {{else}} <label class="block-label" for="{{../../../name}}{{value}}" {{#if dataTarget }} data-target="{{dataTarget}}" {{/if}} > <input type="{{type}}" value="{{value}}" {{#if isSelected}}checked{{/if}} name="{{../../../name}}" id="{{../../../name}}{{value}}" > {{text}} </label> {{/if}} {{/each}} {{/EL_TOUCH}} </fieldset> {{else}} <label for="{{name}}" class="form-label {{#unless error}}{{#if mod }}{{mod}}{{/if }}{{/unless}}"> {{> atom_question}} </label> {{> atom_select}} {{> atom_input}} {{> atom_textarea}} {{/if}} </div> {{#EL_TARGET}} <div class="panel-indent js-hidden {{#if error}}has-error{{/if}}" id="{{dataTarget}}"> <label class="form-label" for="{{../name}}-target"> {{> atom_question}} </label> <input type="{{EL_INPUT.type}}" name="{{../name}}-target" id="{{../name}}-target" value="{{EL_INPUT.value}}" class=" form-control {{#if EL_INPUT.mod}} form-control-{{EL_INPUT.mod}}{{/if}} " {{#if EL_INPUT.isPasteDisabled}}onpaste="return false;"{{/if}} {{#if EL_INPUT.isCopyDisabled}}oncopy="return false;"{{/if}} > </div> {{/EL_TARGET}} {{/if}} {{/EL_ROW}} </fieldset>
<html><body> <h4>Windows 10 x64 (19042.572) 20H2</h4><br> <h2>_CM_INTENT_LOCK</h2> <font face="arial"> +0x000 OwnerCount : Uint4B<br> +0x008 OwnerTable : Ptr64 Ptr64 <a href="./_CM_KCB_UOW.html">_CM_KCB_UOW</a><br> </font></body></html>
import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { AngularFireModule } from 'angularfire2'; import { AngularFireDatabaseModule } from 'angularfire2/database'; import { environment } from '../environments/environment'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { MaterialImportsModule } from './material-imports/material-imports.module'; import { ApiService } from './services/api.service'; import { HomeComponent } from './components/home/home.component'; import { BarChartComponent } from './components/bar-chart/bar-chart.component'; import { TopListComponent } from './components/top-list/top-list.component'; import { TableComponent } from './components/table/table.component'; import { CommaseparatorPipe } from './pipes/commaseparator.pipe'; import { ShorthandnumberPipe } from './pipes/shorthandnumber.pipe'; import { LineChartComponent } from './components/line-chart/line-chart.component'; import { DataService } from './services/data.service'; import { ToolbarComponent } from './components/toolbar/toolbar.component'; import { AboutComponent } from './components/about/about.component'; @NgModule({ declarations: [ AppComponent, HomeComponent, BarChartComponent, TopListComponent, TableComponent, CommaseparatorPipe, ShorthandnumberPipe, LineChartComponent, ToolbarComponent, AboutComponent ], imports: [ BrowserModule, BrowserAnimationsModule, AngularFireModule.initializeApp(environment.firebase), AngularFireDatabaseModule, HttpClientModule, AppRoutingModule, MaterialImportsModule ], providers: [ApiService, DataService], bootstrap: [AppComponent] }) export class AppModule { }
using System; namespace NullValuesArithmetic { class NullValuesArithmetic //Problem 12. Null Values Arithmetic //Create a program that assigns null values to an integer and to a double variable. //Try to print these variables at the console. //Try to add some number or the null literal to these variables and print the result. { static void Main() { int? ValueInteger = null; double? valueDouble = null; bool check = (ValueInteger == null && valueDouble == null); Console.WriteLine("Nullable value of integer number is:" + ValueInteger); Console.WriteLine("Nullable value of double is: " + valueDouble); Console.WriteLine("Is there a null check = " + check); int secValueInteger = 7; double secValueDouble = 9.5; Console.WriteLine("The value of Integer after been modified: " + secValueInteger); Console.WriteLine("The value of Double after been modified: " + secValueDouble); } } }
package WorldCup::Command::teams; # ABSTRACT: Returns the teams in the World Cup. use strict; use warnings; use WorldCup -command; use JSON; use LWP::UserAgent; use File::Basename; use Term::ANSIColor; use List::Util qw(max); sub opt_spec { return ( [ "outfile|o=s", "A file to place a listing of the teams" ], ); } sub validate_args { my ($self, $opt, $args) = @_; my $command = __FILE__; if ($self->app->global_options->{man}) { system([0..5], "perldoc $command"); } else { $self->usage_error("Too many arguments.") if @$args; } } sub execute { my ($self, $opt, $args) = @_; exit(0) if $self->app->global_options->{man}; my $outfile = $opt->{outfile}; my $result = _fetch_teams($outfile); } sub _fetch_teams { my ($outfile) = @_; my $out; if ($outfile) { open $out, '>', $outfile or die "\nERROR: Could not open file: $!\n"; } else { $out = \*STDOUT; } my $ua = LWP::UserAgent->new; my $urlbase = 'http://worldcup.sfg.io/teams'; my $response = $ua->get($urlbase); unless ($response->is_success) { die "Can't get url $urlbase -- ", $response->status_line; } my $matches = decode_json($response->content); my @teamlens; my %grouph; my %groups_seen; my $group_map = { '1' => 'A', '2' => 'B', '3' => 'C', '4' => 'D', '5' => 'E', '6' => 'F', '7' => 'G', '8' => 'H' }; for my $group ( sort { $a->{group_id} <=> $b->{group_id} } @{$matches} ) { if (exists $group_map->{$group->{group_id}}) { push @{$grouph{$group_map->{$group->{group_id}}}}, join "|", $group->{fifa_code}, $group->{country}; push @teamlens, length($group->{country}); } else { $grouph{$group_map->{$group->{group_id}}} = join "|", $group->{fifa_code}, $group->{country}; push @teamlens, length($group->{country}); } } my $namelen = max(@teamlens); my $len = $namelen + 2; for my $groupid (sort keys %grouph) { my $header = pack("A$len A*", "Group $groupid", "FIFA Code"); if ($outfile) { print $out $header, "\n"; } else { print $out colored($header, 'bold underline'), "\n"; } for my $team (@{$grouph{$groupid}}) { my ($code, $country) = split /\|/, $team; print $out pack("A$len A*", $country, $code), "\n"; } print "\n"; } close $out; } 1; __END__ =pod =head1 NAME worldcup teams - Get the team name, with 3-letter FIFA code, listed by group =head1 SYNOPSIS worldcup teams -o wcteams =head1 DESCRIPTION Print a table showing all teams in the World Cup, displayed by the group, along with the 3-letter FIFA code for each team. The 3-letter FIFA code can be used for getting metainformation about team results in the tournament. =head1 AUTHOR S. Evan Staton, C<< <statonse at gmail.com> >> =head1 REQUIRED ARGUMENTS =over 2 =item -o, --outfile A file to place the World Cup team information =back =head1 OPTIONS =over 2 =item -h, --help Print a usage statement. =item -m, --man Print the full documentation. =back =cut
package org.achacha.webcardgame.game.logic; public enum EventType { Start, CardStart, CardHealth, CardAttack, CardAttackCrit, CardAttackAbsorb, CardAttackCritAbsorb, CardDeath, PlayerWin, PlayerDraw, PlayerLose, StickerHeal, StickerDamage }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; namespace rubbishProducer { /// <summary> /// 提供特定于应用程序的行为,以补充默认的应用程序类。 /// </summary> sealed partial class App : Application { /// <summary> /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, /// 已执行,逻辑上等同于 main() 或 WinMain()。 /// </summary> public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( Microsoft.ApplicationInsights.WindowsCollectors.Metadata | Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; } /// <summary> /// 在应用程序由最终用户正常启动时进行调用。 /// 将在启动应用程序以打开特定文件等情况下使用。 /// </summary> /// <param name="e">有关启动请求和过程的详细信息。</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // 不要在窗口已包含内容时重复应用程序初始化, // 只需确保窗口处于活动状态 if (rootFrame == null) { // 创建要充当导航上下文的框架,并导航到第一页 rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: 从之前挂起的应用程序加载状态 } // 将框架放在当前窗口中 Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // 当导航堆栈尚未还原时,导航到第一页, // 并通过将所需信息作为导航参数传入来配置 // 参数 rootFrame.Navigate(typeof(MainPage), e.Arguments); } // 确保当前窗口处于活动状态 Window.Current.Activate(); } /// <summary> /// 导航到特定页失败时调用 /// </summary> ///<param name="sender">导航失败的框架</param> ///<param name="e">有关导航失败的详细信息</param> void OnNavigationFailed(object sender, NavigationFailedEventArgs e) { throw new Exception("Failed to load Page " + e.SourcePageType.FullName); } /// <summary> /// 在将要挂起应用程序执行时调用。 在不知道应用程序 /// 无需知道应用程序会被终止还是会恢复, /// 并让内存内容保持不变。 /// </summary> /// <param name="sender">挂起的请求的源。</param> /// <param name="e">有关挂起请求的详细信息。</param> private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: 保存应用程序状态并停止任何后台活动 deferral.Complete(); } } }
require 'markdown_section_numbering/version' class MarkdownSectionNumbering class << self def config(max_level) @max_level = max_level end def convert(input) @section_index = [-1] + [0] * max_level input.lines.map do |line| convert_line(line) end.join("\n") + "\n" end private def max_level @max_level || 10 end def convert_line(line) line.chomp! match = line.match(/^#+/) if !match line else level = match[0].length add_section_number(line, level) end end def add_section_number(line, target_level) return line if target_level > max_level header_sign = '#' * target_level regex = Regexp.new("^#{header_sign}\\s*(\\d+(\\.\\d+)*)?\\s*(.+)") match = line.match(regex) number = calc_section_number(target_level) "#{header_sign} #{number} #{match[3]}" end def calc_section_number(target_level) @section_index[target_level] += 1 ((target_level + 1)..max_level).each do |child_level| @section_index[child_level] = 0 end (1..target_level).map { |level| @section_index[level].to_s }.join('.') end end end
import React from 'react'; import { FieldProps } from 'formik'; import { Text, BorderBox, FilterList } from '@primer/components'; import { iconThemes } from '@renderer/icons'; const IconPicker: React.FC<FieldProps> = ({ field, form }): JSX.Element => { const currentIconTheme = iconThemes.find( (iconTheme) => iconTheme.name === field.value, ); return ( <React.Fragment> <Text fontWeight="bold" fontSize="14px" as="label" style={{ display: 'block' }} mt="3" mb="2" > Icon theme </Text> <FilterList> {iconThemes.map(({ name, displayName, icons }) => ( <FilterList.Item key={name} mr="3" selected={name === field.value} onClick={(): void => form.setFieldValue('iconTheme', name)} > <img src={icons.contributed} style={{ height: 16, marginRight: 10, position: 'relative', top: 2, }} /> {displayName} </FilterList.Item> ))} </FilterList> <BorderBox mr="3" mt="3" bg="gray.0"> <table style={{ width: '100%' }}> <tr> <td style={{ textAlign: 'center' }}> <Text fontWeight="bold" fontSize="14px"> Pending </Text> </td> <td style={{ textAlign: 'center' }}> <Text fontWeight="bold" fontSize="14px"> Contributed </Text> </td> <td style={{ textAlign: 'center' }}> <Text fontWeight="bold" fontSize="14px"> Streaking </Text> </td> </tr> <tr> <td style={{ textAlign: 'center' }}> <img src={currentIconTheme.icons.pending} style={{ height: 16 }} /> </td> <td style={{ textAlign: 'center' }}> <img src={currentIconTheme.icons.contributed} style={{ height: 16 }} /> </td> <td style={{ textAlign: 'center' }}> <img src={currentIconTheme.icons.streaking} style={{ height: 16 }} /> </td> </tr> </table> </BorderBox> </React.Fragment> ); }; export default IconPicker;
<section class="usernameprofile"> <div class="widgets"> <p-growl [value]="msgs"></p-growl> <div class="row"> <div class="col-md-10"> <ba-card title="USER PROFILE" baCardClass="with-scroll"> <form class="form-horizontal"> <div *ngFor="let fields of fieldLists"> <div class="form-group row" [ngSwitch]="fields.fieldtype"> <label for="inputEmail3" class="col-sm-4 form-control-label">{{fields.displayname}}</label> <div *ngSwitchCase="'text'" class="col-sm-4"> <div *ngIf="fields.labelname == 'points'"> <span> {{fields.value}} </span> </div> <div *ngIf="fields.labelname !== 'points'"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <input *ngIf="fields.visiblity" [id]="fields.labelname" class="form-control" type="text" [value]="fields.value"> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> </div> <div *ngSwitchCase="'long_text'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <textarea *ngIf="fields.visiblity" [id]="fields.labelname" class="form-control" [value]="fields.value"></textarea> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> <div *ngSwitchCase="'image'" class="col-sm-4"> <!--<img id="imagePath_{{fields.labelname}}" class="img-responsive" style="height: 150px; width: 150px">--> <p-fileUpload name="sampleFile" url="/api/upload/" accept="image/*" multiple="multiple" (onUpload)="onUploadPhoto($event, fields.labelname)" auto="true" showButtons="false" *ngIf="fields.visiblity"> </p-fileUpload> <input class="form-control" type="hidden" id="image_{{fields.labelname}}"> <img id="imagePath_{{fields.labelname}}" class="img-responsive" style="height: 150px; width: 150px"> <input *ngIf="fields.visiblity" type="button" class="btn btn-danger" (click)="removeImage(fields.labelname)" value="Remove"> <!--<span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span>--> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <!--<input *ngIf="fields.visiblity" [id]="fields.labelname" type="file" class="form-control" [value]="fields.value">--> <!-- <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> --> </div> <div *ngSwitchCase="'list'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <div *ngIf="fields.labelname == 'province'"> <select [id]="fields.labelname" *ngIf="fields.visiblity" (change)="onChangeProvince($event.target.value)" class="form-control" [value]="fields.value"> <option value="">--- Select ---</option> <option *ngFor="let opt of _provinceLists" [value]="opt.name">{{opt.name}}</option> </select> </div> <div *ngIf="fields.labelname == 'district'"> <select [id]="fields.labelname" *ngIf="fields.visiblity" class="form-control" [value]="fields.value"> <option value="">--- Select ---</option> <option *ngFor="let opt of _districtOptionLists" [value]="opt">{{opt}}</option> </select> </div> <div *ngIf="fields.labelname == 'area'"> <select [id]="fields.labelname" *ngIf="fields.visiblity" class="form-control" [value]="fields.value"> <option value="">--- Select ---</option> <option *ngFor="let opt of _areaOptionLists" [value]="opt">{{opt}}</option> </select> </div> <div *ngIf="fields.labelname !== 'province' && fields.labelname !== 'district' && fields.labelname !== 'area'"> <select [id]="fields.labelname" *ngIf="fields.visiblity" class="form-control" [value]="fields.value"> <option value="">--- Select ---</option> <option *ngFor="let opt of fields.lookupdata" [value]="opt.key">{{opt.value}}</option> </select> </div> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> <div *ngSwitchCase="'multi_selected_list'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <select [id]="fields.labelname" *ngIf="fields.visiblity" class="form-control" [value]="fields.value" multiple> <option value="">--- Select ---</option> </select> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> <div *ngSwitchCase="'checkbox'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <div *ngFor="let look of lookupdata"> <input [id]="fields.labelname" *ngIf="fields.visiblity" type="checkbox" class="form-control" [value]="fields.value"> {{look.value}} </div> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> <div *ngSwitchCase="'point'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer"> {{fields.value}} </span> <!--<span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span>--> <!--<a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a>--> <!--<input [id]="fields.labelname" *ngIf="fields.visiblity" type="text" class="form-control" [value]="fields.value"> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button>--> </div> <div *ngSwitchCase="'url'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <input [id]="fields.labelname" *ngIf="fields.visiblity" type="text" class="form-control" [value]="fields.value"> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> <div *ngSwitchCase="'map'" class="col-sm-4"> <span *ngIf="!fields.visiblity" style="cursor: pointer" (click)="edit(fields.labelname)"> {{fields.value}} </span> <a *ngIf="!fields.visiblity" (click)="edit(fields.labelname)" style="cursor: pointer; margin-left: 20px;"> <i class="ion-edit"></i> </a> <input [id]="fields.labelname" *ngIf="fields.visiblity" type="text" class="form-control" [value]="fields.value"> <button *ngIf="fields.visiblity" (click)="editSave(fields.labelname, fields.fieldtype)" type="button" class="btn btn-success btn-icon"><i class="ion-android-checkmark-circle"></i></button> <button *ngIf="fields.visiblity" (click)="editCancel(fields.labelname)" type="button" class="btn btn-danger btn-icon"><i class="ion-nuclear"></i></button> </div> </div> </div> </form> </ba-card> </div> </div> </div> </section>
module StreetEasy class Client BASE_URI = "http://www.streeteasy.com/nyc/api/" def self.api_key @api_key end def self.api_key=(key) @api_key = key end def self.construct_url(query) uri = URI( "#{BASE_URI}" + "#{query[:property_type]}/" + "search?criteria=" + "area=#{query[:neighborhoods]}&" + "limit=#{query[:limit]}&" + "order=#{query[:order]}&" + "key=#{@api_key}&" + "format=json" ) end end end
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>18 --> 19</title> <link href="./../../assets/style.css" rel="stylesheet"> </head> <body> <h2>You have to be fast</h2> <a href="./aaf8fbd5bfee65db931ed137bca246ebf79d18e27112f8ae4cbc825b8b462281.html">Teleport</a> <hr> <a href="./../../about.md">About</a> (Spoilers! ) <script src="./../../assets/md5.js"></script> <script> window.currentLevel = 7; </script> <script src="./../../assets/script.js"></script> </body> </html>
<?php declare(strict_types=1); namespace WsdlToPhp\PackageGenerator\Tests\Container\PhpElement; use InvalidArgumentException; use WsdlToPhp\PackageGenerator\Container\PhpElement\Constant; use WsdlToPhp\PackageGenerator\Tests\AbstractTestCase; use WsdlToPhp\PhpGenerator\Element\PhpConstant; use WsdlToPhp\PhpGenerator\Element\PhpMethod; /** * @internal * @coversDefaultClass */ final class ConstantTest extends AbstractTestCase { public function testAdd() { $constant = new Constant(self::getBingGeneratorInstance()); $constant->add(new PhpConstant('foo', 1)); $this->assertCount(1, $constant); $this->assertInstanceOf(PhpConstant::class, $constant->get('foo')); } public function testAddWithException() { $this->expectException(InvalidArgumentException::class); $constant = new Constant(self::getBingGeneratorInstance()); $constant->add(new PhpMethod('Bar')); } }
<?php require_once __DIR__."/../note/note_core.php"; function nodeComplete_GetById( $ids ) { $multi = is_array($ids); if ( !$multi ) $ids = [$ids]; $nodes = node_GetById($ids); if ( !$nodes ) return null; $metas = nodeMeta_ParseByNode($ids); $links = nodeLink_ParseByNode($ids); $loves = nodeLove_GetByNode($ids); $notes = note_CountByNode($ids); // Populate Metadata foreach ( $nodes as &$node ) { // Store Public Metadata if ( isset($metas[$node['id']][SH_NODE_META_PUBLIC]) ) { $node['meta'] = $metas[$node['id']][SH_NODE_META_PUBLIC]; } else { $node['meta'] = []; } // TODO: Store Protected and Private Metadata } // Populate Links (NOTE: Links come in Pairs) foreach ( $nodes as &$node ) { if ( isset($links[$node['id']][0][SH_NODE_META_PUBLIC]) ) { $node['link'] = $links[$node['id']][0][SH_NODE_META_PUBLIC]; } else { $node['link'] = []; } // TODO: Store Protected and Private Metadata } // Populate Love foreach ( $nodes as &$node ) { $node['love'] = 0; foreach ( $loves as $love ) { if ( $node['id'] === $love['node'] ) { $node['love'] = $love['count']; $node['love-timestamp'] = $love['timestamp']; } } } // Populate Note (comment) Count foreach ( $nodes as &$node ) { // Check if note data is public for this Node type if ( note_IsNotePublicByNode($node) ) { $node['notes'] = 0; foreach ( $notes as $note ) { if ( $node['id'] === $note['node'] ) { $node['notes'] = $note['count']; $node['notes-timestamp'] = $note['timestamp']; } } } } if ($multi) return $nodes; else return $nodes[0]; } function nodeComplete_GetAuthored( $id ) { // Scan for things I am the author of $author_links = nodeLink_GetByKeyNode("author", $id); // Populate a list of things I authored $author_ids = []; foreach( $author_links as &$link ) { // We only care about public (for now) if ( $link['scope'] == SH_NODE_META_PUBLIC ) { if ( $link['b'] == $id ) { $author_ids[] = $link['a']; } } } return $author_ids; } function nodeComplete_GetWhereIdCanCreate( $id ) { $ret = []; // Scan for public nodes with 'can-create' metadata $public_metas = nodeMeta_GetByKey("can-create", null, '='.SH_NODE_META_PUBLIC); // Add public nodes foreach( $public_metas as &$meta ) { if ( !isset($ret[$meta['value']]) ) { $ret[$meta['value']] = []; } $ret[$meta['value']][] = $meta['node']; } // Scan for things I am the author of $authored_ids = nodeComplete_GetAuthored($id); if ( !empty($authored_ids) ) { // Scan for shared nodes I authored $shared_metas = nodeMeta_GetByKeyNode("can-create", $authored_ids, '='.SH_NODE_META_SHARED); // Add shared nodes foreach( $shared_metas as &$meta ) { if ( in_array($meta['node'], $authored_ids) ) { if ( !isset($ret[$meta['value']]) ) { $ret[$meta['value']] = []; } $ret[$meta['value']][] = $meta['node']; } } } // // NOTE: This will get slower as the number of games increase // // // Scan for nodes with 'can-create' metadata // $metas = nodeMeta_GetByKey("can-create"); // // foreach( $metas as &$meta ) { // // Add public nodes // if ( $meta['scope'] == SH_NODE_META_PUBLIC ) { // if ( !isset($ret[$meta['value']]) ) { // $ret[$meta['value']] = []; // } // // $ret[$meta['value']][] = $meta['node']; // } // // Add shared nodes (primarily authored nodes) // else if ( $meta['scope'] == SH_NODE_META_SHARED ) { // if ( in_array($meta['node'], $node_ids) ) { // if ( !isset($ret[$meta['value']]) ) { // $ret[$meta['value']] = []; // } // // $ret[$meta['value']][] = $meta['node']; // } // } // } // // Let me post content to my own node (but we're adding ourselves last, to make it the least desirable) // // NOTE: Don't forge tto create sub-arrays here // $RESPONSE['where']['post'][] = $user_id; // $RESPONSE['where']['item'][] = $user_id; // $RESPONSE['where']['article'][] = $user_id; return $ret; } function nodeComplete_GetWhatIdHasAuthoredByParent( $id, $parent ) { $node_ids = nodeComplete_GetAuthored($id); if ( !empty($node_ids) ) { $nodes = node_GetById($node_ids); // OPTIMIZE: Use a cached function (we only need parent) global $RESPONSE; $RESPONSE['_node_ids'] = $node_ids; $RESPONSE['_nodes'] = $nodes; $authored_ids = []; foreach ( $nodes as &$node ) { if ( $node['parent'] == $parent ) { $authored_ids[] = $node['id']; } } return $authored_ids; } return []; }
var userData = [ {'fName':'Justin', 'lName' : 'Gil', 'age': 70, 'gender': 'M', 'phone': '949-111-1111', 'profilePic': '../pix/justin.jpeg', 'city' : 'San Diego', 'add' : '55 Serenity' , 'Bio': 'I like soccer and long walks on the beach.', 'userIndex' : 1, 'username': 'justin', 'password': 'lol', 'state' : 'CA', 'zip' : '92092'}, {'fName':'Momin', 'lName' : 'Khan', 'age': 60, 'gender': 'M', 'phone': '949-111-1312', 'profilePic': '../pix/momin.jpeg', 'city' : 'Carlsbad', 'add' : '23 Rollings' , 'Bio': 'I like soccer and long walks on the beach.', 'userIndex' : 2, 'username': 'momin', 'password': 'lol', 'state' : 'CA', 'zip' : '92312'}, {'fName':'Scott', 'lName' : 'Chen', 'age': 50, 'gender': 'M', 'phone': '949-111-1113', 'profilePic': '../pix/scott.jpeg', 'city' : 'Oceanside', 'add' : '35 Jasmin' , 'Bio': 'I like soccer and long walks on the beach.', 'userIndex' : 3, 'username': 'scott', 'password': 'lol', 'state' : 'CA', 'zip' : '42092'}, {'fName':'Charles', 'lName' : 'Chen', 'age': 72, 'gender': 'M', 'phone': '949-111-1114', 'profilePic': '../pix/charles.jpeg', 'city' : 'Coronado', 'add' : '388 Rose', 'Bio': 'I like soccer and long walks on the beach.', 'userIndex' : 4, 'username': 'charles', 'password': 'lol', 'state' : 'CA', 'zip' : '52092'} ] localStorage.setItem('userDataLocalStorage', JSON.stringify(userData)); $(function () { var invalidAccountWarning = document.getElementById("invalid_account_warning"); invalidAccountWarning.style.display = "none"; }); $("#login").click(function() { var invalidAccountWarning = document.getElementById("invalid_account_warning"); invalidAccountWarning.style.display = "none"; var username = document.getElementById("inputted_username").value; var password = document.getElementById("inputted_password").value; var loggedInUserIndex = 0; for (var i = 0; i < userData.length; i++) { var currData = userData[i]; if(username == currData.username && password == currData.password) loggedInUserIndex = currData.userIndex; } if(loggedInUserIndex != 0) { localStorage.setItem('loggedInUserIndex', loggedInUserIndex); console.log(loggedInUserIndex); window.location.href = 'home.html'; } else { invalidAccountWarning.style.display = "block"; } });
# StHtmlTagClipFlavor The class inherits `StClipFlavor`. ## Method create public Description... ### Parameters layer initCallback ### Return value This method does not return.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; namespace Monocle { public class Tween : Component { public enum TweenMode { Persist, Oneshot, Looping, YoyoOneshot, YoyoLooping }; public Action<Tween> OnUpdate; public Action<Tween> OnComplete; public Action<Tween> OnStart; public TweenMode Mode { get; private set; } public int Duration { get; private set; } public int FramesLeft { get; private set; } public float Percent { get; private set; } public float Eased { get; private set; } public bool Reverse { get; private set; } public Ease.Easer Easer { get; private set; } private bool startedReversed; public Tween(TweenMode mode, Ease.Easer easer = null, int duration = 1, bool start = false) : base(false, false) { #if DEBUG if (duration < 1) throw new Exception("Tween duration cannot be less than 1"); #endif Mode = mode; Easer = easer; Duration = duration; Active = false; if (start) Start(); } public override void Update() { FramesLeft--; //Update the percentage and eased percentage Percent = FramesLeft / (float)Duration; if (!Reverse) Percent = 1 - Percent; if (Easer != null) Eased = Easer(Percent); else Eased = Percent; //Update the tween if (OnUpdate != null) OnUpdate(this); //When finished... if (FramesLeft == 0) { if (OnComplete != null) OnComplete(this); switch (Mode) { case TweenMode.Persist: Active = false; break; case TweenMode.Oneshot: RemoveSelf(); break; case TweenMode.Looping: Start(Reverse); break; case TweenMode.YoyoOneshot: if (Reverse == startedReversed) { Start(!Reverse); startedReversed = !Reverse; } else RemoveSelf(); break; case TweenMode.YoyoLooping: Start(!Reverse); break; } } } public void Start(bool reverse = false) { startedReversed = Reverse = reverse; FramesLeft = Duration; Eased = Percent = Reverse ? 1 : 0; Active = true; if (OnStart != null) OnStart(this); } public void Start(int duration, bool reverse = false) { #if DEBUG if (duration < 1) throw new Exception("Tween duration cannot be less than 1"); #endif Duration = duration; Start(reverse); } public void Stop() { Active = false; } static public Tween Set(Entity entity, int duration, Ease.Easer easer, Action<Tween> onUpdate, TweenMode tweenMode = TweenMode.Oneshot) { Tween tween = new Tween(tweenMode, easer, duration, true); tween.OnUpdate += onUpdate; entity.Add(tween); return tween; } static public Tween Position(Entity entity, Vector2 targetPosition, int duration, Ease.Easer easer, TweenMode tweenMode = TweenMode.Oneshot) { Vector2 startPosition = entity.Position; Tween tween = new Tween(tweenMode, easer, duration, true); tween.OnUpdate = (t) => { entity.Position = Vector2.Lerp(startPosition, targetPosition, t.Eased); }; entity.Add(tween); return tween; } static public Tween Scale(GraphicsComponent image, Vector2 targetScale, int duration, Ease.Easer easer, TweenMode tweenMode = TweenMode.Oneshot) { Vector2 startScale = image.Scale; Tween tween = new Tween(tweenMode, easer, duration, true); tween.OnUpdate = (t) => { image.Scale = Vector2.Lerp(startScale, targetScale, t.Eased); }; image.Entity.Add(tween); return tween; } static public Tween Alpha(GraphicsComponent image, float targetAlpha, int duration, Ease.Easer easer, TweenMode tweenMode = TweenMode.Oneshot) { Entity entity = image.Entity; float startAlpha = image.Color.A/255; Tween tween = new Tween(tweenMode, easer, duration, true); tween.OnUpdate = (t) => { image.Color.A = (byte) Math.Round(MathHelper.Lerp(startAlpha, targetAlpha, t.Eased)*255.0f); }; entity.Add(tween); return tween; } public static Tween Position(GraphicsComponent image, Vector2 targetPosition, int duration, Ease.Easer easer, TweenMode tweenMode = TweenMode.Oneshot) { Vector2 startPosition = image.Position; Tween tween = new Tween(tweenMode, easer, duration, true); tween.OnUpdate = (t) => { image.Position = Vector2.Lerp(startPosition, targetPosition, t.Eased); }; image.Entity.Add(tween); return tween; } } }
/*! \file rk_int.c * \brief Function definitions for numerical integration routines. */ #include<math.h> #include<stdio.h> #include<stdlib.h> #include<gsl/gsl_sf_gamma.h> #include"rk_int.h" #include"routines.h" /******************************************************** * * Numerical Integration Subroutines. * *********************************************************/ /*! \fn double integrate(double (*FUNC)(double,void*), void *fp ,int np,double a,double b,double dxinit, double eps) * \brief Numerical integration routine using 5th-order Runge-Kutta. * * Quadrature using fifth order Runge-Kutta with adaptive step size. * Based on Press et al, Numerical Recipes in C, 2nd ed, pp 719-722. * * Runge-Kutta driver with adaptive stepsize control. Integrate starting * value y from a to b with accuracy eps, storing intermediate results in * global variables. dxinit should be set as a guessed first stepsize. * * Pass a second parameter to FUNC in fparm. * * Original fortan routine by M.A.K. Gross, C implementation by Brant Robertson * * func is the function to be integrated. * parameters are passed in fp(np) array. * func(x,xp,np). */ double integrate(double (*FUNC)(double,void*), void *fp ,int np,double a,double b,double dxinit, double eps) { int maxsteps=10000000; double x, dx, dxnext, y, dydx, yscale; int Nstep; x = a; dx = dxinit; y = 0.0; Nstep = 0; do { Nstep = Nstep + 1; dydx = FUNC(x,fp); //yscale is the scaling used to monitor accuracy. This general-purpose //choice can be modified if need be. yscale = fmax(fabs(y) + fabs(dx*dydx), 1.e-12); if ((x+dx-b)*(x+dx-a)>0.0) //! If stepsize overshoots, decrease it. dx = b - x; RUNGE5VAR(&y,dydx,&x,dx,eps,yscale,&dxnext,FUNC,fp); dx = dxnext; }while (((x-b)*(b-a)<0.0) && (Nstep<maxsteps)); if (Nstep>=maxsteps) { printf("Failed to converge in integral!\n"); exit(-1); } return y; } /*! \fn void RUNGE5VAR(double *y,double dydx,double *x,double htry,double eps,double yscale,double *hnext,double (*DERIVS)(double,void*), void *fp) * \brief Runge-Kutta step in numerical integration routine * * * Fifth-order Runge-Kutta step with monitoring of local truncation error * to ensure accuracy and adjust stepsize. Input are the dependent * variable y and its derivative dydx at the starting value of the * independent variable x. Also input are the stepsize to be attempted * htry, the required accuracy eps, and the value yscale, against which the * error is scaled. On output, y and x are replaced by their new values. * hdid is the stepsize that was actually accomplished, and hnext is the * estimated next stepsize. DERIVS is the user-supplied routine that * computes right-hand-side derivatives. The argument fparm is for an * optional second argument to DERIVS (NOT integrated over). * * * Original fortran by M.A.K. Gross, c implementation by Brant Robertson */ void RUNGE5VAR(double *y,double dydx,double *x,double htry,double eps,double yscale,double *hnext,double (*DERIVS)(double,void*), void *fp) { //external DERIVS double errmax,h,hold,htemp,xnew,yerr,ytemp; double safety=0.9; double pgrow=-0.2; double pshrink=-0.25; double errcon=1.89e-4; yerr = 0.0; h = htry; //! Set stepsize to initial accuracy. errmax = 10.0; do { RUNGE(*y,dydx,*x,h,&ytemp,&yerr,DERIVS,fp); errmax = fabs(yerr/yscale)/eps;// ! Scale relative to required accuracy. if (errmax>1.0) { //! Truncation error too large; reduce h htemp = safety*h*pow(errmax,pshrink); hold = h; //h = sign(fmax(fabs(htemp),0.1*fabs(h)),h); //! No more than factor of 10 if(h<0.0) { //! No more than factor of 10 h = -1.0*fmax(fabs(htemp),0.1*fabs(h)); }else{ //! No more than factor of 10 h = 1.0*fmax(fabs(htemp),0.1*fabs(h)); } xnew = *x + h; if (xnew == *x) { h = hold; errmax = 0.0; } } }while(errmax>1.0); if (errmax>errcon) { *hnext = safety*h*pow(errmax,pgrow); }else{ *hnext = 5.0 * h;//! No more than factor of 5 increase. } *x = *x + h; *y = ytemp; } /*! \fn void RUNGE(double y,double dydx,double x,double h,double *yout,double *yerr,double (*DERIVS)(double,void*),void *fp) * \brief Function to advance the RK solution in the numerical integration. * * Given values for a variable y and its derivative dydx known at x, use * the fifth-order Cash-Karp Runge-Kutta method to advance the solution * over an interval h and return the incremented variables as yout. Also * return an estimate of the local truncation error in yout using the * embedded fourth order method. The user supplies the routine * DERIVS(x,y,dydx), which returns derivatives dydx at x. * * Original fortran by M.A.K. Gross, c implementation by Brant Robertson. */ void RUNGE(double y,double dydx,double x,double h,double *yout,double *yerr,double (*DERIVS)(double,void*),void *fp) { double ak3, ak4, ak5 ,ak6; double a2,a3,a4,a5,a6; double c1,c3,c4,c6,dc1,dc3,dc4,dc5,dc6; a2 = 0.2; a3 = 0.3; a4 = 0.6; a5 = 1.0; a6 = 0.875; c1 = 37.0/378.0; c3 = 250.0/621.0; c4 = 125.0/594.0; c6 = 512.0/1771.0; dc1 = c1 - 2825.0/27648.0; dc3 = c3 - 18575.0/48384.0; dc4 = c4 - 13525.0/55296.0; dc5 = -277.0/14336.0; dc6 = c6 - 0.25; ak3 = DERIVS(x+a3*h,fp); ak4 = DERIVS(x+a4*h,fp); ak5 = DERIVS(x+a5*h,fp); ak6 = DERIVS(x+a6*h,fp); //Estimate the fifth order value. *yout = y + h*(c1*dydx + c3*ak3 + c4*ak4 + c6*ak6); //Estimate error as difference between fourth and fifth order *yerr = h*(dc1*dydx + dc3*ak3 + dc4*ak4 + dc5*ak5 + dc6*ak6); } /*CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC*/ /*! \fn double midpoint_rule_integration(double(*func)(double,void*), void *fp, int np, double a, double b, int level) * \brief Midpoint rule integration * * mid point rule integration, see karniadakis and kirby, s4.2 */ double midpoint_rule_integration(double(*func)(double, void*), void *fp, int np, double a, double b, int level) { int nsteps = (int) pow(2.0,level)-1; double h = (b-a)/pow(2.0,level); double sum = 0.0; for(int i=0;i<=nsteps;i++) sum += func( a + (i+0.5)*h, fp); sum*=h; return sum; } /*! \fn double trapezoid_rule_integration(double(*func)(double,void*), void *fp, int np, double a, double b, int level); * \brief Trapezoid rule integration * * trapezoid rule integration, see karniadakis and kirby, s4.2 */ double trapezoid_rule_integration(double(*func)(double, void*), void *fp, int np, double a, double b, int level) { int nsteps = (int) pow(2.0,level)-1; double h = (b-a)/pow(2.0,level); double sum = 0.0; for(int i=1;i<=nsteps;i++) sum += func( a + i*h, fp); sum*=2; //add the first and the last point to the sum sum += func(a,fp) + func(b,fp); sum*= 0.5*h; return sum; } /*! \fn double romberg_integration(double(*func)(double,void*), void *fp, int np, double a, double b, int m, int k); * \brief Romberg integration * * Romberg integration, see karniadakis and kirby, s4.2 */ double romberg_integration(double(*func)(double, void*), void *fp, int np, double a, double b, int m, int k) { double RI, I1, I2; double coeff = pow(4.0,m); if(k<m) { printf("in romberg integration, k must be >=m, but k=%d, m=%d; setting k=m\n",k,m); fflush(stdout); k=m; } if(m==0) { RI = trapezoid_rule_integration(func, fp, np, a, b, k); }else{ I1 = romberg_integration(func, fp, np, a, b, m-1, k); I2 = romberg_integration(func, fp, np, a, b, m-1, k-1); RI = (coeff*I1 - I2)/(coeff-1.0); } return RI; } /*! \fn double double jacobi_poly(double x, double alpha, double beta, int degree) * \brief Function to calculate the Jacobi polynomials. */ double jacobi_poly(double x, double alpha, double beta, int degree) { double value; double tmp, degm1; double a1=0.,a2=0.,a3=0.,a4=0.; switch(degree) { case 0: value=1.0; break; case 1: value = 0.5*(alpha-beta+(alpha+beta+2.0)*x); break; default: degm1 = degree-1.0; tmp = 2.0*degm1 + alpha + beta; a1 = 2.0*(degm1+1)*(degm1+alpha+beta+1)*tmp; a2 = (tmp+1)*(alpha*alpha - beta*beta); a3 = tmp*(tmp+1.0)*(tmp+2.0); a4 = 2.0*(degm1+alpha)*(degm1+beta)*(tmp+2.0); value = ((a2+a3*x)*jacobi_poly(x,alpha,beta,degree-1) - a4*jacobi_poly(x,alpha,beta,degree-2))/a1; } return value; } /*! \fn double jacobi_poly_deriv(double x, double alpha, double beta, int degree) * \brief Function to calculate the derivative of Jacobi polynomials. */ double jacobi_poly_deriv(double x, double alpha, double beta, int degree) { double value; double tmp; double b1,b2,b3; switch(degree) { case 0: value = 0.0; break; default: tmp = 2.0*degree + alpha + beta; b1 = tmp*(1.0-x*x); b2 = degree*(alpha-beta-tmp*x); b3 = 2.0*(degree+alpha)*(degree+beta); value = (b2*jacobi_poly(x,alpha,beta,degree) + b3*jacobi_poly(x,alpha,beta,degree-1))/b1; } return value; } /*! \fn void jacobi_zeros(double *z, double alpha, double beta, int degree) * \brief Function to find zeros of Jacobi polynomials. */ void jacobi_zeros(double *z, double alpha, double beta, int degree) { int i,j,k; const int maxit=30; const double EPS = 1.0e-14; double dth = M_PI/(2.0*degree); double poly, pder, rlast=0.0; double sum, delr, r; double one = 1.0; double two = 2.0; //if the poly is degree zero or less, then no roots if(degree<=0) return; for(k=0;k<degree;k++) { r = -cos((two*k + one)*dth); if(k) r = 0.5*(r+rlast); for(j=1;j<maxit;++j) { poly = jacobi_poly(r,alpha,beta,degree); pder = jacobi_poly_deriv(r,alpha,beta,degree); sum =0.0; for(i=0;i<k;i++) sum+= one/(r-z[i]); delr = -poly / (pder - sum*poly); r += delr; if( fabs(delr) < EPS) break; } z[k] = r; rlast = r; } return; } /*! \fn void jacobi_zeros_and_weights(double *z, double *w, double alpha, double beta, int degree) * \brief Function to find zeros of the Jacobi polynomials, and weights for Gauss quadrature int. */ void jacobi_zeros_and_weights(double *z, double *w, double alpha, double beta, int degree) { int i; double fac, one=1.0, two=2.0, apb = alpha+beta; jacobi_zeros(z, alpha, beta, degree); for(i=0;i<degree;i++) w[i] = jacobi_poly_deriv(z[i],alpha,beta,degree); fac = pow(two,apb+one)*gsl_sf_gamma(alpha+degree+one)*gsl_sf_gamma(beta+degree+one); fac /= gsl_sf_gamma(degree+one)*gsl_sf_gamma(apb+degree+one); for(i=0;i<degree;i++) w[i] = fac/(w[i]*w[i]*(one-z[i]*z[i])); return; } /*! \fn double gauss_quadrature_integration(double(*func)(double,void*), void *fp, int np, double a, double b, int degree); * \brief Gauss quadrature integration */ double gauss_quadrature_integration(double(*func)(double, void*), void *fp, int np, double a, double b, int degree) { double sum=0.; double *x, *y, *w; x = calloc_double_array(degree); y = calloc_double_array(degree); w = calloc_double_array(degree); jacobi_zeros_and_weights(x,w,0,0,degree); for(int k=0;k<degree;k++) { //scale x coordinates x[k] = 0.5*(b-a) + 0.5*(b-a)*x[k] + a; //scale weights w[k] *= 0.5*(b-a); //calculate y[k]'s y[k] = func(x[k],fp); //sum partial integrand sum+=y[k]*w[k]; } free(x); free(y); free(w); return sum; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>dpdgraph: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.0 / dpdgraph - 0.6.4</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> dpdgraph <small> 0.6.4 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-11-03 02:25:39 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-03 02:25:39 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;yves.bertot@inria.fr&quot; license: &quot;LGPL 2.1&quot; homepage: &quot;https://github.com/karmaki/coq-dpdgraph&quot; build: [ [&quot;./configure&quot;] [&quot;echo&quot; &quot;%{jobs}%&quot; &quot;jobs for the linter&quot;] [make] ] bug-reports: &quot;https://github.com/karmaki/coq-dpdgraph/issues&quot; dev-repo: &quot;git+https://github.com/karmaki/coq-dpdgraph.git&quot; install: [ [make &quot;install&quot; &quot;BINDIR=%{bin}%&quot;] ] remove: [ [&quot;rm&quot; &quot;%{bin}%/dpd2dot&quot; &quot;%{bin}%/dpdusage&quot;] [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/dpdgraph&quot;] ] depends: [ &quot;ocaml&quot; {&lt; &quot;4.08.0&quot;} &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} &quot;ocamlgraph&quot; ] authors: [ &quot;Anne Pacalet&quot; &quot;Yves Bertot&quot;] synopsis: &quot;Compute dependencies between Coq objects (definitions, theorems) and produce graphs&quot; flags: light-uninstall url { src: &quot;https://github.com/Karmaki/coq-dpdgraph/releases/download/v0.6.4/coq-dpdgraph-0.6.4.tgz&quot; checksum: &quot;md5=93e5ffcfa808fdba9cc421866ee1d416&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-dpdgraph.0.6.4 coq.8.10.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.0). The following dependencies couldn&#39;t be met: - coq-dpdgraph -&gt; ocaml &lt; 4.08.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-dpdgraph.0.6.4</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
"use strict"; /** * Additional Interfaces */ import ILocalStorage from "./ILocalStorage"; /** * The Window interface */ interface IWindow { atob: any; btoa: any; escape: any; unescape: any; location: any; Promise: any; document: Document; addEventListener: Function; removeEventListener: Function; localStorage: ILocalStorage; } /** * Declare window interface */ declare var window: IWindow; /** * Export the window interface */ export default IWindow;
import FormComponent from '../../form-component'; export class TextArea extends FormComponent { constructor(context, options) { super( context, context.querySelector('.text-area__input'), context.querySelector('.text-area__error'), 'Text Area', options ); super.init(); this.initEvents(); } initEvents() { this.field.addEventListener('focus', () => { this.setIsFilledIn(true); }); this.field.addEventListener('blur', () => this.setIsFilledIn()); this.field.addEventListener('input', () => { // Don't just call setIsFilledIn() for the case where you've removed // the text field value but are still focusing the text field this.setIsFilledIn( this.field.value || this.field === document.activeElement ); }); } } export const selector = '[class^="text-area--"]';
<?php namespace Kubus\BackendBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class LessonType extends AbstractType { /** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('courseId') ->add('stateId') ->add('beginAt') ->add('endAt') ->add('participantsMinNumber') ->add('participantsMaxNumber') ->add('childCare') ->add('publishAt') ->add('description') ->add('charge') ->add('externUrl') ->add('graduationYears') ->add('createdAt') ->add('updatedAt') ; } /** * @param OptionsResolverInterface $resolver */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'data_class' => 'Kubus\BackendBundle\Entity\Lesson' )); } /** * @return string */ public function getName() { return 'kubus_backendbundle_lesson'; } }
# -*- coding: utf-8 -*- from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from helpers import ClientRouter, MailAssetsHelper, strip_accents class UserMail: """ This class is responsible for firing emails for Users and Nonprofits """ from_email = 'Atados <site@atados.com.br>' def __init__(self, user): self.whole_user = user # This is the Nonprofit or Volunteer object self.user = user.user if not type(user).__name__=='User' else user # This is the User object self.global_context = { "assets": { "check": "https://s3.amazonaws.com/atados-us/images/check.png", "iconFacebook": "https://s3.amazonaws.com/atados-us/images/icon-fb.png", "iconInstagram": "https://s3.amazonaws.com/atados-us/images/icon-insta.png", "logoAtadosSmall": "https://s3.amazonaws.com/atados-us/images/logo.small.png", "logoAtadosSmall2": "https://s3.amazonaws.com/atados-us/images/mandala.png" } } def sendEmail(self, template_name, subject, context, user_email=None): text_content = get_template('email/{}.txt'.format(template_name)).render(context) html_content = get_template('email/{}.html'.format(template_name)).render(context) msg = EmailMultiAlternatives(subject, text_content, self.from_email, [user_email if user_email else self.user.email]) msg.attach_alternative(text_content, "text/plain") msg.attach_alternative(html_content, "text/html") return msg.send() > 0 def make_context(self, data): context_data = self.global_context.copy() context_data.update(data) return Context(context_data) def sendSignupConfirmation(self, site, token): return self.sendEmail('emailVerification', 'Confirme seu email do Atados.', self.make_context({ 'token': token , 'site': site})) class VolunteerMail(UserMail): """ This class contains all emails sent to volunteers """ def sendSignup(self): """ Email A/B from ruler Sent when volunteer completes registration """ return self.sendEmail('volunteerSignup', 'Eba! Seu cadastro foi feito com sucesso', self.make_context({})) def sendFacebookSignup(self): # pass by now """ Sent when volunteer completes registration from Facebook """ return self.sendEmail('volunteerFacebookSignup', 'Seja bem vindo ao Atados! \o/', self.make_context({})) def sendAppliesToProject(self, project): """ Email for ruler C Sent when volunteer applies to project """ return self.sendEmail('volunteerAppliesToProject', u'Você se inscreveu em uma vaga :)', self.make_context({'project': project})) def askActInteractionConfirmation(self, project, volunteer): """ Email for ruler D Sent when volunteer applies to project """ confirm_url = ClientRouter.mail_routine_monitoring_build_form_url(True, volunteer.user.email, project.nonprofit.name, "") refute_url = ClientRouter.mail_routine_monitoring_build_form_url(False, volunteer.user.email, project.nonprofit.name, "") return self.sendEmail('askActInteractionConfirmation', u'Acompanhamento de Rotina:)', self.make_context({ 'project': project, 'confirm_url': confirm_url, 'refute_url': refute_url }) ) def sendAskAboutProjectExperience(self, apply): """ """ subject = u"Como foi sua experiência com a Atados!" feedback_form_url = ClientRouter.mail_ask_about_project_experience_url('volunteer', apply) return self.sendEmail('volunteerAskAboutProjectExperience', subject, self.make_context({ 'project_name': apply.project.name, 'feedback_form_url': feedback_form_url, }), apply.volunteer.user.email) #+ def sendAfterApply4Weeks(self): # new ruler #+ """ #+ """ #+ context = Context({'user': self.user.name}) #+ return self.sendEmail('volunteerAfterApply4Weeks', '~ ~ ~ ~ ~', context) #+ def send3DaysBeforePontual(self): # new ruler #+ """ #+ """ #+ context = Context({'user': self.user.name}) #+ return self.sendEmail('volunteer3DaysBeforePontual', '~ ~ ~ ~ ~', context) class NonprofitMail(UserMail): """ This class contains all emails sent to nonprofits """ def sendSignup(self): """ Email 1 from ruler """ return self.sendEmail('nonprofitSignup', 'Recebemos seu cadastro :)', self.make_context({ 'review_profile_url': ClientRouter.edit_nonprofit_url(self.user.slug) })) def sendApproved(self): """ Email 2 from ruler """ return self.sendEmail('nonprofitApproved', 'Agora você tem um perfil no Atados', self.make_context({ 'new_act_url': ClientRouter.new_act_url() })) def sendProjectPostingSuccessful(self, project): """ Email *NEW* """ return self.sendEmail('projectPostingSuccessful', 'Vaga criada com sucesso!', self.make_context({ 'project': project, 'edit_project_url': ClientRouter.edit_project_url(project.slug) })) edit_nonprofit_act_url(self, act_slug) def sendProjectApproved(self, project): """ Email 3 from ruler """ return self.sendEmail('projectApproved', 'Publicamos a sua vaga de voluntariado', self.make_context({ 'project': project, 'act_url': ClientRouter.view_act_url(project.slug) })) def sendGetsNotifiedAboutApply(self, apply, message): """ Email 4 from ruler """ try: subject = u'Novo voluntário para o {}'.format(apply.project.name) except UnicodeEncodeError: subject = u'Novo voluntário para o {}'.format(strip_accents(apply.project.name)) return self.sendEmail('nonprofitGetsNotifiedAboutApply', subject, self.make_context({ 'apply': apply, 'volunteer_message': message, 'answer_volunteer_url': ClientRouter.view_volunteer_url(apply.volunteer.user.slug) }), apply.project.email) def sendAskAboutProjectExperience(self, project): """ """ subject = u"Nos conta como foi sua experiência com a Atados!" act_url = ClientRouter.edit_project_url(project.slug) feedback_form_url = ClientRouter.mail_ask_about_project_experience_url('nonprofit', project) return self.sendEmail('nonprofitAskAboutProjectExperience', subject, self.make_context({ 'project_name': project.name, 'feedback_form_url': feedback_form_url, 'act_url': act_url, }), project.email) #+ def send1MonthInactive(self): #+ """ #+ """ #+ return self.sendEmail('nonprofit1MonthInactive', '~ ~ ~ ~ ~', self.make_context({ #+ 'name': self.user.name #+ })) #+ def sendPontual(self): #+ """ #+ """ #+ return self.sendEmail('nonprofitPontual', '~ ~ ~ ~ ~', self.make_context({ #+ 'name': self.user.name #+ })) #+ def sendRecorrente(self): #+ """ #+ """ #+ return self.sendEmail('nonprofitRecorrente', '~ ~ ~ ~ ~', self.make_context({ #+ 'name': self.user.name #+ }))
/** * @aside guide tabs * @aside video tabs-toolbars * @aside example tabs * @aside example tabs-bottom * * Tab Panels are a great way to allow the user to switch between several pages that are all full screen. Each * Component in the Tab Panel gets its own Tab, which shows the Component when tapped on. Tabs can be positioned at * the top or the bottom of the Tab Panel, and can optionally accept title and icon configurations. * * Here's how we can set up a simple Tab Panel with tabs at the bottom. Use the controls at the top left of the example * to toggle between code mode and live preview mode (you can also edit the code and see your changes in the live * preview): * * @example miniphone preview * Ext.create('Ext.TabPanel', { * fullscreen: true, * tabBarPosition: 'bottom', * * defaults: { * styleHtmlContent: true * }, * * items: [ * { * title: 'Home', * iconCls: 'home', * html: 'Home Screen' * }, * { * title: 'Contact', * iconCls: 'user', * html: 'Contact Screen' * } * ] * }); * One tab was created for each of the {@link Ext.Panel panels} defined in the items array. Each tab automatically uses * the title and icon defined on the item configuration, and switches to that item when tapped on. We can also position * the tab bar at the top, which makes our Tab Panel look like this: * * @example miniphone preview * Ext.create('Ext.TabPanel', { * fullscreen: true, * * defaults: { * styleHtmlContent: true * }, * * items: [ * { * title: 'Home', * html: 'Home Screen' * }, * { * title: 'Contact', * html: 'Contact Screen' * } * ] * }); * */ Ext.define('Ext.tab.Panel', { extend: 'Ext.Container', xtype: 'tabpanel', alternateClassName: 'Ext.TabPanel', requires: ['Ext.tab.Bar'], config: { /** * @cfg {String} ui * Sets the UI of this component. * Available values are: `light` and `dark`. * @accessor */ ui: 'dark', /** * @cfg {Object} tabBar * An Ext.tab.Bar configuration. * @accessor */ tabBar: true, /** * @cfg {String} tabBarPosition * The docked position for the {@link #tabBar} instance. * Possible values are 'top' and 'bottom'. * @accessor */ tabBarPosition: 'top', /** * @cfg layout * @inheritdoc */ layout: { type: 'card', animation: { type: 'slide', direction: 'left' } }, /** * @cfg cls * @inheritdoc */ cls: Ext.baseCSSPrefix + 'tabpanel' /** * @cfg {Boolean/String/Object} scrollable * @accessor * @hide */ /** * @cfg {Boolean/String/Object} scroll * @hide */ }, initialize: function() { this.callParent(); this.on({ order: 'before', activetabchange: 'doTabChange', delegate: '> tabbar', scope: this }); this.on({ disabledchange: 'onItemDisabledChange', delegate: '> component', scope: this }); }, platformConfig: [{ theme: ['Blackberry'], tabBarPosition: 'bottom' }], /** * Tab panels should not be scrollable. Instead, you should add scrollable to any item that * you want to scroll. * @private */ applyScrollable: function() { return false; }, /** * Updates the Ui for this component and the {@link #tabBar}. */ updateUi: function(newUi, oldUi) { this.callParent(arguments); if (this.initialized) { this.getTabBar().setUi(newUi); } }, /** * @private */ doSetActiveItem: function(newActiveItem, oldActiveItem) { if (newActiveItem) { var items = this.getInnerItems(), oldIndex = items.indexOf(oldActiveItem), newIndex = items.indexOf(newActiveItem), reverse = oldIndex > newIndex, animation = this.getLayout().getAnimation(), tabBar = this.getTabBar(), oldTab = tabBar.parseActiveTab(oldIndex), newTab = tabBar.parseActiveTab(newIndex); if (animation && animation.setReverse) { animation.setReverse(reverse); } this.callParent(arguments); if (newIndex != -1) { this.forcedChange = true; tabBar.setActiveTab(newIndex); this.forcedChange = false; if (oldTab) { oldTab.setActive(false); } if (newTab) { newTab.setActive(true); } } } }, /** * Updates this container with the new active item. * @param {Object} tabBar * @param {Object} newTab * @return {Boolean} */ doTabChange: function(tabBar, newTab) { var oldActiveItem = this.getActiveItem(), newActiveItem; this.setActiveItem(tabBar.indexOf(newTab)); newActiveItem = this.getActiveItem(); return this.forcedChange || oldActiveItem !== newActiveItem; }, /** * Creates a new {@link Ext.tab.Bar} instance using {@link Ext#factory}. * @param {Object} config * @return {Object} * @private */ applyTabBar: function(config) { if (config === true) { config = {}; } if (config) { Ext.applyIf(config, { ui: this.getUi(), docked: this.getTabBarPosition() }); } return Ext.factory(config, Ext.tab.Bar, this.getTabBar()); }, /** * Adds the new {@link Ext.tab.Bar} instance into this container. * @private */ updateTabBar: function(newTabBar) { if (newTabBar) { this.add(newTabBar); this.setTabBarPosition(newTabBar.getDocked()); } }, /** * Updates the docked position of the {@link #tabBar}. * @private */ updateTabBarPosition: function(position) { var tabBar = this.getTabBar(); if (tabBar) { tabBar.setDocked(position); } }, onItemAdd: function(card) { var me = this; if (!card.isInnerItem()) { return me.callParent(arguments); } var tabBar = me.getTabBar(), initialConfig = card.getInitialConfig(), tabConfig = initialConfig.tab || {}, tabTitle = (card.getTitle) ? card.getTitle() : initialConfig.title, tabIconCls = (card.getIconCls) ? card.getIconCls() : initialConfig.iconCls, tabHidden = (card.getHidden) ? card.getHidden() : initialConfig.hidden, tabDisabled = (card.getDisabled) ? card.getDisabled() : initialConfig.disabled, tabBadgeText = (card.getBadgeText) ? card.getBadgeText() : initialConfig.badgeText, innerItems = me.getInnerItems(), index = innerItems.indexOf(card), tabs = tabBar.getItems(), activeTab = tabBar.getActiveTab(), currentTabInstance = (tabs.length >= innerItems.length) && tabs.getAt(index), tabInstance; if (tabTitle && !tabConfig.title) { tabConfig.title = tabTitle; } if (tabIconCls && !tabConfig.iconCls) { tabConfig.iconCls = tabIconCls; } if (tabHidden && !tabConfig.hidden) { tabConfig.hidden = tabHidden; } if (tabDisabled && !tabConfig.disabled) { tabConfig.disabled = tabDisabled; } if (tabBadgeText && !tabConfig.badgeText) { tabConfig.badgeText = tabBadgeText; } //<debug warn> if (!currentTabInstance && !tabConfig.title && !tabConfig.iconCls) { if (!tabConfig.title && !tabConfig.iconCls) { Ext.Logger.error('Adding a card to a tab container without specifying any tab configuration'); } } //</debug> tabInstance = Ext.factory(tabConfig, Ext.tab.Tab, currentTabInstance); if (!currentTabInstance) { tabBar.insert(index, tabInstance); } card.tab = tabInstance; me.callParent(arguments); if (!activeTab && activeTab !== 0) { tabBar.setActiveTab(tabBar.getActiveItem()); } }, /** * If an item gets enabled/disabled and it has an tab, we should also enable/disable that tab * @private */ onItemDisabledChange: function(item, newDisabled) { if (item && item.tab) { item.tab.setDisabled(newDisabled); } }, // @private onItemRemove: function(item, index) { this.getTabBar().remove(item.tab, this.getAutoDestroy()); this.callParent(arguments); } }, function() { //<deprecated product=touch since=2.0> /** * @cfg {Boolean} tabBarDock * @inheritdoc Ext.tab.Panel#tabBarPosition * @deprecated 2.0.0 Please use {@link #tabBarPosition} instead. */ Ext.deprecateProperty(this, 'tabBarDock', 'tabBarPosition'); //</deprecated> });
class JudgeTask @queue = :judge def self.perform(id) submission = Submission.find(id) code = submission.code log = Logger.new 'log/resque.log' compile_output = `gcc #{submission.source_path} -o #{submission.exec_path} #{Settings.compiler_options} 2>&1` if $?.success? problem = submission.problem log.debug "#{submission.id} | #{compile_output}" msg = `#{Settings.sandbox_path} -i #{problem.input_path} -o #{submission.out_path} -t #{problem.time_limit} -m #{problem.mem_limit} #{submission.exec_path}` case msg.strip when /(\d+) (\d+) (\d+)/ submission.time_cost = $2.to_i submission.status = self.output_eql?(submission.out_path, problem.ans_path) ? :ac : :wa; when 'Time Limit Exceeded' submission.status = :tle submission.msg = msg when 'Memory Limit Exceeded' submission.status = :re submission.msg = msg when 'Program Killed' submission.status = :re submission.msg = msg end FileUtils.rm_f(submission.exec_path) FileUtils.rm_f(submission.out_path) else submission.status = :ce submission.msg = compile_output.gsub(submission.source_path, 'Your code') end submission.save end private def self.output_eql?(exec_out, ans_path) a = IO.readlines(exec_out).map { |s| s.strip } b = IO.readlines(ans_path).map { |s| s.strip } a == b end end
package bhgomes.jaql.logging; import java.util.logging.StreamHandler; /** * Singleton object for System.out as a StreamHandler * * @author Brandon Gomes (bhgomes) */ public final class STDOUT extends StreamHandler { /** * Singleton instance */ private static final STDOUT instance = new STDOUT(); /** * Default constructor of the singleton instance */ private STDOUT() { this.setOutputStream(System.out); } /** * @return instance of the singleton */ public static final STDOUT getInstance() { return STDOUT.instance; } }
package com.venky.core.security; import com.venky.core.util.ObjectUtil; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import java.util.Base64; public class SignatureComputer { public static void main(String[] args) throws Exception{ Options options = new Options(); Option help = new Option("h","help",false, "print this message"); Option url = new Option("u","url", true,"Url called"); url.setRequired(true); Option privateKey = new Option("b64pvk","base64privatekey", true,"Private Key to Sign with"); privateKey.setRequired(true); Option data = new Option("d","data", true,"Data posted to the url"); options.addOption(help); options.addOption(url); options.addOption(privateKey); options.addOption(data); CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd = null; try { cmd = parser.parse(options,args); }catch (Exception ex){ formatter.printHelp(SignatureComputer.class.getName(),options); System.exit(1); } StringBuilder payload = new StringBuilder(); String sUrl = cmd.getOptionValue("url"); if (sUrl.startsWith("http://")){ sUrl = sUrl.substring("http://".length()); sUrl = sUrl.substring(sUrl.indexOf("/")); } payload.append(sUrl); String sData = cmd.getOptionValue("data"); if (!ObjectUtil.isVoid(sData)){ payload.append("|"); payload.append(sData); } String sign = Crypt.getInstance().generateSignature(Base64.getEncoder().encodeToString(payload.toString().getBytes()),Crypt.SIGNATURE_ALGO, Crypt.getInstance().getPrivateKey(Crypt.KEY_ALGO,cmd.getOptionValue("base64privatekey"))); System.out.println(sign); } }
local conf = require "conf" local github_issues_comments = require "includes.github_issues_comments" local exports = {} local function html_post(metadata, content) local github_comments_html = "" if metadata.issueid ~= nil then github_comments_html = github_issues_comments.html_github_issues_comments(metadata.issueid) end local post = [[ <section class="post"> <h1>]] .. metadata.title .. [[</h1> ]] .. content .. [[ </section> <section class="meta"> <span class="author"> <a href="/">]] .. conf.author .. [[</a> </span> <span class="time"> / <time datetime="]] .. metadata.date .. [[">]] .. metadata.date .. [[</time> </span> <br /> <span class="license"> Published under <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">(CC) BY-NC-SA</a> </span> <span class="categories"> in categories <a href="/categories/#]] .. metadata.categories .. [[" title="]] .. metadata.categories .. [[">]] .. metadata.categories .. [[</a>&nbsp; </span> </section> ]] .. github_comments_html .. [[ <script type="text/javascript"> $(function(){ $(document).keydown(function(e) { if (e.target.nodeName.toUpperCase() != 'BODY') return; var url = false; if (e.which == 37 || e.which == 74) { // Left arrow and J {% if page.previous %} url = '{{ site.url }}{{ page.previous.url }}'; {% endif %} } else if (e.which == 39 || e.which == 75) { // Right arrow and K {% if page.next %} url = '{{ site.url }}{{ page.next.url }}'; {% endif %} } if (url) { window.location = url; } }); }) </script> ]] return post end exports.html_post = html_post return exports
SwaggerYard::Rails::Engine.routes.draw do get '/doc', to: 'swagger#doc' scope default: {format: 'json'} do get '/swagger', to: 'swagger#index' get '/openapi', to: 'swagger#openapi' get '/api', to: 'swagger#index' end end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>My Project: src/transports/tcp/tcp.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">My Project </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File&#160;List</span></a></li> <li><a href="globals.html"><span>File&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_4ef9e1fab6db8f1c439d7edf0c56068f.html">transports</a></li><li class="navelem"><a class="el" href="dir_d8522389cf87352535be296338c83cb5.html">tcp</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> &#124; <a href="#var-members">Variables</a> </div> <div class="headertitle"> <div class="title">tcp.c File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include &quot;<a class="el" href="transports_2tcp_2tcp_8h_source.html">tcp.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="btcp_8h_source.html">btcp.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="ctcp_8h_source.html">ctcp.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="tcp_8h_source.html">../../tcp.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="port_8h_source.html">../utils/port.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="iface_8h_source.html">../utils/iface.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="err_8h_source.html">../../utils/err.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="alloc_8h_source.html">../../utils/alloc.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="fast_8h_source.html">../../utils/fast.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="list_8h_source.html">../../utils/list.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="cont_8h_source.html">../../utils/cont.h</a>&quot;</code><br /> <code>#include &lt;string.h&gt;</code><br /> <code>#include &lt;unistd.h&gt;</code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for tcp.c:</div> <div class="dyncontent"> <div class="center"><img src="tcp_8c__incl.png" border="0" usemap="#src_2transports_2tcp_2tcp_8c" alt=""/></div> <map name="src_2transports_2tcp_2tcp_8c" id="src_2transports_2tcp_2tcp_8c"> <area shape="rect" id="node2" href="transports_2tcp_2tcp_8h.html" title="tcp.h" alt="" coords="317,96,368,123"/> <area shape="rect" id="node15" href="btcp_8h.html" title="btcp.h" alt="" coords="152,96,211,123"/> <area shape="rect" id="node16" href="ctcp_8h.html" title="ctcp.h" alt="" coords="235,96,293,123"/> <area shape="rect" id="node17" href="tcp_8h.html" title="../../tcp.h" alt="" coords="1085,96,1160,123"/> <area shape="rect" id="node18" href="port_8h.html" title="../utils/port.h" alt="" coords="363,395,457,421"/> <area shape="rect" id="node19" href="iface_8h.html" title="../utils/iface.h" alt="" coords="811,96,912,123"/> <area shape="rect" id="node21" href="err_8h.html" title="../../utils/err.h" alt="" coords="551,96,651,123"/> <area shape="rect" id="node25" href="alloc_8h.html" title="../../utils/alloc.h" alt="" coords="901,395,1013,421"/> <area shape="rect" id="node24" href="fast_8h.html" title="fast.h" alt="" coords="681,171,735,197"/> <area shape="rect" id="node9" href="list_8h.html" title="utils/list.h" alt="" coords="526,245,604,272"/> <area shape="rect" id="node26" href="cont_8h.html" title="../../utils/cont.h" alt="" coords="1035,320,1145,347"/> <area shape="rect" id="node3" href="transport_8h.html" title="../../transport.h" alt="" coords="210,171,317,197"/> <area shape="rect" id="node4" href="nn_8h.html" title="nn.h" alt="" coords="455,245,501,272"/> <area shape="rect" id="node7" href="fsm_8h.html" title="aio/fsm.h" alt="" coords="69,245,144,272"/> <area shape="rect" id="node10" href="msg_8h.html" title="utils/msg.h" alt="" coords="201,245,287,272"/> <area shape="rect" id="node13" href="int_8h.html" title="int.h" alt="" coords="57,469,103,496"/> <area shape="rect" id="node8" href="queue_8h.html" title="../utils/queue.h" alt="" coords="22,320,129,347"/> <area shape="rect" id="node11" href="chunkref_8h.html" title="chunkref.h" alt="" coords="155,320,237,347"/> <area shape="rect" id="node12" href="chunk_8h.html" title="chunk.h" alt="" coords="118,395,185,421"/> </map> </div> </div><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnn__tcp__optset.html">nn_tcp_optset</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> Variables</h2></td></tr> <tr class="memitem:a49cae577b6a5f862cf71b9ae4d3d050d"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structnn__transport.html">nn_transport</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tcp_8c.html#a49cae577b6a5f862cf71b9ae4d3d050d">nn_tcp</a> = &amp;nn_tcp_vfptr</td></tr> <tr class="separator:a49cae577b6a5f862cf71b9ae4d3d050d"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <h2 class="groupheader">Variable Documentation</h2> <a class="anchor" id="a49cae577b6a5f862cf71b9ae4d3d050d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct <a class="el" href="structnn__transport.html">nn_transport</a>* nn_tcp = &amp;nn_tcp_vfptr</td> </tr> </table> </div><div class="memdoc"> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
// // DDAreaPickerView.h // AreaPicker // // Created by SuperDanny on 15/11/10. // Copyright © 2015年 SuperDanny. All rights reserved. // #import <UIKit/UIKit.h> #import "DDLocation.h" typedef enum { DDAreaPickerWithStateAndCity, DDAreaPickerWithStateAndCityAndDistrict } DDAreaPickerStyle; @class DDAreaPickerView; @protocol DDAreaPickerDatasource <NSObject> - (NSArray *)areaPickerData:(DDAreaPickerView *)picker; @end @protocol DDAreaPickerDelegate <NSObject> @optional - (void)pickerDidChaneStatus:(DDAreaPickerView *)picker; @end @interface DDAreaPickerView : UIView <UIPickerViewDelegate, UIPickerViewDataSource> @property (assign, nonatomic) id <DDAreaPickerDelegate> delegate; @property (assign, nonatomic) id <DDAreaPickerDatasource> datasource; @property (strong, nonatomic) IBOutlet UIPickerView *locatePicker; @property (strong, nonatomic) DDLocation *locate; @property (nonatomic) DDAreaPickerStyle pickerStyle; - (id)initWithStyle:(DDAreaPickerStyle)pickerStyle withDelegate:(id <DDAreaPickerDelegate>)delegate andDatasource:(id <DDAreaPickerDatasource>)datasource; - (void)showInView:(UIView *)view; - (void)cancelPicker; @end
window.PerfHelpers = window.PerfHelpers || {}; ;(function(PerfHelpers) { var timers = {}; PerfHelpers = window.performance || {}; PerfHelpers.now = PerfHelpers.now || function () {}; if ((!console) || (!console.time)) { console.time = function() {}; console.timeEnd = function() {}; } var consoleTime = console.time.bind(window.console); var consoleTimeEnd = console.timeEnd.bind(window.console); console.time = function(key) { var phTimeKey = '[PHTime]' + key; timers[phTimeKey + '_start'] = PerfHelpers.now(); var _startDate = (new Date().toLocaleString()); timers[phTimeKey + '_startDate'] = _startDate; //console.log(phTimeKey + '[STARTED]: ' + _startDate); consoleTime(phTimeKey); }; console.timeEnd = function (key) { var phTimeKey = '[PHTime]' + key; var _startTime = timers[phTimeKey + '_start']; if (_startTime) { var _endDate = (new Date().toLocaleString()); var _endTime = PerfHelpers.now(); var _totalTime = _endTime - _startTime; delete timers[phTimeKey + '_start']; delete timers[phTimeKey + '_startDate']; //console.log(phTimeKey + '[ENDED]: ' + _endDate); consoleTimeEnd(phTimeKey); if ('ga' in window) { var alKey = 'ACT_' + key; var _roundedTime = Math.round(_totalTime); ga('send', 'timing', 'web-performance', alKey, _roundedTime, 'Total Time'); ga('send', { hitType: 'event', eventCategory: 'web-performance', eventAction: alKey, eventLabel: _endDate, eventValue: _roundedTime }); // console.debug('[GA][timing]:', 'send', 'event', 'web-performance', alKey, _endDate, _roundedTime); } return _totalTime; } else { return undefined; } }; })(window.PerfHelpers);
<!doctype html> <html class="no-js" ng-app="ngMailCreator"> <head> <meta charset="utf-8"> <title>frontend</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- build:css styles/vendor.css --> <!-- bower:css --> <!-- endbower --> <!-- endbuild --> <!-- build:css({.tmp,app}) styles/main.css --> <link rel="stylesheet" href="styles/main.css"> <!-- endbuild --> <!-- build:js scripts/modernizr.js --> <script src="bower_components/modernizr/modernizr.js"></script> <!-- endbuild --> </head> <body> <!--[if lt IE 10]> <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <!-- <div class="off-canvas-wrap"> <a class="left-off-canvas-toggle" href="#"><i class="fa fa-cog"></i></a> <div ui-view="content" class="inner-wrap"></div> <aside ui-view="left-nav" class="left-off-canvas-menu"></aside> </div> --> <div class="off-canvas-wrap" ui-view="main"></div> <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> <script> (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','UA-XXXXX-X');ga('send','pageview'); </script> <!-- build:js scripts/vendor.js --> <!-- bower:js --> <script src="bower_components/angular/angular.js"></script> <script src="bower_components/angular-animate/angular-animate.js"></script> <script src="bower_components/angular-cookies/angular-cookies.js"></script> <script src="bower_components/angular-touch/angular-touch.js"></script> <script src="bower_components/angular-sanitize/angular-sanitize.js"></script> <script src="bower_components/lodash/dist/lodash.compat.js"></script> <script src="bower_components/restangular/dist/restangular.js"></script> <script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script> <script src="bower_components/angular-foundation/mm-foundation-tpls.js"></script> <!-- endbower --> <script src="scripts/modules/ngDraggable.js"></script> <!-- endbuild --> <!-- build:js({app,.tmp}) scripts/main.js --> <script src="scripts/ngMailCreator.js"></script> <script src="scripts/controllers/main-ctrl.js"></script> <!-- inject:partials --> <!-- endinject --> <!-- endbuild --> </body> </html>
# frozen_string_literal: true class Awarding < ApplicationRecord belongs_to :award belongs_to :recipient belongs_to :group validates :award, presence: true validates :recipient, presence: true # group should be present if there is no default group validates :group, presence: true, if: proc { |a| a.award.nil? || a.award.group.nil? } # award name override should be present iff the award is an 'other award' validates :award_name, presence: true, if: proc { |a| a.award.nil? || a.award.other_award? } validates :award_name, absence: true, if: proc { |a| a.award && !a.award.other_award? } # returns overriden value if present, otherwise falls back to award def override_attr(attr, own_attr_val) return own_attr_val if own_attr_val award.send(attr) if award end # returns override award name if one exists, otherwise the default group def group override_attr(:group, super) end # returns award name or display name (if other award) along with granting group (if not the default) def display_name override_attr(:name, award_name) + (group == award.group ? '' : " (#{group})") end def to_s display_name end def received return super if super '(Unknown)' end end
# suite2
<?php /* * This file is part of Hifone. * * (c) Hifone.com <hifone@hifone.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Hifone\Http\Controllers\Auth; use AltThree\Validator\ValidationException; use Hifone\Commands\Identity\AddIdentityCommand; use Hifone\Events\User\UserWasAddedEvent; use Hifone\Events\User\UserWasLoggedinEvent; use Hifone\Hashing\PasswordHasher; use Hifone\Http\Controllers\Controller; use Hifone\Models\Identity; use Hifone\Models\Provider; use Hifone\Models\User; use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; use Illuminate\Foundation\Auth\ThrottlesLogins; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\View; use Illuminate\Support\Str; use Input; use Laravel\Socialite\Two\InvalidStateException; class AuthController extends Controller { /* |-------------------------------------------------------------------------- | Registration & Login Controller |-------------------------------------------------------------------------- | | This controller handles the registration of new users, as well as the | authentication of existing users. By default, this controller uses | a simple trait to add these behaviors. Why don't you explore it? | */ use AuthenticatesAndRegistersUsers, ThrottlesLogins; //注册后返回主页 protected $redirectPath = '/'; protected $hasher; public function __construct(PasswordHasher $hasher) { $this->hasher = $hasher; $this->middleware('guest', ['except' => ['logout', 'getLogout']]); } public function getLogin() { $providers = Provider::orderBy('created_at', 'desc')->get(); return $this->view('auth.login') ->withCaptcha(route('captcha', ['random' => time()])) ->withConnectData(Session::get('connect_data')) ->withProviders($providers) ->withPageTitle(trans('dashboard.login.login')); } public function landing() { return $this->view('auth.landing') ->withConnectData(Session::get('connect_data')) ->withPageTitle(''); } /** * Logs the user in. * * @return \Illuminate\Http\RedirectResponse */ public function postLogin() { $loginData = Input::only(['login', 'password', 'verifycode']); if (!Config::get('setting.site_captcha_login_disabled')) { $verifycode = array_pull($loginData, 'verifycode'); if ($verifycode != Session::get('phrase')) { // instructions if user phrase is good return Redirect::to('auth/login') ->withInput(Input::except('password')) ->withError(trans('hifone.captcha.failure')); } } // Login with username or email. $loginKey = Str::contains($loginData['login'], '@') ? 'email' : 'username'; $loginData[$loginKey] = array_pull($loginData, 'login'); // Validate login credentials. if (Auth::validate($loginData)) { // We probably want to add support for "Remember me" here. Auth::attempt($loginData, false); if (Session::has('connect_data')) { $connect_data = Session::get('connect_data'); dispatch(new AddIdentityCommand(Auth::user()->id, $connect_data)); } event(new UserWasLoggedinEvent(Auth::user())); return Redirect::intended('/') ->withSuccess(sprintf('%s %s', trans('hifone.awesome'), trans('hifone.login.success'))); } return redirect('/auth/login') ->withInput(Input::except('password')) ->withError(trans('hifone.login.invalid')); } public function getRegister() { $connect_data = Session::get('connect_data'); return $this->view('auth.register') ->withCaptcha(route('captcha', ['random' => time()])) ->withConnectData($connect_data) ->withPageTitle(trans('dashboard.login.login')); } public function postRegister() { // Auto register $connect_data = Session::get('connect_data'); $from = ''; if ($connect_data && isset($connect_data['extern_uid'])) { $registerData = [ 'username' => $connect_data['nickname'].'_'.$connect_data['provider_id'], 'nickname' => $connect_data['nickname'], 'password' => $this->hashPassword(str_random(8), ''), 'email' => $connect_data['extern_uid'].'@'.$connect_data['provider_id'], 'salt' => '', ]; $from = 'provider'; } else { $registerData = Input::only(['username', 'email', 'password', 'password_confirmation', 'verifycode']); if ($registerData['verifycode'] != Session::get('phrase') && Config::get('setting.site_captcha_reg_disabled')) { return Redirect::to('auth/register') ->withTitle(sprintf('%s %s', trans('hifone.whoops'), trans('dashboard.users.add.failure'))) ->withInput(Input::all()) ->withErrors([trans('hifone.captcha.failure')]); } } try { $user = $this->create($registerData); } catch (ValidationException $e) { return Redirect::to('auth/register') ->withTitle(sprintf('%s %s', trans('hifone.whoops'), trans('dashboard.users.add.failure'))) ->withInput(Input::all()) ->withErrors($e->getMessageBag()); } if ($from == 'provider') { dispatch(new AddIdentityCommand($user->id, $connect_data)); } event(new UserWasAddedEvent($user)); Auth::guard($this->getGuard())->login($user); return redirect($this->redirectPath()); } /** * Create a new user instance after a valid registration. * * @param array $data * * @return User */ protected function create(array $data) { $salt = $this->generateSalt(); $password = $this->hashPassword($data['password'], $salt); $user = User::create([ 'username' => $data['username'], 'email' => $data['email'], 'salt' => $salt, 'password' => $password, ]); return $user; } /** * hash user's raw password. * * @param string $password plain text form of user's password * @param string $salt salt * * @return string hashed password */ private function hashPassword($password, $salt) { return $this->hasher->make($password, ['salt' => $salt]); } /** * generate salt for hashing password. * * @return string */ private function generateSalt() { return str_random(16); } public function provider($slug) { return \Socialite::with($slug)->redirect(); } public function callback($slug) { if (Input::has('code')) { $provider = Provider::where('slug', '=', $slug)->firstOrFail(); try { $extern_user = \Socialite::with($slug)->user(); } catch (InvalidStateException $e) { return Redirect::to('/auth/landing') ->withErrors(['授权失效']); } //检查是否已经连接过 $identity = Identity::where('provider_id', '=', $provider->id)->where('extern_uid', '=', $extern_user->id)->first(); if (is_null($identity)) { Session::put('connect_data', ['provider_id' => $provider->id, 'extern_uid' => $extern_user->id, 'nickname' => $extern_user->nickname]); return Redirect::to('/auth/landing'); } //已经连接过,找出user_id, 直接登录 $user = User::find($identity->user_id); if (!Auth::check()) { Auth::login($user, true); } return Redirect::to('/') ->withSuccess(sprintf('%s %s', trans('hifone.awesome'), trans('hifone.login.success'))); } } public function userBanned() { if (Auth::check() && !Auth::user()->is_banned) { return redirect(route('home')); } //force logout Auth::logout(); return Redirect::to('/'); } // 用户屏蔽 public function userIsBanned($user) { return Redirect::route('user-banned'); } }
using Hanafuda.OpenApi.Entities; using Hanafuda.OpenApi.Enums; using Hanafuda.OpenApi.Expressions; using System; using System.Collections.Generic; using System.Linq; namespace Hanafuda.OpenApi.Extensions { /// <summary> /// Extensions for Enumerable /// </summary> public static class EnumerableExtension { /// <summary> /// Return a Shuffled enumerable of this enumerable /// </summary> /// <typeparam name="T">T type</typeparam> /// <param name="enumerable">Enumerable extend</param> /// <returns>Shuffled enumerable</returns> public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> enumerable) { return enumerable.OrderBy(x => Guid.NewGuid()).ToList(); } /// <summary> /// Draw a random item /// </summary> /// <typeparam name="T">T type</typeparam> /// <param name="enumerable">Enumerable extend</param> /// <returns>Item draw</returns> public static T Draw<T>(this IEnumerable<T> enumerable) { return enumerable.Shuffle().First(); } /// <summary> /// True if a card enumeration has a Teshi, otherwise false /// </summary> /// <param name="cards">IEnumarable extends</param> /// <param name="month">Month</param> /// <returns>True if a card enumeration has a Teshi, otherwise false</returns> public static bool HasTeshi(this IEnumerable<Card> cards, MonthEnum month) { return cards.Count(x => x.Month == month) == 4; } /// <summary> /// True if a card enumeration has a Kuttsuki, otherwise false /// </summary> /// <param name="cards">IEnumarable extends</param> /// <returns>True if a card enumeration has a Kuttsuki, otherwise false</returns> public static bool HasKuttsuki(this IEnumerable<Card> cards) { var cardArray = cards as Card[] ?? cards.ToArray(); //4 month pair return cardArray.Select(x => x.Month).Distinct().Count(m => cardArray.Count(x => x.Month == m) == 2) == 4; } /// <summary> /// Return all Yakus find in a collection of cards. /// </summary> /// <param name="cards">Cards</param> /// <param name="currentMonth">Current month</param> /// <returns>Enumerable of YakuEnum</returns> public static IEnumerable<YakuEnum> GetYakus(this IEnumerable<Card> cards, MonthEnum currentMonth) { var cardArray = cards as Card[] ?? cards.ToArray(); var yakus = new List<YakuEnum>(); //SANKO if (cardArray.Count(YakuLambda.NoRainMan) == 3) yakus.Add(YakuEnum.Sanko); //SHIKO if (cardArray.Count(YakuLambda.NoRainMan) == 4) { yakus.Remove(YakuEnum.Sanko); yakus.Add(YakuEnum.Shiko); } //AME_SHIKO if (cardArray.Count(YakuLambda.NoRainMan) == 3 && cardArray.Any(YakuLambda.RainMan)) { yakus.Remove(YakuEnum.Sanko); yakus.Add(YakuEnum.AmeShiko); } //GOKO if (cardArray.Count(YakuLambda.Special) == 5) { yakus.Remove(YakuEnum.Shiko); yakus.Add(YakuEnum.Goko); } //INOSHIKACHO if (cardArray.Count(YakuLambda.Inoshikacho) == 3) yakus.Add(YakuEnum.Inoshikacho); //TANE if (cardArray.Count(YakuLambda.Animal) >= 5) yakus.Add(YakuEnum.Tane); //AKATAN if (cardArray.Count(YakuLambda.Poem) == 3) yakus.Add(YakuEnum.Akatan); //AOTAN if (cardArray.Count(YakuLambda.Blue) == 3) yakus.Add(YakuEnum.Aotan); //AKATAN_AOTAN_NO_CHOFUKU if(yakus.Contains(YakuEnum.Akatan) && yakus.Contains(YakuEnum.Aotan)) yakus.Add(YakuEnum.AkatanAotanNoChofuku); //TAN if (cardArray.Count(YakuLambda.Ribbon) >= 5) yakus.Add(YakuEnum.Tan); //TSUKIMI if (cardArray.Any(YakuLambda.Moon) && cardArray.Any(YakuLambda.SakeCup)) yakus.Add(YakuEnum.TsukimiZake); //HANAMI if (cardArray.Any(YakuLambda.Curtain) && cardArray.Any(YakuLambda.SakeCup)) yakus.Add(YakuEnum.HanamiZake); //KASU if (cardArray.Count(YakuLambda.Normal) >= 10) yakus.Add(YakuEnum.Kasu); //BAKE_FUDA if (cardArray.Count(YakuLambda.Normal) == 9 && cardArray.Any(YakuLambda.SakeCup)) { yakus.Add(YakuEnum.BakeFuda); } //TSUKI_FUDA if (cardArray.Count(x => x.Month == currentMonth) == 4) yakus.Add(YakuEnum.TsukiFuda); return yakus; } } }
function preloadimages(n,o){function r(){++a>=e&&o(i)}var a=0,e=0,i=n instanceof Array?[]:{};for(var c in n)e++,i[c]=new Image,i[c].src=n[c],i[c].onload=r,i[c].onerror=r,i[c].onabort=r}
import { NgModule } from '@angular/core'; import { RouterModule, Routes, PreloadAllModules } from '@angular/router'; import { HomeComponent } from './home/home.component'; import { I18nComponent } from './i18n/i18n.component'; import { ValidationComponent } from './validation/validation.component'; const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'i18n', component: I18nComponent }, { path: 'list', loadChildren: () => import('./list/list.module').then(m => m.ListModule) }, { path: 'validation', component: ValidationComponent }, { path: '**', redirectTo: 'home' } ]; @NgModule({ imports: [ RouterModule.forRoot(routes, { useHash: true, preloadingStrategy: PreloadAllModules }) ], exports: [RouterModule] }) export class AppRoutingModule { }
package com.github.bogdanlivadariu.jenkins.reporting.testng; import hudson.FilePath; import hudson.model.Action; import hudson.model.DirectoryBrowserSupport; import java.io.File; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; public abstract class TestNGTestReportBaseAction implements Action { public String getUrlName() { return "testng-reports-with-handlebars"; } public String getDisplayName() { return "View TestNG Reports"; } public String getIconFileName() { return "/plugin/bootstraped-multi-test-results-report/testng.png"; } public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { DirectoryBrowserSupport dbs = new DirectoryBrowserSupport(this, new FilePath(this.dir()), this.getTitle(), "graph.gif", false); dbs.setIndexFileName("testsByClassOverview.html"); dbs.generateResponse(req, rsp, this); } protected abstract String getTitle(); protected abstract File dir(); }
package com.bitdecay.game.ui; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.scenes.scene2d.Group; import com.badlogic.gdx.scenes.scene2d.actions.Actions; import com.badlogic.gdx.scenes.scene2d.actions.MoveToAction; import com.bitdecay.game.util.Quest; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; import java.util.Optional; import static com.badlogic.gdx.scenes.scene2d.actions.Actions.moveTo; public class Tray extends Group { protected Logger log = LogManager.getLogger(this.getClass()); public TrayCard taskCard; public ConversationDialog dialog; private TaskList taskList; private boolean isHidden = false; public Tray(TaskList taskList) { super(); this.taskList = taskList; Vector2 screenSize = new Vector2(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); Group taskCardGroup = new Group(); taskCard = new TrayCard(); taskCard.setPosition(0, 0); taskCardGroup.addActor(taskCard); taskCardGroup.setScale(0.7f); addActor(taskCardGroup); dialog = new ConversationDialog(); dialog.setPosition(screenSize.x * 0.2125f, 0); addActor(dialog); } @Override public void act(float delta) { super.act(delta); Optional<Quest> curQuest = taskList.currentQuest(); if (curQuest.isPresent()){ Quest q = curQuest.get(); if (q != taskCard.quest) { taskCard.quest = q; showTray(); } } else if (!isHidden) hideTray(); } public void showTray(){ log.info("Show tray"); MoveToAction move = moveTo(getX(), Gdx.graphics.getHeight() * 1.01f); move.setDuration(0.25f); addAction(Actions.sequence(Actions.run(()-> { if(taskCard.quest != null && taskCard.quest.currentZone().isPresent()) { taskCard.quest.currentZone().ifPresent(zone -> { dialog.setPersonName(taskCard.quest.personName); dialog.setText(zone.flavorText); }); } else { dialog.setPersonName(null); dialog.setText(""); } }), move)); isHidden = false; } public void hideTray(){ log.info("Hide tray"); MoveToAction move = moveTo(getX(), 0); move.setDuration(0.25f); addAction(Actions.sequence(move, Actions.run(()-> taskCard.quest = null))); isHidden = true; } public void toggle(){ if (isHidden) showTray(); else hideTray(); } }
module.exports = function(locker) { /* locker.add(function(callback) { //Return content in format: callback({ name: "Vehicle Speed", type: "metric", content: { x: 0, y: 0, xtitle: "Time", ytitle: "Speed" }, tags: ["vehicle", "speed", "velocity", "car"] }); }); locker.add(function(callback) { //Return content in format: callback({ name: "Vehicle RPM", type: "metric", content: { x: 0, y: 0, xtitle: "Time", ytitle: "Revolutions Per Minute" }, tags: ["vehicle", "rpm", "revolutions", "car"] }); }); locker.add(function(callback) { callback({ name: "Image test", type: "image", content: { url: "http://24.media.tumblr.com/tumblr_mc6vgcDUEK1qmbg8bo1_500.jpg" }, tags: ["vehicle", "rpm", "revolutions", "car"] }); }); */ }
package app; import java.util.ResourceBundle; import control.MainController; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.VBox; import javafx.stage.Stage; /** * Main class for Logoquiz app. */ public class LogoquizMainApp extends Application { /** * Root layout of the application. */ private VBox rootLayout; /** * Primary Stage. */ private Stage primaryStage; /** * main() method. * @param args arguments */ public static final void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { primaryStage = stage; FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/fxml/rootLayout.fxml")); loader.setResources(ResourceBundle.getBundle("i18n/message")); rootLayout = loader.load(); MainController controller = loader.getController(); controller.setMainApp(this); primaryStage.setTitle("Logoquiz"); primaryStage.setScene(new Scene(rootLayout)); primaryStage.show(); } /** * Getter for primaryStage. * * @return primaryStage */ public Stage getPrimaryStage() { return primaryStage; } }
{ it("returns a key", () => { var nativeEvent = new KeyboardEvent("keypress", { key: "f" }); expect(getEventKey(nativeEvent)).toBe("f"); }); }
<?php /* @WebProfiler/Icon/close.svg */ class __TwigTemplate_6bdd9e9862db24b9d9ca3b9811419338c5925f8e0c5dd2898e11b045839a13fd extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { $__internal_a0af381be0a0e30ade6543694a1930767aff1d9dfe92cf56a41f9cee6dc77806 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"); $__internal_a0af381be0a0e30ade6543694a1930767aff1d9dfe92cf56a41f9cee6dc77806->enter($__internal_a0af381be0a0e30ade6543694a1930767aff1d9dfe92cf56a41f9cee6dc77806_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Icon/close.svg")); // line 1 echo "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" enable-background=\"new 0 0 24 24\" xml:space=\"preserve\"> <path fill=\"#AAAAAA\" d=\"M21.1,18.3c0.8,0.8,0.8,2,0,2.8c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6L12,14.8l-6.3,6.3 c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6c-0.8-0.8-0.8-2,0-2.8L9.2,12L2.9,5.7c-0.8-0.8-0.8-2,0-2.8c0.8-0.8,2-0.8,2.8,0L12,9.2 l6.3-6.3c0.8-0.8,2-0.8,2.8,0c0.8,0.8,0.8,2,0,2.8L14.8,12L21.1,18.3z\"/> </svg> "; $__internal_a0af381be0a0e30ade6543694a1930767aff1d9dfe92cf56a41f9cee6dc77806->leave($__internal_a0af381be0a0e30ade6543694a1930767aff1d9dfe92cf56a41f9cee6dc77806_prof); } public function getTemplateName() { return "@WebProfiler/Icon/close.svg"; } public function getDebugInfo() { return array ( 22 => 1,); } /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */ public function getSource() { @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); return $this->getSourceContext()->getCode(); } public function getSourceContext() { return new Twig_Source("<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" enable-background=\"new 0 0 24 24\" xml:space=\"preserve\"> <path fill=\"#AAAAAA\" d=\"M21.1,18.3c0.8,0.8,0.8,2,0,2.8c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6L12,14.8l-6.3,6.3 c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6c-0.8-0.8-0.8-2,0-2.8L9.2,12L2.9,5.7c-0.8-0.8-0.8-2,0-2.8c0.8-0.8,2-0.8,2.8,0L12,9.2 l6.3-6.3c0.8-0.8,2-0.8,2.8,0c0.8,0.8,0.8,2,0,2.8L14.8,12L21.1,18.3z\"/> </svg> ", "@WebProfiler/Icon/close.svg", "C:\\wamp\\www\\ws\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\WebProfilerBundle\\Resources\\views\\Icon\\close.svg"); } }
/** * A 32-bit unsigned bitfield that describes an entity's classification(s) * @typedef {number} EntityClass */ /** * Enumerate entity classes */ const ENTITY = { NULL: 0x00, // Base celestial classes ASTEROID: 0x01, // floating rock in space, orbits star COMET: 0x02, // an asteroid with a highly-eccentric orbit PLANET: 0x04, // a large celestial that orbits a star MOON: 0x08, // something that orbits a celestial that is not a star STAR: 0x10, // a luminous sphere of plasma, typically the center of a solar system BLACKHOLE: 0x20, // a object dense enough to maintain an event horizon // Celestial modifiers GAS: 0x40, // is a gas giant / gas world ICE: 0x80, // is an ice giant / ice world DESERT: 0x100, // is a desert world DWARF: 0x200, // is a "dwarf" in its category GIANT: 0x400, // is a "giant" in its category NEUTRON: 0x800, // is a composed of "neutronium" (ie neutron stars) // Empire Units VESSEL: 0x1000, // a vessel is any empire-made object, manned or unmanned SHIP: 0x2000, // a ship is a manned vessel equipped with engines DRONE: 0x4000, // a drone is an unmanned vessel equipped with engines STATION: 0x8000, // a station is a large habitable vessel with reduced maneuverability (if any) - can be orbital or ground-based MILITARY: 0x10000, // a military vessel belongs to an empire's military COLONY: 0x20000 // a colony is a ground-based civilian population }; /** * An Entity is any object representing something in the game world. This may include: planets, stars, starships, * cultures, empires, etc. */ class Entity { /** * Entity constructor method * @param {string} [name] * Defines the name of this entity * @param {Coord} [coords] * Defines the default coordinates of this entity * @param {EntityClass} [eClass] * Defines this entity's eClass */ constructor(name, coords, eClass) { /** The entity's non-unique name */ this.name = name || ""; /** The entity's class */ this.eClass = eClass || ENTITY.NULL; if(coords) { // Set this entity's location this.setPos(coords.xPos, coords.yPos, coords.system); } // Register this entity to LogicM LogicM.addEntity(this); } /** * * @param {number} [xPos=0] * The new x coordinate * @param {number} [yPos=0] * The new y coordinate * @param {string} [system] * The name of the star system */ setPos(xPos=0, yPos=0, system) { this.xPos = xPos; this.yPos = yPos; this.system = system || this.system; } } /** * A table describing an entity's display properties * * @typedef {Object} DisplayProperties * @property {number} radius - The entity's real radius, in km * @property {number} [minRadius=0] - The entity's minimum draw radius, in pixels * @property {string} [color=#ffffff] - The entity's draw color */ /** * A RenderEntity is an entity that structures render data. It can be drawn onto the screen. * @extends Entity */ class RenderEntity extends Entity { /** * RenderEntity constructor method * @param {string} name * Defines the name of this entity * @param {Coord} coords * Defines the default coordinates of this entity * @param {DisplayProperties} displayProps * Defines the default display properties * @param {EntityClass} [eClass] * Defines this entity's eClass */ constructor(name, coords, displayProps, eClass) { super(name, coords, eClass); /** Set to true if this entity can be rendered */ this.canRender = true; /** Entity's draw radius */ this.radius = displayProps.radius || 0; /** Entity's minimum radius */ this.minRadius = displayProps.minRadius || 0; /** Entity's draw color */ this.color = displayProps.color || 'white'; // Register this visible entity to the Logic Module if(LogicM.getViewingSystem() == coords.system) { RenderM.addRenderEntity(this); } } }
# -*- coding: utf-8 -*- """ flask.ext.babelex ~~~~~~~~~~~~~~~~~ Implements i18n/l10n support for Flask applications based on Babel. :copyright: (c) 2013 by Serge S. Koval, Armin Ronacher and contributors. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os # this is a workaround for a snow leopard bug that babel does not # work around :) if os.environ.get('LC_CTYPE', '').lower() == 'utf-8': os.environ['LC_CTYPE'] = 'en_US.utf-8' from datetime import datetime from flask import _request_ctx_stack from babel import dates, numbers, support, Locale from babel.support import NullTranslations from werkzeug import ImmutableDict try: from pytz.gae import pytz except ImportError: from pytz import timezone, UTC else: timezone = pytz.timezone UTC = pytz.UTC from flask_babelex._compat import string_types _DEFAULT_LOCALE = Locale.parse('en') class Babel(object): """Central controller class that can be used to configure how Flask-Babel behaves. Each application that wants to use Flask-Babel has to create, or run :meth:`init_app` on, an instance of this class after the configuration was initialized. """ default_date_formats = ImmutableDict({ 'time': 'medium', 'date': 'medium', 'datetime': 'medium', 'time.short': None, 'time.medium': None, 'time.full': None, 'time.long': None, 'date.short': None, 'date.medium': None, 'date.full': None, 'date.long': None, 'datetime.short': None, 'datetime.medium': None, 'datetime.full': None, 'datetime.long': None, }) def __init__(self, app=None, default_locale='en', default_timezone='UTC', date_formats=None, configure_jinja=True, default_domain=None): self._default_locale = default_locale self._default_timezone = default_timezone self._date_formats = date_formats self._configure_jinja = configure_jinja self.app = app self._locale_cache = dict() if default_domain is None: self._default_domain = Domain() else: self._default_domain = default_domain self.locale_selector_func = None self.timezone_selector_func = None if app is not None: self.init_app(app) def init_app(self, app): """Set up this instance for use with *app*, if no app was passed to the constructor. """ self.app = app app.babel_instance = self if not hasattr(app, 'extensions'): app.extensions = {} app.extensions['babel'] = self app.config.setdefault('BABEL_DEFAULT_LOCALE', self._default_locale) app.config.setdefault('BABEL_DEFAULT_TIMEZONE', self._default_timezone) if self._date_formats is None: self._date_formats = self.default_date_formats.copy() #: a mapping of Babel datetime format strings that can be modified #: to change the defaults. If you invoke :func:`format_datetime` #: and do not provide any format string Flask-Babel will do the #: following things: #: #: 1. look up ``date_formats['datetime']``. By default ``'medium'`` #: is returned to enforce medium length datetime formats. #: 2. ``date_formats['datetime.medium'] (if ``'medium'`` was #: returned in step one) is looked up. If the return value #: is anything but `None` this is used as new format string. #: otherwise the default for that language is used. self.date_formats = self._date_formats if self._configure_jinja: app.jinja_env.filters.update( datetimeformat=format_datetime, dateformat=format_date, timeformat=format_time, timedeltaformat=format_timedelta, numberformat=format_number, decimalformat=format_decimal, currencyformat=format_currency, percentformat=format_percent, scientificformat=format_scientific, ) app.jinja_env.add_extension('jinja2.ext.i18n') app.jinja_env.install_gettext_callables( lambda x: get_domain().get_translations().ugettext(x), lambda s, p, n: get_domain().get_translations().ungettext(s, p, n), newstyle=True ) def localeselector(self, f): """Registers a callback function for locale selection. The default behaves as if a function was registered that returns `None` all the time. If `None` is returned, the locale falls back to the one from the configuration. This has to return the locale as string (eg: ``'de_AT'``, ''`en_US`'') """ assert self.locale_selector_func is None, \ 'a localeselector function is already registered' self.locale_selector_func = f return f def timezoneselector(self, f): """Registers a callback function for timezone selection. The default behaves as if a function was registered that returns `None` all the time. If `None` is returned, the timezone falls back to the one from the configuration. This has to return the timezone as string (eg: ``'Europe/Vienna'``) """ assert self.timezone_selector_func is None, \ 'a timezoneselector function is already registered' self.timezone_selector_func = f return f def list_translations(self): """Returns a list of all the locales translations exist for. The list returned will be filled with actual locale objects and not just strings. .. versionadded:: 0.6 """ dirname = os.path.join(self.app.root_path, 'translations') if not os.path.isdir(dirname): return [] result = [] for folder in os.listdir(dirname): locale_dir = os.path.join(dirname, folder, 'LC_MESSAGES') if not os.path.isdir(locale_dir): continue if filter(lambda x: x.endswith('.mo'), os.listdir(locale_dir)): result.append(Locale.parse(folder)) if not result: result.append(Locale.parse(self._default_locale)) return result @property def default_locale(self): """The default locale from the configuration as instance of a `babel.Locale` object. """ return self.load_locale(self.app.config['BABEL_DEFAULT_LOCALE']) @property def default_timezone(self): """The default timezone from the configuration as instance of a `pytz.timezone` object. """ return timezone(self.app.config['BABEL_DEFAULT_TIMEZONE']) def load_locale(self, locale): """Load locale by name and cache it. Returns instance of a `babel.Locale` object. """ rv = self._locale_cache.get(locale) if rv is None: self._locale_cache[locale] = rv = Locale.parse(locale) return rv def get_locale(): """Returns the locale that should be used for this request as `babel.Locale` object. This returns `None` if used outside of a request. If flask-babel was not attached to the Flask application, will return 'en' locale. """ ctx = _request_ctx_stack.top if ctx is None: return None locale = getattr(ctx, 'babel_locale', None) if locale is None: babel = ctx.app.extensions.get('babel') if babel is None: locale = _DEFAULT_LOCALE else: if babel.locale_selector_func is not None: rv = babel.locale_selector_func() if rv is None: locale = babel.default_locale else: locale = babel.load_locale(rv) else: locale = babel.default_locale ctx.babel_locale = locale return locale def get_timezone(): """Returns the timezone that should be used for this request as `pytz.timezone` object. This returns `None` if used outside of a request. If flask-babel was not attached to application, will return UTC timezone object. """ ctx = _request_ctx_stack.top tzinfo = getattr(ctx, 'babel_tzinfo', None) if tzinfo is None: babel = ctx.app.extensions.get('babel') if babel is None: tzinfo = UTC else: if babel.timezone_selector_func is None: tzinfo = babel.default_timezone else: rv = babel.timezone_selector_func() if rv is None: tzinfo = babel.default_timezone else: if isinstance(rv, string_types): tzinfo = timezone(rv) else: tzinfo = rv ctx.babel_tzinfo = tzinfo return tzinfo def refresh(): """Refreshes the cached timezones and locale information. This can be used to switch a translation between a request and if you want the changes to take place immediately, not just with the next request:: user.timezone = request.form['timezone'] user.locale = request.form['locale'] refresh() flash(gettext('Language was changed')) Without that refresh, the :func:`~flask.flash` function would probably return English text and a now German page. """ ctx = _request_ctx_stack.top for key in 'babel_locale', 'babel_tzinfo': if hasattr(ctx, key): delattr(ctx, key) def _get_format(key, format): """A small helper for the datetime formatting functions. Looks up format defaults for different kinds. """ babel = _request_ctx_stack.top.app.extensions.get('babel') if babel is not None: formats = babel.date_formats else: formats = Babel.default_date_formats if format is None: format = formats[key] if format in ('short', 'medium', 'full', 'long'): rv = formats['%s.%s' % (key, format)] if rv is not None: format = rv return format def to_user_timezone(datetime): """Convert a datetime object to the user's timezone. This automatically happens on all date formatting unless rebasing is disabled. If you need to convert a :class:`datetime.datetime` object at any time to the user's timezone (as returned by :func:`get_timezone` this function can be used). """ if datetime.tzinfo is None: datetime = datetime.replace(tzinfo=UTC) tzinfo = get_timezone() return tzinfo.normalize(datetime.astimezone(tzinfo)) def to_utc(datetime): """Convert a datetime object to UTC and drop tzinfo. This is the opposite operation to :func:`to_user_timezone`. """ if datetime.tzinfo is None: datetime = get_timezone().localize(datetime) return datetime.astimezone(UTC).replace(tzinfo=None) def format_datetime(datetime=None, format=None, rebase=True): """Return a date formatted according to the given pattern. If no :class:`~datetime.datetime` object is passed, the current time is assumed. By default rebasing happens which causes the object to be converted to the users's timezone (as returned by :func:`to_user_timezone`). This function formats both date and time. The format parameter can either be ``'short'``, ``'medium'``, ``'long'`` or ``'full'`` (in which cause the language's default for that setting is used, or the default from the :attr:`Babel.date_formats` mapping is used) or a format string as documented by Babel. This function is also available in the template context as filter named `datetimeformat`. """ format = _get_format('datetime', format) return _date_format(dates.format_datetime, datetime, format, rebase) def format_date(date=None, format=None, rebase=True): """Return a date formatted according to the given pattern. If no :class:`~datetime.datetime` or :class:`~datetime.date` object is passed, the current time is assumed. By default rebasing happens which causes the object to be converted to the users's timezone (as returned by :func:`to_user_timezone`). This function only formats the date part of a :class:`~datetime.datetime` object. The format parameter can either be ``'short'``, ``'medium'``, ``'long'`` or ``'full'`` (in which cause the language's default for that setting is used, or the default from the :attr:`Babel.date_formats` mapping is used) or a format string as documented by Babel. This function is also available in the template context as filter named `dateformat`. """ if rebase and isinstance(date, datetime): date = to_user_timezone(date) format = _get_format('date', format) return _date_format(dates.format_date, date, format, rebase) def format_time(time=None, format=None, rebase=True): """Return a time formatted according to the given pattern. If no :class:`~datetime.datetime` object is passed, the current time is assumed. By default rebasing happens which causes the object to be converted to the users's timezone (as returned by :func:`to_user_timezone`). This function formats both date and time. The format parameter can either be ``'short'``, ``'medium'``, ``'long'`` or ``'full'`` (in which cause the language's default for that setting is used, or the default from the :attr:`Babel.date_formats` mapping is used) or a format string as documented by Babel. This function is also available in the template context as filter named `timeformat`. """ format = _get_format('time', format) return _date_format(dates.format_time, time, format, rebase) def format_timedelta(datetime_or_timedelta, granularity='second'): """Format the elapsed time from the given date to now or the given timedelta. This currently requires an unreleased development version of Babel. This function is also available in the template context as filter named `timedeltaformat`. """ if isinstance(datetime_or_timedelta, datetime): datetime_or_timedelta = datetime.utcnow() - datetime_or_timedelta return dates.format_timedelta(datetime_or_timedelta, granularity, locale=get_locale()) def _date_format(formatter, obj, format, rebase, **extra): """Internal helper that formats the date.""" locale = get_locale() extra = {} if formatter is not dates.format_date and rebase: extra['tzinfo'] = get_timezone() return formatter(obj, format, locale=locale, **extra) def format_number(number): """Return the given number formatted for the locale in request :param number: the number to format :return: the formatted number :rtype: unicode """ locale = get_locale() return numbers.format_number(number, locale=locale) def format_decimal(number, format=None): """Return the given decimal number formatted for the locale in request :param number: the number to format :param format: the format to use :return: the formatted number :rtype: unicode """ locale = get_locale() return numbers.format_decimal(number, format=format, locale=locale) def format_currency(number, currency, format=None): """Return the given number formatted for the locale in request :param number: the number to format :param currency: the currency code :param format: the format to use :return: the formatted number :rtype: unicode """ locale = get_locale() return numbers.format_currency( number, currency, format=format, locale=locale ) def format_percent(number, format=None): """Return formatted percent value for the locale in request :param number: the number to format :param format: the format to use :return: the formatted percent number :rtype: unicode """ locale = get_locale() return numbers.format_percent(number, format=format, locale=locale) def format_scientific(number, format=None): """Return value formatted in scientific notation for the locale in request :param number: the number to format :param format: the format to use :return: the formatted percent number :rtype: unicode """ locale = get_locale() return numbers.format_scientific(number, format=format, locale=locale) class Domain(object): """Localization domain. By default will use look for tranlations in Flask application directory and "messages" domain - all message catalogs should be called ``messages.mo``. """ def __init__(self, dirname=None, domain='messages'): self.dirname = dirname self.domain = domain self.cache = dict() def as_default(self): """Set this domain as default for the current request""" ctx = _request_ctx_stack.top if ctx is None: raise RuntimeError("No request context") ctx.babel_domain = self def get_translations_cache(self, ctx): """Returns dictionary-like object for translation caching""" return self.cache def get_translations_path(self, ctx): """Returns translations directory path. Override if you want to implement custom behavior. """ return self.dirname or os.path.join(ctx.app.root_path, 'translations') def get_translations(self): """Returns the correct gettext translations that should be used for this request. This will never fail and return a dummy translation object if used outside of the request or if a translation cannot be found. """ ctx = _request_ctx_stack.top if ctx is None: return NullTranslations() locale = get_locale() cache = self.get_translations_cache(ctx) translations = cache.get(str(locale)) if translations is None: dirname = self.get_translations_path(ctx) translations = support.Translations.load(dirname, locale, domain=self.domain) cache[str(locale)] = translations return translations def gettext(self, string, **variables): """Translates a string with the current locale and passes in the given keyword arguments as mapping to a string formatting string. :: gettext(u'Hello World!') gettext(u'Hello %(name)s!', name='World') """ t = self.get_translations() return t.ugettext(string) % variables def ngettext(self, singular, plural, num, **variables): """Translates a string with the current locale and passes in the given keyword arguments as mapping to a string formatting string. The `num` parameter is used to dispatch between singular and various plural forms of the message. It is available in the format string as ``%(num)d`` or ``%(num)s``. The source language should be English or a similar language which only has one plural form. :: ngettext(u'%(num)d Apple', u'%(num)d Apples', num=len(apples)) """ variables.setdefault('num', num) t = self.get_translations() return t.ungettext(singular, plural, num) % variables def pgettext(self, context, string, **variables): """Like :func:`gettext` but with a context. .. versionadded:: 0.7 """ t = self.get_translations() return t.upgettext(context, string) % variables def npgettext(self, context, singular, plural, num, **variables): """Like :func:`ngettext` but with a context. .. versionadded:: 0.7 """ variables.setdefault('num', num) t = self.get_translations() return t.unpgettext(context, singular, plural, num) % variables def lazy_gettext(self, string, **variables): """Like :func:`gettext` but the string returned is lazy which means it will be translated when it is used as an actual string. Example:: hello = lazy_gettext(u'Hello World') @app.route('/') def index(): return unicode(hello) """ from speaklater import make_lazy_string return make_lazy_string(self.gettext, string, **variables) def lazy_pgettext(self, context, string, **variables): """Like :func:`pgettext` but the string returned is lazy which means it will be translated when it is used as an actual string. .. versionadded:: 0.7 """ from speaklater import make_lazy_string return make_lazy_string(self.pgettext, context, string, **variables) # This is the domain that will be used if there is no request context (and thus no app) # or if the app isn't initialized for babel. Note that if there is no request context, # then the standard Domain will use NullTranslations domain = Domain() def get_domain(): """Return the correct translation domain that is used for this request. This will return the default domain (e.g. "messages" in <approot>/translations") if none is set for this request. """ ctx = _request_ctx_stack.top if ctx is None: return domain try: return ctx.babel_domain except AttributeError: pass babel = ctx.app.extensions.get('babel') if babel is not None: d = babel._default_domain else: d = domain ctx.babel_domain = d return d # Create shortcuts for the default Flask domain def gettext(*args, **kwargs): return get_domain().gettext(*args, **kwargs) _ = gettext def ngettext(*args, **kwargs): return get_domain().ngettext(*args, **kwargs) def pgettext(*args, **kwargs): return get_domain().pgettext(*args, **kwargs) def npgettext(*args, **kwargs): return get_domain().npgettext(*args, **kwargs) def lazy_gettext(*args, **kwargs): return get_domain().lazy_gettext(*args, **kwargs) def lazy_pgettext(*args, **kwargs): return get_domain().lazy_pgettext(*args, **kwargs)
<?php Class Contact_model extends MY_Model { var $table = 'contact'; function get_list_contact() { $query = $this->db->get($this->table); if ($query->result()) { return $query->result(); } else { return FALSE; } } }
var _; //globals /* This section uses a functional extension known as Underscore.js - http://documentcloud.github.com/underscore/ "Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux." */ describe("About Higher Order Functions", function () { it("should use filter to return array items that meet a criteria", function () { var numbers = [1,2,3]; var odd = _(numbers).filter(function (x) { return x % 2 !== 0 }); expect(odd).toEqual([1,3]); expect(odd.length).toBe(2); expect(numbers.length).toBe(3); }); it("should use 'map' to transform each element", function () { var numbers = [1, 2, 3]; var numbersPlus1 = _(numbers).map(function(x) { return x + 1 }); expect(numbersPlus1).toEqual([2,3,4]); expect(numbers).toEqual([1,2,3]); }); it("should use 'reduce' to update the same result on each iteration", function () { var numbers = [1, 2, 3]; var reduction = _(numbers).reduce( function(memo, x) { //note: memo is the result from last call, and x is the current number return memo + x; }, /* initial */ 0 ); expect(reduction).toBe(6); expect(numbers).toEqual([1,2,3]); }); it("should use 'forEach' for simple iteration", function () { var numbers = [1,2,3]; var msg = ""; var isEven = function (item) { msg += (item % 2) === 0; }; _(numbers).forEach(isEven); expect(msg).toEqual('falsetruefalse'); expect(numbers).toEqual([1,2,3]); }); it("should use 'all' to test whether all items pass condition", function () { var onlyEven = [2,4,6]; var mixedBag = [2,4,5,6]; var isEven = function(x) { return x % 2 === 0 }; expect(_(onlyEven).all(isEven)).toBe(true); expect(_(mixedBag).all(isEven)).toBe(false); }); it("should use 'any' to test if any items passes condition" , function () { var onlyEven = [2,4,6]; var mixedBag = [2,4,5,6]; var isEven = function(x) { return x % 2 === 0 }; expect(_(onlyEven).any(isEven)).toBe(true); expect(_(mixedBag).any(isEven)).toBe(true); }); it("should use range to generate an array", function() { expect(_.range(3)).toEqual([0, 1, 2]); expect(_.range(1, 4)).toEqual([1, 2, 3]); expect(_.range(0, -4, -1)).toEqual([0, -1, -2, -3]); }); it("should use flatten to make nested arrays easy to work with", function() { expect(_([ [1, 2], [3, 4] ]).flatten()).toEqual([1,2,3,4]); }); it("should use chain() ... .value() to use multiple higher order functions", function() { var result = _([ [0, 1], 2 ]).chain() .flatten() .map(function(x) { return x+1 } ) .reduce(function (sum, x) { return sum + x }) .value(); expect(result).toEqual(6); }); });
<?php $error_id = uniqid('error', true); ?> <!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="robots" content="noindex"> <title><?= esc($title) ?></title> <style type="text/css"> <?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?> </style> <script type="text/javascript"> <?= file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.js') ?> </script> </head> <body onload="init()"> <!-- Header --> <div class="header"> <div class="container"> <h1><?= esc($title), esc($exception->getCode() ? ' #' . $exception->getCode() : '') ?></h1> <p> <?= nl2br(esc($exception->getMessage())) ?> <a href="https://www.duckduckgo.com/?q=<?= urlencode($title . ' ' . preg_replace('#\'.*\'|".*"#Us', '', $exception->getMessage())) ?>" rel="noreferrer" target="_blank">search &rarr;</a> </p> </div> </div> <!-- Source --> <div class="container"> <p><b><?= esc(static::cleanPath($file, $line)) ?></b> at line <b><?= esc($line) ?></b></p> <?php if (is_file($file)) : ?> <div class="source"> <?= static::highlightFile($file, $line, 15); ?> </div> <?php endif; ?> </div> <div class="container"> <ul class="tabs" id="tabs"> <li><a href="#backtrace">Backtrace</a></li> <li><a href="#server">Server</a></li> <li><a href="#request">Request</a></li> <li><a href="#response">Response</a></li> <li><a href="#files">Files</a></li> <li><a href="#memory">Memory</a></li> </ul> <div class="tab-content"> <!-- Backtrace --> <div class="content" id="backtrace"> <ol class="trace"> <?php foreach ($trace as $index => $row) : ?> <li> <p> <!-- Trace info --> <?php if (isset($row['file']) && is_file($row['file'])) :?> <?php if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once'], true)) { echo esc($row['function'] . ' ' . static::cleanPath($row['file'])); } else { echo esc(static::cleanPath($row['file']) . ' : ' . $row['line']); } ?> <?php else : ?> {PHP internal code} <?php endif; ?> <!-- Class/Method --> <?php if (isset($row['class'])) : ?> &nbsp;&nbsp;&mdash;&nbsp;&nbsp;<?= esc($row['class'] . $row['type'] . $row['function']) ?> <?php if (! empty($row['args'])) : ?> <?php $args_id = $error_id . 'args' . $index ?> ( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> ) <div class="args" id="<?= esc($args_id, 'attr') ?>"> <table cellspacing="0"> <?php $params = null; // Reflection by name is not available for closure function if (substr($row['function'], -1) !== '}') { $mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']); $params = $mirror->getParameters(); } foreach ($row['args'] as $key => $value) : ?> <tr> <td><code><?= esc(isset($params[$key]) ? '$' . $params[$key]->name : "#{$key}") ?></code></td> <td><pre><?= esc(print_r($value, true)) ?></pre></td> </tr> <?php endforeach ?> </table> </div> <?php else : ?> () <?php endif; ?> <?php endif; ?> <?php if (! isset($row['class']) && isset($row['function'])) : ?> &nbsp;&nbsp;&mdash;&nbsp;&nbsp; <?= esc($row['function']) ?>() <?php endif; ?> </p> <!-- Source? --> <?php if (isset($row['file']) && is_file($row['file']) && isset($row['class'])) : ?> <div class="source"> <?= static::highlightFile($row['file'], $row['line']) ?> </div> <?php endif; ?> </li> <?php endforeach; ?> </ol> </div> <!-- Server --> <div class="content" id="server"> <?php foreach (['_SERVER', '_SESSION'] as $var) : ?> <?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) { continue; } ?> <h3>$<?= esc($var) ?></h3> <table> <thead> <tr> <th>Key</th> <th>Value</th> </tr> </thead> <tbody> <?php foreach ($GLOBALS[$var] as $key => $value) : ?> <tr> <td><?= esc($key) ?></td> <td> <?php if (is_string($value)) : ?> <?= esc($value) ?> <?php else: ?> <pre><?= esc(print_r($value, true)) ?></pre> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endforeach ?> <!-- Constants --> <?php $constants = get_defined_constants(true); ?> <?php if (! empty($constants['user'])) : ?> <h3>Constants</h3> <table> <thead> <tr> <th>Key</th> <th>Value</th> </tr> </thead> <tbody> <?php foreach ($constants['user'] as $key => $value) : ?> <tr> <td><?= esc($key) ?></td> <td> <?php if (is_string($value)) : ?> <?= esc($value) ?> <?php else: ?> <pre><?= esc(print_r($value, true)) ?></pre> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> </div> <!-- Request --> <div class="content" id="request"> <?php $request = \Config\Services::request(); ?> <table> <tbody> <tr> <td style="width: 10em">Path</td> <td><?= esc($request->uri) ?></td> </tr> <tr> <td>HTTP Method</td> <td><?= esc($request->getMethod(true)) ?></td> </tr> <tr> <td>IP Address</td> <td><?= esc($request->getIPAddress()) ?></td> </tr> <tr> <td style="width: 10em">Is AJAX Request?</td> <td><?= $request->isAJAX() ? 'yes' : 'no' ?></td> </tr> <tr> <td>Is CLI Request?</td> <td><?= $request->isCLI() ? 'yes' : 'no' ?></td> </tr> <tr> <td>Is Secure Request?</td> <td><?= $request->isSecure() ? 'yes' : 'no' ?></td> </tr> <tr> <td>User Agent</td> <td><?= esc($request->getUserAgent()->getAgentString()) ?></td> </tr> </tbody> </table> <?php $empty = true; ?> <?php foreach (['_GET', '_POST', '_COOKIE'] as $var) : ?> <?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) { continue; } ?> <?php $empty = false; ?> <h3>$<?= esc($var) ?></h3> <table style="width: 100%"> <thead> <tr> <th>Key</th> <th>Value</th> </tr> </thead> <tbody> <?php foreach ($GLOBALS[$var] as $key => $value) : ?> <tr> <td><?= esc($key) ?></td> <td> <?php if (is_string($value)) : ?> <?= esc($value) ?> <?php else: ?> <pre><?= esc(print_r($value, true)) ?></pre> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endforeach ?> <?php if ($empty) : ?> <div class="alert"> No $_GET, $_POST, or $_COOKIE Information to show. </div> <?php endif; ?> <?php $headers = $request->getHeaders(); ?> <?php if (! empty($headers)) : ?> <h3>Headers</h3> <table> <thead> <tr> <th>Header</th> <th>Value</th> </tr> </thead> <tbody> <?php foreach ($headers as $value) : ?> <?php if (empty($value)) { continue; } if (! is_array($value)) { $value = [$value]; } ?> <?php foreach ($value as $h) : ?> <tr> <td><?= esc($h->getName(), 'html') ?></td> <td><?= esc($h->getValueLine(), 'html') ?></td> </tr> <?php endforeach; ?> <?php endforeach; ?> </tbody> </table> <?php endif; ?> </div> <!-- Response --> <?php $response = \Config\Services::response(); $response->setStatusCode(http_response_code()); ?> <div class="content" id="response"> <table> <tr> <td style="width: 15em">Response Status</td> <td><?= esc($response->getStatusCode() . ' - ' . $response->getReason()) ?></td> </tr> </table> <?php $headers = $response->getHeaders(); ?> <?php if (! empty($headers)) : ?> <?php natsort($headers) ?> <h3>Headers</h3> <table> <thead> <tr> <th>Header</th> <th>Value</th> </tr> </thead> <tbody> <?php foreach ($headers as $name => $value) : ?> <tr> <td><?= esc($name, 'html') ?></td> <td><?= esc($response->getHeaderLine($name), 'html') ?></td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> </div> <!-- Files --> <div class="content" id="files"> <?php $files = get_included_files(); ?> <ol> <?php foreach ($files as $file) :?> <li><?= esc(static::cleanPath($file)) ?></li> <?php endforeach ?> </ol> </div> <!-- Memory --> <div class="content" id="memory"> <table> <tbody> <tr> <td>Memory Usage</td> <td><?= esc(static::describeMemory(memory_get_usage(true))) ?></td> </tr> <tr> <td style="width: 12em">Peak Memory Usage:</td> <td><?= esc(static::describeMemory(memory_get_peak_usage(true))) ?></td> </tr> <tr> <td>Memory Limit:</td> <td><?= esc(ini_get('memory_limit')) ?></td> </tr> </tbody> </table> </div> </div> <!-- /tab-content --> </div> <!-- /container --> <div class="footer"> <div class="container"> <p> Displayed at <?= esc(date('H:i:sa')) ?> &mdash; PHP: <?= esc(PHP_VERSION) ?> &mdash; CodeIgniter: <?= esc(\CodeIgniter\CodeIgniter::CI_VERSION) ?> </p> </div> </div> </body> </html>
try: from tornado.websocket import WebSocketHandler import tornado.ioloop tornadoAvailable = True except ImportError: class WebSocketHandler(object): pass tornadoAvailable = False from json import loads as fromJS, dumps as toJS from threading import Thread from Log import console import Settings from utils import * PORT = Settings.PORT + 1 handlers = [] channels = {} class WebSocket: @staticmethod def available(): return tornadoAvailable @staticmethod def start(): if WebSocket.available(): WSThread().start() @staticmethod def broadcast(data): for handler in handlers: handler.write_message(toJS(data)) @staticmethod def sendChannel(channel, data): if not 'channel' in data: data['channel'] = channel for handler in channels.get(channel, []): handler.write_message(toJS(data)) class WSThread(Thread): def __init__(self): Thread.__init__(self) self.name = 'websocket' self.daemon = True def run(self): app = tornado.web.Application([('/', WSHandler)]) app.listen(PORT, '0.0.0.0') tornado.ioloop.IOLoop.instance().start() class WSHandler(WebSocketHandler): def __init__(self, *args, **kw): super(WSHandler, self).__init__(*args, **kw) self.channels = set() def check_origin(self, origin): return True def open(self): handlers.append(self) console('websocket', "Opened") def on_message(self, message): console('websocket', "Message received: %s" % message) try: data = fromJS(message) except: return if 'subscribe' in data and isinstance(data['subscribe'], list): addChannels = (set(data['subscribe']) - self.channels) self.channels |= addChannels for channel in addChannels: if channel not in channels: channels[channel] = set() channels[channel].add(self) if 'unsubscribe' in data and isinstance(data['unsubscribe'], list): rmChannels = (self.channels & set(data['unsubscribe'])) self.channels -= rmChannels for channel in rmChannels: channels[channel].remove(self) if len(channels[channel]) == 0: del channels[channel] def on_close(self): for channel in self.channels: channels[channel].remove(self) if len(channels[channel]) == 0: del channels[channel] handlers.remove(self) console('websocket', "Closed") verbs = { 'status': "Status set", 'name': "Renamed", 'goal': "Goal set", 'assigned': "Reassigned", 'hours': "Hours updated", } from Event import EventHandler, addEventHandler class ShareTaskChanges(EventHandler): def newTask(self, handler, task): WebSocket.sendChannel("backlog#%d" % task.sprint.id, {'type': 'new'}); #TODO def taskUpdate(self, handler, task, field, value): if field == 'assigned': # Convert set of Users to list of usernames value = [user.username for user in value] elif field == 'goal': # Convert Goal to goal ID value = value.id if value else 0 description = ("%s by %s" % (verbs[field], task.creator)) if field in verbs else None WebSocket.sendChannel("backlog#%d" % task.sprint.id, {'type': 'update', 'id': task.id, 'revision': task.revision, 'field': field, 'value': value, 'description': description, 'creator': task.creator.username}) addEventHandler(ShareTaskChanges())
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("WcfLib.TestConsole")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WcfLib.TestConsole")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("5bcc7ea7-ed58-4e5a-87a2-d09123b1c4e1")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
<?php namespace Illuminate\Database\Query; use Closure; use BadMethodCallException; use Illuminate\Support\Arr; use Illuminate\Support\Str; use InvalidArgumentException; use Illuminate\Pagination\Paginator; use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\ConnectionInterface; use Illuminate\Database\Query\Grammars\Grammar; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Database\Query\Processors\Processor; class Builder { use Macroable { __call as macroCall; } /** * The database connection instance. * * @var \Illuminate\Database\Connection */ protected $connection; /** * The database query grammar instance. * * @var \Illuminate\Database\Query\Grammars\Grammar */ protected $grammar; /** * The database query post processor instance. * * @var \Illuminate\Database\Query\Processors\Processor */ protected $processor; /** * The current query value bindings. * * @var array */ protected $bindings = [ 'select' => [], 'join' => [], 'where' => [], 'having' => [], 'order' => [], 'union' => [], ]; /** * An aggregate function and column to be run. * * @var array */ public $aggregate; /** * The columns that should be returned. * * @var array */ public $columns; /** * Indicates if the query returns distinct results. * * @var bool */ public $distinct = false; /** * The table which the query is targeting. * * @var string */ public $from; /** * The table joins for the query. * * @var array */ public $joins; /** * The where constraints for the query. * * @var array */ public $wheres; /** * The groupings for the query. * * @var array */ public $groups; /** * The having constraints for the query. * * @var array */ public $havings; /** * The orderings for the query. * * @var array */ public $orders; /** * The maximum number of records to return. * * @var int */ public $limit; /** * The number of records to skip. * * @var int */ public $offset; /** * The query union statements. * * @var array */ public $unions; /** * The maximum number of union records to return. * * @var int */ public $unionLimit; /** * The number of union records to skip. * * @var int */ public $unionOffset; /** * The orderings for the union query. * * @var array */ public $unionOrders; /** * Indicates whether row locking is being used. * * @var string|bool */ public $lock; /** * The field backups currently in use. * * @var array */ protected $backups = []; /** * The binding backups currently in use. * * @var array */ protected $bindingBackups = []; /** * All of the available clause operators. * * @var array */ protected $operators = [ '=', '<', '>', '<=', '>=', '<>', '!=', 'like', 'like binary', 'not like', 'between', 'ilike', '&', '|', '^', '<<', '>>', 'rlike', 'regexp', 'not regexp', '~', '~*', '!~', '!~*', 'similar to', 'not similar to', ]; /** * Whether use write pdo for select. * * @var bool */ protected $useWritePdo = false; /** * Create a new query builder instance. * * @param \Illuminate\Database\ConnectionInterface $connection * @param \Illuminate\Database\Query\Grammars\Grammar $grammar * @param \Illuminate\Database\Query\Processors\Processor $processor * @return void */ public function __construct(ConnectionInterface $connection, Grammar $grammar, Processor $processor) { $this->grammar = $grammar; $this->processor = $processor; $this->connection = $connection; } /** * Set the columns to be selected. * * @param array|mixed $columns * @return $this */ public function select($columns = ['*']) { $this->columns = is_array($columns) ? $columns : func_get_args(); return $this; } /** * Add a new "raw" select expression to the query. * * @param string $expression * @param array $bindings * @return \Illuminate\Database\Query\Builder|static */ public function selectRaw($expression, array $bindings = []) { $this->addSelect(new Expression($expression)); if ($bindings) { $this->addBinding($bindings, 'select'); } return $this; } /** * Add a subselect expression to the query. * * @param \Closure|\Illuminate\Database\Query\Builder|string $query * @param string $as * @return \Illuminate\Database\Query\Builder|static */ public function selectSub($query, $as) { if ($query instanceof Closure) { $callback = $query; $callback($query = $this->newQuery()); } if ($query instanceof self) { $bindings = $query->getBindings(); $query = $query->toSql(); } elseif (is_string($query)) { $bindings = []; } else { throw new InvalidArgumentException; } return $this->selectRaw('('.$query.') as '.$this->grammar->wrap($as), $bindings); } /** * Add a new select column to the query. * * @param array|mixed $column * @return $this */ public function addSelect($column) { $column = is_array($column) ? $column : func_get_args(); $this->columns = array_merge((array) $this->columns, $column); return $this; } /** * Force the query to only return distinct results. * * @return $this */ public function distinct() { $this->distinct = true; return $this; } /** * Set the table which the query is targeting. * * @param string $table * @return $this */ public function from($table) { $this->from = $table; return $this; } /** * Add a join clause to the query. * * @param string $table * @param string $one * @param string $operator * @param string $two * @param string $type * @param bool $where * @return $this */ public function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false) { // If the first "column" of the join is really a Closure instance the developer // is trying to build a join with a complex "on" clause containing more than // one condition, so we'll add the join and call a Closure with the query. if ($one instanceof Closure) { $join = new JoinClause($type, $table); call_user_func($one, $join); $this->joins[] = $join; $this->addBinding($join->bindings, 'join'); } // If the column is simply a string, we can assume the join simply has a basic // "on" clause with a single condition. So we will just build the join with // this simple join clauses attached to it. There is not a join callback. else { $join = new JoinClause($type, $table); $this->joins[] = $join->on( $one, $operator, $two, 'and', $where ); $this->addBinding($join->bindings, 'join'); } return $this; } /** * Add a "join where" clause to the query. * * @param string $table * @param string $one * @param string $operator * @param string $two * @param string $type * @return \Illuminate\Database\Query\Builder|static */ public function joinWhere($table, $one, $operator, $two, $type = 'inner') { return $this->join($table, $one, $operator, $two, $type, true); } /** * Add a left join to the query. * * @param string $table * @param string $first * @param string $operator * @param string $second * @return \Illuminate\Database\Query\Builder|static */ public function leftJoin($table, $first, $operator = null, $second = null) { return $this->join($table, $first, $operator, $second, 'left'); } /** * Add a "join where" clause to the query. * * @param string $table * @param string $one * @param string $operator * @param string $two * @return \Illuminate\Database\Query\Builder|static */ public function leftJoinWhere($table, $one, $operator, $two) { return $this->joinWhere($table, $one, $operator, $two, 'left'); } /** * Add a right join to the query. * * @param string $table * @param string $first * @param string $operator * @param string $second * @return \Illuminate\Database\Query\Builder|static */ public function rightJoin($table, $first, $operator = null, $second = null) { return $this->join($table, $first, $operator, $second, 'right'); } /** * Add a "right join where" clause to the query. * * @param string $table * @param string $one * @param string $operator * @param string $two * @return \Illuminate\Database\Query\Builder|static */ public function rightJoinWhere($table, $one, $operator, $two) { return $this->joinWhere($table, $one, $operator, $two, 'right'); } /** * Add a basic where clause to the query. * * @param string|array|\Closure $column * @param string $operator * @param mixed $value * @param string $boolean * @return $this * * @throws \InvalidArgumentException */ public function where($column, $operator = null, $value = null, $boolean = 'and') { // If the column is an array, we will assume it is an array of key-value pairs // and can add them each as a where clause. We will maintain the boolean we // received when the method was called and pass it into the nested where. if (is_array($column)) { return $this->whereNested(function ($query) use ($column) { foreach ($column as $key => $value) { $query->where($key, '=', $value); } }, $boolean); } // Here we will make some assumptions about the operator. If only 2 values are // passed to the method, we will assume that the operator is an equals sign // and keep going. Otherwise, we'll require the operator to be passed in. if (func_num_args() == 2) { list($value, $operator) = [$operator, '=']; } elseif ($this->invalidOperatorAndValue($operator, $value)) { throw new InvalidArgumentException('Illegal operator and value combination.'); } // If the columns is actually a Closure instance, we will assume the developer // wants to begin a nested where statement which is wrapped in parenthesis. // We'll add that Closure to the query then return back out immediately. if ($column instanceof Closure) { return $this->whereNested($column, $boolean); } // If the given operator is not found in the list of valid operators we will // assume that the developer is just short-cutting the '=' operators and // we will set the operators to '=' and set the values appropriately. if (! in_array(strtolower($operator), $this->operators, true)) { list($value, $operator) = [$operator, '=']; } // If the value is a Closure, it means the developer is performing an entire // sub-select within the query and we will need to compile the sub-select // within the where clause to get the appropriate query record results. if ($value instanceof Closure) { return $this->whereSub($column, $operator, $value, $boolean); } // If the value is "null", we will just assume the developer wants to add a // where null clause to the query. So, we will allow a short-cut here to // that method for convenience so the developer doesn't have to check. if (is_null($value)) { return $this->whereNull($column, $boolean, $operator != '='); } // Now that we are working with just a simple query we can put the elements // in our array and add the query binding to our array of bindings that // will be bound to each SQL statements when it is finally executed. $type = 'Basic'; $this->wheres[] = compact('type', 'column', 'operator', 'value', 'boolean'); if (! $value instanceof Expression) { $this->addBinding($value, 'where'); } return $this; } /** * Add an "or where" clause to the query. * * @param string $column * @param string $operator * @param mixed $value * @return \Illuminate\Database\Query\Builder|static */ public function orWhere($column, $operator = null, $value = null) { return $this->where($column, $operator, $value, 'or'); } /** * Determine if the given operator and value combination is legal. * * @param string $operator * @param mixed $value * @return bool */ protected function invalidOperatorAndValue($operator, $value) { $isOperator = in_array($operator, $this->operators); return $isOperator && $operator != '=' && is_null($value); } /** * Add a raw where clause to the query. * * @param string $sql * @param array $bindings * @param string $boolean * @return $this */ public function whereRaw($sql, array $bindings = [], $boolean = 'and') { $type = 'raw'; $this->wheres[] = compact('type', 'sql', 'boolean'); $this->addBinding($bindings, 'where'); return $this; } /** * Add a raw or where clause to the query. * * @param string $sql * @param array $bindings * @return \Illuminate\Database\Query\Builder|static */ public function orWhereRaw($sql, array $bindings = []) { return $this->whereRaw($sql, $bindings, 'or'); } /** * Add a where between statement to the query. * * @param string $column * @param array $values * @param string $boolean * @param bool $not * @return $this */ public function whereBetween($column, array $values, $boolean = 'and', $not = false) { $type = 'between'; $this->wheres[] = compact('column', 'type', 'boolean', 'not'); $this->addBinding($values, 'where'); return $this; } /** * Add an or where between statement to the query. * * @param string $column * @param array $values * @return \Illuminate\Database\Query\Builder|static */ public function orWhereBetween($column, array $values) { return $this->whereBetween($column, $values, 'or'); } /** * Add a where not between statement to the query. * * @param string $column * @param array $values * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereNotBetween($column, array $values, $boolean = 'and') { return $this->whereBetween($column, $values, $boolean, true); } /** * Add an or where not between statement to the query. * * @param string $column * @param array $values * @return \Illuminate\Database\Query\Builder|static */ public function orWhereNotBetween($column, array $values) { return $this->whereNotBetween($column, $values, 'or'); } /** * Add a nested where statement to the query. * * @param \Closure $callback * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereNested(Closure $callback, $boolean = 'and') { $query = $this->forNestedWhere(); call_user_func($callback, $query); return $this->addNestedWhereQuery($query, $boolean); } /** * Create a new query instance for nested where condition. * * @return \Illuminate\Database\Query\Builder */ public function forNestedWhere() { $query = $this->newQuery(); return $query->from($this->from); } /** * Add another query builder as a nested where to the query builder. * * @param \Illuminate\Database\Query\Builder|static $query * @param string $boolean * @return $this */ public function addNestedWhereQuery($query, $boolean = 'and') { if (count($query->wheres)) { $type = 'Nested'; $this->wheres[] = compact('type', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); } return $this; } /** * Add a full sub-select to the query. * * @param string $column * @param string $operator * @param \Closure $callback * @param string $boolean * @return $this */ protected function whereSub($column, $operator, Closure $callback, $boolean) { $type = 'Sub'; $query = $this->newQuery(); // Once we have the query instance we can simply execute it so it can add all // of the sub-select's conditions to itself, and then we can cache it off // in the array of where clauses for the "main" parent query instance. call_user_func($callback, $query); $this->wheres[] = compact('type', 'column', 'operator', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; } /** * Add an exists clause to the query. * * @param \Closure $callback * @param string $boolean * @param bool $not * @return $this */ public function whereExists(Closure $callback, $boolean = 'and', $not = false) { $type = $not ? 'NotExists' : 'Exists'; $query = $this->newQuery(); // Similar to the sub-select clause, we will create a new query instance so // the developer may cleanly specify the entire exists query and we will // compile the whole thing in the grammar and insert it into the SQL. call_user_func($callback, $query); $this->wheres[] = compact('type', 'operator', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; } /** * Add an or exists clause to the query. * * @param \Closure $callback * @param bool $not * @return \Illuminate\Database\Query\Builder|static */ public function orWhereExists(Closure $callback, $not = false) { return $this->whereExists($callback, 'or', $not); } /** * Add a where not exists clause to the query. * * @param \Closure $callback * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereNotExists(Closure $callback, $boolean = 'and') { return $this->whereExists($callback, $boolean, true); } /** * Add a where not exists clause to the query. * * @param \Closure $callback * @return \Illuminate\Database\Query\Builder|static */ public function orWhereNotExists(Closure $callback) { return $this->orWhereExists($callback, true); } /** * Add a "where in" clause to the query. * * @param string $column * @param mixed $values * @param string $boolean * @param bool $not * @return $this */ public function whereIn($column, $values, $boolean = 'and', $not = false) { $type = $not ? 'NotIn' : 'In'; // If the value of the where in clause is actually a Closure, we will assume that // the developer is using a full sub-select for this "in" statement, and will // execute those Closures, then we can re-construct the entire sub-selects. if ($values instanceof Closure) { return $this->whereInSub($column, $values, $boolean, $not); } if ($values instanceof Arrayable) { $values = $values->toArray(); } $this->wheres[] = compact('type', 'column', 'values', 'boolean'); $this->addBinding($values, 'where'); return $this; } /** * Add an "or where in" clause to the query. * * @param string $column * @param mixed $values * @return \Illuminate\Database\Query\Builder|static */ public function orWhereIn($column, $values) { return $this->whereIn($column, $values, 'or'); } /** * Add a "where not in" clause to the query. * * @param string $column * @param mixed $values * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereNotIn($column, $values, $boolean = 'and') { return $this->whereIn($column, $values, $boolean, true); } /** * Add an "or where not in" clause to the query. * * @param string $column * @param mixed $values * @return \Illuminate\Database\Query\Builder|static */ public function orWhereNotIn($column, $values) { return $this->whereNotIn($column, $values, 'or'); } /** * Add a where in with a sub-select to the query. * * @param string $column * @param \Closure $callback * @param string $boolean * @param bool $not * @return $this */ protected function whereInSub($column, Closure $callback, $boolean, $not) { $type = $not ? 'NotInSub' : 'InSub'; // To create the exists sub-select, we will actually create a query and call the // provided callback with the query so the developer may set any of the query // conditions they want for the in clause, then we'll put it in this array. call_user_func($callback, $query = $this->newQuery()); $this->wheres[] = compact('type', 'column', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; } /** * Add a "where null" clause to the query. * * @param string $column * @param string $boolean * @param bool $not * @return $this */ public function whereNull($column, $boolean = 'and', $not = false) { $type = $not ? 'NotNull' : 'Null'; $this->wheres[] = compact('type', 'column', 'boolean'); return $this; } /** * Add an "or where null" clause to the query. * * @param string $column * @return \Illuminate\Database\Query\Builder|static */ public function orWhereNull($column) { return $this->whereNull($column, 'or'); } /** * Add a "where not null" clause to the query. * * @param string $column * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereNotNull($column, $boolean = 'and') { return $this->whereNull($column, $boolean, true); } /** * Add an "or where not null" clause to the query. * * @param string $column * @return \Illuminate\Database\Query\Builder|static */ public function orWhereNotNull($column) { return $this->whereNotNull($column, 'or'); } /** * Add a "where date" statement to the query. * * @param string $column * @param string $operator * @param int $value * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereDate($column, $operator, $value, $boolean = 'and') { return $this->addDateBasedWhere('Date', $column, $operator, $value, $boolean); } /** * Add a "where day" statement to the query. * * @param string $column * @param string $operator * @param int $value * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereDay($column, $operator, $value, $boolean = 'and') { return $this->addDateBasedWhere('Day', $column, $operator, $value, $boolean); } /** * Add a "where month" statement to the query. * * @param string $column * @param string $operator * @param int $value * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereMonth($column, $operator, $value, $boolean = 'and') { return $this->addDateBasedWhere('Month', $column, $operator, $value, $boolean); } /** * Add a "where year" statement to the query. * * @param string $column * @param string $operator * @param int $value * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ public function whereYear($column, $operator, $value, $boolean = 'and') { return $this->addDateBasedWhere('Year', $column, $operator, $value, $boolean); } /** * Add a date based (year, month, day) statement to the query. * * @param string $type * @param string $column * @param string $operator * @param int $value * @param string $boolean * @return $this */ protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and') { $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); $this->addBinding($value, 'where'); return $this; } /** * Handles dynamic "where" clauses to the query. * * @param string $method * @param string $parameters * @return $this */ public function dynamicWhere($method, $parameters) { $finder = substr($method, 5); $segments = preg_split('/(And|Or)(?=[A-Z])/', $finder, -1, PREG_SPLIT_DELIM_CAPTURE); // The connector variable will determine which connector will be used for the // query condition. We will change it as we come across new boolean values // in the dynamic method strings, which could contain a number of these. $connector = 'and'; $index = 0; foreach ($segments as $segment) { // If the segment is not a boolean connector, we can assume it is a column's name // and we will add it to the query as a new constraint as a where clause, then // we can keep iterating through the dynamic method string's segments again. if ($segment != 'And' && $segment != 'Or') { $this->addDynamic($segment, $connector, $parameters, $index); $index++; } // Otherwise, we will store the connector so we know how the next where clause we // find in the query should be connected to the previous ones, meaning we will // have the proper boolean connector to connect the next where clause found. else { $connector = $segment; } } return $this; } /** * Add a single dynamic where clause statement to the query. * * @param string $segment * @param string $connector * @param array $parameters * @param int $index * @return void */ protected function addDynamic($segment, $connector, $parameters, $index) { // Once we have parsed out the columns and formatted the boolean operators we // are ready to add it to this query as a where clause just like any other // clause on the query. Then we'll increment the parameter index values. $bool = strtolower($connector); $this->where(Str::snake($segment), '=', $parameters[$index], $bool); } /** * Add a "group by" clause to the query. * * @param array|string $column,... * @return $this */ public function groupBy() { foreach (func_get_args() as $arg) { $this->groups = array_merge((array) $this->groups, is_array($arg) ? $arg : [$arg]); } return $this; } /** * Add a "having" clause to the query. * * @param string $column * @param string $operator * @param string $value * @param string $boolean * @return $this */ public function having($column, $operator = null, $value = null, $boolean = 'and') { $type = 'basic'; $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); if (! $value instanceof Expression) { $this->addBinding($value, 'having'); } return $this; } /** * Add a "or having" clause to the query. * * @param string $column * @param string $operator * @param string $value * @return \Illuminate\Database\Query\Builder|static */ public function orHaving($column, $operator = null, $value = null) { return $this->having($column, $operator, $value, 'or'); } /** * Add a raw having clause to the query. * * @param string $sql * @param array $bindings * @param string $boolean * @return $this */ public function havingRaw($sql, array $bindings = [], $boolean = 'and') { $type = 'raw'; $this->havings[] = compact('type', 'sql', 'boolean'); $this->addBinding($bindings, 'having'); return $this; } /** * Add a raw or having clause to the query. * * @param string $sql * @param array $bindings * @return \Illuminate\Database\Query\Builder|static */ public function orHavingRaw($sql, array $bindings = []) { return $this->havingRaw($sql, $bindings, 'or'); } /** * Add an "order by" clause to the query. * * @param string $column * @param string $direction * @return $this */ public function orderBy($column, $direction = 'asc') { $property = $this->unions ? 'unionOrders' : 'orders'; $direction = strtolower($direction) == 'asc' ? 'asc' : 'desc'; $this->{$property}[] = compact('column', 'direction'); return $this; } /** * Add an "order by" clause for a timestamp to the query. * * @param string $column * @return \Illuminate\Database\Query\Builder|static */ public function latest($column = 'created_at') { return $this->orderBy($column, 'desc'); } /** * Add an "order by" clause for a timestamp to the query. * * @param string $column * @return \Illuminate\Database\Query\Builder|static */ public function oldest($column = 'created_at') { return $this->orderBy($column, 'asc'); } /** * Add a raw "order by" clause to the query. * * @param string $sql * @param array $bindings * @return $this */ public function orderByRaw($sql, $bindings = []) { $property = $this->unions ? 'unionOrders' : 'orders'; $type = 'raw'; $this->{$property}[] = compact('type', 'sql'); $this->addBinding($bindings, 'order'); return $this; } /** * Set the "offset" value of the query. * * @param int $value * @return $this */ public function offset($value) { $property = $this->unions ? 'unionOffset' : 'offset'; $this->$property = max(0, $value); return $this; } /** * Alias to set the "offset" value of the query. * * @param int $value * @return \Illuminate\Database\Query\Builder|static */ public function skip($value) { return $this->offset($value); } /** * Set the "limit" value of the query. * * @param int $value * @return $this */ public function limit($value) { $property = $this->unions ? 'unionLimit' : 'limit'; if ($value >= 0) { $this->$property = $value; } return $this; } /** * Alias to set the "limit" value of the query. * * @param int $value * @return \Illuminate\Database\Query\Builder|static */ public function take($value) { return $this->limit($value); } /** * Set the limit and offset for a given page. * * @param int $page * @param int $perPage * @return \Illuminate\Database\Query\Builder|static */ public function forPage($page, $perPage = 15) { return $this->skip(($page - 1) * $perPage)->take($perPage); } /** * Add a union statement to the query. * * @param \Illuminate\Database\Query\Builder|\Closure $query * @param bool $all * @return \Illuminate\Database\Query\Builder|static */ public function union($query, $all = false) { if ($query instanceof Closure) { call_user_func($query, $query = $this->newQuery()); } $this->unions[] = compact('query', 'all'); $this->addBinding($query->getBindings(), 'union'); return $this; } /** * Add a union all statement to the query. * * @param \Illuminate\Database\Query\Builder|\Closure $query * @return \Illuminate\Database\Query\Builder|static */ public function unionAll($query) { return $this->union($query, true); } /** * Lock the selected rows in the table. * * @param bool $value * @return $this */ public function lock($value = true) { $this->lock = $value; if ($this->lock) { $this->useWritePdo(); } return $this; } /** * Lock the selected rows in the table for updating. * * @return \Illuminate\Database\Query\Builder */ public function lockForUpdate() { return $this->lock(true); } /** * Share lock the selected rows in the table. * * @return \Illuminate\Database\Query\Builder */ public function sharedLock() { return $this->lock(false); } /** * Get the SQL representation of the query. * * @return string */ public function toSql() { return $this->grammar->compileSelect($this); } /** * Execute a query for a single record by ID. * * @param int $id * @param array $columns * @return mixed|static */ public function find($id, $columns = ['*']) { return $this->where('id', '=', $id)->first($columns); } /** * Get a single column's value from the first result of a query. * * @param string $column * @return mixed */ public function value($column) { $result = (array) $this->first([$column]); return count($result) > 0 ? reset($result) : null; } /** * Execute the query and get the first result. * * @param array $columns * @return mixed|static */ public function first($columns = ['*']) { $results = $this->take(1)->get($columns); return count($results) > 0 ? reset($results) : null; } /** * Execute the query as a "select" statement. * * @param array $columns * @return array|static[] */ public function get($columns = ['*']) { $original = $this->columns; if (is_null($original)) { $this->columns = $columns; } $results = $this->processor->processSelect($this, $this->runSelect()); $this->columns = $original; return $results; } /** * Run the query as a "select" statement against the connection. * * @return array */ protected function runSelect() { return $this->connection->select($this->toSql(), $this->getBindings(), ! $this->useWritePdo); } /** * Paginate the given query into a simple paginator. * * @param int $perPage * @param array $columns * @param string $pageName * @param int|null $page * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator */ public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null) { $page = $page ?: Paginator::resolveCurrentPage($pageName); $total = $this->getCountForPagination($columns); $results = $this->forPage($page, $perPage)->get($columns); return new LengthAwarePaginator($results, $total, $perPage, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, ]); } /** * Get a paginator only supporting simple next and previous links. * * This is more efficient on larger data-sets, etc. * * @param int $perPage * @param array $columns * @param string $pageName * @return \Illuminate\Contracts\Pagination\Paginator */ public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'page') { $page = Paginator::resolveCurrentPage($pageName); $this->skip(($page - 1) * $perPage)->take($perPage + 1); return new Paginator($this->get($columns), $perPage, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, ]); } /** * Get the count of the total records for the paginator. * * @param array $columns * @return int */ public function getCountForPagination($columns = ['*']) { $this->backupFieldsForCount(); $this->aggregate = ['function' => 'count', 'columns' => $this->clearSelectAliases($columns)]; $results = $this->get(); $this->aggregate = null; $this->restoreFieldsForCount(); if (isset($this->groups)) { return count($results); } return isset($results[0]) ? (int) array_change_key_case((array) $results[0])['aggregate'] : 0; } /** * Backup some fields for the pagination count. * * @return void */ protected function backupFieldsForCount() { foreach (['orders', 'limit', 'offset', 'columns'] as $field) { $this->backups[$field] = $this->{$field}; $this->{$field} = null; } foreach (['order', 'select'] as $key) { $this->bindingBackups[$key] = $this->bindings[$key]; $this->bindings[$key] = []; } } /** * Remove the column aliases since they will break count queries. * * @param array $columns * @return array */ protected function clearSelectAliases(array $columns) { return array_map(function ($column) { return is_string($column) && ($aliasPosition = strpos(strtolower($column), ' as ')) !== false ? substr($column, 0, $aliasPosition) : $column; }, $columns); } /** * Restore some fields after the pagination count. * * @return void */ protected function restoreFieldsForCount() { foreach (['orders', 'limit', 'offset', 'columns'] as $field) { $this->{$field} = $this->backups[$field]; } foreach (['order', 'select'] as $key) { $this->bindings[$key] = $this->bindingBackups[$key]; } $this->backups = []; $this->bindingBackups = []; } /** * Chunk the results of the query. * * @param int $count * @param callable $callback * @return bool */ public function chunk($count, callable $callback) { $results = $this->forPage($page = 1, $count)->get(); while (count($results) > 0) { // On each chunk result set, we will pass them to the callback and then let the // developer take care of everything within the callback, which allows us to // keep the memory low for spinning through large result sets for working. if (call_user_func($callback, $results) === false) { return false; } $page++; $results = $this->forPage($page, $count)->get(); } return true; } /** * Get an array with the values of a given column. * * @param string $column * @param string|null $key * @return array */ public function pluck($column, $key = null) { $results = $this->get(is_null($key) ? [$column] : [$column, $key]); // If the columns are qualified with a table or have an alias, we cannot use // those directly in the "pluck" operations since the results from the DB // are only keyed by the column itself. We'll strip the table out here. return Arr::pluck( $results, $this->stripeTableForPluck($column), $this->stripeTableForPluck($key) ); } /** * Strip off the table name or alias from a column identifier. * * @param string $column * @return string|null */ protected function stripeTableForPluck($column) { return is_null($column) ? $column : last(preg_split('~\.| ~', $column)); } /** * Concatenate values of a given column as a string. * * @param string $column * @param string $glue * @return string */ public function implode($column, $glue = '') { return implode($glue, $this->pluck($column)); } /** * Determine if any rows exist for the current query. * * @return bool */ public function exists() { $sql = $this->grammar->compileExists($this); $results = $this->connection->select($sql, $this->getBindings(), ! $this->useWritePdo); if (isset($results[0])) { $results = (array) $results[0]; return (bool) $results['exists']; } return false; } /** * Retrieve the "count" result of the query. * * @param string $columns * @return int */ public function count($columns = '*') { if (! is_array($columns)) { $columns = [$columns]; } return (int) $this->aggregate(__FUNCTION__, $columns); } /** * Retrieve the minimum value of a given column. * * @param string $column * @return float|int */ public function min($column) { return $this->aggregate(__FUNCTION__, [$column]); } /** * Retrieve the maximum value of a given column. * * @param string $column * @return float|int */ public function max($column) { return $this->aggregate(__FUNCTION__, [$column]); } /** * Retrieve the sum of the values of a given column. * * @param string $column * @return float|int */ public function sum($column) { $result = $this->aggregate(__FUNCTION__, [$column]); return $result ?: 0; } /** * Retrieve the average of the values of a given column. * * @param string $column * @return float|int */ public function avg($column) { return $this->aggregate(__FUNCTION__, [$column]); } /** * Alias for the "avg" method. * * @param string $column * @return float|int */ public function average($column) { return $this->avg($column); } /** * Execute an aggregate function on the database. * * @param string $function * @param array $columns * @return float|int */ public function aggregate($function, $columns = ['*']) { $this->aggregate = compact('function', 'columns'); $previousColumns = $this->columns; // We will also back up the select bindings since the select clause will be // removed when performing the aggregate function. Once the query is run // we will add the bindings back onto this query so they can get used. $previousSelectBindings = $this->bindings['select']; $this->bindings['select'] = []; $results = $this->get($columns); // Once we have executed the query, we will reset the aggregate property so // that more select queries can be executed against the database without // the aggregate value getting in the way when the grammar builds it. $this->aggregate = null; $this->columns = $previousColumns; $this->bindings['select'] = $previousSelectBindings; if (isset($results[0])) { $result = array_change_key_case((array) $results[0]); return $result['aggregate']; } } /** * Insert a new record into the database. * * @param array $values * @return bool */ public function insert(array $values) { if (empty($values)) { return true; } // Since every insert gets treated like a batch insert, we will make sure the // bindings are structured in a way that is convenient for building these // inserts statements by verifying the elements are actually an array. if (! is_array(reset($values))) { $values = [$values]; } // Since every insert gets treated like a batch insert, we will make sure the // bindings are structured in a way that is convenient for building these // inserts statements by verifying the elements are actually an array. else { foreach ($values as $key => $value) { ksort($value); $values[$key] = $value; } } // We'll treat every insert like a batch insert so we can easily insert each // of the records into the database consistently. This will make it much // easier on the grammars to just handle one type of record insertion. $bindings = []; foreach ($values as $record) { foreach ($record as $value) { $bindings[] = $value; } } $sql = $this->grammar->compileInsert($this, $values); // Once we have compiled the insert statement's SQL we can execute it on the // connection and return a result as a boolean success indicator as that // is the same type of result returned by the raw connection instance. $bindings = $this->cleanBindings($bindings); return $this->connection->insert($sql, $bindings); } /** * Insert a new record and get the value of the primary key. * * @param array $values * @param string $sequence * @return int */ public function insertGetId(array $values, $sequence = null) { $sql = $this->grammar->compileInsertGetId($this, $values, $sequence); $values = $this->cleanBindings($values); return $this->processor->processInsertGetId($this, $sql, $values, $sequence); } /** * Update a record in the database. * * @param array $values * @return int */ public function update(array $values) { $bindings = array_values(array_merge($values, $this->getBindings())); $sql = $this->grammar->compileUpdate($this, $values); return $this->connection->update($sql, $this->cleanBindings($bindings)); } /** * Increment a column's value by a given amount. * * @param string $column * @param int $amount * @param array $extra * @return int */ public function increment($column, $amount = 1, array $extra = []) { $wrapped = $this->grammar->wrap($column); $columns = array_merge([$column => $this->raw("$wrapped + $amount")], $extra); return $this->update($columns); } /** * Decrement a column's value by a given amount. * * @param string $column * @param int $amount * @param array $extra * @return int */ public function decrement($column, $amount = 1, array $extra = []) { $wrapped = $this->grammar->wrap($column); $columns = array_merge([$column => $this->raw("$wrapped - $amount")], $extra); return $this->update($columns); } /** * Delete a record from the database. * * @param mixed $id * @return int */ public function delete($id = null) { // If an ID is passed to the method, we will set the where clause to check // the ID to allow developers to simply and quickly remove a single row // from their database without manually specifying the where clauses. if (! is_null($id)) { $this->where('id', '=', $id); } $sql = $this->grammar->compileDelete($this); return $this->connection->delete($sql, $this->getBindings()); } /** * Run a truncate statement on the table. * * @return void */ public function truncate() { foreach ($this->grammar->compileTruncate($this) as $sql => $bindings) { $this->connection->statement($sql, $bindings); } } /** * Get a new instance of the query builder. * * @return \Illuminate\Database\Query\Builder */ public function newQuery() { return new static($this->connection, $this->grammar, $this->processor); } /** * Merge an array of where clauses and bindings. * * @param array $wheres * @param array $bindings * @return void */ public function mergeWheres($wheres, $bindings) { $this->wheres = array_merge((array) $this->wheres, (array) $wheres); $this->bindings['where'] = array_values(array_merge($this->bindings['where'], (array) $bindings)); } /** * Remove all of the expressions from a list of bindings. * * @param array $bindings * @return array */ protected function cleanBindings(array $bindings) { return array_values(array_filter($bindings, function ($binding) { return ! $binding instanceof Expression; })); } /** * Create a raw database expression. * * @param mixed $value * @return \Illuminate\Database\Query\Expression */ public function raw($value) { return $this->connection->raw($value); } /** * Get the current query value bindings in a flattened array. * * @return array */ public function getBindings() { return Arr::flatten($this->bindings); } /** * Get the raw array of bindings. * * @return array */ public function getRawBindings() { return $this->bindings; } /** * Set the bindings on the query builder. * * @param array $bindings * @param string $type * @return $this * * @throws \InvalidArgumentException */ public function setBindings(array $bindings, $type = 'where') { if (! array_key_exists($type, $this->bindings)) { throw new InvalidArgumentException("Invalid binding type: {$type}."); } $this->bindings[$type] = $bindings; return $this; } /** * Add a binding to the query. * * @param mixed $value * @param string $type * @return $this * * @throws \InvalidArgumentException */ public function addBinding($value, $type = 'where') { if (! array_key_exists($type, $this->bindings)) { throw new InvalidArgumentException("Invalid binding type: {$type}."); } if (is_array($value)) { $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); } else { $this->bindings[$type][] = $value; } return $this; } /** * Merge an array of bindings into our bindings. * * @param \Illuminate\Database\Query\Builder $query * @return $this */ public function mergeBindings(Builder $query) { $this->bindings = array_merge_recursive($this->bindings, $query->bindings); return $this; } /** * Get the database connection instance. * * @return \Illuminate\Database\ConnectionInterface */ public function getConnection() { return $this->connection; } /** * Get the database query processor instance. * * @return \Illuminate\Database\Query\Processors\Processor */ public function getProcessor() { return $this->processor; } /** * Get the query grammar instance. * * @return \Illuminate\Database\Query\Grammars\Grammar */ public function getGrammar() { return $this->grammar; } /** * Use the write pdo for query. * * @return $this */ public function useWritePdo() { $this->useWritePdo = true; return $this; } /** * Handle dynamic method calls into the method. * * @param string $method * @param array $parameters * @return mixed * * @throws \BadMethodCallException */ public function __call($method, $parameters) { if (static::hasMacro($method)) { return $this->macroCall($method, $parameters); } if (Str::startsWith($method, 'where')) { return $this->dynamicWhere($method, $parameters); } $className = get_class($this); throw new BadMethodCallException("Call to undefined method {$className}::{$method}()"); } }
# Swagger\Client\KintoApi All URIs are relative to *https://kinto.dev.mozaws.net/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**batch**](KintoApi.md#batch) | **POST** /batch | [**contribute**](KintoApi.md#contribute) | **GET** /contribute.json | [**createBucket**](KintoApi.md#createBucket) | **POST** /buckets | [**createCollection**](KintoApi.md#createCollection) | **POST** /buckets/{bucket_id}/collections | [**createGroup**](KintoApi.md#createGroup) | **POST** /buckets/{bucket_id}/groups | [**createRecord**](KintoApi.md#createRecord) | **POST** /buckets/{bucket_id}/collections/{collection_id}/records | [**deleteBucket**](KintoApi.md#deleteBucket) | **DELETE** /buckets/{bucket_id} | [**deleteBuckets**](KintoApi.md#deleteBuckets) | **DELETE** /buckets | [**deleteCollection**](KintoApi.md#deleteCollection) | **DELETE** /buckets/{bucket_id}/collections/{collection_id} | [**deleteCollections**](KintoApi.md#deleteCollections) | **DELETE** /buckets/{bucket_id}/collections | [**deleteGroup**](KintoApi.md#deleteGroup) | **DELETE** /buckets/{bucket_id}/groups/{group_id} | [**deleteGroups**](KintoApi.md#deleteGroups) | **DELETE** /buckets/{bucket_id}/groups | [**deleteRecord**](KintoApi.md#deleteRecord) | **DELETE** /buckets/{bucket_id}/collections/{collection_id}/records/{record_id} | [**deleteRecords**](KintoApi.md#deleteRecords) | **DELETE** /buckets/{bucket_id}/collections/{collection_id}/records | [**getBucket**](KintoApi.md#getBucket) | **GET** /buckets/{bucket_id} | [**getBuckets**](KintoApi.md#getBuckets) | **GET** /buckets | [**getCollection**](KintoApi.md#getCollection) | **GET** /buckets/{bucket_id}/collections/{collection_id} | [**getCollections**](KintoApi.md#getCollections) | **GET** /buckets/{bucket_id}/collections | [**getGroup**](KintoApi.md#getGroup) | **GET** /buckets/{bucket_id}/groups/{group_id} | [**getGroups**](KintoApi.md#getGroups) | **GET** /buckets/{bucket_id}/groups | [**getRecord**](KintoApi.md#getRecord) | **GET** /buckets/{bucket_id}/collections/{collection_id}/records/{record_id} | [**getRecords**](KintoApi.md#getRecords) | **GET** /buckets/{bucket_id}/collections/{collection_id}/records | [**heartbeat**](KintoApi.md#heartbeat) | **GET** /__heartbeat__ | [**lbheartbeat**](KintoApi.md#lbheartbeat) | **GET** /__lbheartbeat__ | [**patchBucket**](KintoApi.md#patchBucket) | **PATCH** /buckets/{bucket_id} | [**patchCollection**](KintoApi.md#patchCollection) | **PATCH** /buckets/{bucket_id}/collections/{collection_id} | [**patchGroup**](KintoApi.md#patchGroup) | **PATCH** /buckets/{bucket_id}/groups/{group_id} | [**patchRecord**](KintoApi.md#patchRecord) | **PATCH** /buckets/{bucket_id}/collections/{collection_id}/records/{record_id} | [**serverInfo**](KintoApi.md#serverInfo) | **GET** / | [**updateBucket**](KintoApi.md#updateBucket) | **PUT** /buckets/{bucket_id} | [**updateCollection**](KintoApi.md#updateCollection) | **PUT** /buckets/{bucket_id}/collections/{collection_id} | [**updateGroup**](KintoApi.md#updateGroup) | **PUT** /buckets/{bucket_id}/groups/{group_id} | [**updateRecord**](KintoApi.md#updateRecord) | **PUT** /buckets/{bucket_id}/collections/{collection_id}/records/{record_id} | [**version**](KintoApi.md#version) | **GET** /__version__ | # **batch** > \Swagger\Client\Model\InlineResponse200 batch($batch) Send multiple operations in one request. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $batch = new \Swagger\Client\Model\Batch(); // \Swagger\Client\Model\Batch | Batch operation properties. try { $result = $api_instance->batch($batch); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->batch: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **batch** | [**\Swagger\Client\Model\Batch**](../Model/\Swagger\Client\Model\Batch.md)| Batch operation properties. | ### Return type [**\Swagger\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **contribute** > object contribute() ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\KintoApi(); try { $result = $api_instance->contribute(); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->contribute: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters This endpoint does not need any parameter. ### Return type **object** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createBucket** > \Swagger\Client\Model\Bucket createBucket($bucket, $if_match, $if_none_match) Create a bucket. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket = new \Swagger\Client\Model\Bucket(); // \Swagger\Client\Model\Bucket | Bucket information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. try { $result = $api_instance->createBucket($bucket, $if_match, $if_none_match); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->createBucket: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket** | [**\Swagger\Client\Model\Bucket**](../Model/\Swagger\Client\Model\Bucket.md)| Bucket information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] ### Return type [**\Swagger\Client\Model\Bucket**](../Model/Bucket.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createCollection** > \Swagger\Client\Model\Collection createCollection($bucket_id, $collection, $if_match, $if_none_match) Create a collection. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection = new \Swagger\Client\Model\Collection(); // \Swagger\Client\Model\Collection | Collection information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. try { $result = $api_instance->createCollection($bucket_id, $collection, $if_match, $if_none_match); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->createCollection: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection** | [**\Swagger\Client\Model\Collection**](../Model/\Swagger\Client\Model\Collection.md)| Collection information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] ### Return type [**\Swagger\Client\Model\Collection**](../Model/Collection.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createGroup** > \Swagger\Client\Model\Group createGroup($bucket_id, $group, $if_match, $if_none_match) Create a group. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $group = new \Swagger\Client\Model\Group(); // \Swagger\Client\Model\Group | Group information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. try { $result = $api_instance->createGroup($bucket_id, $group, $if_match, $if_none_match); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->createGroup: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **group** | [**\Swagger\Client\Model\Group**](../Model/\Swagger\Client\Model\Group.md)| Group information. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] ### Return type [**\Swagger\Client\Model\Group**](../Model/Group.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createRecord** > \Swagger\Client\Model\Record createRecord($bucket_id, $collection_id, $record, $if_match, $if_none_match) Upload a record. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Collection id. $record = new \Swagger\Client\Model\Record(); // \Swagger\Client\Model\Record | Record information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. try { $result = $api_instance->createRecord($bucket_id, $collection_id, $record, $if_match, $if_none_match); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->createRecord: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Collection id. | **record** | [**\Swagger\Client\Model\Record**](../Model/\Swagger\Client\Model\Record.md)| Record information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] ### Return type [**\Swagger\Client\Model\Record**](../Model/Record.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteBucket** > \Swagger\Client\Model\Deleted deleteBucket($bucket_id, $if_match, $if_none_match, $_fields) Delete a bucket. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->deleteBucket($bucket_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteBucket: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Deleted**](../Model/Deleted.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteBuckets** > \Swagger\Client\Model\ModelList deleteBuckets($_since, $_before, $_sort, $if_match, $if_none_match) Delete all writable buckets. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. try { $result = $api_instance->deleteBuckets($_since, $_before, $_sort, $if_match, $if_none_match); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteBuckets: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteCollection** > \Swagger\Client\Model\Deleted deleteCollection($bucket_id, $collection_id, $if_match, $if_none_match, $_fields) Delete a collection. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->deleteCollection($bucket_id, $collection_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteCollection: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Deleted**](../Model/Deleted.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteCollections** > \Swagger\Client\Model\ModelList deleteCollections($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort) Delete writable collections. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). try { $result = $api_instance->deleteCollections($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteCollections: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteGroup** > \Swagger\Client\Model\Deleted deleteGroup($bucket_id, $group_id, $if_match, $if_none_match, $_fields) Delete a group. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $group_id = "group_id_example"; // string | Group id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->deleteGroup($bucket_id, $group_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteGroup: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **group_id** | **string**| Group id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Deleted**](../Model/Deleted.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteGroups** > \Swagger\Client\Model\ModelList deleteGroups($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort) Delete writable groups. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). try { $result = $api_instance->deleteGroups($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteGroups: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteRecord** > \Swagger\Client\Model\Deleted deleteRecord($bucket_id, $collection_id, $record_id, $if_match, $if_none_match, $_fields) Delete a single record. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $record_id = "record_id_example"; // string | Record id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->deleteRecord($bucket_id, $collection_id, $record_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteRecord: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **record_id** | **string**| Record id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Deleted**](../Model/Deleted.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **deleteRecords** > \Swagger\Client\Model\ModelList deleteRecords($bucket_id, $collection_id, $if_match, $if_none_match, $_since, $_before, $_sort) Delete stored records. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Collection id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). try { $result = $api_instance->deleteRecords($bucket_id, $collection_id, $if_match, $if_none_match, $_since, $_before, $_sort); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->deleteRecords: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Collection id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getBucket** > \Swagger\Client\Model\Bucket getBucket($bucket_id, $if_match, $if_none_match, $_fields) Retrieve an existing bucket. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getBucket($bucket_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getBucket: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Bucket**](../Model/Bucket.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getBuckets** > \Swagger\Client\Model\ModelList getBuckets($if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields) List all acessible buckets. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). $_limit = 56; // int | Limit objects on a list. $_token = "_token_example"; // string | Continuation token of a limited list. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getBuckets($if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getBuckets: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] **_limit** | **int**| Limit objects on a list. | [optional] **_token** | **string**| Continuation token of a limited list. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getCollection** > \Swagger\Client\Model\Collection getCollection($bucket_id, $collection_id, $if_match, $if_none_match, $_fields) Retreive an existing collection. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getCollection($bucket_id, $collection_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getCollection: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Collection**](../Model/Collection.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getCollections** > \Swagger\Client\Model\ModelList getCollections($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields) List bucket’s collections. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). $_limit = 56; // int | Limit objects on a list. $_token = "_token_example"; // string | Continuation token of a limited list. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getCollections($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getCollections: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] **_limit** | **int**| Limit objects on a list. | [optional] **_token** | **string**| Continuation token of a limited list. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getGroup** > \Swagger\Client\Model\Group getGroup($bucket_id, $group_id, $if_match, $if_none_match, $_fields) Retrieve a group. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $group_id = "group_id_example"; // string | Group id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getGroup($bucket_id, $group_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getGroup: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **group_id** | **string**| Group id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Group**](../Model/Group.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getGroups** > \Swagger\Client\Model\ModelList getGroups($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields) Retrieve the list of bucket’s group. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). $_limit = 56; // int | Limit objects on a list. $_token = "_token_example"; // string | Continuation token of a limited list. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getGroups($bucket_id, $if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getGroups: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] **_limit** | **int**| Limit objects on a list. | [optional] **_token** | **string**| Continuation token of a limited list. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getRecord** > \Swagger\Client\Model\Record getRecord($bucket_id, $collection_id, $record_id, $if_match, $if_none_match, $_fields) Retrieve a single record. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $record_id = "record_id_example"; // string | Record id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getRecord($bucket_id, $collection_id, $record_id, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getRecord: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **record_id** | **string**| Record id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Record**](../Model/Record.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getRecords** > \Swagger\Client\Model\ModelList getRecords($bucket_id, $collection_id, $if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields) Retrieve stored records. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Collection id. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_since = 56; // int | Get entries after a timestamp. $_before = 56; // int | Get entries before a timestamp. $_sort = array("_sort_example"); // string[] | Comma separeted list of fields to sort ascending on a list (use -field to sort descending). $_limit = 56; // int | Limit objects on a list. $_token = "_token_example"; // string | Continuation token of a limited list. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->getRecords($bucket_id, $collection_id, $if_match, $if_none_match, $_since, $_before, $_sort, $_limit, $_token, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->getRecords: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Collection id. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_since** | **int**| Get entries after a timestamp. | [optional] **_before** | **int**| Get entries before a timestamp. | [optional] **_sort** | [**string[]**](../Model/string.md)| Comma separeted list of fields to sort ascending on a list (use -field to sort descending). | [optional] **_limit** | **int**| Limit objects on a list. | [optional] **_token** | **string**| Continuation token of a limited list. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\ModelList**](../Model/ModelList.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **heartbeat** > map[string,bool] heartbeat() Return the status of dependent services. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\KintoApi(); try { $result = $api_instance->heartbeat(); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->heartbeat: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters This endpoint does not need any parameter. ### Return type [**map[string,bool]**](../Model/map.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **lbheartbeat** > object lbheartbeat() ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\KintoApi(); try { $result = $api_instance->lbheartbeat(); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->lbheartbeat: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters This endpoint does not need any parameter. ### Return type **object** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **patchBucket** > \Swagger\Client\Model\Bucket patchBucket($bucket_id, $bucket, $if_match, $if_none_match, $_fields) Modify an existing bucket. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $bucket = new \Swagger\Client\Model\Bucket(); // \Swagger\Client\Model\Bucket | Bucket information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->patchBucket($bucket_id, $bucket, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->patchBucket: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **bucket** | [**\Swagger\Client\Model\Bucket**](../Model/\Swagger\Client\Model\Bucket.md)| Bucket information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Bucket**](../Model/Bucket.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/merge-patch+json, application/json-patch+json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **patchCollection** > \Swagger\Client\Model\Collection patchCollection($bucket_id, $collection_id, $collection, $if_match, $if_none_match, $_fields) Modify an existing collection. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $collection = new \Swagger\Client\Model\Collection(); // \Swagger\Client\Model\Collection | Collection information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->patchCollection($bucket_id, $collection_id, $collection, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->patchCollection: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **collection** | [**\Swagger\Client\Model\Collection**](../Model/\Swagger\Client\Model\Collection.md)| Collection information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Collection**](../Model/Collection.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/merge-patch+json, application/json-patch+json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **patchGroup** > \Swagger\Client\Model\Group patchGroup($bucket_id, $group_id, $group, $if_match, $if_none_match, $_fields) Modify an existing group. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $group_id = "group_id_example"; // string | Group id. $group = new \Swagger\Client\Model\Group(); // \Swagger\Client\Model\Group | Group information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->patchGroup($bucket_id, $group_id, $group, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->patchGroup: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **group_id** | **string**| Group id. | **group** | [**\Swagger\Client\Model\Group**](../Model/\Swagger\Client\Model\Group.md)| Group information. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Group**](../Model/Group.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/merge-patch+json, application/json-patch+json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **patchRecord** > \Swagger\Client\Model\Record patchRecord($bucket_id, $collection_id, $record_id, $record, $if_match, $if_none_match, $_fields) Modify an existing record. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $record_id = "record_id_example"; // string | Record id. $record = new \Swagger\Client\Model\Record(); // \Swagger\Client\Model\Record | Record information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->patchRecord($bucket_id, $collection_id, $record_id, $record, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->patchRecord: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **record_id** | **string**| Record id. | **record** | [**\Swagger\Client\Model\Record**](../Model/\Swagger\Client\Model\Record.md)| Record information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Record**](../Model/Record.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/merge-patch+json, application/json-patch+json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **serverInfo** > object serverInfo() Information about the running instance. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\KintoApi(); try { $result = $api_instance->serverInfo(); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->serverInfo: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters This endpoint does not need any parameter. ### Return type **object** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateBucket** > \Swagger\Client\Model\Bucket updateBucket($bucket_id, $bucket, $if_match, $if_none_match, $_fields) Create or replace a bucket. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $bucket = new \Swagger\Client\Model\Bucket(); // \Swagger\Client\Model\Bucket | Bucket information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->updateBucket($bucket_id, $bucket, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->updateBucket: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **bucket** | [**\Swagger\Client\Model\Bucket**](../Model/\Swagger\Client\Model\Bucket.md)| Bucket information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Bucket**](../Model/Bucket.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateCollection** > \Swagger\Client\Model\Collection updateCollection($bucket_id, $collection_id, $collection, $if_match, $if_none_match, $_fields) Create or replace a collection. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $collection = new \Swagger\Client\Model\Collection(); // \Swagger\Client\Model\Collection | Collection information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->updateCollection($bucket_id, $collection_id, $collection, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->updateCollection: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **collection** | [**\Swagger\Client\Model\Collection**](../Model/\Swagger\Client\Model\Collection.md)| Collection information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Collection**](../Model/Collection.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateGroup** > \Swagger\Client\Model\Group updateGroup($bucket_id, $group_id, $group, $if_match, $if_none_match, $_fields) Update a group. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $group_id = "group_id_example"; // string | Group id. $group = new \Swagger\Client\Model\Group(); // \Swagger\Client\Model\Group | Group information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->updateGroup($bucket_id, $group_id, $group, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->updateGroup: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **group_id** | **string**| Group id. | **group** | [**\Swagger\Client\Model\Group**](../Model/\Swagger\Client\Model\Group.md)| Group information. | **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Group**](../Model/Group.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateRecord** > \Swagger\Client\Model\Record updateRecord($bucket_id, $collection_id, $record_id, $record, $if_match, $if_none_match, $_fields) Create or replace a record. ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); $api_instance = new Swagger\Client\Api\KintoApi(); $bucket_id = "bucket_id_example"; // string | Bucket id. $collection_id = "collection_id_example"; // string | Colection id. $record_id = "record_id_example"; // string | Record id. $record = new \Swagger\Client\Model\Record(); // \Swagger\Client\Model\Record | Record information. $if_match = "if_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. $if_none_match = "if_none_match_example"; // string | Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. $_fields = array("_fields_example"); // string[] | Fields to compose response (id and last_modified are always returned). try { $result = $api_instance->updateRecord($bucket_id, $collection_id, $record_id, $record, $if_match, $if_none_match, $_fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->updateRecord: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bucket_id** | **string**| Bucket id. | **collection_id** | **string**| Colection id. | **record_id** | **string**| Record id. | **record** | [**\Swagger\Client\Model\Record**](../Model/\Swagger\Client\Model\Record.md)| Record information. | [optional] **if_match** | **string**| Provide a timestamp to see if a resource has changed, avoid changes and returns 412 if it does. | [optional] **if_none_match** | **string**| Provide a timestamp to see if a resource has changed, avoid overwriting objects with the same id if it does. Returns 304 with empty body if nothing has changed. | [optional] **_fields** | [**string[]**](../Model/string.md)| Fields to compose response (id and last_modified are always returned). | [optional] ### Return type [**\Swagger\Client\Model\Record**](../Model/Record.md) ### Authorization [basicAuth](../../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **version** > object version() ### Example ```php <?php require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\KintoApi(); try { $result = $api_instance->version(); print_r($result); } catch (Exception $e) { echo 'Exception when calling KintoApi->version: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters This endpoint does not need any parameter. ### Return type **object** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
<html><body> <h4>Windows 10 x64 (18362.449)</h4><br> <h2>_PPM_VETO_ACCOUNTING</h2> <font face="arial"> +0x000 VetoPresent : Int4B<br> +0x008 VetoListHead : <a href="./_LIST_ENTRY.html">_LIST_ENTRY</a><br> +0x018 CsAccountingBlocks : UChar<br> +0x019 BlocksDrips : UChar<br> +0x01c PreallocatedVetoCount : Uint4B<br> +0x020 PreallocatedVetoList : Ptr64 <a href="./_PPM_VETO_ENTRY.html">_PPM_VETO_ENTRY</a><br> </font></body></html>
const autoAdjustOverflow = { adjustX: 1, adjustY: 1 } const targetOffset = [0, 0] export const placements = { left: { points: ['cr', 'cl'], overflow: autoAdjustOverflow, offset: [-3, 0], targetOffset }, right: { points: ['cl', 'cr'], overflow: autoAdjustOverflow, offset: [3, 0], targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-3, 0], targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [3, 0], targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: autoAdjustOverflow, offset: [3, 0], targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: autoAdjustOverflow, offset: [-3, 0], targetOffset } } export default placements