iOS file upload post data

//Contact: Shihu QQ: 1224614774 nickname: humming 1. File Download There are two ways to get the resource file size 1, HTTP HEAD Method NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:0 timeoutInterval:kTimeout];   request.HTTPMethod = @"HEAD";   [NSURLConnection sendAsynch ...

Posted on Sun, 16 Jun 2019 13:39:58 -0400 by healthnut

Mandatory offline with BroadcastReceiver

Ideas: First enter the login interface, enter the account and password, then log on to the main interface, in the main interface, send a forced offline broadcast by clicking the button, and then the broadcaster re-enter the login interface after receiving the broadcast. New project Broadcast03.Forced offline requires that all activities be cl ...

Posted on Sun, 16 Jun 2019 13:08:09 -0400 by Ryan Sanders

Summary of years of iOS development experience (2)

1. Setting UILabel row spacing NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] initWithString:label.text]; NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; [style setLineSpacing:20]; [attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, label.text ...

Posted on Fri, 14 Jun 2019 20:14:00 -0400 by jhuaraya

Kotlin - Builder of Type Safety

The concept of builder is quite popular in Groovy community. Builders allow semi-declarative definition of data. Builders are useful for generating XML, layouting out UI components, and describing 3D scenarios. In many cases, Kotlin allows builders to do type checking, which is more effective than dynamic type checking in Groovy. For the res ...

Posted on Fri, 14 Jun 2019 18:45:49 -0400 by tacojohn

Day 19 numpy module\pandas module matplotlib module

Catalog numpy module\pandas module matplotlib module numpy module pandas module numpy module\pandas module matplotlib module numpy module The numpy library serves two purposes: Unlike list lists, it provides array operations, array operations, statistical distribution, and simple mathematical mo ...

Posted on Thu, 13 Jun 2019 13:54:00 -0400 by artin

Android Learning: The Use of Fragment s

1. Simple usage of debris (realizing adding two debris to an activity and dividing the active space between the two debris) 1. Create a new FragmentTest project; Create a new left_fragment.xml fragment layout with the following code: (Place only one button and display horizontally in the middle) 1 <?xml version="1.0" encoding="utf-8"?> ...

Posted on Wed, 12 Jun 2019 20:13:03 -0400 by themightydude

10 minutes to teach you how to use Aliyun API

I also officially contacted Aliyun 13 years ago, and started using it in 2014. There may be some automation needs at that time, but I didn't find "python SDK", so I wrote a simple general SDK myself. Recently, more and more friends have been found using Aliyun. Today, I want to share them with you. Here is the example of load balancin ...

Posted on Wed, 12 Jun 2019 20:08:09 -0400 by micknc

Lecture 06 Common fields of mysql

Numerical model int float decimal Type int - (31 power of 2) ~ (31 power of 2) - 1) If int is unsigned, then the range is (0 - 4294967295) Character string: char varchar text Date type date == To create a table, first create a library== 3.3.1. Create and select a database If the administrator creates a database for you when setting ...

Posted on Wed, 12 Jun 2019 19:02:16 -0400 by tracy

RecyclerView Series (2): Add a separator for RecyclerView

Just yesterday at noon, I published my first technical document in a short book: RecyclerView Series: (1) Add Header and Footer to RecyclerView And fortunately, I was able to get so much support that I couldn't wait to write a second article.Today I'll talk about adding a dividing line to RecyclerView. Understanding ChildView in ListVie ...

Posted on Wed, 12 Jun 2019 14:39:44 -0400 by dumdumsareyum

Using anko to discard XML

anko anko It's a tool that combines kotlin language to discard layout xml. With this tool, you can write layout XML code without writing layout XML code. Take a chestnut If we need to implement a function, click the button toast to pop up the characters entered in the input box (as shown below) Ordinary way to achieve such a function, ...

Posted on Wed, 12 Jun 2019 13:33:57 -0400 by RW