
能力说明:
掌握封装、继承和多态设计Java类的方法,能够设计较复杂的Java类结构;能够使用泛型与集合的概念与方法,创建泛型类,使用ArrayList,TreeSet,TreeMap等对象掌握Java I/O原理从控制台读取和写入数据,能够使用BufferedReader,BufferedWriter文件创建输出、输入对象。
暂时未有相关云产品技术能力~
阿里云技能认证
详细说明WPF 皮肤1、新建两个ResourceDictionary的xaml,BlueSkin.xaml和YellowSkin.xaml; <!--<SnippetBlueSkinMARKUP1>--> <!-- Blue Skin --> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:SkinnedApplication"> <Style TargetType="{x:Type Button}"> <Setter Property="Background" Value="Blue" /> </Style> <Style TargetType="{x:Type local:ChildWindow}"> <Setter Property="Background" Value="Blue" /> </Style> <Style TargetType="{x:Type local:MainWindow}"> <Setter Property="Background" Value="Blue" /> </Style> </ResourceDictionary> <!--</SnippetBlueSkinMARKUP2>--> <!--<SnippetYellowSkinMARKUP1>--> <!-- Yellow Skin --> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:SkinnedApplication"> <Style TargetType="{x:Type Button}"> <Setter Property="Background" Value="Yellow" /> </Style> <Style TargetType="{x:Type local:ChildWindow}"> <Setter Property="Background" Value="Yellow" /> </Style> <Style TargetType="{x:Type local:MainWindow}"> <Setter Property="Background" Value="Yellow" /> </Style> </ResourceDictionary> <!--</SnippetYellowSkinMARKUP2>--> 2、App.xaml添加 Startup="App_Startup"; <Application x:Class="SkinnedApplication.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:SkinnedApplication" StartupUri="MainWindow.xaml" Startup="App_Startup"> <Application.Resources> </Application.Resources> </Application> 3、App.xaml.cs添加 对应方法,加载两个皮肤; private void App_Startup(object sender, StartupEventArgs e) { Properties["Blue"] = (ResourceDictionary)LoadComponent(new Uri("BlueSkin.xaml", UriKind.Relative)); Properties["Yellow"] = (ResourceDictionary)LoadComponent(new Uri("YellowSkin.xaml", UriKind.Relative)); // Note: you can also use the following syntax: // Skins["Yellow"] = new YellowSkin() // But only as long as you implement the ResourceDictionary using markup and code-behind, // use the x:Class attribute in markup, and call InitializeComponent() from code-behind, eg: // // <!-- Markup --> // <ResourceDictionary // xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" // xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" // xmlns:local="clr-namespace:SDKSample" // x:Class="SDKSample.YellowSkin"> // ... // </ResourceDictionary> // // // Code-behind // public partial class YellowSkin : ResourceDictionary // { // public YellowSkin() { InitializeComponent(); } // } } 4、 MainWindow.xaml.cs中添加如下初始化代码; //set initial skin Application.Current.Resources = (ResourceDictionary)Application.Current.Properties["Blue"]; 5、如果用下拉框选择,在事件中添加如下代码; //Change the skin var selectedValue = (string)e.AddedItems[0]; Application.Current.Resources = (ResourceDictionary)Application.Current.Properties[selectedValue]; maojie
<TextBlock Background="LightBlue" DockPanel.Dock="Top">Some Text</TextBlock> <TextBlock DockPanel.Dock="Bottom" Background="LightYellow">Some text at the bottom of the page.</TextBlock> <TextBlock DockPanel.Dock="Left" Background="Lavender">Some More Text</TextBlock> <DockPanel Background="Bisque"> <StackPanel DockPanel.Dock="Top"> <Button HorizontalAlignment="Left" Height="30px" Width="100px" Margin="10,10,10,10">Button1</Button> <Button HorizontalAlignment="Left" Height="30px" Width="100px" Margin="10,10,10,10">Button2</Button> </StackPanel> <TextBlock Background="LightGreen">Some Text Below the Buttons</TextBlock> </DockPanel> </DockPanel>
DockPanel <TextBlock Background="LightBlue" DockPanel.Dock="Top">Some Text</TextBlock> <TextBlock DockPanel.Dock="Bottom" Background="LightYellow">Some text at the bottom of the page.</TextBlock> <TextBlock DockPanel.Dock="Left" Background="Lavender">Some More Text</TextBlock> <DockPanel Background="Bisque"> <StackPanel DockPanel.Dock="Top"> <Button HorizontalAlignment="Left" Height="30px" Width="100px" Margin="10,10,10,10">Button1</Button> <Button HorizontalAlignment="Left" Height="30px" Width="100px" Margin="10,10,10,10">Button2</Button> </StackPanel> <TextBlock Background="LightGreen">Some Text Below the Buttons</TextBlock> </DockPanel> </DockPanel>
读 Range ce=sheet.Cells[2,3]; string vv=ce.value; 写 //注意: // * Excel中形如Cells[x][y]的写法,前面的数字是RowIndex,后面的数字是ColumnIndex! // * Excel中的行、列都是从1开始的,而不是0 //1.制作一个新的Excel文档实例 Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();//创建excel Workbook myWorkBook = excelApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);//创建工作簿(workBook;即excel文件主体本身) //Worksheet sheet = (Worksheet)workBook.Worksheets[1];//创建主工作簿 //增加查询信息Sheet // Microsoft.Office.Interop.Excel.Worksheet sarchInfoSheet = myWorkBook.Sheets.Add(); sarchInfoSheet.Name = "查询条件";//确定sheet名称 sarchInfoSheet.Cells[1, 1] = "起始时间:";//起始时间 sarchInfoSheet.Cells[1, 2] = SearchPageModel.mySearchPageModel.startDateTime.ToString();//起始时间 sarchInfoSheet.Cells[2, 1] = "结束时间:";//结束时间 sarchInfoSheet.Cells[2, 2] = SearchPageModel.mySearchPageModel.endDateTime.ToString();//结束时间 sarchInfoSheet.Cells[3, 1] = "手机型号:"; sarchInfoSheet.Cells[3, 2] = SearchPageModel.mySearchPageModel.selectedModel; sarchInfoSheet.Cells[4, 1] = "测试计划:"; sarchInfoSheet.Cells[4, 2] = SearchPageModel.mySearchPageModel.selectedFile; sarchInfoSheet.Cells[5, 1] = "失败项目:"; sarchInfoSheet.Cells[5, 2] = SearchPageModel.mySearchPageModel.selectedItem; sarchInfoSheet.Cells[6, 1] = "失败原因:"; sarchInfoSheet.Cells[6, 2] = SearchPageModel.mySearchPageModel.selectedReason; sarchInfoSheet.Cells[7, 1] = "PhoneID:"; sarchInfoSheet.Cells[7, 2] = SearchPageModel.mySearchPageModel.phoneID; sarchInfoSheet.Cells[8, 1] = "工位IP:"; sarchInfoSheet.Cells[8, 2] = SearchPageModel.mySearchPageModel.computerIP; sarchInfoSheet.Cells[9, 1] = "计算机名:"; sarchInfoSheet.Cells[9, 2] = SearchPageModel.mySearchPageModel.computerName; sarchInfoSheet.Cells[10, 1] = "线程号码:"; sarchInfoSheet.Cells[10, 2] = SearchPageModel.mySearchPageModel.threadNumber; sarchInfoSheet.Cells[11, 1] = "操作人员:"; sarchInfoSheet.Cells[11, 2] = SearchPageModel.mySearchPageModel.tsOperator; sarchInfoSheet.Cells[12, 1] = "测试类型:"; sarchInfoSheet.Cells[12, 2] = SearchPageModel.mySearchPageModel.testType; sarchInfoSheet.Cells[13, 1] = "软件版本:"; sarchInfoSheet.Cells[13, 2] = SearchPageModel.mySearchPageModel.softVersion; sarchInfoSheet.Cells[14, 1] = "测试OK:"; sarchInfoSheet.Cells[14, 2] = SearchPageModel.mySearchPageModel.testResultOK; sarchInfoSheet.Cells[15, 1] = "测试NG:"; sarchInfoSheet.Cells[15, 2] = SearchPageModel.mySearchPageModel.testResultNG; sarchInfoSheet.Cells[16, 1] = "Data is exported from HustAnalyser."; // Worksheet myWorkSheet = myWorkBook.Sheets.Add(); //2.设置Excel分页卡标题 myWorkSheet.Name = "详细数据";//确定sheet名称 //方法二:生成Excel中列头名称 for (int i = 0; i < dataSouce.Columns.Count; i++) { myWorkSheet.Cells[1, i + 1] = dataSouce.Columns[i].ColumnName;//输出DataGridView列头名 if (i>= addCollumNum && searchResults[i - addCollumNum].result == "FAIL") { Microsoft.Office.Interop.Excel.Range columnRange = myWorkSheet.Columns.EntireColumn[i + 1]; columnRange.Font.Color = 0x0000FF;//(蓝00绿00红00) } } //RunInfo = "testDataArray复制数据到Excel"; //方法二:整体赋值 Microsoft.Office.Interop.Excel.Range dataSourceRange = myWorkSheet.Range[myWorkSheet.Cells[2, 1], myWorkSheet.Cells[dataSouce.Rows.Count + 1, dataSouce.Columns.Count]]; dataSourceRange.Value = testDataArray; //给Exccel中的Range整体赋值 //RunInfo = "Excel格式设置..."; dataSourceRange.EntireColumn.AutoFit(); //设定Excel列宽度自适应 //5.设置格式 Microsoft.Office.Interop.Excel.Range rowRange = myWorkSheet.Rows.EntireRow[1];//首行 rowRange.Font.ColorIndex = ColorIndex.深蓝;//首行颜色 rowRange.Interior.Color = 0xA6AA00;//(蓝A6绿AA红00) 首行背景 rowRange.Font.Bold = true;//首行加粗 Microsoft.Office.Interop.Excel.Range colRange = myWorkSheet.Columns.EntireColumn[1];//首列 //colRange.Font.ColorIndex = ColorIndex.深蓝;//首列颜色 colRange.Font.Bold = true;//首列加粗 //冻结首行首列 excelApp.ActiveWindow.SplitRow = 1;//设置将指定窗口拆分成窗格处的行号(拆分线以上的行数) excelApp.ActiveWindow.SplitColumn = 1;//设置将指定窗口拆分成窗格处的列号(拆分线左侧的列数) excelApp.ActiveWindow.FreezePanes = true;//冻结首行首列 //边框实线 Microsoft.Office.Interop.Excel.Range dataRange = myWorkSheet.Range[myWorkSheet.Cells[1, 1], myWorkSheet.Cells[dataSouce.Rows.Count, dataSouce.Columns.Count]];// dataRange.Borders.LineStyle = 1;//设置边框为实线 //myWorkSheet.Cells.Borders.LineStyle = 1;//设置整个数据区边框为实线 //auto adjust column width (according to content)调整列宽 //Microsoft.Office.Interop.Excel.Range allColumn = myWorkSheet.Columns; //allColumn.AutoFit();//调整列宽 dispatcher.Invoke(new System.Action(() => { //以下为Excel保存过程----------------------------- string excelFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\HustAnalyser导出info" + DateTime.Now.ToString("-yyyyMMddHHmmss") + ".xlsx"; //默认桌面 System.Windows.Forms.SaveFileDialog saveFileDialog = new System.Windows.Forms.SaveFileDialog(); saveFileDialog.Filter = "Excel文件(*.xlsx)|*.xlsx"; saveFileDialog.FileName = "HustAnalyser导出info" + DateTime.Now.ToString("-yyyyMMddHHmmss"); if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { excelFile = saveFileDialog.FileName; } //myWorkBook.Save();//保存结果 myWorkBook.SaveAs(excelFile);//保存结果 excelApp.Quit(); excelApp = null; System.Diagnostics.Process.Start("Explorer", "/select," + excelFile); //Excel保存结束------------------------------------ }));
1、解决方案资源管理器中,右键“引用”,选择“管理NuGet程序包”; 2、点击图中设置按钮; 3、选择程序包源的位置(网络上下载好的nupkg文件位置),把不相关的选项可以勾掉; 4、选择对应下载的程序包,点击右侧安装,注意其依赖项。 5、程序包下载:直接访问NuGet网站,然后搜索即可,再次提醒注意查看程序包的依赖项。
到官网下载JDK的对应windows版本。(Make sure you download the JDK, not the JRE.) https://www.oracle.com/technetwork/java/javase/downloads/index.html安装,进行环境变量配置。Updating the PATH Environment VariableIf you do not set the PATH variable, you need to specify the full path to the executable file every time you run it, such as: C:> "C:Program FilesJavajdk1.8.0binjavac" MyClass.javaIt is useful to set the PATH variable permanently so it will persist after rebooting. To set the PATH variable permanently, add the full path of the jdk1.8.0bin directory to the PATH variable. Typically, this full path looks something like C:Program FilesJavajdk1.8.0bin. Set the PATH variable as follows on Microsoft Windows: Click Start, then Control Panel, then System. Click Advanced, then Environment Variables. Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. The following is a typical value for the PATH variable: C:WINDOWSsystem32;C:WINDOWS;C:Program FilesJavajdk1.8.0binNote: The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. Microsoft Windows looks for programs in the PATH directories in order, from left to right. You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored. If you are not sure where to add the JDK path, append it. The new path takes effect in each new command window you open after setting the PATH variable. 打开cmd.exe运行javac查看是否已经配置OK。
在用where查询数据时会出现条件个数不确定的情况,虽然可以用循环组成SQL语句来实现,不过也可以看看下面的小例子,应该会更方便。下面的例子是从parts表中查找工件类型ID为1、2或6...(个数不定)的所有part。 LinqPartsDataContext myLinqParts = new LinqPartsDataContext(); int[] typeid = new int[3] { 1, 2, 6 };//数量可动态变化的条件 var Results = from o in myLinqParts.tb_part select o; //Results = Results.Where(x => x.part_typeid == 1||x.part_typeid==2||x.part_typeid==6);//已知条件个数时可用 Results = Results.Where(x => typeid.Contains(x.part_typeid));//条件个数动态变化时用! List<tb_part> dd= Results.ToList(); int co = dd.Count();
git config --global user.name "maojie"git config --global user.email "wangmaojie@aliyun.com"当安装Git后首先要做的事情是设置用户名称和e-mail地址。这是非常重要的,因为每次Git提交都会使用该信息。它被永远的嵌入到了你的提交中。 git init [目录] 在当前目录或指定目录创建一个空的Git仓库或重新初始化一个现有仓库。 git clone [url]使用 git clone 拷贝一个 Git 仓库到本地,让自己能够查看该项目,或者进行修改。 git pull <远程主机名> <远程分支名>:<本地分支名>git pull origin master:master将远程存储库中的更改合并到当前分支中。在默认模式下,git pull是git fetch后跟git merge FETCH_HEAD的缩写。 git add <“PATH”> git add . # 将当前目录所有修改添加到暂存区通常是通过git add <“PATH”>的形式把<“PATH”>添加到索引库中,<“PATH”>可以是文件也可以是目录。git不仅能判断出<“PATH”>中修改(不包括已删除)的文件,还能判断出新添的文件,并把它们的信息添加到索引库中。 git commit -m "the commit message" git commit命令用于将更改记录(提交)到存储库。将索引的当前内容与描述更改的用户和日志消息一起存储在新的提交中。 git push <远程主机名> <本地分支名>:<远程分支名>git push origin mastergit push命令用于将本地分支的更新,推送到远程主机。它的格式与git pull命令相似。上面示例命令表示,将本地的master分支推送到origin主机的master分支。如果master不存在,则会被新建。 参考:https://www.yiibai.com/git/笔记问题请联系wangmaojie@aliyun.com。