Android studio报错 view is not constrained....

content_main.xml
//在两个button和LinearLayout下都有这个错误,看了半天注释,似乎是要约束组件的位置?但内层的EditText却没有这个错误,试了很多方法都没法解决

<?xml version="1.0" encoding="utf-8"?>
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.ryo.myapplication.MainActivity">

<Button
    android:id="@+id/button3"
    style="@style/Widget.AppCompat.Button.Borderless"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:fadingEdge="horizontal|vertical"
    android:text="@string/Login_Button_1"
    tools:layout_editor_absoluteX="67dp"
    tools:layout_editor_absoluteY="503dp" />

<Button
    android:id="@+id/button"
    style="@style/Widget.AppCompat.Button.Borderless"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:fadingEdge="horizontal|vertical"
    android:text="@string/Login_Button"
    tools:layout_editor_absoluteX="227dp"
    tools:layout_editor_absoluteY="503dp" />

<LinearLayout
    android:id="@+id/Login_text1"
    android:layout_width="385dp"
    android:layout_height="164dp"
    android:layout_alignLeft="@+id/button"
    android:layout_alignStart="@+id/button"
    android:layout_centerVertical="true"
    android:layout_marginTop="-23dp"
    android:orientation="vertical"
    android:weightSum="1"
    app:layout_constraintTop_toTopOf="parent"
    tools:layout_editor_absoluteX="0dp">

    <EditText
        android:id="@+id/editText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.40"
        android:ems="10"
        android:hint="@string/Login_UserName"
        android:inputType="textPersonName" />

    <EditText
        android:id="@+id/editText2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.51"
        android:ems="10"
        android:hint="@string/Login_Password"
        android:inputType="textPassword" />

</LinearLayout>

3个回答

能不能把content_main.xml完整的贴出来呢

图片说明

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.levme.myapplication.ContentActivity"
    android:gravity="center">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:id="@+id/name_area">
        <EditText
            android:id="@+id/editText2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.51"
            android:ems="10"
            android:hint="请输入密码"
            android:inputType="textPassword" />


        <Button
            android:id="@+id/button"
            style="@style/Widget.AppCompat.Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="注册" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_below="@+id/name_area">

        <EditText
            android:id="@+id/editText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.40"
            android:ems="10"
            android:hint="请输入用户名"
            android:inputType="textPersonName" />


        <Button
            android:id="@+id/button3"
            style="@style/Widget.AppCompat.Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="登录" />

    </LinearLayout>
</RelativeLayout>

是这个意思么?这样不会报错

或者是这样图片说明

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.levme.myapplication.ContentActivity">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true">
    <Button
        android:id="@+id/button3"
        style="@style/Widget.AppCompat.Button.Borderless"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:text="登录" />

    <Button
        android:id="@+id/button"
        style="@style/Widget.AppCompat.Button.Borderless"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:layout_toLeftOf="@+id/button3"
        android:text="注册"/>
    </LinearLayout>
    <LinearLayout
        android:id="@+id/Login_text1"
        android:layout_width="385dp"
        android:layout_height="164dp"
        android:layout_centerVertical="true"
        android:layout_marginTop="-23dp"
        android:orientation="vertical"
        android:weightSum="1"
        tools:layout_editor_absoluteX="0dp">

        <EditText
            android:id="@+id/editText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.40"
            android:ems="10"
            android:hint="请输入用户名"
            android:inputType="textPersonName" />

        <EditText
            android:id="@+id/editText2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.51"
            android:ems="10"
            android:hint="请输入密码"
            android:inputType="textPassword" />

    </LinearLayout>
</RelativeLayout>

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java 启动jdbc 事务报错 嵌套异常

