急,跪求pycharm跑yolov3-train.py报错

图片说明

import numpy as np
import keras.backend as K
from keras.layers import Input, Lambda
from keras.models import Model
from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping
from yolo3.model import preprocess_true_boxes, yolo_body, tiny_yolo_body, yolo_loss
from yolo3.utils import get_random_data


def _main():
    annotation_path = 'train.txt'
    log_dir = 'logs/000/'
    classes_path = 'model_data/voc_classes.txt'
    anchors_path = 'model_data/yolo_anchors.txt'
    class_names = get_classes(classes_path)
    anchors = get_anchors(anchors_path)
    input_shape = (416,416) # multiple of 32, hw
    model = create_model(input_shape, anchors, len(class_names) )
    train(model, annotation_path, input_shape, anchors, len(class_names), log_dir=log_dir)

def train(model, annotation_path, input_shape, anchors, num_classes, log_dir='logs/'):
    model.compile(optimizer='adam', loss={
        'yolo_loss': lambda y_true, y_pred: y_pred})
    logging = TensorBoard(log_dir=log_dir)
    checkpoint = ModelCheckpoint(log_dir + "ep{epoch:03d}-loss{loss:.3f}-val_loss{val_loss:.3f}.h5",
        monitor='val_loss', save_weights_only=True, save_best_only=True, period=1)
    batch_size = 8
    val_split = 0.1
    with open(annotation_path) as f:
        lines = f.readlines()
    np.random.shuffle(lines)
    num_val = int(len(lines)*val_split)
    num_train = len(lines) - num_val
    print('Train on {} samples, val on {} samples, with batch size {}.'.format(num_train, num_val, batch_size))

    model.fit_generator (
        data_generator_wrapper ( lines[:num_train] , batch_size , input_shape , anchors , num_classes ) ,
        steps_per_epoch=max ( 1 , num_train // batch_size ) ,
        validation_data=data_generator_wrapper (
            lines[num_train:] , batch_size , input_shape , anchors , num_classes ) ,
        validation_steps=max ( 1 , num_val // batch_size ) ,
        epochs=10 ,
        initial_epoch=0 ,
        callbacks=[logging , checkpoint] )

    model.save_weights(log_dir + 'trained_weights.h5')

def get_classes(classes_path):
    with open(classes_path) as f:
        class_names = f.readlines()
    class_names = [c.strip() for c in class_names]
    return class_names

def get_anchors(anchors_path):
    with open(anchors_path) as f:
        anchors = f.readline()
    anchors = [float(x) for x in anchors.split(',')]
    return np.array(anchors).reshape(-1, 2)

def create_model(input_shape, anchors, num_classes, load_pretrained=False, freeze_body=False,
            weights_path='model_data/yolo_weights.h5'):
    K.clear_session() # get a new session
    h, w = input_shape
    image_input = Input(shape=(w, h, 3))
    num_anchors = len(anchors)
    y_true = [Input(shape=(h//{0:32, 1:16, 2:8}[l], w//{0:32, 1:16, 2:8}[l],
        num_anchors//3, num_classes+5)) for l in range(3)]

    model_body = yolo_body(image_input, num_anchors//3, num_classes)
    print('Create YOLOv3 model with {} anchors and {} classes.'.format(num_anchors, num_classes))

    if load_pretrained:
        model_body.load_weights(weights_path, by_name=True, skip_mismatch=True)
        print('Load weights {}.'.format(weights_path))
        if freeze_body in [1, 2]:
            # Do not freeze 3 output layers.
            num = (185 , len ( model_body.layers ) - 3)[freeze_body - 1]
            for i in range(num):
                model_body.layers[i].trainable = False
            print('Freeze the first {} layers of total {} layers.'.format(num, len(model_body.layers)))
    model_loss = Lambda ( yolo_loss ,
                          output_shape=(1 ,) , name='yolo_loss',
                          arguments={'anchors': anchors,
                                     'num_classes': num_classes,
                                     'ignore_thresh': 0.5}
                          )(model_body.output + y_true)
    model = Model(inputs=[model_body.input] + y_true, outputs=model_loss)
    return model
def data_generator(annotation_lines, batch_size, input_shape, anchors, num_classes):
    n = len(annotation_lines)

    i = 0
    while True:
        image_data = []
        box_data = []
        for b in range(batch_size):
            if i==0:
                np.random.shuffle(annotation_lines)
            image, box = get_random_data(annotation_lines[i], input_shape, random=True)
            image_data.append(image)
            box_data.append(box)
            i = (i+1) % n
        image_data = np.array(image_data)
        box_data = np.array(box_data)
        y_true = preprocess_true_boxes(box_data, input_shape, anchors, num_classes)
        yield [image_data]+y_true, np.zeros(batch_size)

def data_generator_wrapper(annotation_lines, batch_size, input_shape, anchors, num_classes):
    n = len(annotation_lines)
    if n==0 or batch_size<=0: return None
    return data_generator(annotation_lines, batch_size, input_shape, anchors, num_classes)

if __name__ == '__main__':
    _main()

报了一个:tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation training/Adam/gradients/AddN_24 of type _MklAddN must have the same size and shape. Input 0: [2768896] != input 1: [8,26,26,512]
[[Node: training/Adam/gradients/AddN_24 = _MklAddN[N=2, T=DT_FLOAT, _kernel="MklOp", _device="/job:localhost/replica:0/task:0/device:CPU:0"](training/Adam/gradients/batch_normalization_65/FusedBatchNorm_grad/FusedBatchNormGrad, training/Adam/gradients/batch_n

EtherealQ
EtherealQ 我也出错了 不过可能问题还在你前面 所以可以找你帮忙看下吗
24 天之前 回复
weixin_43750615
深情从下而终 巧了,我也是这个报错
10 个月之前 回复
qq_38711478
qq_38711478 你好,最近我也遇到了这个问题,请问你解决了吗?
12 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
训练模型前运行train.py报错?

感谢各位大佬!!!! 经历重重困难,终于走带最后一步,结果却还是卡在了这里,话不多说,上图。 ![图片说明](https://img-ask.csdn.net/upload/201908/01/1564625533_691952.png) 这个问题已经是第二次了,在我使用generate——tfrecord.py时也出现过类型的错误,因为但是还是生成了.record文件,就没有去管它,现在好像不行了。

Django执行python manage.py migrate报错情况如下,求大神指教

![图片说明](https://img-ask.csdn.net/upload/201905/11/1557577343_698571.png) 老是报错,求大神指点

为什么我已经在pycharm里安装opencv-contrib库依旧有错误提示?

1、系统环境是Ubuntu16.04,pycharm编译环境,现安装的库包括![图片说明](https://img-ask.csdn.net/upload/201904/13/1555163642_430593.png) 2、出错代码 model = cv2.face.createEigenFaceRecognizer()![图片说明](https://img-ask.csdn.net/upload/201904/13/1555163859_29594.png) 3、报错信息 AttributeError: module 'cv2.cv2' has no attribute 'face'![图片说明](https://img-ask.csdn.net/upload/201904/13/1555164020_648644.png) 各位大哥如果能告诉我问题出在哪我感谢不尽!

pycharm断点运行后会出现_pydev_execfile.py文件

我在断点运行文件时 文件代码可以正常跑完没有bug 但是每次都会弹出_pydev_execfile.py文件 文件代码图如下![图片说明](https://img-ask.csdn.net/upload/202004/02/1585840678_347553.png) 希望有老师可以解决一下pydev_execfile.py 文件总是弹出的问题谢谢 有劳

pycharm运行mnist_show.py出现如下问题,

# 这是深度学习入门这本书里的一段代码,请问这个问题是什么意思以及怎样解决? 报错如下:(下面有源代码)Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] on win32 runfile('E:/PycharmProjects/deep-learning-from-scratch-master/ch03/mnist_show.py', wdir='E:/PycharmProjects/deep-learning-from-scratch-master/ch03') Converting train-images-idx3-ubyte.gz to NumPy Array ... Traceback (most recent call last): File "D:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-eab209ee1d7f>", line 1, in <module> runfile('E:/PycharmProjects/deep-learning-from-scratch-master/ch03/mnist_show.py', wdir='E:/PycharmProjects/deep-learning-from-scratch-master/ch03') File "D:\Program Files\JetBrains\PyCharm 2019.1.1\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "D:\Program Files\JetBrains\PyCharm 2019.1.1\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "E:/PycharmProjects/deep-learning-from-scratch-master/ch03/mnist_show.py", line 13, in <module> (x_train, t_train), (x_test, t_test) = load_mnist(flatten=True, normalize=False) File "E:\PycharmProjects\deep-learning-from-scratch-master\dataset\mnist.py", line 106, in load_mnist init_mnist() File "E:\PycharmProjects\deep-learning-from-scratch-master\dataset\mnist.py", line 76, in init_mnist dataset = _convert_numpy() 源代码为:# coding: utf-8 mnist_show.py:::: import sys, os sys.path.append(os.pardir) # 为了导入父目录的文件而进行的设定 import numpy as np from dataset.mnist import load_mnist from PIL import Image def img_show(img): pil_img = Image.fromarray(np.uint8(img)) pil_img.show() (x_train, t_train), (x_test, t_test) = load_mnist(flatten=True, normalize=False) img = x_train[0] label = t_train[0] print(label) # 5 print(img.shape) # (784,) img = img.reshape(28, 28) # 把图像的形状变为原来的尺寸 print(img.shape) # (28, 28) img_show(img) mnist.py::: # coding: utf-8 try: import urllib.request except ImportError: raise ImportError('You should use Python 3.x') import os.path import gzip import pickle import os import numpy as np url_base = 'http://yann.lecun.com/exdb/mnist/' key_file = { 'train_img':'train-images-idx3-ubyte.gz', 'train_label':'train-labels-idx1-ubyte.gz', 'test_img':'t10k-images-idx3-ubyte.gz', 'test_label':'t10k-labels-idx1-ubyte.gz' } dataset_dir = os.path.dirname(os.path.abspath(__file__)) save_file = dataset_dir + "/mnist.pkl" train_num = 60000 test_num = 10000 img_dim = (1, 28, 28) img_size = 784 def _download(file_name): file_path = dataset_dir + "/" + file_name if os.path.exists(file_path): return print("Downloading " + file_name + " ... ") urllib.request.urlretrieve(url_base + file_name, file_path) print("Done") def download_mnist(): for v in key_file.values(): _download(v) def _load_label(file_name): file_path = dataset_dir + "/" + file_name print("Converting " + file_name + " to NumPy Array ...") with gzip.open(file_path, 'rb') as f: labels = np.frombuffer(f.read(), np.uint8, offset=8) print("Done") return labels def _load_img(file_name): file_path = dataset_dir + "/" + file_name print("Converting " + file_name + " to NumPy Array ...") with gzip.open(file_path, 'rb') as f: data = np.frombuffer(f.read(), np.uint8, offset=16) data = data.reshape(-1, img_size) print("Done") return data def _convert_numpy(): dataset = {} dataset['train_img'] = _load_img(key_file['train_img']) dataset['train_label'] = _load_label(key_file['train_label']) dataset['test_img'] = _load_img(key_file['test_img']) dataset['test_label'] = _load_label(key_file['test_label']) return dataset def init_mnist(): download_mnist() dataset = _convert_numpy() print("Creating pickle file ...") with open(save_file, 'wb') as f: pickle.dump(dataset, f, -1) print("Done!") def _change_one_hot_label(X): T = np.zeros((X.size, 10)) for idx, row in enumerate(T): row[X[idx]] = 1 return T def load_mnist(normalize=True, flatten=True, one_hot_label=False): """读入MNIST数据集 Parameters ---------- normalize : 将图像的像素值正规化为0.0~1.0 one_hot_label : one_hot_label为True的情况下,标签作为one-hot数组返回 one-hot数组是指[0,0,1,0,0,0,0,0,0,0]这样的数组 flatten : 是否将图像展开为一维数组 Returns ------- (训练图像, 训练标签), (测试图像, 测试标签) """ if not os.path.exists(save_file): init_mnist() with open(save_file, 'rb') as f: dataset = pickle.load(f) if normalize: for key in ('train_img', 'test_img'): dataset[key] = dataset[key].astype(np.float32) dataset[key] /= 255.0 if one_hot_label: dataset['train_label'] = _change_one_hot_label(dataset['train_label']) dataset['test_label'] = _change_one_hot_label(dataset['test_label']) if not flatten: for key in ('train_img', 'test_img'): dataset[key] = dataset[key].reshape(-1, 1, 28, 28) return (dataset['train_img'], dataset['train_label']), (dataset['test_img'], dataset['test_label']) if __name__ == '__main__': init_mnist()

pycharm无法导入包的问题

有大神吗。。。anaconda运行就可以,numpy和matplotlib库都行。但是一用pycharm,就不行了。说找不到模块。pycharm里面的环境是echo%path%来的,我全复制粘贴上去了,而且包下载的环境和运行的环境都是base。搞了一天了,人快没了。 ![图片说明](https://img-ask.csdn.net/upload/202003/14/1584182209_946789.png)![图片说明](https://img-ask.csdn.net/upload/202003/14/1584182220_113000.png)![图片说明](https://img-ask.csdn.net/upload/202003/14/1584182225_375399.png)![图片说明](https://img-ask.csdn.net/upload/202003/14/1584182231_653730.png)![图片说明](https://img-ask.csdn.net/upload/202003/14/1584182236_990596.png)

执行python manage.py migrate命令有问题

我在windows系统搭建了开发环境,使用的是pytohn2.7版本,在本地开发环境验证测试,执行python manage.py migrate命令有问题: 我在这个位置执行的命令: ![图片说明](https://img-ask.csdn.net/upload/201912/16/1576467780_425609.png) 报错如下: ![图片说明](https://img-ask.csdn.net/upload/201912/16/1576467889_633346.png) D:\python2.7\python2.7\Lib\site-packages\django\conf\project_template>python manage.py migrate Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "D:\python2.7\python2.7\lib\site-packages\django\core\management\__init__.py", line 338, in execute_from_command_line utility.execute() File "D:\python2.7\python2.7\lib\site-packages\django\core\management\__init__.py", line 303, in execute settings.INSTALLED_APPS File "D:\python2.7\python2.7\lib\site-packages\django\conf\__init__.py", line 48, in __getattr__ self._setup(name) File "D:\python2.7\python2.7\lib\site-packages\django\conf\__init__.py", line 44, in _setup self._wrapped = Settings(settings_module) File "D:\python2.7\python2.7\lib\site-packages\django\conf\__init__.py", line 92, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "D:\python2.7\python2.7\lib\importlib\__init__.py", line 37, in import_module __import__(name) ImportError: No module named {{ project_name }}.settings 求大神指教,是我执行的目录位置有问题吗?

windows10系统使用pycharm创建项目时报错,有大佬解释一下吗?报错如下

raceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\packaging_tool.py", line 170, in main do_pyvenv(path, system_site_packages) File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\packaging_tool.py", line 88, in do_pyvenv venv.create(path, system_site_packages=system_site_packages) File "D:\Python\Anaconda3\lib\venv\__init__.py", line 363, in create builder.create(env_dir) File "D:\Python\Anaconda3\lib\venv\__init__.py", line 66, in create self.setup_python(context) File "D:\Python\Anaconda3\lib\venv\__init__.py", line 204, in setup_python copier(context.executable, path) File "D:\Python\Anaconda3\lib\venv\__init__.py", line 192, in symlink_or_copy shutil.copyfile(src, dst) File "D:\Python\Anaconda3\lib\shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Python\\Anaconda3\\lib\\venv\\scripts\\nt\\python.exe'

django创建项目时,urls.py报错:No module named 'index.urls'

django创建音乐网站项目时,urls.py写入代码后,pycharm一直报错: No module named 'index.urls' 用idle运行时候就报错: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. 创建过程中只修改了urls.py 和setting.py 文件 代码如下: [b]urls.py[/b] from django.contrib import admin from django.urls import path, include from django.conf.urls import url from django.views import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('', include('index.urls')), path('ranking.html', include('ranking.urls')), path('play/', include('play.urls')), path('comment/', include('comment.urls')), path('search/', include('search.urls')), path('user/', include('user.urls')), ] [b]settings.py[/b] (部分代码) INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'index', 'ranking', 'user', 'play', 'search', 'comment', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', # 使用中文 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'music.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'index/templates'), os.path.join(BASE_DIR, 'ranking/templates'), os.path.join(BASE_DIR, 'user/templates'), os.path.join(BASE_DIR, 'play/templates'), os.path.join(BASE_DIR, 'comment/templates'), ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'music.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'music_db', 'USER': 'root', 'PASSWORD': '1234', 'HOST': '127.0.0.1', 'POST': '3306', } } 请问这种情况该如何处理呢?求指点

pyinstaller 打包python文件为exe时出错

cmd上运行后如下: C:\WINDOWS\system32>pyinstaller -F C:\Users\lenovo\Desktop\文档\测试\btboay.py 128 INFO: PyInstaller: 3.3.1 128 INFO: Python: 3.6.5 129 INFO: Platform: Windows-10-10.0.16299-SP0 131 INFO: wrote C:\WINDOWS\system32\btboay.spec 141 INFO: UPX is not available. 142 INFO: Extending PYTHONPATH with paths ['C:\\Users\\lenovo\\Desktop\\文档\\测试', 'C:\\WINDOWS\\system32'] 143 INFO: checking Analysis 270 INFO: Building because inputs changed 271 INFO: Initializing module dependency graph... 294 INFO: Initializing module graph hooks... 299 INFO: Analyzing base_library.zip ... 7202 INFO: running Analysis out00-Analysis.toc 7208 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by d:\python\python.exe 7701 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of d:\python\python36.dll 7782 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\python36.dll 8887 INFO: Caching module hooks... 8900 INFO: Analyzing C:\Users\lenovo\Desktop\文档\测试\btboay.py 9554 INFO: Loading module hooks... 9555 INFO: Loading module hook "hook-encodings.py"... 10430 INFO: Loading module hook "hook-pydoc.py"... 10432 INFO: Loading module hook "hook-xml.py"... 10926 INFO: Loading module hook "hook-_tkinter.py"... 11707 INFO: checking Tree 11981 INFO: checking Tree 12067 INFO: Looking for ctypes DLLs 12067 INFO: Analyzing run-time hooks ... 12072 INFO: Including run-time hook 'pyi_rth__tkinter.py' 12094 INFO: Looking for dynamic libraries 12195 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\DLLs\_ssl.pyd 12327 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\DLLs\_hashlib.pyd 12828 INFO: Looking for eggs 12828 INFO: Using Python library d:\python\python36.dll 12829 INFO: Found binding redirects: [] 12849 INFO: Warnings written to C:\WINDOWS\system32\build\btboay\warnbtboay.txt 12952 INFO: Graph cross-reference written to C:\WINDOWS\system32\build\btboay\xref-btboay.html 13010 INFO: checking PYZ 13036 INFO: Building because toc changed 13036 INFO: Building PYZ (ZlibArchive) C:\WINDOWS\system32\build\btboay\out00-PYZ.pyz 14218 INFO: Building PYZ (ZlibArchive) C:\WINDOWS\system32\build\btboay\out00-PYZ.pyz completed successfully. 14232 INFO: checking PKG 14291 INFO: Building because toc changed 14291 INFO: Building PKG (CArchive) out00-PKG.pkg 20903 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully. 20975 INFO: Bootloader d:\python\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe 20975 INFO: checking EXE 21034 INFO: Building because toc changed 21034 INFO: Building EXE from out00-EXE.toc 21219 INFO: Appending archive to EXE C:\WINDOWS\system32\dist\btboay.exe 21236 INFO: Building EXE from out00-EXE.toc completed successfully. 但我要打包的文件目录下只生成了一个__pycache__文件夹,没有打包的EXE文件

使用pyCharm调试出错,python版本为2.3.5,求大神帮忙

E:\Python23\python.exe "E:\PyCharm 3.4.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 18039 --file D:/project/python/vignette/arrayImage.py Traceback (most recent call last): File "E:\PyCharm 3.4.1\helpers\pydev\pydevd.py", line 4, in ? from django_debug import DjangoLineBreakpoint File "E:\PyCharm 3.4.1\helpers\pydev\django_debug.py", line 3, in ? from pydevd_comm import CMD_SET_BREAK File "E:\PyCharm 3.4.1\helpers\pydev\pydevd_comm.py", line 89, in ? from socket import SHUT_RD, SHUT_WR ImportError: cannot import name SHUT_RD

在pycharm中使用一个py文件调用另一个py文件时报错

代码是这样的: ![图片说明](https://img-ask.csdn.net/upload/202004/12/1586703061_18874.png) 报错: ![图片说明](https://img-ask.csdn.net/upload/202004/12/1586703105_80215.png) 求问各位这个报错是为什么?被调用的那个py文件可以在pycharm中正常运行,但调用时会报错显示没有python?这是因为啥?

pycharm Django setting.py文件配置问题

INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # 'app1.apps.App1Config', 'app1', ] 注:最后一行本没有,我自己加上的。本来有加注释的这行(让我注释掉了)。 以上代码,我看别的教程是没有我加注释这行的,而我自己用pycharm建的Django项目 有加注释的这行。所有教程都说让我加上最后一行,而没有提注释这行,新手表示注释这行很奇怪啊,请问大神这行是干什么的??

运行pip显示SyntaxError: invalid syntax

C:\Users\Administrator>pip list Traceback (most recent call last): File "C:\Python32\Scripts\pip-script.py", line 9, in <module> load_entry_point('pip==9.0.1', 'console_scripts', 'pip')() File "C:\Python32\lib\site-packages\distribute-0.6.27-py3.2.egg\pkg_resources.py", line 337, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "C:\Python32\lib\site-packages\distribute-0.6.27-py3.2.egg\pkg_resources.py", line 2308, in load_entry_point return ep.load() File "C:\Python32\lib\site-packages\distribute-0.6.27-py3.2.egg\pkg_resources.py", line 2018, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "C:\Python32\lib\site-packages\pip-9.0.1-py3.2.egg\pip\__init__.py", line 21, in <module> from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning File "C:\Python32\lib\site-packages\pip-9.0.1-py3.2.egg\pip\_vendor\requests\__init__.py", line 66, in <module> from .models import Request, Response, PreparedRequest File "C:\Python32\lib\site-packages\pip-9.0.1-py3.2.egg\pip\_vendor\requests\models.py", line 856 http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url) ^ SyntaxError: invalid syntax

python unittest执行程序在pycharm可以成功运行但使用cmd会报错

如题,在pycharm中执行主程序运行成功: 已连接主机 登录成功 正在发送...... 邮件发送完成~ Process finished with exit code 0 在cmd执行主程序报错: Traceback (most recent call last): File"all_test.py",line 32,in<module> alltestnames = creatsuite() File"all_test.py",line 27,in creatsuite testunit.addTests(test_case) File "C:\Python37\lib\unittest\suite.py",line57,in addTests for test in tests: TypeError:'_FailedTest'object is not iterable 报错的程序代码是这部分: def creatsuite(): testunit = unittest.TestSuite() test_dir = test_suite_dir package_tests = unittest.defaultTestLoader.discover(test_dir, pattern='*.py', top_level_dir=None) for test_suite in package_tests: for test_case in test_suite: testunit.addTests(test_case) print(testunit) return testunit 刚接触接口测试,请问是哪里出了问题呢?因为正在jenkins构建项目执行,把源码放在github后使用windows批处理命令执行,这样进程是停滞的,也结束不了。

pycharm启动出错,Entry META-INF/PlatformLangXmlPlugin.xml not found in /lib/pycharm.jar

PyCharm Community Edition 2019.1.1 python-3.7.3 jdk1.8.0_212 ![图片说明](https://img-ask.csdn.net/upload/201905/05/1557040386_312448.png) 完整报错信息: Internal error. Please report to http://jb.gg/ide/critical-startup-errors java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.intellij.util.xmlb.XIncludeException: java.io.FileNotFoundException: Entry META-INF/PlatformLangXmlPlugin.xml not found in D:/ProgramFiles/PyCharm Community Edition 2019.1.1/lib/pycharm.jar at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:215) at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:74) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:347) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.intellij.util.xmlb.XIncludeException: java.io.FileNotFoundException: Entry META-INF/PlatformLangXmlPlugin.xml not found in D:/ProgramFiles/PyCharm Community Edition 2019.1.1/lib/pycharm.jar at com.intellij.util.ExceptionUtilRt.rethrow(ExceptionUtilRt.java:31) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:1212) at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1410) at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1586) at com.intellij.ide.plugins.PluginManagerCore.getLoadedPlugins(PluginManagerCore.java:139) at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentConfigs(ComponentManagerImpl.java:291) at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:79) at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:407) at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:393) at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:208) ... 15 more Caused by: java.util.concurrent.ExecutionException: com.intellij.util.xmlb.XIncludeException: java.io.FileNotFoundException: Entry META-INF/PlatformLangXmlPlugin.xml not found in D:/ProgramFiles/PyCharm Community Edition 2019.1.1/lib/pycharm.jar at java.base/java.util.concurrent.FutureTask.report(Unknown Source) at java.base/java.util.concurrent.FutureTask.get(Unknown Source) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptorsFromClassPath(PluginManagerCore.java:1095) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:1203) ... 23 more Caused by: com.intellij.util.xmlb.XIncludeException: java.io.FileNotFoundException: Entry META-INF/PlatformLangXmlPlugin.xml not found in D:/ProgramFiles/PyCharm Community Edition 2019.1.1/lib/pycharm.jar at com.intellij.util.xmlb.JDOMXIncluder.parseRemote(JDOMXIncluder.java:342) at com.intellij.util.xmlb.JDOMXIncluder.resolveXIncludeElement(JDOMXIncluder.java:253) at com.intellij.util.xmlb.JDOMXIncluder$InplaceJdomXIncluder.resolveNonXIncludeElement(JDOMXIncluder.java:107) at com.intellij.util.xmlb.JDOMXIncluder.resolve(JDOMXIncluder.java:222) at com.intellij.util.xmlb.JDOMXIncluder.parseRemote(JDOMXIncluder.java:326) at com.intellij.util.xmlb.JDOMXIncluder.resolveXIncludeElement(JDOMXIncluder.java:253) at com.intellij.util.xmlb.JDOMXIncluder$InplaceJdomXIncluder.resolveNonXIncludeElement(JDOMXIncluder.java:107) at com.intellij.util.xmlb.JDOMXIncluder.resolveNonXIncludeElement(JDOMXIncluder.java:84) at com.intellij.ide.plugins.IdeaPluginDescriptorImpl.readExternal(IdeaPluginDescriptorImpl.java:141) at com.intellij.ide.plugins.IdeaPluginDescriptorImpl.readExternal(IdeaPluginDescriptorImpl.java:126) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptorFromJar(PluginManagerCore.java:698) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptor(PluginManagerCore.java:826) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptor(PluginManagerCore.java:724) at com.intellij.ide.plugins.PluginManagerCore.loadDescriptorFromResource(PluginManagerCore.java:1144) at com.intellij.ide.plugins.PluginManagerCore.lambda$loadDescriptorsFromClassPath$11(PluginManagerCore.java:1089) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:220) at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26) at com.intellij.util.concurrency.BoundedTaskExecutor$2.lambda$run$0(BoundedTaskExecutor.java:198) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:224) at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:194) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.io.FileNotFoundException: Entry META-INF/PlatformLangXmlPlugin.xml not found in D:/ProgramFiles/PyCharm Community Edition 2019.1.1/lib/pycharm.jar at com.intellij.util.io.URLUtil.openJarStream(URLUtil.java:91) at com.intellij.util.io.URLUtil.openStream(URLUtil.java:52) at com.intellij.util.io.URLUtil.openResourceStream(URLUtil.java:58) at com.intellij.openapi.util.JDOMUtil.loadResource(JDOMUtil.java:349) at com.intellij.util.xmlb.JDOMXIncluder.parseRemote(JDOMXIncluder.java:325) ... 23 more

pycharm里运行.sh文件与在shell里运行,有什么不同

同一个hello.sh文件,在shell里运行没问题,但在pycharm里却报错。 ![图片说明](https://img-ask.csdn.net/upload/201806/04/1528097918_459248.jpg) ![图片说明](https://img-ask.csdn.net/upload/201806/04/1528097937_675579.jpg) ![图片说明](https://img-ask.csdn.net/upload/201806/04/1528097950_236159.jpg)

运行pycharm时提示缺少 nvcuda.dll文件

运行pycharm时提示缺少 nvcuda.dll文件。之前都还运行的好好的,自从运行了一个ipynb的项目之后,就报错了,再运行之前能运行的项目也不行了。 从网上下载nvcuda.dll放在指定位置,但提示不匹配。在网上下载多个都不行。 pycharm报错提示: ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed in 'C:\Windows\System32'. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed. ![![图片说明](https://img-ask.csdn.net/upload/201712/19/1513666593_375869.png)图片说明](https://img-ask.csdn.net/upload/201712/19/1513666471_597241.png) _我也试过网上说的电脑管家修复,但并未成功。求解答,在线等急。_

django中创建表python manage.py makemigrations出现以下错误 ,望大神指导

![图片说明](https://img-ask.csdn.net/up load/201812/05/1544007099_480215.jpg) ![图片说明](https://img-ask.csdn.net/upload/201812/05/1544012043_872565.jpg) C:\Users\Administrator\PycharmProjects\mysite>python manage.py makemigrations Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\mysql\base.py", line 227, in get_new_connection return Database.connect(**conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\__init__. py", line 94, in Connect return Connection(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 327, in __init__ self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 598, in connect self._request_authentication() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 873, in _request_authentication auth_packet = _auth.caching_sha2_password_auth(self, auth_packet) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 253, in caching_sha2_password_auth pkt = _roundtrip(conn, data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 112, in _roundtrip pkt = conn._read_packet() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 683, in _read_packet packet.check_error() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\protocol. py", line 220, in check_error err.raise_mysql_exception(self._data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\__init__.py", line 381, in execute_from_command_line utility.execute() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\base.py", line 316, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\base.py", line 353, in execute output = self.handle(*args, **options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\base.py", line 83, in wrapped res = handle_func(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\manag ement\commands\makemigrations.py", line 103, in handle loader.check_consistent_history(connection) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrati ons\loader.py", line 281, in check_consistent_history applied = recorder.applied_migrations() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrati ons\recorder.py", line 61, in applied_migrations if self.has_table(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrati ons\recorder.py", line 44, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cur sor()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 255, in cursor return self._cursor() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 232, in _cursor self.ensure_connection() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.p y", line 89, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 216, in ensure_connection self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backend s\mysql\base.py", line 227, in get_new_connection return Database.connect(**conn_params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\__init__. py", line 94, in Connect return Connection(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 327, in __init__ self.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 598, in connect self._request_authentication() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 873, in _request_authentication auth_packet = _auth.caching_sha2_password_auth(self, auth_packet) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 253, in caching_sha2_password_auth pkt = _roundtrip(conn, data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\_auth.py" , line 112, in _roundtrip pkt = conn._read_packet() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\connectio ns.py", line 683, in _read_packet packet.check_error() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\protocol. py", line 220, in check_error err.raise_mysql_exception(self._data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES) ")

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

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

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

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

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

ArrayList源码分析(入门篇)

ArrayList源码分析 前言: 写这篇博客的主要原因是,在我上一次参加千牵科技Java实习生面试时,有被面试官问到ArrayList为什么查找的速度较快,插入和删除的速度较慢?当时我回答得不好,很大的一部分原因是因为我没有阅读过ArrayList源码,虽然最后收到Offer了,但我拒绝了,打算寒假学得再深入些再广泛些,下学期开学后再去投递其他更好的公司。为了更加深入理解ArrayList,也为

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

数据结构与算法思维导图

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

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

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

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

和黑客斗争的 6 天!

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

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

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

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

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

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

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

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

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

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

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

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

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

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

玩转springboot启动banner定义所得

最近接手了一个springboot项目,不是不熟悉这个框架,启动时打印的信息吸引了我。 这不是我熟悉的常用springboot的打印信息啊,我打开自己的项目: 还真是的,不用默认的感觉也挺高大上的。一时兴起,就去研究了一下源代码,还正是有些收获,稍后我会总结一下。正常情况下做为一个老程序员,是不会对这种小儿科感兴趣的,不就是一个控制台打印嘛。哈哈! 于是出于最初的好奇,研究了项目的源代码。看到

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

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

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

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

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

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

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

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

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

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

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

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

你打算用Java 8一辈子都不打算升级到Java 14,真香

我们程序员应该抱着尝鲜、猎奇的心态,否则就容易固步自封,技术停滞不前。

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

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

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

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

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

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

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

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

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

立即提问
相关内容推荐