lf

Do I really need to specify all binary files in .gitattributes

喜夏-厌秋 提交于 2021-01-21 09:22:07
问题 I've read Git documentation that shows that I can explicitly set certain files to be treated as text, so their line endings are automatically changed or as binary to ensure that they are untouched. However, I have also read that Git is pretty good at detecting binary files, which makes me thing this is not needed. So my question is do I really need to specify these explicit settings for every single file extension in my repository? I've seen some recommend to do so for all image file

Chromium Embedded Framework中文文档 (SVN属性)

元气小坏坏 提交于 2020-03-28 18:32:29
转载自:http://www.cnblogs.com/think/archive/2011/10/06/2199692.html Subversion properties 在CEF开发中,应当如下将Subversion配置文件配置成自动设置新文件的属性,不要使用svn:eol-style=native因为它会使得不同平台间的文件比较变得十分痛苦 # CEF-specific config file to put at ~/.subversion/config or %USERPROFILE%\AppData\Roaming\Subversion\config# Originally copied from http://src.chromium.org/viewvc/chrome/trunk/tools/buildbot/slave/config?revision=46073[miscellany]global-ignores = *.pyc *.user *.suo *.bak *~ #*# *.ncb *.o *.lo *.la .*~ .#* .DS_Store .*.swp *.scons *.mk *.Makefile *.sln *.vcproj *.rules SConstruct *.xcodeprojenable-auto-props = yes[auto

1033 To Fill or Not to Fill

点点圈 提交于 2020-03-07 08:38:36
link #include <cstdio> #include <cmath> #include <vector> #include <algorithm> #include <climits> #include <unordered_map> #include <cstdio> #include <iostream> # define LL long long using namespace std; struct Station{ double dis; double price; }; int main(){ double cmax, D, davg; int N; scanf("%lf %lf %lf %d", &cmax, &D, &davg, &N); vector<Station> stas(N+1); stas[0].dis=D; stas[0].price=0; for(int i=1;i<=N;i++){ scanf("%lf %lf", &stas[i].price, &stas[i].dis); } sort(stas.begin(),stas.end(),[](Station s1, Station s2){ return s1.dis<s2.dis; }); if(stas[0].dis!=0){ printf("The maximum travel

计算圆的面积和周长

风流意气都作罢 提交于 2020-02-28 19:08:52
#include <stdio.h> #include <stdlib.h> #define PI 3.14159 int main() { double R,l,s; scanf("%lf",&R); l = 2 * PI * R; s = PI * R * R; printf(“圆的周长为:%lf\n”,l); printf(“圆的面积为:%lf”,s); system(“pause”); return 0 ; } 来源: CSDN 作者: K2MnO2 链接: https://blog.csdn.net/Polary1/article/details/104560671

2019-2020nowcoder牛客寒假基础4

北城余情 提交于 2020-02-12 14:48:53
A欧几里得 1 0 2 1 3 2 第一个数字是上一行数字的和,第二个数字是上一行数字第一个数字 #include <cstdio> #include <cmath> #include <algorithm> #include <iostream> #include <cstring> #include <queue> #include <set> #include <map> #include <stack> using namespace std; #define scd(a) scanf("%d",&a) #define scdd(a,b) scanf("%d%d",&a,&b) #define scddd(a,b,c) scanf("%d%d%d",&a,&b,&c) #define scl(a) scanf("%lld",&a) #define scll(a,b) scanf("%lld%lld",&a,&b) #define sclll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c) #define prl(a) printf("%lld\n",a) #define prd(a) printf("%d\n",a) #define prf(a) printf("%lf\n",a) #define ptd(a) printf("%d ",a)

输入一个正方形的边长,输出正方形的外接圆和内接圆的面积。