![图片说明](https://img-ask.csdn.net/upload/201506/16/1434439243_354727.png)![图片说明](https://img-ask.csdn.net/upload/201506/16/1434439145_70473.png)org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class '2678A9D8A4F5FA0707A5F652001ACABE816EE484B994AE39ED963C5A4B2DA3A22B8ABA272F176A7C2C239A79A6364D41' ### The error may exist in cn/drzk/wanda/cinema/dao/form/dao/TicketsFromDao.java (best guess) ### The error may involve cn.drzk.wanda.cinema.dao.form.dao.TicketsFromDao.count ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class '2678A9D8A4F5FA0707A5F652001ACABE816EE484B994AE39ED963C5A4B2DA3A22B8ABA272F176A7C2C239A79A6364D41'

机器学习Regularized的问题

![图片说明](https://img-ask.csdn.net/upload/201702/11/1486810294_777147.png) 我百度、谷歌也没有解析。为什么答案选A

hibernate3 延迟加载报错could not initialize proxy - no session

web.xml [code="java"] <!-- 保持SESSION直到request将全部页面发送到客户端,解决hibernate延迟加载带来的问题 --> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> <init-param> <param-name>sessionFactoryBeanName</param-name> <param-value>SessionFactory</param-value> </init-param> <init-param> <param-name>singleSession</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- struts2过滤器 --> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> [/code] 映射: [code="java"] <hibernate-mapping package="cn.sjlrManage.domain"> <class name="BulletinIndex" table="gh_bulletin_index" lazy="true"> <id name="id" length="32"> <generator class="guid"></generator> </id> <property name="type" column="index_type" length="2" not-null="true"/> <property name="title" column="index_title" length="100" not-null="true" unique="true"/> <property name="url" length="100" unique="true"/> <property name="date" column="posttime" length="20"/> <property name="strong" not-null="true" length="1"/> <property name="hot" length="1"/> <property name="editTime" column="edittime"></property> <property name="postTag"></property> <one-to-one name="content" class="BulletinContent" fetch="select" cascade="all" lazy="proxy"></one-to-one> </class> </hibernate-mapping> <hibernate-mapping package="cn.sjlrManage.domain"> <class name="BulletinContent" table="gh_bulletin_content" lazy="true"> <id name="id" length="32"> <generator class="foreign"> <param name="property">index</param> </generator> </id> <property name="content" type="org.springframework.orm.hibernate3.support.ClobStringType"/> <one-to-one name="index" class="BulletinIndex" constrained="true" lazy="proxy"></one-to-one> </class> </hibernate-mapping> [/code] DAO: [code="java"] public BulletinIndex findIndexById(String id){ return (BulletinIndex) sessionFactory.getCurrentSession().load(BulletinIndex.class, id); }; [/code] 看了不少博文,问题没有解决。如果不用load而直接写一个不带关联对象的查询不会报错,但执行出来的时候hibernate会添加上另一个关联对象的查询。

windows 下ffmpeg 转MP4 没有画面 报 libx264错误

y@Lenovo-PC ~ $ ffmpeg.exe -threads 4 -i d:/temp/ffmpeg/test.avi -ab 32 -ar 22050 -vcodec lib x264 -qscale 6 -r 25 -s 480x360 -flags +loop -crf 24 -bt 256k -vol 200 -vf yadi f d:/2.mp4 ffmpeg version N-48731-g7e5c5fa Copyright (c) 2000-2013 the FFmpeg developers built on Jan 10 2013 19:47:49 with gcc 4.7.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e nable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --en able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable -libxavs --enable-libxvid --enable-zlib --enable-filter=frei0r libavutil 52. 13.100 / 52. 13.100 libavcodec 54. 86.100 / 54. 86.100 libavformat 54. 59.107 / 54. 59.107 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 32.100 / 3. 32.100 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Input #0, avi, from 'd:/temp/ffmpeg/test.avi': Duration: 00:02:07.40, start: 0.000000, bitrate: 153 kb/s Stream #0:0: Video: tscc (tscc / 0x63637374), rgb555le, 800x600, 15 tbr, 15 tbn, 15 tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 24000 Hz, stereo, s16p, 56 kb /s Please use -q:a or -q:v, -qscale is ambiguous File 'd:/2.mp4' already exists. Overwrite ? [y/N] y -vol has been deprecated. Use the volume audio filter instead. -vol is forwarded to lavfi similarly to -af volume=0.781250. [libx264 @ 02298400] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE 4.2 AVX AVX2 FMA3 BMI1 BMI2 [libx264 @ 02298400] profile High 4:4:4 Predictive, level 2.1, 4:4:4 8-bit [libx264 @ 02298400] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Cop yleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deb lock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m e_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chro ma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 in terlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b _bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecu t=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=24.0 qcomp=0.60 qpmin=0 $ 我已经把x264.exe 和 dll 文件加进去了 还是报错

Locate Mining Center 的一个具体的思路

Problem Description As part of a peace treaty with the Navi, the humans are allowed mine for Unobtainium in a remote, deserted area of Pandora. The scientists have identified many possible excavation sites, and are now trying to figure out where to place the Mining Center. The placement of the mining center is further constrained by the fact that the robots that will carry the Unobtainium from the excavation sites to the mining center can only walk along prespecified Grid lines (see figure). The goal is now to find the location of the mining center so that the maximum distance to the excavation sites is minimized. You are to write a program for finding that location. Specifically, you are given the x- and y-coordinates of the excavations sites, (x1, y1), (x2, y2), ...(xn, yn) (n denotes the number of excavation sites). You are to find the coordinates for the Mining Center, (x0, y0), so that the maximum of the distances between the mining center and the excavation sites is minimized. All coordinates must be integers. The distance metric to be used is the rectilinear distance (also called Manhattan distance). Specifically, the rectilinear distance between (x0, y0) and (xi, yi) is: |xi - x0| + |yi - y0| Further, if there are multiple locations which qualify, then you must find the location that is closest to the origin by Euclidean distance q metric. Since origin is at (0, 0), this corresponds to minimizing . In other words, given the input (x1, y1), ..., (xn, yn), your goal is to find (x0, y0) such that: is minimized, and if there are multiple answers, then is the smallest among all such answers. Input The first line in the test data file contains the number of test cases, n. After that, each line contains one test case. The test case begins with the number of mines, followed by the x and y coordinates of each mine. All coordinates must be integers. Very large coordinate values may be used (million+), so brute force methods will not work. Output For each test case, you are to output a line beginning with ”LOCATION”, followed by the x and y coordinates of the mining center. All coordinates must be integers. Sample Input 2 4 100 0 40 0 -10 0 20 0 3 245 692 -772 -647 330 526 Sample Output LOCATION 45 0 LOCATION -121 -120

Counting spanning trees 用的数据结构

Problem Description Everyone knows spanning trees, especially MST problem. But most of them are not familiar with degree constrained spanning tree. a degree-constrained spanning tree is a spanning tree which the maximum vertex degree is limited to a certain constant d. Given two integers n and d, your task is to count the number of degree constrained spanning trees of a (labeled) complete graph with n vertices. Input Each line contains two integers n, d. 1<=n<=100, 1<=k<=100. Output For each query, output a line which contains only one integer, the number of degree constrained spanning trees of a (labeled) complete graph with n vertices. This number may be very large, so output the answer modulo 20090829. Sample Input 3 1 3 2 4 2 10 3 Sample Output 0 3 12 3458313

Delay Constrained Maximum Capacity Path

Problem Description Consider an undirected graph with N vertices, numbered from 1 to N, and M edges. The vertex numbered with 1 corresponds to a mine from where some precious minerals are extracted. The vertex numbered with N corresponds to a minerals processing factory. Each edge has an associated travel time (in time units) and capacity (in units of minerals). It has been decided that the minerals which are extracted from the mine will be delivered to the factory using a single path. This path should have the highest capacity possible, in order to be able to transport simultaneously as many units of minerals as possible. The capacity of a path is equal to the smallest capacity of any of its edges. However, the minerals are very sensitive and, once extracted from the mine, they will start decomposing after T time units, unless they reach the factory within this time interval. Therefore, the total travel time of the chosen path (the sum of the travel times of its edges) should be less or equal to T. Input The first line of input contains an integer number X, representing the number of test cases to follow. The first line of each test case contains 3 integer numbers, separated by blanks: N (2 <= N <= 10.000), M (1 <= M <= 50.000) and T (1 <= T <= 500.000). Each of the next M lines will contain four integer numbers each, separated by blanks: A, B, C and D, meaning that there is an edge between vertices A and B, having capacity C (1 <= C <= 2.000.000.000) and the travel time D (1 <= D <= 50.000). A and B are different integers between 1 and N. There will exist at most one edge between any two vertices. Output For each of the X test cases, in the order given in the input, print one line containing the highest capacity of a path from the mine to the factory, considering the travel time constraint. There will always exist at least one path between the mine and the factory obbeying the travel time constraint. Sample Input 2 2 1 10 1 2 13 10 4 4 20 1 2 1000 15 2 4 999 6 1 3 100 15 3 4 99 4 Sample Output 13 99

多图像上传过程在后台

<div class="post-text" itemprop="text"> <p><strong>I would like to know whether it is possible</strong> to use PHP &amp; Javascript alone for uploading images WHILE you browse through other parts of the same website as the upload is happening. </p> <p>Meaning that after you were to, for example, click on upload... instead of waiting for the upload to complete and finally getting redirected to a success page, is it possible that after clicking on upload, you could then move away to other pages on the same website as the images get uploaded?</p> <p>I did some research and I bumped across a concept called <strong>Thread</strong>. But I'm not entirely sure if that's the solution or whether it is a practical function that works in PHP.</p> <p>If, according to your knowledge, this is not possible at all... what would be your advice for me to handle this sort of a client requirement.</p> <p>Or, if it's not possible without supplementary resources, what are those resources I should consider.</p> <p>In case this might be helpful, I'm working on an Online Database for a Garage that stores Job Card information. This particular Multi Image upload system I am trying to achieve is for uploading relatively High Resolution photos of the vehicles before the garage works on them. The system is meant to replace a slower and feature constrained MS Access DB.</p> <p>Thank you for taking your time to read this. I will appreciate your contribution to this question :)</p> </div>

mybatis 嵌套的结果集不能被安全的转为自定义ResultHandler

如下:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Mapped Statements with nested result mappings cannot be safely used with a custom ResultHandler. Use safeResultHandlerEnabled=false setting to bypass this check. 请各位大师解决看看

Fermat vs. Pythagoras 代码设计

Description Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Science. The first proof of the four-color problem was completed with the assistance of a computer program and current efforts in verification have succeeded in verifying the translation of high-level code down to the chip level. This problem deals with computing quantities relating to part of Fermat's Last Theorem: that there are no integer solutions of a^n + b^n = c^n for n > 2. Given a positive integer N, you are to write a program that computes two quantities regarding the solution of x^2 + y^2 = z^2, where x, y, and z are constrained to be positive integers less than or equal to N. You are to compute the number of triples (x,y,z) such that x < y < z, and they are relatively prime, i.e., have no common divisor larger than 1. You are also to compute the number of values 0 < p <= N such that p is not part of any triple (not just relatively prime triples). Input The input consists of a sequence of positive integers, one per line. Each integer in the input file will be less than or equal to 1,000,000. Input is terminated by end-of-file Output For each integer N in the input file print two integers separated by a space. The first integer is the number of relatively prime triples (such that each component of the triple is <=N). The second number is the number of positive integers <=N that are not part of any triple whose components are all <=N. There should be one output line for each input line. Sample Input 10 25 100 Sample Output 1 4 4 9 16 27

Fermat vs. Pythagoras

Description Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Science. The first proof of the four-color problem was completed with the assistance of a computer program and current efforts in verification have succeeded in verifying the translation of high-level code down to the chip level. This problem deals with computing quantities relating to part of Fermat's Last Theorem: that there are no integer solutions of a^n + b^n = c^n for n > 2. Given a positive integer N, you are to write a program that computes two quantities regarding the solution of x^2 + y^2 = z^2, where x, y, and z are constrained to be positive integers less than or equal to N. You are to compute the number of triples (x,y,z) such that x < y < z, and they are relatively prime, i.e., have no common divisor larger than 1. You are also to compute the number of values 0 < p <= N such that p is not part of any triple (not just relatively prime triples). Input The input consists of a sequence of positive integers, one per line. Each integer in the input file will be less than or equal to 1,000,000. Input is terminated by end-of-file Output For each integer N in the input file print two integers separated by a space. The first integer is the number of relatively prime triples (such that each component of the triple is <=N). The second number is the number of positive integers <=N that are not part of any triple whose components are all <=N. There should be one output line for each input line. Sample Input 10 25 100 Sample Output 1 4 4 9 16 27

getDbTable() - > select() - > where where(Zend Framework 1.x)

<div class="post-text" itemprop="text"> <p>I've currently got a query I'm preparing in Zend 1.x. The select query is formed within a class as you'd expect:</p> <p>I'm setting up the query as follows:</p> <pre><code> // prepare query $this-&gt;getDbTable()-&gt;select() -&gt;setIntegrityCheck(false) -&gt;from(array('mdt' =&gt; 'meta_data_type')) -&gt;where('id = :id') -&gt;bind( array( ':id' =&gt; $id ) ); // report SQL for debugging echo $this-&gt;getDbTable()-&gt;select()-&gt;__toString(); </code></pre> <p>As you can see, this isn't exactly the hardest query. However: the returned SQL is as follows:</p> <pre><code>SELECT `meta_data_type`.* FROM `meta_data_type` </code></pre> <p>Can anyone give me any gotchas on how to debug this? It seems correct to me. I've tried to follow the examples online, but given our system approach (sat inside a Mapper pattern, with non-standard table namings amongst other things) this isn't too much help.</p> <p>FYI : The actual data it returns matches what you'd expect from a "get row" operation on a "complete data set".. as in: the first row is well formed. It's just not constrained by the where clause (as you'd expect with it missing from SQL!).</p> <p>FYI 2 : The bind/where isn't the issue. If I change the whole ending to:</p> <pre><code>-&gt;where('id = 2'); </code></pre> <p>It still does not show this inside the clause.</p> </div>

Fermat vs. Pythagoras,这道题目用C语言的程序的编写的代码的形式如何进行正确回答的

Description Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Science. The first proof of the four-color problem was completed with the assistance of a computer program and current efforts in verification have succeeded in verifying the translation of high-level code down to the chip level. This problem deals with computing quantities relating to part of Fermat's Last Theorem: that there are no integer solutions of a^n + b^n = c^n for n > 2. Given a positive integer N, you are to write a program that computes two quantities regarding the solution of x^2 + y^2 = z^2, where x, y, and z are constrained to be positive integers less than or equal to N. You are to compute the number of triples (x,y,z) such that x < y < z, and they are relatively prime, i.e., have no common divisor larger than 1. You are also to compute the number of values 0 < p <= N such that p is not part of any triple (not just relatively prime triples). Input The input consists of a sequence of positive integers, one per line. Each integer in the input file will be less than or equal to 1,000,000. Input is terminated by end-of-file Output For each integer N in the input file print two integers separated by a space. The first integer is the number of relatively prime triples (such that each component of the triple is <=N). The second number is the number of positive integers <=N that are not part of any triple whose components are all <=N. There should be one output line for each input line. Sample Input 10 25 100 Sample Output 1 4 4 9 16 27

Linux下CGAL编译不通过

大一新生,做作业需要用到cgal库。Ubuntu16.04系统 装好了cgal库后(usr/local/include/里有CGAL文件夹),尝试将CGAL-5.0.2/examples里的程式进行编译 但是好像编译不通过,比如 `examples/Triangulation_2/constrained.cpp` 源码在直接执行`g++ constrained.cpp -o out` 时产生错误 ``` /tmp/ccvF93Cq.o: In function `CGAL::Gmpq_rep::Gmpq_rep()': main.cpp:(.text._ZN4CGAL8Gmpq_repC2Ev[_ZN4CGAL8Gmpq_repC5Ev]+0x14): undefined reference to `__gmpq_init' /tmp/ccvF93Cq.o: In function `CGAL::Gmpq_rep::~Gmpq_rep()': main.cpp:(.text._ZN4CGAL8Gmpq_repD2Ev[_ZN4CGAL8Gmpq_repD5Ev]+0x14): undefined reference to `__gmpq_clear' /tmp/ccvF93Cq.o: In function `CGAL::Gmpq::Gmpq(double)': main.cpp:(.text._ZN4CGAL4GmpqC2Ed[_ZN4CGAL4GmpqC5Ed]+0x6a): undefined reference to `__gmpq_set_d' /tmp/ccvF93Cq.o: In function `CGAL::Gmpq::operator==(CGAL::Gmpq const&) const': main.cpp:(.text._ZNK4CGAL4GmpqeqERKS0_[_ZNK4CGAL4GmpqeqERKS0_]+0x33): undefined reference to `__gmpq_equal' /tmp/ccvF93Cq.o: In function `CGAL::Gmpq::operator<(CGAL::Gmpq const&) const': main.cpp:(.text._ZNK4CGAL4GmpqltERKS0_[_ZNK4CGAL4GmpqltERKS0_]+0x33): undefined reference to `__gmpq_cmp' /tmp/ccvF93Cq.o: In function `CGAL::Mpzf::Mpzf(CGAL::Mpzf const&)': main.cpp:(.text._ZN4CGAL4MpzfC2ERKS0_[_ZN4CGAL4MpzfC5ERKS0_]+0x8d): undefined reference to `__gmpn_copyi' /tmp/ccvF93Cq.o: In function `CGAL::Mpzf::aors(CGAL::Mpzf const&, CGAL::Mpzf const&, int)': main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0xe5): undefined reference to `__gmpn_copyi' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x189): undefined reference to `__gmpn_copyi' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x355): undefined reference to `__gmpn_copyi' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x3a6): undefined reference to `__gmpn_copyi' /tmp/ccvF93Cq.o:main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x404): more undefined references to `__gmpn_copyi' follow /tmp/ccvF93Cq.o: In function `CGAL::Mpzf::aors(CGAL::Mpzf const&, CGAL::Mpzf const&, int)': main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x5a3): undefined reference to `__gmpn_add' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x631): undefined reference to `__gmpn_add' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x950): undefined reference to `__gmpn_copyi' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0x9cc): undefined reference to `__gmpn_neg' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0xa1f): undefined reference to `__gmpn_sub_1' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0xacd): undefined reference to `__gmpn_neg' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0xb39): undefined reference to `__gmpn_sub' main.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[_ZN4CGAL4Mpzf4aorsERKS0_S2_i]+0xb64): undefined reference to `__gmpn_sub_1' /tmp/ccvF93Cq.o: In function `CGAL::operator*(CGAL::Mpzf const&, CGAL::Mpzf const&)': main.cpp:(.text._ZN4CGALmlERKNS_4MpzfES2_[_ZN4CGALmlERKNS_4MpzfES2_]+0xfd): undefined reference to `__gmpn_mul' main.cpp:(.text._ZN4CGALmlERKNS_4MpzfES2_[_ZN4CGALmlERKNS_4MpzfES2_]+0x150): undefined reference to `__gmpn_mul' collect2: error: ld returned 1 exit status ``` 以下是编译的源码: ```cpp #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Constrained_Delaunay_triangulation_2.h> #include <gmpxx.h> #include <gmp.h> #include <assert.h> #include <iostream> typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_tag Itag; typedef CGAL::Constrained_Delaunay_triangulation_2<K, CGAL::Default, Itag> CDT; typedef CDT::Point Point; typedef CDT::Edge Edge; int main() { CDT cdt; return 0; } ``` 作业ddl马上到了,一直卡在cgal不会用上……还请大佬指点!

