matlab guidata两个,Matlab

%在控件本身函数中用hObject调用

%在别的函数中,需要使用handles调用

function varargout = TestGUI(varargin)

% TESTGUI MATLAB code for TestGUI.fig

%      TESTGUI, by itself, creates a new TESTGUI or raises the existing

%      singleton*.

%

%      H = TESTGUI returns the handle to a new TESTGUI or the handle to

%      the existing singleton*.

%

%      TESTGUI('CALLBACK',hObject,eventData,handles,...) calls the local

%      function named CALLBACK in TESTGUI.M with the given input arguments.

%

%      TESTGUI('Property','Value',...) creates a new TESTGUI or raises the

%      existing singleton*.  Starting from the left, property value pairs are

%      applied to the GUI before TestGUI_OpeningFcn gets called.  An

%      unrecognized property name or invalid value makes property application

%      stop.  All inputs are passed to TestGUI_OpeningFcn via varargin.

%

%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one

%      instance to run (singleton)".

%

% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help TestGUI

% Last Modified by GUIDE v2.5 06-Oct-2015 17:26:26

% Begin initialization code - DO NOT EDIT

global isRight;

isRight = 0;

gui_Singleton = 1;

gui_State = struct('gui_Name',       mfilename, ...

'gui_Singleton',  gui_Singleton, ...

'gui_OpeningFcn', @TestGUI_OpeningFcn, ...

'gui_OutputFcn',  @TestGUI_OutputFcn, ...

'gui_LayoutFcn',  [] , ...

'gui_Callback',   []);

if nargin && ischar(varargin{1})

gui_State.gui_Callback = str2func(varargin{1});

end

if nargout

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

else

gui_mainfcn(gui_State, varargin{:});

end

% End initialization code - DO NOT EDIT

%这里练习使用helpdlg

if isRight

helpdlg('第一步导入图像/视频;第二步选择功能;第三步点击‘Start’开始处理图像/视频(多幅图像/视频多次点击);第四步点击‘Exit’退出界面');

end

% --- Executes just before TestGUI is made visible.

function TestGUI_OpeningFcn(hObject, eventdata, handles, varargin)

% This function has no output args, see OutputFcn.

% hObject    handle to figure

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% varargin   command line arguments to TestGUI (see VARARGIN)

% 定义全局变量

global isVideo;

isVideo = 0;

global isImage;

isImage = 0;

global Count;

Count = 0;

global isRight;

% Choose default command line output for TestGUI

handles.output = hObject;

% Update handles structure

guidata(hObject, handles);

% UIWAIT makes TestGUI wait for user response (see UIRESUME)

% uiwait(handles.figure1);

%简单的密码验证,这里主要是练习使用inputdlg

prompt = {'Name = hen','Code = 1989'};

title = '请输入用户名和密码';

lines = [2,1]';

AvailNameCode = {'hen','1989'};

% FalseNameCode = {'***','***'};

FalseNameCode = AvailNameCode;

answer = inputdlg(prompt,title,lines,FalseNameCode);

if  length(answer) == 2 && strcmp(answer{1},AvailNameCode{1}) && strcmp(answer{2},AvailNameCode{2})

msgbox('正确,点击 确定 以继续');    %练习使用msgbox

isRight = 1;

else

errordlg('用户名或密码错误');

%     close(gcf); %但是会导致崩溃

end

% --- Outputs from this function are returned to the command line.

function varargout = TestGUI_OutputFcn(hObject, eventdata, handles)

% varargout  cell array for returning output args (see VARARGOUT);

% hObject    handle to figure

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure

global isRight;

varargout{1} = handles.output;

if ~isRight

close(gcf); %放到这里就不会导致程序崩溃了

end

% --------------------------------------------------------------------

function ImageIO_Callback(hObject, eventdata, handles)

