| Email td>
| 1073064953 @qq.com has ️ td> tr> tbody> table>
?disclaimer
The software is for learning and communication only, please do not use it for any commercial purposes! Thank you all!
?introduce
This project is a video download for Bilibili(B station)
Project description: download bilibili_video_download.py from the video crawler file under the AV number of station B or the video link address
?Runtime environment
Version: Python3
?Install dependency libraries
pip3 install -r requirements.txt
?Run a screenshot
Run download
download complete
?conclusion
Finally, if you think this project is good or helpful to you, give a Star, which is also a kind of encouragement for my study!
Ha ha ha, thank you all! Lead yo ~ * *??
postman restricted header use postman interceptor
There’s a problem with postman setting headers
It is recommended to use Chrome APP directly, which is simple and convenient.
There’s a problem with postman setting headers
Start the interceptor to
Reproduced indicate the source: http://write.blog.csdn.net/postlist
Method one:
findpeaks function
PKS = findpeaks(data)
[PKS,locs] = findpeaks(data) — the number of peaks corresponding to PKS and locs
[…] = findpeaks(data,’minpeakheight’, MPH)– MPH sets the minimum peakheight
[…] = findpeaks(data,’minpeakdistance’, MPD)– MPD sets the minimum interval between two peaks
[…] = findpeaks(data,’threshold’,th)
[…] = findpeaks(data,’npeaks’,np)
[…] = findpeaks(data,’sortstr’, STR)
the command findpeaks is used to findpeaks of a vector that is greater than the value of two adjacent elements. for example: a=[1 3 2 5 6 8 5 3]; findpeaks(a), returns 3 8 [v,l]= findbb2 (a), returns v=3 8 l=2 6 if a is a matrix, the values and locations of the peaks are listed in column search order.
For more information, see Help FindPeaks
Disadvantages:
You can only find the peak, you can’t find the trough.
Reproduced indicate the source: http://write.blog.csdn.net/postlist
Method 2:
IndMin=find(diff(sign(diff(data)))> 0) + 1; IndMax=find(diff(sign(diff(data)))< 0) + 1;
where,
IndMin, data(IndMin) corresponds to the trough data IndMax,data(IndMax) corresponds to the crest data
>> a=[1 3 2 5 6 8 5 3]
a =
1 3 2 5 6 8 5 3
>> IndMax=find(diff(sign(diff(a)))<0)+1
IndMax =
2 6
>> a(IndMax)
ans =
3 8
>> IndMin=find(diff(sign(diff(a)))>0)+1
IndMin =
3
>> a(IndMin)
ans =
2
Reprint with reference to:
http://write.blog.csdn.net/postlist
http://www.mkyong.com/hibernate/how-to-call-store-procedure-in-hibernate/
In this tutorial, you will learn how to call a store procedure in Hibernate.
MySQL store procedure
Here’s a MySQL store procedure, which accept a stock code parameter and return the related stock data.
SQL
DELIMITER $$
CREATE PROCEDURE `GetStocks`(int_stockcode varchar(20))
BEGIN
SELECT * FROM stock where stock_code = int_stockcode;
END $$
DELIMITER ;
In MySQL, you can simple call it with a call keyword :
SQL
CALL GetStocks('7277');
Hibernate call store procedure
In Hibernate, there are three approaches to call a database store procedure.
1. Native SQL – createSQLQuery
You can use createSQLQuery() to call a store procedure directly.
Java
Query query = session.createSQLQuery(
"CALL GetStocks(:stockCode)")
.addEntity(Stock.class)
.setParameter("stockCode", "7277");
List result = query.list();
for(int i=0; i<result.size(); i++){
Stock stock = (Stock)result.get(i);
System.out.println(stock.getStockCode());
}
2. NamedNativeQuery in annotation
Declare your store procedure inside the @NamedNativeQueries annotation.
Java
//Stock.java
...
@NamedNativeQueries({
@NamedNativeQuery(
name = "callStockStoreProcedure",
query = "CALL GetStocks(:stockCode)",
resultClass = Stock.class
)
})
@Entity
@Table(name = "stock")
public class Stock implements java.io.Serializable {
...
Call it with getNamedQuery().
Java
Query query = session.getNamedQuery("callStockStoreProcedure")
.setParameter("stockCode", "7277");
List result = query.list();
for(int i=0; i<result.size(); i++){
Stock stock = (Stock)result.get(i);
System.out.println(stock.getStockCode());
}
3. sql-query in XML mapping file
Declare your store procedure inside the “sql-query” tag.
Markup
<!-- Stock.hbm.xml -->
...
<hibernate-mapping>
<class name="com.mkyong.common.Stock" table="stock" ...>
<id name="stockId" type="java.lang.Integer">
<column name="STOCK_ID" />
<generator class="identity" />
</id>
<property name="stockCode" type="string">
<column name="STOCK_CODE" length="10" not-null="true" unique="true" />
</property>
...
</class>
<sql-query name="callStockStoreProcedure">
<return alias="stock" class="com.mkyong.common.Stock"/>
<![CDATA[CALL GetStocks(:stockCode)]]>
</sql-query>
</hibernate-mapping>
Call it with getNamedQuery().
Java
Query query = session.getNamedQuery("callStockStoreProcedure")
.setParameter("stockCode", "7277");
List result = query.list();
for(int i=0; i<result.size(); i++){
Stock stock = (Stock)result.get(i);
System.out.println(stock.getStockCode());
}
Conclusion
The above three approaches are doing the same thing, call a store procedure in database. There are not much big different between the three approaches, which method you choose is depend on your personal prefer.
【 Problem Description 】
Reverse digits of an integer.
Example1: x = 123, return 321 Example2: x = -123, return -321
click to show spoilers.
[thinking]
This problem seems simple, but there are more pits.
Integer inversion is a simple problem, but overflow needs to be dealt with.
Save the result as a long, returning 0 if it is greater than the integer maximum or less than the negative minimum
[code]
public class Solution {
public int reverse(int x) {
if (x == 0) {
return 0;
}
int sign = 1;
if (x < 0) {
sign = -1;
}
long result = 0;
long t = Math.abs((long) x);
while (t != 0) {
result = result * 10 + t % 10;
;
t /= 10;
}
if ((sign == 1 && result > Integer.MAX_VALUE)
|| (sign == -1 && sign * result < Integer.MIN_VALUE)) {
return 0;
}
return sign * (int) result;
}
}
In Androidmanifest.xml, < Add the following statement to application
android:usesCleartextTraffic="true"
A detailed description of the BLOB download problem
I want to use the SRC url blob:https%3A//www.youtube.com/23aea5c8-9ae2-40dc-9417-e675ea99b386 code> download video, but I don't know how to do it.
Is there a general way to download this kind of video?
Recommended solutions
I found a way to download a video using the blob url in Vimeo (I didn't know how until I read this article). I'm using Google Chrome. Here are the steps:
open More Tools> Developer Tools check if there is something like this in the video tag:
<video preload="" src="blob:https://player.vimeo.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"></video>
Copy the iframe SRC (if any) value of the label, such as http://player.vimeo.com/video/XYZ code>, if you find that it can be replicated, jump straight to point 7, otherwise in accordance with the step 4 and 6 to continue operating. Now find the string in the page https://skyfire.vimeocdn.com/... /master.json?Base64_init =1(using the Developer View), it should be found in the javascript function, like this:
(function(e,a){var t={"cdn_url":"https://f.vimeocdn.com","view":1,"request":{"files":{"dash":{"origin":"gcs","url":"https://48skyfiregce-a.akamaihd.net/.../master.json?base64_init=1","cdn":"
Force a.akamaihd.net/... copy the link from the url field above to a new Chrome TAB, such as https://48skyfiregce-a.akamaihd.net/... /master.json?Base64_init =1, then open it with a browser, it will open a json file like this:
{
"clip_id": XYZ,
"base_url": "../",
"video": [
{ ... ... ...
Use id now XYZ code> combination structure a URL, as shown in the following: https://player.vimeo.com/video/XYZ code> are replaced with the final URL video tag within the blob:https://player.vimeo.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX code> (created in the previous step # 6). Now you can see that, magically, the SRC field inside the video tag has changed (if not, try Step 7 multiple times)...
<video preload="none" src="https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/XX/XXX/X/XXXXXXXX/XXXXXXXXX.mp4?token=abcdefg"></video>
Finally, using the new link to download it directly, like this: https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/XX/XXX/X/XXXXXXXX/XXXXXXXXX.mp4?token=abcdefg
Other solutions
The answer is for the Twitter url -
right click on the video, then click check element -
You'll find code like this
<div id="playerContainer" class="player-container full-screen-enabled" data-config="{"is_360":false,"duration":28617,"scribe_widget_origin":true,"heartbeatEnabled":true,"video_url":"https:\/\/video.twimg.com\/ext_tw_video\/844504104512749568\/pu\/pl\/e91Du5N2TZ09ZaW_.m3u8","disable_embed":"0","videoInfo":{"title":null,"description":null,"publisher":{"screen_name":"MountainButorac","name":"Mountain Butorac","profile_image_url":"https:\/\/pbs.twimg.com\/profile_images\/808318456701521920\/vBvlAASx_normal.jpg"}},"cardUrl":"https:\/\/t.co\/SdSorop3uN","content_type":"application\/x-mpegURL","owner_id":"14120461","looping_enabled":true,"show_cookie_override_en":true,"visit_cta_url":null,"scribe_playlist_url":"https:\/\/twitter.com\/MountainButorac\/status\/844505243538931714\/video\/1","source_type":"consumer","image_src":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","heartbeatIntervalInMs":5000.0,"use_tfw_live_heartbeat_event_category":true,"video_loading_timeout":45000.0,"status":{"created_at":"Wed Mar 22 11:05:14 +0000 2017","id":844505243538931714,"id_str":"844505243538931714","text":"Took my Goddaughter to meet the pope. She stole his hat! https:\/\/t.co\/SdSorop3uN","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":844504104512749568,"id_str":"844504104512749568","indices":[57,80],"media_url":"http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","media_url_https":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","url":"https:\/\/t.co\/SdSorop3uN","display_url":"pic.twitter.com\/SdSorop3uN","expanded_url":"https:\/\/twitter.com\/MountainButorac\/status\/844505243538931714\/video\/1","type":"photo","sizes":{"small":{"w":340,"h":604,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":576,"h":1024,"resize":"fit"},"medium":{"w":576,"h":1024,"resize":"fit"}}}]},"source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"show_cookie_override_all":true,"video_session_enabled":false,"media_id":"844504104512749568","view_counts":null,"statusTimestamp":{"local":"4:05 AM - 22 Mar 2017"},"media_type":1,"user":{"screen_name":"MountainButorac","name":"Mountain Butorac","profile_image_url":"https:\/\/pbs.twimg.com\/profile_images\/808318456701521920\/vBvlAASx_bigger.jpg"},"watch_now_cta_url":null,"tweet_id":"844505243538931714"}" data-source-type="consumer">
Copy the above code and paste it into Notepad++ (Notepad++), then replace all & with "; quot; , replace all and \/ with /. (use CTRL + H)
You'll get something like this
{
"is_360": false,
"duration": 28617,
"scribe_widget_origin": true,
"heartbeatEnabled": true,
"video_url": "https://video.twimg.com/ext_tw_video/844504104512749568/pu/pl/e91Du5N2TZ09ZaW_.m3u8",
"disable_embed": "0",
"videoInfo": {
"title": null,
"description": null,
"publisher": {
"screen_name": "MountainButorac",
"name": "Mountain Butorac",
"profile_image_url": "https://pbs.twimg.com/profile_images/808318456701521920/vBvlAASx_normal.jpg"
}
},
"cardUrl": "https://t.co/SdSorop3uN",
"content_type": "application/x-mpegURL",
"owner_id": "14120461",
"looping_enabled": true,
"show_cookie_override_en": true,
"visit_cta_url": null,
"scribe_playlist_url": "https://twitter.com/MountainButorac/status/844505243538931714/video/1",
"source_type": "consumer",
"image_src": "https://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"heartbeatIntervalInMs": 5000.0,
"use_tfw_live_heartbeat_event_category": true,
"video_loading_timeout": 45000.0,
"status": {
"created_at": "Wed Mar 22 11:05:14 +0000 2017",
"id": 844505243538931714,
"id_str": "844505243538931714",
"text": "Took my Goddaughter to meet the pope. She stole his hat! https://t.co/SdSorop3uN",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": [],
"media": [{
"id": 844504104512749568,
"id_str": "844504104512749568",
"indices": [57, 80],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"url": "https://t.co/SdSorop3uN",
"display_url": "pic.twitter.com/SdSorop3uN",
"expanded_url": "https://twitter.com/MountainButorac/status/844505243538931714/video/1",
"type": "photo",
"sizes": {
"small": {
"w": 340,
"h": 604,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 576,
"h": 1024,
"resize": "fit"
},
"medium": {
"w": 576,
"h": 1024,
"resize": "fit"
}
}
}]
},
"source": "\u003ca href=\"http://twitter.com/download/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c/a\u003e",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en"
},
"show_cookie_override_all": true,
"video_session_enabled": false,
"media_id": "844504104512749568",
"view_counts": null,
"statusTimestamp": {
"local": "4:05 AM - 22 Mar 2017"
},
"media_type": 1,
"user": {
"screen_name": "MountainButorac",
"name": "Mountain Butorac",
"profile_image_url": "https://pbs.twimg.com/profile_images/808318456701521920/vBvlAASx_bigger.jpg"
},
"watch_now_cta_url": null,
"tweet_id": "844505243538931714"
}
From the JSON format above, you can see the value of video_URL
https://video.twimg.com/ext_tw_video/844504104512749568/pu/pl/e91Du5N2TZ09ZaW_.m3u8
The problem here is that after August 1, 2016, Twitter stopped using.MP4 video and instead converted to a new HLS, adaptive streaming format with a.m3u8 file extension.
The.m3u8 files are basically just a wrapper around the text, and they are very small (300-500 bytes). When you open them with a text editor, they contain links to different video sizes
in Notepad++ (Notepad++) open the file m3u8, which will contain the code
EXTM3U EXT-X-INDEPENDENT-SEGMENTS EXT - X - STREAM - INF: PROGRAM - ID = 1, BANDWIDTH = 256000, RESOLUTION = 180 x320 CODECS = "mp4a. 40.2, avc1.42001 f"/ext_tw_video/844504104512749568/pu/pl/180 x320/_Z42SY5zwMlLdFYx m3u8 EXT - X - STREAM - INF: PROGRAM - ID = 1, BANDW IDTH = 832000, 360 x640 RESOLUTION =, CODECS = "mp4a. 40.2, avc1.42001 f"/ext_tw_video/844504104512749568/pu/pl/360 x640/- Phfjbbx2yinirLi. M3u8
copy the corresponding link from above according to the resolution you need. Repeat the same steps until you have a.ts file. Download the.TS file (video file).
In PYTHon3, it runs IDLE:
import nltk
nltk.download()
Tip: Certificate Verity Failed
Solutions:
Run in TERMINAL:
/ Applications/Python 3.6/Install Certificates.com mand
Then run NLTk.download () in IDLE.
For details, please see: https://stackoverflow.com/questions/41348621/ssl-error-downloading-nltk-data
When writing Unity Shader, there are times when you need to write shader that can support Unity’s built-in Lightmap or Light probe. If you’re writing with Surface, you don’t have to worry about that. Unity will compile automatically, but if you’re writing with Vert& Frag writes shader, these need to add their own code to call.
Unity has a built-in lightMap call
To make the unity built-in data and various macro definitions (such as LIGHTMAP_OFF in this article) work, you need to add #pragma:
pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
Prior to Unity5.0, there were two built-in parameters that needed to be declared. With Unity5.0, they were not required:
half4 unity_LightmapST; sampler2D unity_Lightmap;
Lightmap is a UV2 that USES the model, so next declare uV2 in the vertex input structure:
float2 texcoord1 : TEXCOORD1;
In another vertex structure, define the UV value used to receive UV2:
ifndef LIGHTMAP_OFF
half2 uvLM : TEXCOORD4;
endif
Assign uvLM to the vert function:
ifndef LIGHTMAP_OFF
o.uvLM = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw;
endif
Then the frag function samples the lightMap map and adds it to the main color:
ifndef LIGHTMAP_OFF
fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uvLM.xy)); col.rgb*=lm;
endif
In the above code, DecodeLightmap is used to decode unity’s built-in LightMap. This is because the LightMap baked by unity is a 32-bit HDR map. On the desktop side, the code of the LightMap is RGBM, while on the mobile side, in most cases, the code of the LightMap is double-ldr, so different coding methods should be provided for different platforms. DecodeLightmap is here, it can decode the light map for different platforms
VF version code 01:
Shader “PengLu/Unlit/TextureLM” { Properties { _MainTex (” Base (RGB) “, 2D) = “white” {} }
SubShader { Tags {” RenderType “=” Opaque “} LOD 100
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fog
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : SV_POSITION;
half2 texcoord : TEXCOORD0;
#ifndef LIGHTMAP_OFF
half2 uvLM : TEXCOORD1;
#endif
UNITY_FOG_COORDS(1)
};
sampler2D _MainTex;
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
#ifndef LIGHTMAP_OFF
o.uvLM = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw;
#endif
UNITY_TRANSFER_FOG(o,o.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.texcoord);
UNITY_APPLY_FOG(i.fogCoord, col);
UNITY_OPAQUE_ALPHA(col.a);
#ifndef LIGHTMAP_OFF
fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uvLM.xy));
col.rgb*=lm;
#endif
return col;
}
ENDCG
}
}
}
A call of Unity’s built-in Light Probes
In shader we call Light Probes using Half3 ShadeSH9(Half4 Normal) defined by Unity. Light Probes lighting USES a simulation called Sphere Harmonic, or SH, so in ShadeSH9 the normal in a world coordinate is needed to determine the Light on the surface of the object.
First we define a parameter SHLighting in the vertex output structure:
fixed3 SHLighting : COLOR;
Then assign it to a vertex function:
float3 worldNormal = mul((float3x3)_Object2World, v.normal); Get normal in world coordinates
o.SHLighting= ShadeSH9(float4(worldNormal,1)) ;
VF version code 02:
Shader “PengLu/Unlit/TextureLM” { Properties { _MainTex (” Base (RGB) “, 2D) = “white” {} _SHLightingScale(” LightProbe influence scale “,float) = 1 }
SubShader { Tags {” Queue “=” Geometry “” LightMode” = “ForwardBase” “RenderType” = “Opaque”} LOD 100
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct v2f {
float4 vertex : SV_POSITION;
half2 texcoord : TEXCOORD0;
fixed3 SHLighting : COLOR;
UNITY_FOG_COORDS(1)
};
sampler2D _MainTex;
float4 _MainTex_ST;
float _SHLightingScale;
v2f vert (appdata_base v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
float3 worldNormal = mul((float3x3)_Object2World, v.normal);
o.SHLighting= ShadeSH9(float4(worldNormal,1)) ;
UNITY_TRANSFER_FOG(o,o.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.texcoord);
col.rgb*=i.SHLighting;
UNITY_APPLY_FOG(i.fogCoord, col);
UNITY_OPAQUE_ALPHA(col.a);
return col*_SHLightingScale;
}
ENDCG
}
}
}
Topic link
https://leetcode.com/problems/reverse-integer/
The questions in the original
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321
The title translation
Reverses the number in an integer. example 1: given x=123, return 321; Example 2: Given x=-123, return -321.
If x is equal to 10 or x is equal to 100, then both returns 1. 2. What happens to overflow after the original integer is reversed?– For example, if x=1000000003, reverse overflow, then the specified overflow results will return 0.
Thinking method
Here, Python’s handling of integers doesn’t actively overflow and actually causes problems, requiring special handling.
Thinking a
Loop through the modulus of 10 to get the tail number, step by step multiply 10 to construct a new flipped integer. However, it is important to first judge the positive and negative of the original number, and finally judge whether the result is overflow.
code
class Solution(object):
def reverse(self, x):
"""
:type x: int
:rtype: int
"""
flag = 1 if x >= 0 else -1
new_x, x = 0, abs(x)
while x:
new_x = 10 * new_x + x % 10
x /= 10
new_x = flag * new_x
return new_x if new_x < 2147483648 and new_x >= -2147483648 else 0
Idea 2
Python string reversal is used to reverse an integer, and the reversed string is converted back to an integer. As above, pay attention to positive and negative and overflow situations.
code
class Solution(object):
def reverse(self, x):
"""
:type x: int
:rtype: int
"""
x = int(str(x)[::-1]) if x >= 0 else - int(str(-x)[::-1])
return x if x < 2147483648 and x >= -2147483648 else 0
PS: The novice brush LeetCode, the new handwriting blog, write wrong or write unclear please help point out, thank you! reprint please indicate the: http://blog.csdn.net/coder_orz/article/details/52039990
|