首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏程序员互动联盟

    基础如何成为代码高手

    绝大多数计算机专业的学生是基础,其中不乏被调剂的。 等到毕业之际,有的成了大神,进入BAT或者google微软,有的还是基础…… 1.最重要的是学会写程序 C语言也好,python也好,你得学会把自己的思考用程序实现。 之后再写程序,你需要考虑代码的优雅、简单、时间空间效率高,使用什么样的方式来实现最好。最后你学会了复用,学会了调用系统API,学会了想什么就能用代码实现什么或者知道它不能被实现,你就学会了编程。 关于写代码代码是基本功,代码写不好的,嘴上说多牛逼,多半是瞎扯淡。 6. 关于总结 总结记录,加深记忆,方便以后查看。多进行总结记录也会起到不错的效果。

    1.1K70发布于 2018-03-15
  • 来自专栏韩东吉的Unity杂货铺

    基础入门 9: Unity脚本的生命周期

    如下图,我们在FixedUpdate函数里加入几行代码 第一行m_f+=1; 我们让m_f += 1,m_f+= 1这句代码可以理解成m_f = m_f+1,当前m_f为0,当函数调用一次后,m_f+= 第二行代码 if(m_f > 1) return; 意思就是如果m_f这个值大于1了,那么就直接退出这个函数。 ? 如下图,我们把Debug这句话放到逻辑代码下面就行了,并且给Update和LateUpdate都加上这样的逻辑。 ? 然后再次回到Unity,重新运行。 ? 如下图操作,我们将时间修改为1,并且在代码内,把限制FixedUpdate日志输出的函数注释,然后回到Unity运行游戏,可以看出,FixedUpdate日志以固定1秒输出一条日志。 ?

    1.4K40发布于 2018-10-19
  • 来自专栏韩东吉的Unity杂货铺

    基础入门 36:代码控制预设

    ,我们在Unity中,可以把一个GameObject从Hierarchy窗口拖动到Project窗口,这样就完成了对Prefab的创建或者更新,但是这一切的操作都依赖于手动拖动,那如果想要实现自动化的代码操控 今天也是给这些有疑问的小伙伴们答疑的一篇,来分享下如何通过代码控制预设。 下面把完整代码附上。

    81250发布于 2018-10-18
  • 来自专栏技术杂记

    Codis 基础9

    添加 Redis Server Group 准备配置文件 [root@h102 codis]# grep -v "^#" extern/redis-2.8.21/redis.conf | grep -v "^$" > /etc/codis/redis_s.conf [root@h102 codis]# grep -v "^#" extern/redis-2.8.21/redis.conf | grep -v "^$" > /etc/codis/redis2.conf [root@h102 codis

    35620编辑于 2022-03-22
  • 来自专栏技术杂记

    Snort 基础9

    解决方法 : 安装 pcre.x86_64 和 pcre-devel.x86_64 软件包

    38120编辑于 2022-05-03
  • 来自专栏技术杂记

    fio基础9

    randrepeat=boolForrandomIOworkloads,seedthegeneratorinapredictablewaysothatresultsarerepeatableacrossrepetitions.Defaultstotrue.randseed=intSeedtherandomnumbergeneratorsbasedonthisseedvalue,tobeabletocontrolwhatsequenceofoutputisbeinggenerated.Ifnotset,therandomsequencedependsontherandrepeatsetting.fallocate=strWhetherpre-allocationisperformedwhenlayingdownfiles.Acceptedvaluesare:noneDonotpre-allocatespaceposixPre-allocateviaposix_fallocate()keepPre-allocateviafallocate()withFALLOC_FL_KEEP_SIZEset0Backward-compatiblealiasfor'none'1Backward-compatiblealiasfor'posix'Maynotbeavailableonallsupportedplatforms.'keep'isonlyavailableonLinux.IfusingZFSonSolaristhismustbesetto'none'becauseZFSdoesn't support it. Default: 'posix'. fadvise_hint=bool By default, fio will use fadvise() to advise the kernel on what IO patterns it is likely to issue. Sometimes you want to test specific IO patterns without telling the kernel about it, in which case you can disable this option. If set, fio will use POSIX_FADV_SEQUENTIAL for sequential IO and POSIX_FADV_RANDOM for random IO. fadvise_stream=int Notify the kernel what write stream ID to place these writes under. Only supported on Linux. Note, this option may change going forward. size=int The total size of file io for this job. Fio will run until this many bytes has been transferred, unless runtime is limited by other options (such as 'runtime', for instance, or increased/decreased by 'io_size'). Unless specific nrfiles and filesize options are given, fio will divide this size between the available files specified by the job. If not set, fio will use the full size of the given files or devices. If the files do not exist, size must be given. It is also possible to give size as a percentage between 1 and 100. If size=20% is given, fio will use 20% of the full size of the given files or devices. io_size=int io_limit=int Normally fio operates within the region set by 'size', which means that the 'size' option sets both the region and size of IO to

    70250编辑于 2022-04-24
  • 来自专栏技术杂记

    SQLite 基础9

    分离数据库 无法分离 main 和 temp 数据库 sqlite> .databases seq name file --- --------------- ---------------------------------------------------------- 0 main /usr/local/sqlite3.11/bin/

    24310编辑于 2021-12-01
  • 来自专栏技术杂记

    memcached基础9

    stats查看状态statsSTAT pid 8917STAT uptime 1183STAT time 1442996635STAT version 1.4.24STAT libevent 1.4.13-stableSTAT pointer_size 64STAT rusage_user 0.014997STAT rusage_system 0.105983STAT curr_connections 12STAT total_connections 14STAT connection_structures

    21410编辑于 2022-06-26
  • 来自专栏技术杂记

    Logstash 基础9

    打开本地的 tcp udp 5000端口 标记类型为 syslog filter中作判断如果类型是 syslog 拆分解析信息 添加 received_at received_from 字段 使用 syslog_pri { } 来处理 定义 syslog_timestamp 的格式 输出到ES 以 rubydebug 的格式输出到终端 启动 Logstash [root@h102 etc]# /opt/logstash/bin/logstash -f logstash-syslog.conf Setti

    28110编辑于 2022-02-10
  • 来自专栏技术杂记

    etcd 基础9

    刷新目录过期时间 [root@docker ~]# date +%s ;curl http://127.0.0.1:2379/v2/keys/testdir -XPUT -d ttl=10 -d dir=true 1454394195 {"action":"set","node":{"key":"/testdir","dir":true,"expiration":"2016-02-02T06:23:25.962070512Z","ttl":10,"modifiedIndex":85,"createdInde

    25910编辑于 2022-01-20
  • 来自专栏技术杂记

    Tengine基础9

    upstream 是nginx 负载均衡的主要模块,它提供了一个简单方法来轮询后端的服务器

    44220编辑于 2022-05-03
  • 来自专栏技术杂记

    UnrealIRCd 基础9

    error: /root/unrealircd/conf/unrealircd.conf:378: set::cloak-keys: (key 2) Keys should be mixed a-zA-Z0-9, error: /root/unrealircd/conf/unrealircd.conf:379: set::cloak-keys: (key 3) Keys should be mixed a-zA-Z0-9, IRCd configuration failed to pass testing 分别为: 1.要求修改操作员角色的用户名和密码 2.cloak-keys 必须得相互不一样,并且由 a-zA-Z0-9

    42820编辑于 2021-11-29
  • 来自专栏技术杂记

    RabbitMQ基础9

    日志信息 =INFO REPORT==== 23-Oct-2015::16:52:50 === Starting RabbitMQ 3.5.6 on Erlang R14B04 Copyright (C) 2007-2015 Pivotal Software, Inc. Licensed under the MPL. See http://www.rabbitmq.com/ =INFO REPORT==== 23-Oct-2015::16:52:50 === node : rabbi

    32920编辑于 2022-05-04
  • 来自专栏技术杂记

    Consul 基础9

    我们还可以使用 DNS API 结合 tag 来过滤服务 [root@h104 ~]# dig @127.0.0.1 -p 8600 rails.web.service.consul ; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.1 <<>> @127.0.0.1 -p 8600 rails.web.service.consul ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<

    38610编辑于 2021-12-01
  • 来自专栏技术杂记

    nginx基础9

    启动 查看配置 [root@h102 conf]# grep -v "#" /usr/local/nginx/conf/nginx.conf | grep -v "^$" worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on;

    19010编辑于 2022-05-12
  • 来自专栏技术杂记

    Docker 基础9

    可见 docker.service 是依赖于 docker.socket 的,但是并不必要开启

    33320编辑于 2022-02-09
  • 来自专栏技术杂记

    ZooKeeper 基础9

    redo 再次执行之前命令 Tip: 历史命令的保持是在当前会话中,不论此时是否已经成功连接服务 [zk: localhost:2181(CONNECTED) 20] history 10 - ls 11 - ls / 12 - create /test test 13 - get /test 14 - ls / 15 - close 16 - ls / 17 - connect localhost:2181 18 - ls / 19 - help 20 - history [zk: localhos

    32320编辑于 2022-03-25
  • 来自专栏技术杂记

    HAproxy 基础9

    启动haproxy [root@h102 ~]# /usr/local/haproxy/sbin/haproxy -f /etc/haproxy/transparent_proxy.cfg ... ... ... ---------- [root@h102 ~]# netstat -ant | grep 1234 tcp 0 0 0.0.0.0:1234 0.0.0.0:* LISTEN [root@h1

    24610编辑于 2022-01-19
  • 来自专栏Creator星球游戏开发社区

    Cocos Creator基础教程(9)—优化代码编辑器

    排除干扰文件 我们知道Cocos Creatror会为项目资源文件生成同名的meta文件,在代码编辑器中很是碍眼,而且也不能更改里面的内容,严重干扰我们在代码编辑器中浏览文件,请看下图: ? 代码补全增强 代码补全是开发中提高效率的重要功能,对于JavaScript动态语言来说,代码补全确实要比c/c++、Java要差很多。 配置上Cocos Creator的源码路径,可以进一步提高Webstorm代码提示精度,见下图: ? 点击Add…按钮,添加Cocos Creator源码路径: ? 源码目录我用的是Mac系统设置的路径是: /Applications/CocosCreator.app/Contents/Resources/engine/cocos2d 点击OK保存 对于高精度的代码补全来说使用 小结 代码编辑器是程序员的一把利剑,本篇介绍在VSCode和Webstorm中如何排除干扰文件、优化代码提示,以提高开发效率。细心觉察开发过程中影响效率的地方,从小事做起,享受编程带来的乐趣吧!

    2.5K50发布于 2019-09-11
  • 来自专栏编程基础

    C编程基础-基础9

    struct #include <stdio.h> int main() { struct Contacts { char name[100]; int age; char mobile[12]; }; struct Contacts person1 = {"John", 30, }; printf("name: %s, age: %d, mobile: %s\n", person1.name, person1.age, p

    32031发布于 2021-02-26
领券