% hObject    handle to ImageIO (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------

function VideoIO_Callback(hObject, eventdata, handles)

% hObject    handle to VideoIO (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------

function ReadVideoIO_Callback(hObject, eventdata, handles)

% hObject    handle to ReadVideoIO (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

%读入视频,前三个是第一次申明,第四个是引用

global InputVideo;

global ResultVideo;

global VideoFullPath;

global isVideo;

[ReadVideoFileName,ReadVideoPathName,ReadVideoFilterIndex] = uigetfile({'*.avi;*.mp4','VideoFile(*.avi,*.mp4)';'*.avi','AVIVideoFile(*.avi)';'*.*','AllFile(*.*)'},'ReadVideo',...

'MultiSelect','on',...       %是否能够多选,'off'不支持多选, 'on'支持多选

'C:\Users\hsw\Desktop'); %设置默认路径

if isequal(ReadVideoFileName,0) || isequal(ReadVideoPathName,0) || isequal(ReadVideoFilterIndex,0)

msgbox('导入视频失败,点击 确定 关闭对话框,再重新导入');

else

%支持多选时需要处理

isVideo = 1;

if iscell(ReadVideoFileName)

%读入多个视频时

InputVideo = cell(length(ReadVideoFileName),1);

VideoFullPath = InputVideo;

for IterVideo = 1:length(ReadVideoFileName)

VideoFullPath{IterVideo} = fullfile(ReadVideoPathName,ReadVideoFileName{IterVideo}); %先保存所有视频或图像路径

end

VideoObject = VideoReader(VideoFullPath{1});

else

%只读入一个视频时

VideoFullPath = fullfile(ReadVideoPathName,ReadVideoFileName);

VideoObject = VideoReader(VideoFullPath);

end

%     显示第一个视频的第一帧,直到按下Start按钮时,开始显示别的

frame = read(VideoObject,1);

axes(handles.OriginalAxes);

imshow(frame);

axes(handles.ResultAxes);

imshow(255*ones(size(frame)));

ResultVideo = InputVideo;

msgbox('成功导入视频,点击 确定 关掉对话框');

end

% --------------------------------------------------------------------

function SaveVideoIO_Callback(hObject, eventdata, handles)

% hObject    handle to SaveVideoIO (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

%保存视频

[SaveVideoFileName,SaveVideoPathName,SaveVideoFilterIndex] = uiputfile({'*.avi;*.mp4','VideoFile(*.avi,*.mp4)';...

'*.avi','AVIVideoFile(*.avi)';'*.*','AllFile(*.*)'},'ReadVideo',...

'C:\Users\hsw\Desktop'); %设置默认路径

if isequal(SaveVideoFileName,0) || isequal(SaveVideoPathName,0) || isequal(SaveVideoFilterIndex,0)

disp('User seleceted Cancel');

else

%这里保存所有读入的视频的处理结果

end

% --------------------------------------------------------------------

function ReadImageIO_Callback(hObject, eventdata, handles)

% hObject    handle to ReadImageIO (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

%读入图像,前三个是第一次申明,第四个是引用

global InputImage;

global ResultImage;

global ImageFullPath;

global isImage;

[ReadImageFileName,ReadImagePathName,ReadImageFilterIndex] = uigetfile({'*.jpg;*.png;*.tif','ImageFile(*.jpg;*.png;*.tif)';...

'*.jpg','JPEGImageFile(*.jpg)';'*.*','AllFile(*.*)'},'ReadImage',...

'MultiSelect','on',...       %是否能够多选,'off'不支持多选, 'on'支持多选

'C:\Users\hsw\Desktop'); %设置默认路径

if isequal(ReadImageFileName,0)|| isequal(ReadImagePathName,0) || isequal(ReadImageFilterIndex,0)

msgbox('导入图像失败,点击 确定 关闭对话框,再重新导入');

else

% 支持多选时,注意需要分别处理

isImage = 1;

if iscell(ReadImageFileName)

%读入多个图像时,名称为cell数组,多个图像必须在同一个目录

InputImage = cell(length(ReadImageFileName),1);

ImageFullPath = InputImage;

for IterImage = 1:length(ReadImageFileName)

ImageFullPath{IterImage} = fullfile(ReadImagePathName,ReadImageFileName{IterImage});

end

FirstImageFullPath = ImageFullPath{1};

else

%只读入一个视频时

FirstImageFullPath = fullfile(ReadImagePathName,ReadImageFileName);

ImageFullPath = FirstImageFullPath;

end

%显示第一张图片

axes(handles.OriginalAxes);

imshow(imread(FirstImageFullPath));

axes(handles.ResultAxes);

imshow(255*ones(size(imread(FirstImageFullPath))));

ResultImage = InputImage;

msgbox('成功导入图像,点击 确定 关掉对话框');

end

% --------------------------------------------------------------------

function SaveImageIO_Callback(hObject, eventdata, handles)

% hObject    handle to SaveImageIO (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

%保存图像:保存当前结果

[SaveImageFileName,SaveImagePathName,SaveImageFilterIndex] = uiputfile({'*.jpg;*.png;*.tif','ImageFile(*.jpg;*.png;*.tif)';...

'*.jpg','JPEGImageFile(*.jpg)';'*.*','AllFile(*.*)'},'SaveImage','C:\Users\heshiwen\Desktop');

if isequal(SaveImageFileName,0) || isequal(SaveImagePathName,0) || isequal(SaveImageFilterIndex,0)

disp('User selected Cancel');

else

%保存处理的结果

end

% --- Executes on button press in StartPushButton.

function StartPushButton_Callback(hObject, eventdata, handles)

% hObject    handle to StartPushButton (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

%开始执行功能

%需要再次申明全局变量

global InputVideo;

global ResultVideo;

global VideoFullPath;

global isVideo;

global InputImage;

global ResultImage;

global ImageFullPath;

global isImage;

global Count;

% handles 不清楚有哪些按钮可以输出handles查看

handles

MaxNum =  str2double(get(handles.edit1,'String')); %练习获取可编辑文本框中的值

disp(num2str(MaxNum));

ChooseFunctions1 = get(handles.radiobutton1,'Value'); %执行radiobutton对应功能

ChooseFunctions2 = get(handles.radiobutton2,'Value'); %执行radiobutton对应功能

if isImage %处理图像

if ChooseFunctions1 %进行图像翻转

if iscell(ImageFullPath) && Count 

InputImage = imread(ImageFullPath{Count + 1});

ResultImage{Count + 1} = 255*ones(size(InputImage)) - double(InputImage);

axes(handles.OriginalAxes);

imshow(InputImage);

axes(handles.ResultAxes);

imshow(ResultImage{Count + 1}/255,[]);

Count = Count + 1;

set(handles.edit2,'String',length(ImageFullPath) - Count);  %设置可编辑对话框中的值

%             set(handles.edit2,'String',[1,2;3,4]);

if Count == length(ImageFullPath)

msgbox('图像处理完!');

Count = 0;

end

elseif ~iscell(ImageFullPath) && Count 

InputImage = imread(ImageFullPath);

ResultImage = 255*ones(size(InputImage)) - double(InputImage);

axes(handles.OriginalAxes);

imshow(InputImage);

axes(handles.ResultAxes);

imshow(ResultImage/255,[]);

Count = Count + 1;

set(handles.edit2,'String',0);

if Count == 1

msgbox('图像处理完!');

Count = 0;

end

end

elseif ChooseFunctions2 %进行直方图均衡化

msgbox('没有实现!');

else

errordlg('程序出错了!');

end

elseif isVideo

if ChooseFunctions1

if iscell(VideoFullPath) && Count 

VideoObject = VideoReader(VideoFullPath{Count + 1});

for IterVideo = 1:VideoObject.NumberOfFrames

InputFrame = read(VideoObject,IterVideo);

ResultFrame = 255*ones(size(InputFrame)) - double(InputFrame);

axes(handles.OriginalAxes);

imshow(InputFrame);

axes(handles.ResultAxes);

imshow(ResultFrame/255,[]);

end

Count = Count + 1; %改如何保存呢?

elseif ~iscell(ImageFullPath) && Count 

Count = Count + 1;

end

elseif ChooseFunction2

msgbox('没有实现!');

else

errordlg('程序出错了!');

end

else

errordlg('需要先导入图像/视频');

end

% --- Executes on button press in ExitPushButton.

function ExitPushButton_Callback(hObject, eventdata, handles)

% hObject    handle to ExitPushButton (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

%退出导航

close(gcf);

% msgbox('Exit !!');

function edit1_Callback(hObject, eventdata, handles)

% hObject    handle to edit1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text

%        str2double(get(hObject,'String')) returns contents of edit1 as a double

% --- Executes during object creation, after setting all properties.

function edit1_CreateFcn(hObject, eventdata, handles)

% hObject    handle to edit1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

%       See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit2_Callback(hObject, eventdata, handles)

% hObject    handle to edit2 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text

%        str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- Executes during object creation, after setting all properties.

function edit2_CreateFcn(hObject, eventdata, handles)

% hObject    handle to edit2 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

%       See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on slider movement.

function slider2_Callback(hObject, eventdata, handles)

% hObject    handle to slider2 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'Value') returns position of slider

%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider

ValueOfSlider = get(hObject,'Value'); %获取值

set(handles.edit3,'String',ValueOfSlider);

% --- Executes during object creation, after setting all properties.

function slider2_CreateFcn(hObject, eventdata, handles)

% hObject    handle to slider2 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.

if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor',[.9 .9 .9]);

end

function edit3_Callback(hObject, eventdata, handles)

% hObject    handle to edit3 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3 as text

% %string就是我们先要获得或显示的部分

%        str2double(get(hObject,'String')) returns contents of edit3 as a double

% --- Executes during object creation, after setting all properties.

function edit3_CreateFcn(hObject, eventdata, handles)

% hObject    handle to edit3 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

%       See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in popupmenu1.

function popupmenu1_Callback(hObject, eventdata, handles)

% hObject    handle to popupmenu1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array

%        contents{get(hObject,'Value')} returns selected item from popupmenu1

contents = cellstr(get(hObject,'String')); %弹出式列表中每一行的”文字“

msgbox(['你选择的条目为 = ',contents{1}]);

popupmenuvalue = get(hObject,'Value'); %选择时对应的行

msgbox(num2str(popupmenuvalue));

% --- Executes during object creation, after setting all properties.

function popupmenu1_CreateFcn(hObject, eventdata, handles)

% hObject    handle to popupmenu1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.

%       See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in listbox1.

function listbox1_Callback(hObject, eventdata, handles)

% hObject    handle to listbox1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array

%        contents{get(hObject,'Value')} returns selected item from listbox1

contents = cellstr(get(hObject,'String'));

contents

contentsvalue = get(hObject,'Value');

msgbox(num2str(contentsvalue));

% --- Executes during object creation, after setting all properties.

function listbox1_CreateFcn(hObject, eventdata, handles)

% hObject    handle to listbox1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.

%       See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on button press in togglebutton1.

function togglebutton1_Callback(hObject, eventdata, handles)

% hObject    handle to togglebutton1 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton1

% 可以实现:开始--结束--开始...

togglevalue = get(hObject,'Value');

if togglevalue == 0

msgbox('togglevalue =  1');

set(hObject,'String','播放');

elseif togglevalue == 1

msgbox('togglevalue =  0');

set(hObject,'String','停止');

else

errordlg('togglebutton控件设置错误');

end

%复选框

% --- Executes on button press in checkbox2.

function checkbox2_Callback(hObject, eventdata, handles)

% hObject    handle to checkbox2 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox2

% --- Executes on button press in checkbox3.

function checkbox3_Callback(hObject, eventdata, handles)

% hObject    handle to checkbox3 (see GCBO)

% eventdata  reserved - to be defined in a future version of MATLAB

% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox3

% --- Executes when entered data in editable cell(s) in uitable1.

function uitable1_CellEditCallback(hObject, eventdata, handles)

% hObject    handle to uitable1 (see GCBO)

% eventdata  structure with the following fields (see UITABLE)

%   Indices: row and column indices of the cell(s) edited

%   PreviousData: previous data for the cell(s) edited

%   EditData: string(s) entered by the user

%   NewData: EditData or its converted form set on the Data property. Empty if Data was not changed

%   Error: error string when failed to convert EditData to appropriate value for Data

% handles    structure with handles and user data (see GUIDATA)

% --- Executes when selected cell(s) is changed in uitable1.

function uitable1_CellSelectionCallback(hObject, eventdata, handles)

% hObject    handle to uitable1 (see GCBO)

% eventdata  structure with the following fields (see UITABLE)

%   Indices: row and column indices of the cell(s) currently selecteds

% handles    structure with handles and user data (see GUIDATA)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/263821.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

spring boot jar包替换报错之Unable to open nested entry 'BOOT-INF/lib/cache-api-0.4.jar'.

spring boot用layout ZIP打出来的包能够支持外部classpath,但是当用rar/7zip替换其中的jar后,报下列错误: Unable to open nested entry BOOT-INF/lib/cache-api-0.4.jar. It has been compressed and nested jar files must be stored witho…

hadoop博客 oschina

http://my.oschina.net/Xiao629/blog?catalog449279

php用json交换二维数组,PHP和Javascript的JSON交互(处理一个二维数组)

我不得不承认:我是一个彻彻底底的JS白痴。但根据项目需要,不得不使用JSON,不管怎么说,经过一个晚上的学习,已经略有所成,记录下来。PHP的JSON类库我使用的是Services_JSON,没什么特别的优点&…

RoRoWoBlog 开源博客系统介绍

萝萝窝个人博客开源项目 以Asp.net MVC 2.0 ADO.Net Entity Framework 4.0 Unity 2.0 MvcPager JQuery 等技术框架,开发的个人博客系统。 支持MetaWeblog接口 通过MetaWeblog接口,可以将您个人博客系统中的博文,直接同步到您其它网站的博…

Python基础:模块化来搭项目

简单模块化 import 最好在最顶端sys.path.append("..")表示把当前程序所在位置向上提了一级在python3规范中,__init__.py并不是必须的。文件结构: . ├── utils │ ├── util.py │ └── class_util.py ├── src │ └── sub_…

(原)离开,只为更好的活着

序)经过长时间的失眠,辗转反侧,开始默默的写下一篇文章,我不知道以后是怎样的方向,不过明天依旧会天亮。 入职)那最初的梦想 有位朋友说,找工作一定不要找初创公司,那样你会疯狂的加…

Flask入门到放弃(四)—— 数据库

转载请在文章开头附上原文链接地址:https://www.cnblogs.com/Sunzz/p/10979970.html 数据库操作 ORM ORM 全拼Object-Relation Mapping,中文意为 对象-关系映射。主要实现模型对象到关系数据库数据的映射 优点 : 只需要面向对象编程, 不需要面向数据库编…

virtualbox安装centos6.5碰到的问题

今天无聊用virtualbox安装centos6.5 , 自己笔记本vm撑不住, 用公司的试试virtualbox先 安装快完成时 没有足够的内存配置kdump”(在英文界面下提示的是“insufficient memory to configure kdump”) 出现这个提示, 解决办法, 按这篇博客可以解决, 简单点…

matlab som聚类算法,使用SOM对数据进行聚类

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼6.7 2.5 5.8 1.8 37.2 3.6 6.1 2.5 36.5 3.2 5.1 2 36.4 2.7 5.3 1.9 36.8 3 5.5 2.1 35.7 2.5 5 2 35.8 2.8 5.1 …

程序从技术到管理:思维转变是关键

IT公司研发部门的管理人员大多是从公司内部的技术人员中提拔的。在快速发展的公司里,这样的机会更多。然而这种“半路出家”的转型也给我们带来了很多挑战,其中最关键的部分在于思维方式的转变。 从个人成就到团队成就。 无论是做管理还是做技术&#xf…

javascript技巧

1、作用域安全的构造函数 function Person(name,age){ if(this instanceof Person){ this.namename; this.ageage; this.getInfofunction (){}; }else{ new Person(name,age); } } 2、函数柯里化//使用闭包返回一个函数,函数的参数是外部函数传递内部自身函数的参数…

VLC 学习计划---文档阅读

一 videolan-howto-en-html 该文档完全描述了VideoLAN "流"的解决方法. VideoLAN 项目包括两个软件. 1) VLC:以前是视频流接收的客户端,但是现在也可以作为服务端工作.2) VLS:视频服务端,能发送 MPEG-1, MPEG-2 and MPEG-4 files, DVDs, digital satellite channels,…

php 重定向到https,php - 如何从HTTPS重定向到HTTP? - SO中文参考 - www.soinside.com

如果我了解您,以下代码将解决此问题:RewriteEngine OnRewriteCond %{HTTPS} offRewriteCond %{SCRIPT_FILENAME} !\/index\.php [NC]#the above line will exclude https://www.hellomysite.com/index.php# from the following rulesRewriteCond %{SCRIP…

JAVA 面试知识点

主要包括以下几个部分: Java 基础知识点Java 常见集合高并发编程(JUC 包)JVM 内存管理Java 8 知识点网络协议相关数据库相关MVC 框架相关大数据相关Linux 命令相关面试,是大家从学校走向社会的第一步。 互联网公司的校园招聘&…

rails中weill_paginate的paginate方法中不能使用额外参数的解决办法

我们知道高版本中的rails中的分页功能已经放在will_paginate这个gem中,我们在控制器方法中往往需要调用其paginate方法来实现分页数据集控制,举个例子:正常的情况我们想要每页显示10条记录可以这么写: Item.paginate(page:params[…

企业管理软件开发不能割裂各系统的功能

现今企业管理软件分类比较多,但在一个企业中可能随着自己的发展以及管理的需要,在不同时期会购买不同阶段的管理软件,出于各种考虑可能会买入不同厂商的软件系统,这样就带来各软件间的无缝接口问题,这个问题如不能及时…

sqlserver 导出mysql,sqlserver数据(表)导出到mysql

这里说明我的工具: Navicat Premium1 首先 navicat 连接到 sqlserver 数据库,也就是我要从这里导出那个 170 万条数据的表,然后选中表右键单击,选择导出向导2 然后选择文本文件,下一步3 核对下我们要导出的表&#xff…

Android ListView避免多线程加载一个同一资源

当我们的ListView中的Item包含图片,而且这些图片是同一资源,我们用多线程去加载图片,这时候可能就发生了这种情况。 比如线程是人,第一个人去做加载图片到缓存的工作,还没做好时第二个人要这同一张张图,结果…

windows笔记-内核对象

有哪些内核对象? 如下:存取符号对象、事件对象、文件对象、文件映射对象、I / O 完成端口对象、作业对象、信箱对象、互斥对象、管道对象、进程对象、信标对象、线程对象和等待计时器对象等。这些对象都是通过调用函数来创建的。 什么是内核对象&#xf…

Django-你想知道的都在这里

1.Django初识 路由层 模板层 ORM层 其他小细节 2.Django进阶 form组件|form细节 Cookie 与 Session 中间件与auth RESTFUL Redis Celery框架 全文检索 反向代理和正向代理 虚拟环境 第三方依赖包 偏函数 长轮询与轮询 转载于:https://www.cnblo…