FFmpegFrameRecorder录制视频的问题?

## # 现在遇到的问题就是:在使用FFmpegFrameRecorder录制桌面的时候,如果设置的格式是 AV_CODEC_ID_MPEG4 就能生成一个视频,如果格式设置为AV_CODEC_ID_H264 格式就会出现 这样的异常,并且生成的文件为0KB, ## 想要的效果就是能给输出一个 h264编码格式的视频文件 org.bytedeco.javacv.FrameRecorder$Exception: avcodec_encode_video2() error -542398533: Could not encode video packet. at org.bytedeco.javacv.FFmpegFrameRecorder.recordImage(FFmpegFrameRecorder.java:946) at org.bytedeco.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:855) at org.bytedeco.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:848) at com.media.cqrcb.util.VideoRecode$1.run(VideoRecode.java:134) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [libx264 @ 1671ec00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 1671ec00] profile High, level 5.0 [libx264 @ 1671ec00] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=abr mbtree=1 bitrate=100 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'video/2020-05-22 144200.mp4': Metadata: encoder : Lavf57.83.100 Stream #0:0: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, q=2-31, 100 kb/s, 15360 tbn Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s [libx264 @ 1671ec00] lookahead thread is already stopped [libx264 @ 1671ec00] internal error (MV out of thread range) [libx264 @ 1671ec00] recovering by using intra mode [libx264 @ 1671ec00] internal error (MV out of thread range) [libx264 @ 1671ec00] recovering by using intra mode [libx264 @ 1671ec00] internal error (MV out of thread range) [libx264 @ 1671ec00] recovering by using intra mode [libx264 @ 1671ec00] internal error (MV out of thread range) [libx264 @ 1671ec00] recovering by using intra mode [libx264 @ 1671ec00] internal error (MV out of thread range) [libx264 @ 1671ec00] recovering by using intra mode [libx264 @ 1671ec00] internal error (MV out of thread range) [libx264 @ 1671ec00] recovering by using intra mode <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.4</version> </dependency> ``` package com.media.cqrcb.util; import org.bytedeco.javacpp.avcodec; import org.bytedeco.javacv.FFmpegFrameRecorder; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameRecorder.Exception; import org.bytedeco.javacv.Java2DFrameConverter; import javax.imageio.ImageIO; import javax.sound.sampled.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.ShortBuffer; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * 使用javacv进行录屏 */ public class VideoRecode { //线程池 screenTimer private ScheduledThreadPoolExecutor screenTimer; //获取屏幕尺寸 private Rectangle rectangle; //视频类 FFmpegFrameRecorder private FFmpegFrameRecorder recorder; private Robot robot; //线程池 exec private ScheduledThreadPoolExecutor exec; private TargetDataLine line; private AudioFormat audioFormat; private DataLine.Info dataLineInfo; private boolean isHaveDevice = true; private long startTime = 0; private long videoTS = 0; private long pauseTime = 0; private double frameRate = 24; /** * * @param fileName 文件储存路径 * @param isHaveDevice 传入一个 true */ public VideoRecode(String fileName, boolean isHaveDevice) { rectangle = new Rectangle(Helper.screenSizeWidth(), Helper.screenSizeHeight()); recorder = new FFmpegFrameRecorder(fileName + ".mp4", Helper.screenSizeWidth(), Helper.screenSizeHeight()); // recorder.setVideoCodec(avcodec.AV_CODEC_ID_AV1); // 13 // recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4); // 13 recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264); recorder.setFormat("mp4"); // recorder.setSampleRate(44100); // recorder.setFrameRate(frameRate); // recorder.setVideoQuality(0); // recorder.setVideoOption("crf", "23"); recorder.setVideoBitrate(100000); recorder.setVideoOption("preset", "slow"); recorder.setPixelFormat(0); // yuv420p = 0 recorder.setAudioChannels(2); recorder.setAudioOption("crf", "0"); // Highest quality recorder.setAudioQuality(0); recorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC); try { robot = new Robot(); } catch (AWTException e) { e.printStackTrace(); } try { recorder.start(); } catch (Exception e) { System.out.print("*******************************"); } this.isHaveDevice = isHaveDevice; } /** * 开始录制 */ public void start() { if (startTime == 0) { startTime = System.currentTimeMillis(); } if (pauseTime == 0) { pauseTime = System.currentTimeMillis(); } //不录声音了 // 如果有录音设备则启动录音线程 // if (isHaveDevice) { // new Thread(new Runnable() { // public void run() { // caputre(); // } // }).start(); // } // 录屏 screenTimer = new ScheduledThreadPoolExecutor(1); screenTimer.scheduleAtFixedRate(new Runnable() { public void run() { BufferedImage screenCapture = robot.createScreenCapture(rectangle); // 截屏 BufferedImage videoImg = new BufferedImage((int) rectangle.getWidth(), (int) rectangle.getHeight(), BufferedImage.TYPE_3BYTE_BGR); // 声明一个BufferedImage用重绘截图 Graphics2D videoGraphics = videoImg.createGraphics();// 创建videoImg的Graphics2D videoGraphics.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE); videoGraphics.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_SPEED); videoGraphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED); videoGraphics.drawImage(screenCapture, 0, 0, null); // 重绘截图 //BufferedImage bi = robot.createScreenCapture(new Rectangle(Helper.screenSizeWidth(), Helper.screenSizeHeight())); Java2DFrameConverter java2dConverter = new Java2DFrameConverter(); Frame frame = java2dConverter.convert(videoImg); try { videoTS = 1000L * (System.currentTimeMillis() - startTime - (System.currentTimeMillis() - pauseTime)); // 检查偏移量 if (videoTS > recorder.getTimestamp()) { recorder.setTimestamp(videoTS); } recorder.record(frame); // 录制视频 } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { // 释放资源 videoGraphics.dispose(); videoGraphics = null; videoImg.flush(); videoImg = null; java2dConverter = null; screenCapture.flush(); screenCapture = null; } } }, (int) (1000 / frameRate), (int) (1000 / frameRate), TimeUnit.MILLISECONDS); } /** * 抓取声音 */ public void caputre() { audioFormat = new AudioFormat(44100.0F, 16, 2, true, false); dataLineInfo = new DataLine.Info(TargetDataLine.class, audioFormat); try { line = (TargetDataLine) AudioSystem.getLine(dataLineInfo); } catch (LineUnavailableException e1) { // TODO Auto-generated catch block System.out.println("#################"); } try { line.open(audioFormat); } catch (LineUnavailableException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } line.start(); final int sampleRate = (int) audioFormat.getSampleRate(); final int numChannels = audioFormat.getChannels(); int audioBufferSize = sampleRate * numChannels; final byte[] audioBytes = new byte[audioBufferSize]; exec = new ScheduledThreadPoolExecutor(1); exec.scheduleAtFixedRate(new Runnable() { public void run() { try { int nBytesRead = line.read(audioBytes, 0, line.available()); int nSamplesRead = nBytesRead / 2; short[] samples = new short[nSamplesRead]; // Let's wrap our short[] into a ShortBuffer and // pass it to recordSamples ByteBuffer.wrap(audioBytes).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(samples); ShortBuffer sBuff = ShortBuffer.wrap(samples, 0, nSamplesRead); // recorder is instance of // org.bytedeco.javacv.FFmpegFrameRecorder recorder.recordSamples(sampleRate, numChannels, sBuff); // System.gc(); } catch (org.bytedeco.javacv.FrameRecorder.Exception e) { System.out.println(e); } } }, (int) (1000 / frameRate), (int) (1000 / frameRate), TimeUnit.MILLISECONDS); } /** * 停止 */ public void stop() { if (null != screenTimer) { screenTimer.shutdownNow(); } try { recorder.stop(); recorder.release(); recorder.close(); screenTimer = null; // screenCapture = null; if (isHaveDevice) { if (null != exec) { exec.shutdownNow(); } if (null != line) { line.stop(); line.close(); } dataLineInfo = null; audioFormat = null; } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } /** * 暂停 * * @throws Exception */ public void pause() throws Exception { screenTimer.shutdownNow(); screenTimer = null; if (isHaveDevice) { exec.shutdownNow(); exec = null; line.stop(); line.close(); dataLineInfo = null; audioFormat = null; line = null; } pauseTime = System.currentTimeMillis(); } /** * 截屏 */ public static List<File> screenshot() { List<File> list = new ArrayList<>(); try { //把抓取到的内容写到一个jpg文件中 File file = new File("video/new/"); if (!file.exists()) { file.mkdir(); } SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HHmmss"); String date = sdf.format(new Date()); //一秒钟24张图片 System.out.println("开始截屏"); for (int a = 0; a <= 100; a++) { try { //休眠40毫秒截屏一次,一秒钟25张图 Thread.sleep(100); } catch (java.lang.Exception e) { } Robot robot = new Robot(); //根据指定的区域抓取屏幕的指定区域,1300是长度,800是宽度。 BufferedImage bi = robot.createScreenCapture(new Rectangle(Helper.screenSizeWidth(), Helper.screenSizeHeight())); File f = new File("video/new/" + date + "--" + a + ".jpg"); ImageIO.write(bi, "jpg", f); list.add(f); } System.out.println("截屏结束"); } catch (AWTException e) { e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); return null; } return list; } } ``` ``` ```

VHDL语言问题报错求助

Error (10802): VHDL Unconstrained Array error at b.vhd(3): formal "X" must be constrained 求助这个s什么问题啊?

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

程序员必知的 89 个操作系统核心概念

操作系统(Operating System,OS):是管理计算机硬件与软件资源的系统软件,同时也是计算机系统的内核与基石。操作系统需要处理管理与配置内存、决定系统资源供需的优先次序、控制输入与输出设备、操作网络与管理文件系统等基本事务。操作系统也提供一个让用户与系统交互的操作界面。 shell:它是一个程序,可从键盘获取命令并将其提供给操作系统以执行。 在过去,它是类似 Unix 的系统上...

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

立即提问
相关内容推荐