CuterCorley CuterCorley
4年前
C语言基础习题50例(八)36-40
习题36求100之内的素数。实现思路:使用函数实现,并循环遍历依次判断。代码如下:cinclude<stdio.hinclude<math.hintmain(){intisPrime(intn);inti,count0;for(i2;i<101;i){if(isPrime(i)){
Stella981 Stella981
3年前
React.createClass 、React.createElement、Component
react里面有几个需要区别开的函数React.createClass、React.createElement、Component首选看一下在浏览器的下面写法:<divid"app"</div<scriptsrc"../js/react.js"</script<scr
Easter79 Easter79
3年前
TypeScript 真香系列——接口篇
接口带来了什么好处好处One——过去我们写JavaScriptJavaScript中定义一个函数,用来获取一个用户的姓名和年龄的字符串:constgetUserInfofunction(user){returnname:${user.name},age:${user
Stella981 Stella981
3年前
JavaScript里面的居民们3
如代码,分别实现diyTrim及removeRepetition函数,并跑通代码中的测试用例。1<!DOCTYPEhtml2<html3<head4<metacharset"utf8"/5<titleJS里的居民们3</title
Stella981 Stella981
3年前
Comparator和Comparable
12\.比较器java.util接口Comparator集合具有比较特性。强行对某个对象collection进行整体排序的比较函数。可以将Comparator传递给sort方法(如Collections.sort或Arrays.sort)
Stella981 Stella981
3年前
Python笔记17(Django之路由系统)
URL配置(URLconf)就像Django所支撑网站的目录。它的本质是URL与要为该URL调用的视图函数之间的映射表。一、URLconf配置1、基本格式fromdjango.conf.urlsimporturlurlpatternsurl(正则
Stella981 Stella981
3年前
Lua 字符串查找函数 string.find(s, pattern [, init [, plain]] )【转】
函数原型string.find(s,pattern\,init\,plain\\)s:源字符串pattern:待搜索模式串init:可选,起始位置plain:我没用过①子串匹配:print(string.find("haha",'ah'))输出23注意:
Wesley13 Wesley13
3年前
C++核心准则编译边学
!(https://oscimg.oschina.net/oscnet/713eb5c59e184a289ae775269e3c170a.jpg)F.46:intisthereturntypeformain()F.46:main函数的返回值类型是整数Reason
Stella981 Stella981
3年前
Scala学习笔记(3):纯函数式编程的一些思想和技巧
Everythingisafunction最近刚刚学完Coursera上FunctionalprogramminginScala的课程,通过看教学视频还有做assignments,对于functionalprogramming(函数式编程)有一点点心得体会,在这里总结下。Everythi
Stella981 Stella981
3年前
Android横竖屏切换+ConfigChanges属性对Activity的生命周期影响
在Activity中添加了android:configChanges属性,目的是当所指定属性(ConfigurationChanges)发生改变时,通知程序调用onConfigurationChanged()函数。通过一个例子来介绍:1、运行一个新建的ActivityonCreateonStart