大城市里の小女人 提交于 2020-02-10 13:58:12
#include <stdio.h> #define pi 3.1415926 int main() { double a; scanf("%lf", &a); printf("正方形面积:%lf\n", a * a); printf("内接圆面积:%lf\n", pi * a * a / 4); printf("外接圆面积:%lf\n", pi * a * a / 2); return 0; } 来源: https://www.cnblogs.com/bobotongxue/p/12290647.html

2019-2020nowcoder牛客寒假基础2

余生长醉 提交于 2020-02-06 22:08:55
12点四十起床饭都没恰,温州阴郁的天气隐隐暗示了今天的基调 https://ac.nowcoder.com/acm/contest/3003#question A.做游戏 石头剪刀布wa两发娱乐一下,int的read加起来的时候在右边炸了一回,重新写sclll没抄对,甚至样例都没过就直接上了,这脑残的行径能怪谁呢 #include <cstdio> #include <cmath> #include <algorithm> #include <iostream> #include <cstring> #include <queue> #include <set> #include <map> #include <stack> using namespace std; #define scd(a) scanf("%d",&a) #define scdd(a,b) scanf("%d%d",&a,&b) #define scddd(a,b,c) scanf("%d%d%d",&a,&b,&c) #define scl(a) scanf("%lld",&a) #define scll(a,b) scanf("%lld%lld",&a,&b) #define sclll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c) #define prl(a) printf(

Leetcode-03 无重复字符的最长子串

青春壹個敷衍的年華 提交于 2020-01-28 00:42:18
lf rt 确定子串范围 , mm记录曾经遇到过的最长子串 针对每一个新的字符,从右向左找是否有重复,重复则重新划定范围,舍弃先遇到的字符。 class Solution { public : int lf = 0 ; int rt = 0 ; int lengthOfLongestSubstring ( string s ) { if ( s . length ( ) == 1 ) return 1 ; int mm = 0 ; for ( int i = 1 ; i < s . length ( ) ; i ++ ) { for ( int j = rt ; j >= lf ; j -- ) if ( s [ i ] == s [ j ] ) lf = j + 1 ; rt ++ ; mm = mm > ( rt - lf + 1 ) ? mm : rt - lf + 1 ; } return mm ; } } ; 来源: CSDN 作者: 啾九啾 链接: https://blog.csdn.net/qq_40070622/article/details/104095630

「一本通 1.2 练习 3」灯泡

时间秒杀一切 提交于 2020-01-26 06:01:50
传送门 思路 :这是一道推式子题 假设人离灯泡的地面距离为x 那么影子长D+H−(x+(H−h)∗D/x)① 定义域为 x<=D且x>=D - h * D / H 应用 均值不等式 原式<=D+H-2 sqrt(D (H-h)) 当x=sqrt(D*(H-h))时取等号 设a=sqrt(D*(H-h)) ①式图像为单峰函数,到分类讨论的时间了。如果a>D,最大值在x=D时取到,此时最大值为h;如果a<D-h D/H,最大值在x=D-h D/H时取到,此时最大值为h D/H;其他情况的最大值在x=a是取到,最大值为D+H-2 a 代码如下: # include <cmath> # include <cstring> # include <cstdio> # include <algorithm> # include <queue> # include <fstream> # include <stack> # include <iostream> # include <time.h> # define LL long long using namespace std ; LL T ; double H , h , D ; int main ( ) { cin >> T ; while ( T -- ) { scanf ( "%lf%lf%lf" , & H , & h , & D )

求一元二次方程的解

家住魔仙堡 提交于 2020-01-24 19:15:44
#include "stdio.h" #include "math.h" void main() { double a,b,c,x1,x2,p,q,dis; printf("输入abc的值\n"); scanf("a=%lf b=%lf c=%lf",&a,&b,&c); dis=sqrt(b*b-4*a*c); p=-b/(2*a); q=dis/(2*a); x1=p+q; x2=p-q; printf("一元二次方程的解为:\n"); printf("x1=%5.2lf\nx2=%5.2lf\n",x1,x2); } 来源: https://www.cnblogs.com/zyz322/p/12232466.html