This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.pekall.onlinetest; | |
| public class Solution { | |
| public int equi(int[] A) { | |
| int i, j; | |
| int left = 0; | |
| int right = 0; | |
| int length = A.length; | |
| for (i = 1; i < length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shaobin adm dialout cdrom plugdev lpadmin admin sambashare vboxusers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2011 Patrik Åkerfeldt | |
| * | |
| * 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.tydic; | |
| public class MainCls { | |
| public static void main(String[] args) { | |
| int[] arr = new int[] { 1, 1, 1, 1, 1, 7, 5 }; | |
| // tNum1, tNum2 应使用 long 类型,不然数组的加和可能会溢出 | |
| int n = arr.length, tNum1 = 0, tNum2 = 0, i, j; | |
| for (i = 0; i < n; i++) { | |
| tNum1 = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // you can also use imports, for example: | |
| // import java.math.*; | |
| class Solution { | |
| public int equi ( int[] A ) { | |
| if (A.length == 0) return -1; | |
| long[] sum = new long[A.length]; | |
| sum[0] = A[0]; | |
| for (int i = 1; i < A.length; i++) { | |
| sum[i] = sum[i - 1] + A[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <profiles version="10"> | |
| <profile name="Android" version="10"> | |
| <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> | |
| <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/> | |
| <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> | |
| <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/> | |
| <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/> | |
| <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/> | |
| <setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Organize Import Order | |
| #Wed Apr 04 11:32:05 CDT 2007 | |
| 4=javax | |
| 3=java | |
| 2=android | |
| 1=org | |
| 0=com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2011 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.videolan.vlc.android.widget; | |
| import android.content.Context; | |
| import android.util.AttributeSet; | |
| import android.view.MotionEvent; | |
| import android.view.VelocityTracker; | |
| import android.view.View; | |
| import android.view.ViewConfiguration; | |
| import android.view.ViewGroup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 获取Cpu | |
| * | |
| */ | |
| private String getCpu() { | |
| ProcessBuilder cmd; | |
| String result = ""; | |
| try { | |
| String[] args = { "/system/bin/cat", "/proc/cpuinfo" }; | |
| cmd = new ProcessBuilder(args); |