ath9k驱动不能正常记载导致板子一直重启 5C

qca9563 ath9k
内核 4.9.131
openwrt ap152

static int ath_ahb_probe(struct platform_device *pdev)
{
ret = ath9k_init_device(dev_id, sc, &ath_ahb_bus_ops);
}
int ath9k_init_device(u16 devid, struct ath_softc *sc,
const struct ath_bus_ops *bus_ops)
{

error = ath9k_init_softc(devid, sc, bus_ops);
}

static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
const struct ath_bus_ops *bus_ops)
{
ret = ath9k_hw_init(ah);
}
int ath9k_hw_init(struct ath_hw *ah)
{
int ret;
struct ath_common *common = ath9k_hw_common(ah);
}

static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah)
{
return &ah->common;
}

ath9k驱动调用该函数导致cup挂掉,具体如图,求助大神指导,或者给点思路。

图片说明

2个回答

这个问题不是MCP23017的问题,这个是无线驱动的问题,更上一个问题没有关系。谢谢你的回答。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
LINUX网卡驱动修改(ath9k驱动),求救!!
小弟现在做一个任务,需要跳过网卡驱动的协议栈,直接通过射频发送数据,不知如何修改? 网卡是AR9285,系统是LINUX,驱动为ATH9K。 不知各位高人有何指教?
Ubuntu 16.04 无线网卡的问题 高通 QCA9377
装了Ubuntu 16.04, 无线网卡是 高通 QCA9377。 显示Notavailable。 n多方法都试了,不好使。 通过下面的命令,可以看到 有网卡相关的驱动。 盼高人解答,谢谢! lsmod | grep ath ath10k_pci 45056 0 ath10k_core 299008 1 ath10k_pci ath 32768 1 ath10k_core mac80211 647168 1 ath10k_core cfg80211 577536 3 ath,mac80211,ath10k_core compat 16384 3 cfg80211,mac80211,ath10k_pci
Eliminate the Conflict 冲突的问题
Problem Description Conflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fights or even wars. How wonderful the world will be if all conflicts can be eliminated. Edward contributes his lifetime to invent a 'Conflict Resolution Terminal' and he has finally succeeded. This magic item has the ability to eliminate all the conflicts. It works like this: If any two people have conflict, they should simply put their hands into the 'Conflict Resolution Terminal' (which is simply a plastic tube). Then they play 'Rock, Paper and Scissors' in it. After they have decided what they will play, the tube should be opened and no one will have the chance to change. Finally, the winner have the right to rule and the loser should obey it. Conflict Eliminated! But the game is not that fair, because people may be following some patterns when they play, and if the pattern is founded by others, the others will win definitely. Alice and Bob always have conflicts with each other so they use the 'Conflict Resolution Terminal' a lot. Sadly for Bob, Alice found his pattern and can predict how Bob plays precisely. She is very kind that doesn't want to take advantage of that. So she tells Bob about it and they come up with a new way of eliminate the conflict: They will play the 'Rock, Paper and Scissors' for N round. Bob will set up some restricts on Alice. But the restrict can only be in the form of "you must play the same (or different) on the ith and jth rounds". If Alice loses in any round or break any of the rules she loses, otherwise she wins. Will Alice have a chance to win? Input The first line contains an integer T(1 <= T <= 50), indicating the number of test cases. Each test case contains several lines. The first line contains two integers N,M(1 <= N <= 10000, 1 <= M <= 10000), representing how many round they will play and how many restricts are there for Alice. The next line contains N integers B1,B2, ...,BN, where Bi represents what item Bob will play in the ith round. 1 represents Rock, 2 represents Paper, 3 represents Scissors. The following M lines each contains three integers A,B,K(1 <= A,B <= N,K = 0 or 1) represent a restrict for Alice. If K equals 0, Alice must play the same on Ath and Bth round. If K equals 1, she must play different items on Ath and Bthround. Output For each test case in the input, print one line: "Case #X: Y", where X is the test case number (starting with 1) and Y is "yes" or "no" represents whether Alice has a chance to win. Sample Input 2 3 3 1 1 1 1 2 1 1 3 1 2 3 1 5 5 1 2 3 2 1 1 2 1 1 3 1 1 4 1 1 5 1 2 3 0 Sample Output Case #1: no Case #2: yes
MTK7621+QCA9880+AR9580刷Openwrt 一些问题请教大家
在下是来向大家请教问题的,第一次遇上这种“杂交”配置,在上手这块板子的时候遇到一些问题,想跟大家请教探讨一下。 遇到的问题是,刷了openwrt之后,没有5G。 先介绍下环境,用的是openwrt15.05的版本 make menuconfig Target System (Ralink RT288x/RT3xxx) Subtarget (MT7621 based boards) Target Profile (PBR-M1 Device) -*- ath10k-firmware-qca988x.............. ath10k firmware for QCA988x devices -*- kmod-ath...................................... Atheros common driver part <*> kmod-ath10k...................... Atheros 802.11ac wireless cards support <*> kmod-ath9k.................... Atheros 802.11n PCI wireless cards support -*- kmod-ath9k-common 2.4G是AR9580 5G是QCA9880 MTK7621做主CPU 那么问题来了,选择地Subtarget是7621,../ramips/base-file/XXX, 这些编译出来的ath10k的脚本都是ramips的,5G模块用的是QCA9880,应该对应ar71xx的脚本吧。 于是做了一下尝试: 1.将./target/linux/ar71xx 下的脚本移到ramips目录下, 在11-ath10k-caldata 中添加 "ath10k/cal-pci-0000:01:00.0.bin") case $board in pbr-m1) ath10kcal_extract "EEPROM" 32768 2047 ;; 然后编译. 2.将../QCA988X/hw2.0/下的 board.bin firmware-5.bin 直接拷贝到路由器。 编译通过,最后烧录到路由器上问题没有得到解决。 后面仔细看了ramips/../hotplug.d/ 和 ../lib/preinit/* 这些脚本, 还是不知道错在哪里。 思路有限,也怕误入歧途,所以来请教下 广大openwrt玩家,请大家指教。
Dragon Balls 的编写
Problem Description Five hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for Monkey King(WuKong) to gather all of the dragon balls together. His country has N cities and there are exactly N dragon balls in the world. At first, for the ith dragon ball, the sacred dragon will puts it in the ith city. Through long years, some cities' dragon ball(s) would be transported to other cities. To save physical strength WuKong plans to take Flying Nimbus Cloud, a magical flying cloud to gather dragon balls. Every time WuKong will collect the information of one dragon ball, he will ask you the information of that ball. You must tell him which city the ball is located and how many dragon balls are there in that city, you also need to tell him how many times the ball has been transported so far. Input The first line of the input is a single positive integer T(0 < T <= 100). For each case, the first line contains two integers: N and Q (2 < N <= 10000 , 2 < Q <= 10000). Each of the following Q lines contains either a fact or a question as the follow format: T A B : All the dragon balls which are in the same city with A have been transported to the city the Bth ball in. You can assume that the two cities are different. Q A : WuKong want to know X (the id of the city Ath ball is in), Y (the count of balls in Xth city) and Z (the tranporting times of the Ath ball). (1 <= A, B <= N) Output For each test case, output the test case number formated as sample output. Then for each query, output a line with three integers X Y Z saparated by a blank space. Sample Input 2 3 3 T 1 2 T 3 2 Q 2 3 4 T 1 2 Q 1 T 1 3 Q 1 Sample Output Case 1: 2 3 0 Case 2: 2 2 1 3 3 2
新手求助大神,在linux环境下如何获取一个wifi模块的工作状态?
一个PCIE接口的wifi模块工作在嵌入式模块上,ath9k的驱动已安装好, 想在开发的软件中实时监控该wifi模块的工作状态,比如工作中,故障之类的。 还请各位高人指点!!
无线网卡的调制模式都有那些?
ath9k无线网卡的驱动调制模式都有那些,应该在哪里选择呢?相关代码在哪一块?
Sum of Tribonacci Numbers 要如何实现
Problem Description Everybody knows Fibonacci numbers, now we are talking about the Tribonacci numbers: T[0] = T[1] = T[2] = 1; T[n] = T[n - 1] + T[n - 2] + T[n - 3] (n >= 3) Given a and b, you are asked to calculate the sum from the ath Fibonacci number to the bth Fibonacci number, mod 1,000,000,007, that is (T[a] + T[a + 1] + ... + T[b]) % 1,000,000,007. Input There are multiple cases (no more than 100). Each case contain two non-negative integers a b(a <= b and a, b < 1,000,000,000) Output For each case, output the sum % 1,000,000,007. Sample Input 0 2 0 5 Sample Output 3 20
makefile中怎么定义下载代码
各位大神好,在这里请教各位一个关于makefile的问题,先行谢过。 我目的是想编译fastboot源码,需要一些依赖文件,然后想在在makefile中指出下载的地址,编译时候 自动下载其余代码。 手动下载代码是通过: git clone -b android-4.4_r1.2 https://android.googlesource.com/platform/system/core 看了关于http://my.oschina.net/hevakelcj/blog/411942的讲解,还是有一些不懂。 翻看其他makefile PKG_NAME:=ath10k-firmware PKG_SOURCE_VERSION:=77f72b5f7dd940386d9e619a17904987759b7186 PKG_VERSION:=2014-11-13-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git define Download/ath10k-firmware-qca988x URL:=https://www.codeaurora.org/cgit/quic/qsdk/oss/firmware/ath10k-firmware/plain/10.2.4/ FILE:=$(QCA988X_FIRMWARE_FILE) 这里有疑问了,这里面需要 指出正确的PKG_SOURCE_VERSION PKG_VERSION PKG_SOURCE_SUBDIR 吗?因为我的PKG_NAME 不是这个android-4.4_r1.2。 还请各位指点迷津
Ubuntu 18.04.2 LTS Wifi连接不上(高通QCA9377无线网卡)
问题描述:安装了win10和Ubuntu 18.04.2 LTS双系统。win10中无线有线均可以上网,ubuntu中可以USB连接手机上网,但是无法连接wifi,设置中显示“未发现Wifi适配器”。 有线网卡型号:Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 无线网卡型号:Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31) 在终端使用lspci命令二者均可显示 尝试解决: 终端中使用如下命令 sudo apt-get install build-essential linux-headers-$(uname -r) git echo "options ath10k_core skip_otp=y" | sudo tee /etc/modprobe.d/ath10k_core.conf wget https://www.kernel.org/pub/linux/kernel/projects/backports/2015/11/20/backports-20151120.tar.gz tar zxvf backports-20151120.tar.gz cd backports-20151120 make defconfig-wifi make sudo make install 在输入make命令之后报错: ``` /home/l/backports-20151120/backport-include/linux/kconfig.h:25:28: warning: "config_enabled" is not defined, evaluates to 0 [-Wundef] #define IS_BUILTIN(option) config_enabled(option) ^ ```
QCA方案的无线Mac是在哪里读取的?
ilq1.2 QCA9561 刚接触QCA的东西,用QCA的SDK编译AP151的固件, 按照以前编译trunk那一套来 发现行不通, 有线的Mac地址可以更改,无线的Mac地址一直改不掉。 开始还以为是从ART分区中读取的, ath0 Link encap:Ethernet HWaddr 00:02:03:04:05:06 ath1 Link encap:Ethernet HWaddr 00:03:7F:4F:00:16 后来把ART分区中的这些数值改掉了,重新刷固件发现还是默认值,所以猜测无线的Mac是在驱动中写的。 现在想请教的是,qca的驱动中,无线的mac是从哪里读取到的呢。
LCIS 的一个实现的方式
Problem Description Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the longest consecutive increasing subsequence (LCIS) in [a, b]. Input T in the first line, indicating the case number. Each case starts with two integers n , m(0<n,m<=105). The next line has n integers(0<=val<=105). The next m lines each has an operation: U A B(0<=A,n , 0<=B=105) OR Q A B(0<=A<=B< n). Output For each Q, output the answer. Sample Input 1 10 10 7 7 3 3 5 9 9 8 1 8 Q 6 6 U 3 4 Q 0 1 Q 0 5 Q 4 7 Q 3 5 Q 0 2 Q 4 6 U 6 10 Q 0 9 Sample Output 1 1 4 2 3 1 2 5
linux 内核 spi驱动出错
请教,我在linux下(2.6.32)进行gpio模拟spi操作,但是当我调用spi_register_board_info 函数的时候,代码死机了,其具体情况如下: static struct spi_board_info stm32_board_info = { .modalias = "stm32-spi", .max_speed_hz = 10000000, .bus_num = 1, .mode = SPI_MODE_0, }; ret = spi_register_board_info(&stm32_board_info, 1); 死机了: do_cpu invoked from kernel context![#1]: Cpu 0 $ 0 : 00000000 004fdbd6 0000001f 00000001 $ 4 : 81c97c84 00000001 ffffffff 80126830 $ 8 : 3a207061 72616c6c 00000000 7271210a $12 : 7fa41760 00103044 2a60d837 00000000 $16 : 826e02c0 81fa1e08 826e0000 7fa417f0 $20 : 81fa1e08 0049a688 004e9d90 004fdb68 $24 : 00000000 80125f34 $28 : 81fa0000 81fa1930 004fdbc6 81c82684 Hi : 00000000 Lo : 17b44000 epc : 801df82c spi_register_board_info+0x4/0xa0 // 该接口挂了 Tainted: P ra : 81c82684 para_init+0x30/0xd8 [umac] Status: 1000ff03 KERNEL EXL IE Cause : 9080002c PrId : 00019374 (MIPS 24Kc) Modules linked in: wvas_wloc wbs_sec aclk rg_data_plane efqos_kernel roamk rg_wvlan proc_info ar93xx_et eth_subif umac ath_dev(P) ath_rate_atheros(P) ath_hal asf(P) adf(P) wbs_fwd_intf capwap_kernel rg_wlibk wbuf wbs_mng ef_bridge_ko af_packet ipv4 ref_ip eth_parser srvk net2con fpm_k ref_frame lsm_ko wbs_dev dm_chardev env_utils setmac_utils product_info_utils get_envi mtdoops rg_console rg_sysfs rg_thread_det rg_lowmem_killer rg_dprintk Process wbs_mng.elf (pid: 603, threadinfo=81fa0000, task=82a64038, tls=2aab7770) Stack : 00000009 81c8c89c 00000000 00000010 826e02c0 81c81094 81fa1a88 81fa1b70 00000006 00000000 00000001 00000000 00000005 00000001 81fa1e08 81c4bd1c 00000000 00000042 004fdbc6 00000010 00000000 00000000 81fa1b2c 00000000 00000000 00000001 81fa1a50 81fa1a5c 81fa1a50 00000003 00000000 00000000 00060000 8089c000 00000000 00060001 000000ff 00000000 00060000 004e0000 ... Call Trace: [<801df82c>] spi_register_board_info+0x4/0xa0 [<81c82684>] para_init+0x30/0xd8 [umac] [<81c81094>] rj_ath_wloc_set_tcl_cb+0x12c/0x14c [umac] [<81c4bd1c>] ath_ioctl+0x1b8/0x82c [umac] [<80160688>] dev_ioctl+0x664/0x71c [<80089920>] vfs_ioctl+0x2c/0x70 [<8008a008>] do_vfs_ioctl+0x5a0/0x5f8 [<8008a0a8>] sys_ioctl+0x48/0x7c [<80004124>] stack_done+0x20/0x3c Code: 000003f1 0001678c 00000004 <1100000d> 00000001 00016620 00000000 1100fff1 000004d2 Fatal exception: panic in 5 seconds Kernel panic - not syncing: Fatal exception Call Trace: [<800074bc>] dump_stack+0x8/0x34 [<80007550>] panic+0x68/0x13c [<8000f8d8>] die+0xc8/0xd0 [<8000fa24>] do_cpu+0x38/0x268 [<80002400>] ret_from_exception+0x0/0xc [<801df82c>] spi_register_board_info+0x4/0xa0 [<81c82684>] para_init+0x30/0xd8 [umac] [<81c81094>] rj_ath_wloc_set_tcl_cb+0x12c/0x14c [umac] [<81c4bd1c>] ath_ioctl+0x1b8/0x82c [umac] [<80160688>] dev_ioctl+0x664/0x71c [<80089920>] vfs_ioctl+0x2c/0x70 [<8008a008>] do_vfs_ioctl+0x5a0/0x5f8 [<8008a0a8>] sys_ioctl+0x48/0x7c [<80004124>] stack_done+0x20/0x3c 自身没感觉到调用的时候产生了啥错误,请帮忙指点下;
用 C语言来实现LCIS的问题
Problem Description Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the longest consecutive increasing subsequence (LCIS) in [a, b]. Input T in the first line, indicating the case number. Each case starts with two integers n , m(0<n,m<=105). The next line has n integers(0<=val<=105). The next m lines each has an operation: U A B(0<=A,n , 0<=B=105) OR Q A B(0<=A<=B< n). Output For each Q, output the answer. Sample Input 1 10 10 7 7 3 3 5 9 9 8 1 8 Q 6 6 U 3 4 Q 0 1 Q 0 5 Q 4 7 Q 3 5 Q 0 2 Q 4 6 U 6 10 Q 0 9 Sample Output 1 1 4 2 3 1 2 5
Little Wish~ lyrical step~的过程的编写技术
Problem Description N children are living in a tree with exactly N nodes, on each node there lies either a boy or a girl. A girl is said to be protected, if the distance between the girl and her nearest boy is no more than D. You want to do something good, so that each girl on the tree will be protected. On each step, you can choose two nodes, and swap the children living on them. What is the minimum number of steps you have to take to fulfill your wish? Input The first line has a number T (T <= 150) , indicating the number of test cases. In a case, the first line contain two number n (1 <= n <= 50), D (1 <= D <= 10000000), Which means the number of the node and the distance between the girls and boys. The next lines contains n number. The ith number means the ith node contains a girl or a boy. (0 means girl 1 means boy), The follow n - 1 lines contains a, b, w, means a edge connect ath node and bth node, and the length of the edge is w (1 <= w <= 10000000). Output For every case, you should output "Case #t: " at first, without quotes. The t is the case number starting from 1. Then follows the answer, -1 meas you can't comlete it, and others means the minimum number of the times. Sample Input 1 3 1 0 0 1 1 2 1 1 3 1 Sample Output Case #1: 1
C语言代码编程方法,Little Wish~ lyrical step~
Problem Description N children are living in a tree with exactly N nodes, on each node there lies either a boy or a girl. A girl is said to be protected, if the distance between the girl and her nearest boy is no more than D. You want to do something good, so that each girl on the tree will be protected. On each step, you can choose two nodes, and swap the children living on them. What is the minimum number of steps you have to take to fulfill your wish? Input The first line has a number T (T <= 150) , indicating the number of test cases. In a case, the first line contain two number n (1 <= n <= 50), D (1 <= D <= 10000000), Which means the number of the node and the distance between the girls and boys. The next lines contains n number. The ith number means the ith node contains a girl or a boy. (0 means girl 1 means boy), The follow n - 1 lines contains a, b, w, means a edge connect ath node and bth node, and the length of the edge is w (1 <= w <= 10000000). Output For every case, you should output "Case #t: " at first, without quotes. The t is the case number starting from 1. Then follows the answer, -1 meas you can't comlete it, and others means the minimum number of the times. Sample Input 1 3 1 0 0 1 1 2 1 1 3 1 Sample Output Case #1: 1
大神,我这代码运行时为什么出错?
#include<stdio.h> #include<stdlib.h> #include<string.h> struct sport { char sex,athname[10]; char itemtype,itemname[10]; int itemrank,itemnum,mgrade,wgrade; }ath[2]; struct school { int num; char name[10]; struct sport ath[2]; //int score; }sch[2]; void xuexiaochazhao() { int a,b,schoolnum; printf("请输入你要查询的学校编号:"); scanf("%d",&schoolnum); for(a=0;a<2;a++) { for(b=0;b<2;b++) if(sch[a].num==schoolnum) { printf("学校编号,名称,运动员(姓名,性别,项目类型,项目编号,项目名称,项目得分)"); printf("\n%5d,%5s,%10s,%5c,%5c,%7d,%13s,%5d\n", sch[a].num,sch[a].name,sch[a].ath[b].athname,sch[a].ath[b].sex, sch[a].ath[b].itemtype,sch[a].ath[b].itemnum,sch[a].ath[b].itemname, sch[a].ath[b].itemrank); } } } void xiangmuchazhao() { int a,b,itnum; printf("请输入你要查询的项目编号:"); scanf("%d",&itnum); for(a=0;a<2;a++) { for(b=0;b<2;b++) { if(ath[b].itemnum==itnum) { printf("学校编号,名称,运动员(姓名,性别,项目类型,项目编号,项目名称,项目得分)"); printf("\n%5d,%5s,%10s,%5c,%5c,%7d,%13s,%5d\n", sch[a].num,sch[a].name,sch[a].ath[b].athname,sch[a].ath[b].sex, sch[a].ath[b].itemtype,sch[a].ath[b].itemnum,sch[a].ath[b].itemname, sch[a].ath[b].itemrank); } } } } void menu() { void inputandrecord(),exited(); int n,i; printf(" 运动会比赛计分系统 \n"); printf(" 1,本次运动会共有N个学校,M个男生项目,W个女生项目 \n"); printf("2,各个项目项目名次对应得分有两种情况:a,前五名依次得分:7,5,3,2,1;b,前三名依次得分:5,3,2,\n"); printf(" 3,赛后记录每个项目对应得分情况 \n"); printf(" 4,查找每个学校的比赛情况 \n"); printf(" 5,退出 \n"); printf(" -------------------"); printf(" -------------------\n"); for(i=0;i<2;i++) { scanf("%d",&n); switch(n) { case 1: inputandrecord();break; case 5: exited();break; } } } void inputandrecord() { int a,b,m,chazhao; for(a=0;a<2;a++) { printf("\n请输入学校信息\n"); printf("编号:");scanf("%d",&sch[a].num); printf("名字:");scanf("%s",sch[a].name); getchar(); for(b=0;b<2;b++) { printf("\n请输入项目信息\n"); printf("类型:");scanf("%c",&sch[a].ath[b].itemtype); printf("编号:");scanf("%d",&sch[a].ath[b].itemnum); printf("名字:");scanf("%s",sch[a].ath[b].itemname); getchar(); printf("\n请输入运动员信息\n"); printf("名字:");scanf("%s",sch[a].ath[b].athname); getchar(); printf("性别:");scanf("%c",&sch[a].ath[b].sex); printf("名次:");scanf("%d",sch[a].ath[b].itemrank); if(sch[a].ath[b].itemtype=='W') { switch(sch[a].ath[b].itemrank) { case 0:printf("没有此名次;\n");break; case 1:sch[a].ath[b].mgrade=5;printf("mgrade=5\n");break; case 2:sch[a].ath[b].mgrade=3;printf("mgrade=3\n");break; case 3:sch[a].ath[b].mgrade=2;printf("mgrade=2\n");break; default:printf("不符合条件;\n"); } } if(sch[a].ath[b].itemtype=='M') { switch(sch[a].ath[b].itemrank) { case 0:printf("没有此名次;\n");break; case 1:sch[a].ath[b].wgrade=7;printf("wgrade=7\n");break; case 2:sch[a].ath[b].wgrade=5;printf("wgrade=5\n");break; case 3:sch[a].ath[b].wgrade=3;printf("wgrade=3\n");break; case 4:sch[a].ath[b].wgrade=2;printf("wgrade=2\n");break; case 5:sch[a].ath[b].wgrade=1;printf("wgrade=1\n");break; default:printf("不符合条件;\n"); } } } } for(a=0;a<2;a++) { printf("====学校编号:"); printf("%d\n",sch[a].num); for(b=0;b<2;b++) { printf("ath[a]:%s-%s-%c-%c-%d-%s-%d\n\n",sch[a].name,sch[a].ath[b].athname, sch[a].ath[b].sex,sch[a].ath[b].itemtype,sch[a].ath[b].itemnum, sch[a].ath[b].itemname,sch[a].ath[b].itemrank); } } printf("*******************\n\n"); for(m=0;m<4;m++) { printf("按学校查找请输入1,按项目查找请输入2: "); scanf(" %d",&chazhao); if(chazhao==1) xuexiaochazhao(); if(chazhao==2) xiangmuchazhao(); } } void exited() { printf(" -------------------\n"); printf(" -------------------\n"); printf("感谢老师验收\n"); printf(" -------------------\n"); printf(" -------------------"); } void main() { system("color f5"); menu(); } ![图片说明](https://img-ask.csdn.net/upload/201509/24/1443090969_691890.jpg)
如何排除掉冲突的项,怎么用C语言的程序具体的思想来编写出的代码的过程去实现的排除
Problem Description Conflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fights or even wars. How wonderful the world will be if all conflicts can be eliminated. Edward contributes his lifetime to invent a 'Conflict Resolution Terminal' and he has finally succeeded. This magic item has the ability to eliminate all the conflicts. It works like this: If any two people have conflict, they should simply put their hands into the 'Conflict Resolution Terminal' (which is simply a plastic tube). Then they play 'Rock, Paper and Scissors' in it. After they have decided what they will play, the tube should be opened and no one will have the chance to change. Finally, the winner have the right to rule and the loser should obey it. Conflict Eliminated! But the game is not that fair, because people may be following some patterns when they play, and if the pattern is founded by others, the others will win definitely. Alice and Bob always have conflicts with each other so they use the 'Conflict Resolution Terminal' a lot. Sadly for Bob, Alice found his pattern and can predict how Bob plays precisely. She is very kind that doesn't want to take advantage of that. So she tells Bob about it and they come up with a new way of eliminate the conflict: They will play the 'Rock, Paper and Scissors' for N round. Bob will set up some restricts on Alice. But the restrict can only be in the form of "you must play the same (or different) on the ith and jth rounds". If Alice loses in any round or break any of the rules she loses, otherwise she wins. Will Alice have a chance to win? Input The first line contains an integer T(1 <= T <= 50), indicating the number of test cases. Each test case contains several lines. The first line contains two integers N,M(1 <= N <= 10000, 1 <= M <= 10000), representing how many round they will play and how many restricts are there for Alice. The next line contains N integers B1,B2, ...,BN, where Bi represents what item Bob will play in the ith round. 1 represents Rock, 2 represents Paper, 3 represents Scissors. The following M lines each contains three integers A,B,K(1 <= A,B <= N,K = 0 or 1) represent a restrict for Alice. If K equals 0, Alice must play the same on Ath and Bth round. If K equals 1, she must play different items on Ath and Bthround. Output For each test case in the input, print one line: "Case #X: Y", where X is the test case number (starting with 1) and Y is "yes" or "no" represents whether Alice has a chance to win. Sample Input 2 3 3 1 1 1 1 2 1 1 3 1 2 3 1 5 5 1 2 3 2 1 1 2 1 1 3 1 1 4 1 1 5 1 2 3 0 Sample Output Case #1: no Case #2: yes
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
这30个CSS选择器,你必须熟记(上)
关注前端达人,与你共同进步CSS的魅力就是让我们前端工程师像设计师一样进行网页的设计,我们能轻而易举的改变颜色、布局、制作出漂亮的影音效果等等,我们只需要改几行代码,不需...
国产开源API网关项目进入Apache孵化器:APISIX
点击蓝色“程序猿DD”关注我回复“资源”获取独家整理的学习资料!近日,又有一个开源项目加入了这个Java开源界大名鼎鼎的Apache基金会,开始进行孵化器。项目名称:AP...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
编写Spring MVC控制器的14个技巧
本期目录 1.使用@Controller构造型 2.实现控制器接口 3.扩展AbstractController类 4.为处理程序方法指定URL映射 5.为处理程序方法指定HTTP请求方法 6.将请求参数映射到处理程序方法 7.返回模型和视图 8.将对象放入模型 9.处理程序方法中的重定向 10.处理表格提交和表格验证 11.处理文件上传 12.在控制器中自动装配业务类 ...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
求小姐姐抠图竟遭白眼?痛定思痛,我决定用 Python 自力更生!
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习大家好,我是 Rocky0429,一个刚恰完午饭,正在用刷网页浪费生命的蒟蒻...一堆堆无聊八卦信息的网页内容慢慢使我的双眼模糊,一个哈欠打出了三斤老泪,就在此时我看到了一张图片:是谁!是谁把我女朋友的照片放出来的!awsl!太好看了叭...等等,那个背景上的一堆鬼画符是什么鬼?!真是看不下去!叔叔婶婶能忍,隔壁老王的三姨妈的四表...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
相关热词 c# 输入ip c# 乱码 报表 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件
立即提问