1.java源代码 求大神 明天就要上机
2.LOL源代码乐芙兰怎么获得介绍_LOL源代码乐芙兰怎么获得是星手星手什么
3.三星s8虹膜解锁晚上怎么办
4.des算法源代码
5.哪些手机是安卓7.1系统
java源代码 求大神 明天就要上机
package com.uisftec;
import java.io.Serializable;
public class TestScores implements Serializable {
private double[] testScores;
public TestScores(double[] testScores) {
this.testScores = testScores;
}
public double getAverageScore() {
double sum = 0.0d;
for (int i = 0; i < testScores.length; i++) {
sum += testScores[i];
}
return sum / testScores.length;
}
}
package com.uisftec;
public class InvalidTestScore {
public InvalidTestScore(double[] testScores) {
if (testScores == null) {
throw new IllegalArgumentException("数组为空");
}
for (int i = 0; i < testScores.length; i++) {
if (testScores[i] < 0 || testScores[i] > ) {
throw new IllegalArgumentException("数组中包含的test Score不在0~这个范围内");
}
}
}
}
package com.uisftec;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
public class TestScoresSerialize {
public static void main(String[] args) throws FileNotFoundException, IOException, ClassNotFoundException {
// 创建5个对象
TestScores testScores1 = new TestScores(new double[] { 1.0, 2.0 });
TestScores testScores2 = new TestScores(new double[] { 5.0, 2.0 });
TestScores testScores3 = new TestScores(new double[] { .0, .0 });
TestScores testScores4 = new TestScores(new double[] { .0, .0 });
TestScores testScores5 = new TestScores(new double[] { .0, .0 });
// 创建数组
TestScores[] testScores = new TestScores[] { testScores1, testScores2, testScores3, testScores4, testScores5 };
// 写入到D盘testScores.dat
ObjectOutput out = new ObjectOutputStream(new FileOutputStream("d:\\testscores.dat"));
for (TestScores testScores6 : testScores) {
out.writeObject(testScores6);
}
// D盘STOUT
File file = new File("D:\\STDOUT");
// 创建输出留
DataOutputStream outputStream = new DataOutputStream(new FileOutputStream(file));
// 创建读取d盘序列化对象
ObjectInputStream in = new ObjectInputStream(new FileInputStream("d:\\testscores.dat"));
// 打印平均分并写入到D盘STDOUT
TestScores testScores8 = (TestScores) in.readObject();
System.out.println(testScores8.getAverageScore());
outputStream.writeDouble(testScores8.getAverageScore());
TestScores testScores9 = (TestScores) in.readObject();
outputStream.writeDouble(testScores9.getAverageScore());
System.out.println(testScores9.getAverageScore());
TestScores testScores = (TestScores) in.readObject();
System.out.println(testScores.getAverageScore());
outputStream.writeDouble(testScores.getAverageScore());
TestScores testScores = (TestScores) in.readObject();
System.out.println(testScores.getAverageScore());
outputStream.writeDouble(testScores.getAverageScore());
TestScores testScores = (TestScores) in.readObject();
System.out.println(testScores.getAverageScore());
outputStream.writeDouble(testScores.getAverageScore());
// 关闭流
out.close();
in.close();
outputStream.close();
}
}
LOL源代码乐芙兰怎么获得介绍_LOL源代码乐芙兰怎么获得是什么
在刚刚结束的LOLS8总决赛中,iG战队以强劲的机s机实力夺得了冠军,为庆祝这一辉煌时刻,源码源码官方特别为中国大陆服务器的多少玩家们准备了一款限定皮肤——“巅峰的荣耀·iG 源代码 乐芙兰”。对于如何获取这款皮肤,星手星手许多玩家感到困惑,机s机arraylist的addALL源码下面将详细介绍获取方法。源码源码
这款冠军纪念皮肤的多少独特性在于,它仅限于中国大陆服务器LPL的星手星手玩家才能获得。如果你想拥有它,机s机你需要采取特定的源码源码行动。活动期间,多少即从月日至月日,星手星手只要你能在游戏中取得一场胜利(自定义模式除外),机s机就能免费获得这款皮肤。源码源码值得注意的是,活动结束后,照妖镜源码是啥这款纪念皮肤将永久不再进行售卖或抽奖,机会难得,不容错过。
以上就是关于“LOL源代码乐芙兰怎么获得”的详细说明,希望对你的游戏历程有所帮助。我们会持续关注并提供更多游戏资讯,确保你随时掌握最新的游戏动态。祝你在游戏世界中取得更多胜利,redis6 源码体验这一特别的冠军荣耀!
三星s8虹膜解锁晚上怎么办
三星s8虹膜解锁晚上怎么办?
个人感觉虹膜识别日常生活中作用不大
自用note9
个人使用一般情况下,白天,大多数情况手指头有汗,我解锁手机的时候都是按一下home键的位置然后对着屏幕看他就解锁了(那里有压感,类似于iPhone的3d touch那种),我是用的是混合解锁,脸部跟虹膜一起扫的运满满app源码那种,我都不知道他到底有没有认真的检查过我的虹膜,就是识别器闪一会就进入了,但是识别速度真不如国产众机,不过也不是慢到无法忍受那种,感觉解锁的时候有锁屏界面闪一下更有仪式感和安全感(我脑回路可能有问题)
晚上光线暗一些,我就直接指纹识别解锁了,很简单锁屏的时候按一下识别器直接进入
仔细思考了一下,s的编程猫源码基地屏幕指纹其实也不错,反正我也是要用虚拟home键点亮屏幕的,s把指纹跟home键结合了可以提升解锁速度,而且如果我用s,白天晚上就不用换着传感器解锁了,况且超声波指纹安全性也算是比较高的,毕竟国家机密或者公司源代码一般人是不会存到手机里的,所以没多大必要整一些安全度极高的识别方式
des算法源代码
des.h文件:
#ifndef CRYPTOPP_DES_H
#define CRYPTOPP_DES_H
#include "cryptlib.h"
#include "misc.h"
NAMESPACE_BEGIN(CryptoPP)
class DES : public BlockTransformation
{
public:
DES(const byte *userKey, CipherDir);
void ProcessBlock(const byte *inBlock, byte * outBlock) const;
void ProcessBlock(byte * inoutBlock) const
{ DES::ProcessBlock(inoutBlock, inoutBlock);}
enum { KEYLENGTH=8, BLOCKSIZE=8};
unsigned int BlockSize() const { return BLOCKSIZE;}
protected:
static const word Spbox[8][];
SecBlock<word> k;
};
class DESEncryption : public DES
{
public:
DESEncryption(const byte * userKey)
: DES (userKey, ENCRYPTION) { }
};
class DESDecryption : public DES
{
public:
DESDecryption(const byte * userKey)
: DES (userKey, DECRYPTION) { }
};
class DES_EDE_Encryption : public BlockTransformation
{
public:
DES_EDE_Encryption(const byte * userKey)
: e(userKey, ENCRYPTION), d(userKey + DES::KEYLENGTH, DECRYPTION) { }
void ProcessBlock(const byte *inBlock, byte * outBlock) const;
void ProcessBlock(byte * inoutBlock) const;
enum { KEYLENGTH=, BLOCKSIZE=8};
unsigned int BlockSize() const { return BLOCKSIZE;}
private:
DES e, d;
};
class DES_EDE_Decryption : public BlockTransformation
{
public:
DES_EDE_Decryption(const byte * userKey)
: d(userKey, DECRYPTION), e(userKey + DES::KEYLENGTH, ENCRYPTION) { }
void ProcessBlock(const byte *inBlock, byte * outBlock) const;
void ProcessBlock(byte * inoutBlock) const;
enum { KEYLENGTH=, BLOCKSIZE=8};
unsigned int BlockSize() const { return BLOCKSIZE;}
private:
DES d, e;
};
class TripleDES_Encryption : public BlockTransformation
{
public:
TripleDES_Encryption(const byte * userKey)
: e1(userKey, ENCRYPTION), d(userKey + DES::KEYLENGTH, DECRYPTION),
e2(userKey + 2*DES::KEYLENGTH, ENCRYPTION) { }
void ProcessBlock(const byte *inBlock, byte * outBlock) const;
void ProcessBlock(byte * inoutBlock) const;
enum { KEYLENGTH=, BLOCKSIZE=8};
unsigned int BlockSize() const { return BLOCKSIZE;}
private:
DES e1, d, e2;
};
class TripleDES_Decryption : public BlockTransformation
{
public:
TripleDES_Decryption(const byte * userKey)
: d1(userKey + 2*DES::KEYLENGTH, DECRYPTION), e(userKey + DES::KEYLENGTH, ENCRYPTION),
d2(userKey, DECRYPTION) { }
void ProcessBlock(const byte *inBlock, byte * outBlock) const;
void ProcessBlock(byte * inoutBlock) const;
enum { KEYLENGTH=, BLOCKSIZE=8};
unsigned int BlockSize() const { return BLOCKSIZE;}
private:
DES d1, e, d2;
};
NAMESPACE_END
#endif
des.cpp文件:
// des.cpp - modified by Wei Dai from:
/*
* This is a major rewrite of my old public domain DES code written
* circa , which in turn borrowed heavily from Jim Gillogly's
* public domain code. I pretty much kept my key scheduling code, but
* the actual encrypt/decrypt routines are taken from from Richard
* Outerbridge's DES code as printed in Schneier's "Applied Cryptography."
*
* This code is in the public domain. I would appreciate bug reports and
* enhancements.
*
* Phil Karn KA9Q, karn@unix.ka9q.ampr.org, August .
*/
#include "pch.h"
#include "misc.h"
#include "des.h"
NAMESPACE_BEGIN(CryptoPP)
/* Tables defined in the Data Encryption Standard documents
* Three of these tables, the initial permutation, the final
* permutation and the expansion operator, are regular enough that
* for speed, we hard-code them. They're here for reference only.
* Also, the S and P boxes are used by a separate program, gensp.c,
* to build the combined SP box, Spbox[]. They're also here just
* for reference.
*/
#ifdef notdef
/* initial permutation IP */
static byte ip[] = {
, , , , , , , 2,
, , , , , , , 4,
, , , , , , , 6,
, , , , , , , 8,
, , , , , , 9, 1,
, , , , , , , 3,
, , , , , , , 5,
, , , , , , , 7
};
/* final permutation IP^-1 */
static byte fp[] = {
, 8, , , , , , ,
, 7, , , , , , ,
, 6, , , , , , ,
, 5, , , , , , ,
, 4, , , , , , ,
, 3, , , , , , ,
, 2, , , , , , ,
, 1, , 9, , , ,
};
/* expansion operation matrix */
static byte ei[] = {
, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
8, 9, , , , ,
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , 1
};
/* The (in)famous S-boxes */
static byte sbox[8][] = {
/* S1 */
, 4, , 1, 2, , , 8, 3, , 6, , 5, 9, 0, 7,
0, , 7, 4, , 2, , 1, , 6, , , 9, 5, 3, 8,
4, 1, , 8, , 6, 2, , , , 9, 7, 3, , 5, 0,
, , 8, 2, 4, 9, 1, 7, 5, , 3, , , 0, 6, ,
/* S2 */
, 1, 8, , 6, , 3, 4, 9, 7, 2, , , 0, 5, ,
3, , 4, 7, , 2, 8, , , 0, 1, , 6, 9, , 5,
0, , 7, , , 4, , 1, 5, 8, , 6, 9, 3, 2, ,
, 8, , 1, 3, , 4, 2, , 6, 7, , 0, 5, , 9,
/* S3 */
, 0, 9, , 6, 3, , 5, 1, , , 7, , 4, 2, 8,
, 7, 0, 9, 3, 4, 6, , 2, 8, 5, , , , , 1,
, 6, 4, 9, 8, , 3, 0, , 1, 2, , 5, , , 7,
1, , , 0, 6, 9, 8, 7, 4, , , 3, , 5, 2, ,
/* S4 */
7, , , 3, 0, 6, 9, , 1, 2, 8, 5, , , 4, ,
, 8, , 5, 6, , 0, 3, 4, 7, 2, , 1, , , 9,
, 6, 9, 0, , , 7, , , 1, 3, , 5, 2, 8, 4,
3, , 0, 6, , 1, , 8, 9, 4, 5, , , 7, 2, ,
/* S5 */
2, , 4, 1, 7, , , 6, 8, 5, 3, , , 0, , 9,
, , 2, , 4, 7, , 1, 5, 0, , , 3, 9, 8, 6,
4, 2, 1, , , , 7, 8, , 9, , 5, 6, 3, 0, ,
, 8, , 7, 1, , 2, , 6, , 0, 9, , 4, 5, 3,
/* S6 */
, 1, , , 9, 2, 6, 8, 0, , 3, 4, , 7, 5, ,
, , 4, 2, 7, , 9, 5, 6, 1, , , 0, , 3, 8,
9, , , 5, 2, 8, , 3, 7, 0, 4, , 1, , , 6,
4, 3, 2, , 9, 5, , , , , 1, 7, 6, 0, 8, ,
/* S7 */
4, , 2, , , 0, 8, , 3, , 9, 7, 5, , 6, 1,
, 0, , 7, 4, 9, 1, , , 3, 5, , 2, , 8, 6,
1, 4, , , , 3, 7, , , , 6, 8, 0, 5, 9, 2,
6, , , 8, 1, 4, , 7, 9, 5, 0, , , 2, 3, ,
/* S8 */
, 2, 8, 4, 6, , , 1, , 9, 3, , 5, 0, , 7,
1, , , 8, , 3, 7, 4, , 5, 6, , 0, , 9, 2,
7, , 4, 1, 9, , , 2, 0, 6, , , , 3, 5, 8,
2, 1, , 7, 4, , 8, , , , 9, 0, 3, 5, 6,
};
/* -bit permutation function P used on the output of the S-boxes */
static byte pi[] = {
, 7, , ,
, , , ,
1, , , ,
5, , , ,
2, 8, , ,
, , 3, 9,
, , , 6,
, , 4,
};
#endif
/* permuted choice table (key) */
static const byte pc1[] = {
, , , , , , 9,
1, , , , , , ,
, 2, , , , , ,
, , 3, , , , ,
, , , , , , ,
7, , , , , , ,
, 6, , , , , ,
, , 5, , , , 4
};
/* number left rotations of pc1 */
static const byte totrot[] = {
1,2,4,6,8,,,,,,,,,,,
};
/* permuted choice key (table) */
static const byte pc2[] = {
, , , , 1, 5,
3, , , 6, , ,
, , , 4, , 8,
, 7, , , , 2,
, , , , , ,
, , , , , ,
, , , , , ,
, , , , ,
};
/* End of DES-defined tables */
/* bit 0 is left-most in byte */
static const int bytebit[] = {
,,,,,,,
};
/* Set key (initialize key schedule array) */
DES::DES(const byte *key, CipherDir dir)
: k()
{
SecByteBlock buffer(++8);
byte *const pc1m=buffer; /* place to modify pc1 into */
byte *const pcr=pc1m+; /* place to rotate pc1 into */
byte *const ks=pcr+;
register int i,j,l;
int m;
for (j=0; j<; j++) { /* convert pc1 to bits of key */
l=pc1[j]-1; /* integer bit location */
m = l & ; /* find bit */
pc1m[j]=(key[l>>3] & /* find which key byte l is in */
bytebit[m]) /* and which bit of that byte */
1 : 0; /* and store 1-bit result */}
for (i=0; i<; i++) { /* key chunk for each iteration */
memset(ks,0,8); /* Clear key schedule */
for (j=0; j<; j++) /* rotate pc1 the right amount */
pcr[j] = pc1m[(l=j+totrot[i])<(j<? : ) ? l: l-];
/* rotate left and right halves independently */
for (j=0; j<; j++){ /* select bits individually */
/* check bit that goes to ks[j] */
if (pcr[pc2[j]-1]){
/* mask it in if it's there */
l= j % 6;
ks[j/6] |= bytebit[l] >> 2;
}
}
/* Now convert to odd/even interleaved form for use in F */
k[2*i] = ((word)ks[0] << )
| ((word)ks[2] << )
| ((word)ks[4] << 8)
| ((word)ks[6]);
k[2*i+1] = ((word)ks[1] << )
| ((word)ks[3] << )
| ((word)ks[5] << 8)
| ((word)ks[7]);
}
if (dir==DECRYPTION) // reverse key schedule order
for (i=0; i<; i+=2)
{
std::swap(k[i], k[-2-i]);
std::swap(k[i+1], k[-1-i]);
}
}
/* End of C code common to both versions */
/* C code only in portable version */
// Richard Outerbridge's initial permutation algorithm
/*
inline void IPERM(word &left, word &right)
{
word work;
work = ((left >> 4) ^ right) & 0x0f0f0f0f;
right ^= work;
left ^= work << 4;
work = ((left >> ) ^ right) & 0xffff;
right ^= work;
left ^= work << ;
work = ((right >> 2) ^ left) & 0x;
left ^= work;
right ^= (work << 2);
work = ((right >> 8) ^ left) & 0xffff;
left ^= work;
right ^= (work << 8);
right = rotl(right, 1);
work = (left ^ right) & 0xaaaaaaaa;
left ^= work;
right ^= work;
left = rotl(left, 1);
}
inline void FPERM(word &left, word &right)
{
word work;
right = rotr(right, 1);
work = (left ^ right) & 0xaaaaaaaa;
left ^= work;
right ^= work;
left = rotr(left, 1);
work = ((left >> 8) ^ right) & 0xffff;
right ^= work;
left ^= work << 8;
work = ((left >> 2) ^ right) & 0x;
right ^= work;
left ^= work << 2;
work = ((right >> ) ^ left) & 0xffff;
left ^= work;
right ^= work << ;
work = ((right >> 4) ^ left) & 0x0f0f0f0f;
left ^= work;
right ^= work << 4;
}
*/
// Wei Dai's modification to Richard Outerbridge's initial permutation
// algorithm, this one is faster if you have access to rotate instructions
// (like in MSVC)
inline void IPERM(word &left, word &right)
{
word work;
right = rotl(right, 4U);
work = (left ^ right) & 0xf0f0f0f0;
left ^= work;
right = rotr(right^work, U);
work = (left ^ right) & 0xffff;
left ^= work;
right = rotr(right^work, U);
work = (left ^ right) & 0x;
left ^= work;
right = rotr(right^work, 6U);
work = (left ^ right) & 0xffff;
left ^= work;
right = rotl(right^work, 9U);
work = (left ^ right) & 0xaaaaaaaa;
left = rotl(left^work, 1U);
right ^= work;
}
inline void FPERM(word &left, word &right)
{
word work;
right = rotr(right, 1U);
work = (left ^ right) & 0xaaaaaaaa;
right ^= work;
left = rotr(left^work, 9U);
work = (left ^ right) & 0xffff;
right ^= work;
left = rotl(left^work, 6U);
work = (left ^ right) & 0x;
right ^= work;
left = rotl(left^work, U);
work = (left ^ right) & 0xffff;
right ^= work;
left = rotl(left^work, U);
work = (left ^ right) & 0xf0f0f0f0;
right ^= work;
left = rotr(left^work, 4U);
}
// Encrypt or decrypt a block of data in ECB mode
void DES::ProcessBlock(const byte *inBlock, byte * outBlock) const
{
word l,r,work;
#ifdef IS_LITTLE_ENDIAN
l = byteReverse(*(word *)inBlock);
r = byteReverse(*(word *)(inBlock+4));
#else
l = *(word *)inBlock;
r = *(word *)(inBlock+4);
#endif
IPERM(l,r);
const word *kptr=k;
for (unsigned i=0; i<8; i++)
{
work = rotr(r, 4U) ^ kptr[4*i+0];
l ^= Spbox[6][(work) & 0x3f]
^ Spbox[4][(work >> 8) & 0x3f]
^ Spbox[2][(work >> ) & 0x3f]
^ Spbox[0][(work >> ) & 0x3f];
work = r ^ kptr[4*i+1];
l ^= Spbox[7][(work) & 0x3f]
^ Spbox[5][(work >> 8) & 0x3f]
^ Spbox[3][(work >> ) & 0x3f]
^ Spbox[1][(work >> ) & 0x3f];
work = rotr(l, 4U) ^ kptr[4*i+2];
r ^= Spbox[6][(work) & 0x3f]
^ Spbox[4][(work >> 8) & 0x3f]
^ Spbox[2][(work >> ) & 0x3f]
^ Spbox[0][(work >> ) & 0x3f];
work = l ^ kptr[4*i+3];
r ^= Spbox[7][(work) & 0x3f]
^ Spbox[5][(work >> 8) & 0x3f]
^ Spbox[3][(work >> ) & 0x3f]
^ Spbox[1][(work >> ) & 0x3f];
}
FPERM(l,r);
#ifdef IS_LITTLE_ENDIAN
*(word *)outBlock = byteReverse(r);
*(word *)(outBlock+4) = byteReverse(l);
#else
*(word *)outBlock = r;
*(word *)(outBlock+4) = l;
#endif
}
void DES_EDE_Encryption::ProcessBlock(byte *inoutBlock) const
{
e.ProcessBlock(inoutBlock);
d.ProcessBlock(inoutBlock);
e.ProcessBlock(inoutBlock);
}
void DES_EDE_Encryption::ProcessBlock(const byte *inBlock, byte *outBlock) const
{
e.ProcessBlock(inBlock, outBlock);
d.ProcessBlock(outBlock);
e.ProcessBlock(outBlock);
}
void DES_EDE_Decryption::ProcessBlock(byte *inoutBlock) const
{
d.ProcessBlock(inoutBlock);
e.ProcessBlock(inoutBlock);
d.ProcessBlock(inoutBlock);
}
void DES_EDE_Decryption::ProcessBlock(const byte *inBlock, byte *outBlock) const
{
d.ProcessBlock(inBlock, outBlock);
e.ProcessBlock(outBlock);
d.ProcessBlock(outBlock);
}
void TripleDES_Encryption::ProcessBlock(byte *inoutBlock) const
{
e1.ProcessBlock(inoutBlock);
d.ProcessBlock(inoutBlock);
e2.ProcessBlock(inoutBlock);
}
void TripleDES_Encryption::ProcessBlock(const byte *inBlock, byte *outBlock) const
{
e1.ProcessBlock(inBlock, outBlock);
d.ProcessBlock(outBlock);
e2.ProcessBlock(outBlock);
}
void TripleDES_Decryption::ProcessBlock(byte *inoutBlock) const
{
d1.ProcessBlock(inoutBlock);
e.ProcessBlock(inoutBlock);
d2.ProcessBlock(inoutBlock);
}
void TripleDES_Decryption::ProcessBlock(const byte *inBlock, byte *outBlock) const
{
d1.ProcessBlock(inBlock, outBlock);
e.ProcessBlock(outBlock);
d2.ProcessBlock(outBlock);
}
NAMESPACE_END
哪些手机是安卓7.1系统
大部分安卓手机品牌都是7.1系统。Android 是运行于 Linux kernel之上,但并不是GNU/Linux。因为在一般GNU/Linux 里支持的功能,Android 大都没有支持,包括Cairo、X、Alsa、FFmpeg、GTK、Pango及Glibc等都被移除掉了。
Android又以bionic 取代Glibc、以Skia 取代Cairo、再以opencore 取代FFmpeg 等等。Android 为了达到商业应用,必须移除被GNU GPL授权证所约束的部份,例如Android将驱动程序移到 userspace,使得Linux driver 与 Linux kernel彻底分开。
bionic/libc/kernel/ 并非标准的kernel header files。Android 的 kernel header 是利用工具由 Linux kernel header 所产生的,这样做是为了保留常数、数据结构与宏。
Android 的 Linux kernel控制包括安全(Security),存储器管理(Memory Management),程序管理(Process Management),网络堆栈(Network Stack),驱动程序模型(Driver Model)等。下载Android源码之前,先要安装其构建工具 Repo来初始化源码。Repo 是 Android 用来辅助Git工作的一个工具。