<activty android:windowSoftInputMode="stateHidden">
</activity>
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
| 1、编写一个程序判断当前系统的字节顺序。 | |
| 2、请编写一个程序输出以下变量的字节表示(由低位到高位),需要给出16进制表示的输出结果。 | |
| float a = 2.3; | |
| long b = 1; | |
| double c = 1.0; | |
| struct st{ | |
| int num; | |
| char name[2]; | |
| } s; | |
| 3、请结合本课程介绍内容阐述SYN flooding攻击的原理,并提出抵御的方法? |
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
| 请比较select模型与WSAEventSelect模型两者之间的差异? | |
| Deadline: Oct 27, 2014 |
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.ryannnnnnn.test_swipe_refresh_layout; | |
| import android.app.Activity; | |
| import android.graphics.Color; | |
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.support.v4.widget.SwipeRefreshLayout; | |
| public class MyActivity extends Activity implements SwipeRefreshLayout.OnRefreshListener { |
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
| @interface SomeClass | |
| typedef void (^AnimationBlock)(BOOL); | |
| @end | |
| // animationBlocks, where store all animation blocks | |
| NSMutableArray *animationBlocks = [NSMutableArray new]; | |
| AnimationBlock (^getNextAnimation)() = ^{ | |
| AnimationBlock block = animationBlocks.count ? [animationBlocks objectAtIndex:0] : Nil; | |
| if (block) { | |
| [animationBlocks removeObjectAtIndex: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
| @implementation UIImage (ImageCrop) | |
| + (UIImage *)centerOvalCropImage:(UIImage *)image | |
| { | |
| CGFloat width = image.size.width; | |
| CGFloat height = image.size.height; | |
| CGRect targetRect = CGRectMake(width / 4.0, height / 4.0, width / 2.0, height / 2.0); | |
| UIGraphicsBeginImageContextWithOptions(CGSizeMake(width, height), NO, 0); | |
| CGContextRef context = UIGraphicsGetCurrentContext(); |
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
| - (void)viewWillAppear:(BOOL)animated { | |
| [super viewWillAppear:animated]; | |
| // Add observers for keyboard messages | |
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardWillShow:) | |
| name:UIKeyboardWillShowNotification | |
| object:nil]; | |
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardWillHide:) |
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
| #import <UIKit/UIKit.h> | |
| @interface RXWaveLoadingView : UIView | |
| @property (nonatomic, assign) NSInteger numberOfWaves; | |
| @property (nonatomic, assign) CGSize waveSize; | |
| @property (nonatomic, assign) CGFloat waveSpacing; | |
| @property (nonatomic, assign) CGFloat waveDuration; | |
| @property (nonatomic, strong) UIColor *waveColor; |
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
| # -*- coding: UTF-8 -*- | |
| import logging | |
| from nameko.constants import AMQP_URI_CONFIG_KEY | |
| from nameko.standalone.rpc import ServiceRpcProxy | |
| from tornado.options import parse_command_line | |
| def main(): |
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
| function [J, grad] = costFunctionReg(theta, X, y, lambda) | |
| m = length(y); % number of training examples | |
| h = sigmoid(X * theta); | |
| J = mean(-y .* log(h) - (1 - y) .* log(1 - h)) ... | |
| + lambda / 2.0 / m * (sum(theta .^ 2) - theta(1) ^ 2); | |
| grad = X' * (h - y) / m + lambda / m * theta; | |
| grad(1) -= lambda / m * theta(1); |
OlderNewer