-
Notifications
You must be signed in to change notification settings - Fork 167
fixing issue 162 + issue 233 #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7206dff
working code for both x and y axis data type: date time, duration and…
benaliabderrahmane bac9bfa
convert Duration name changed
benaliabderrahmane 803a54a
delete uncesseray file
benaliabderrahmane cc6740d
Add files via upload
benaliabderrahmane 17c6471
changed if statements with switchs
benaliabderrahmane 46ba39c
Merge branch 'isse162_V3' of https://github.com/plotly/plotly-graphin…
benaliabderrahmane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
function userDir = getuserdir | ||
% GETUSERDIR Retrieve the user directory | ||
% - Under Windows returns the %APPDATA% directory | ||
% - For other OSs uses java to retrieve the user.home directory | ||
if ispc | ||
% userDir = winqueryreg('HKEY_CURRENT_USER',... | ||
% ['Software\Microsoft\Windows\CurrentVersion\' ... | ||
% 'Explorer\Shell Folders'],'Personal'); | ||
userDir = getenv('appdata'); | ||
else | ||
userDir = char(java.lang.System.getProperty('user.home')); | ||
function userDir = getuserdir | ||
% GETUSERDIR Retrieve the user directory | ||
% - Under Windows returns the %APPDATA% directory | ||
% - For other OSs uses java to retrieve the user.home directory | ||
|
||
if ispc | ||
% userDir = winqueryreg('HKEY_CURRENT_USER',... | ||
% ['Software\Microsoft\Windows\CurrentVersion\' ... | ||
% 'Explorer\Shell Folders'],'Personal'); | ||
userDir = getenv('appdata'); | ||
else | ||
userDir = char(java.lang.System.getProperty('user.home')); | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
function header = http_createHeader(name,value) | ||
%http_createHeader Simple function for creating input header to urlread2 | ||
% | ||
% header = http_createHeader(name,value) | ||
% | ||
% CODE: header = struct('name',name,'value',value); | ||
% | ||
% See Also: | ||
% urlread2 | ||
function header = http_createHeader(name,value) | ||
%http_createHeader Simple function for creating input header to urlread2 | ||
% | ||
% header = http_createHeader(name,value) | ||
% | ||
% CODE: header = struct('name',name,'value',value); | ||
% | ||
% See Also: | ||
% urlread2 | ||
|
||
header = struct('name',name,'value',value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
function [str,header] = http_paramsToString(params,encodeOption) | ||
%http_paramsToString Creates string for a POST or GET requests | ||
% | ||
% [queryString,header] = http_paramsToString(params, *encodeOption) | ||
% | ||
% INPUTS | ||
% ======================================================================= | ||
% params: cell array of property/value pairs | ||
% NOTE: If the input is in a 2 column matrix, then first column | ||
% entries are properties and the second column entries are | ||
% values, however this is NOT necessary (generally linear) | ||
% encodeOption: (default 1) | ||
% 1 - the typical URL encoding scheme (Java call) | ||
% | ||
% OUTPUTS | ||
% ======================================================================= | ||
% queryString: querystring to add onto URL (LACKS "?", see example) | ||
% header : the header that should be attached for post requests when | ||
% using urlread2 | ||
% | ||
% EXAMPLE: | ||
% ============================================================== | ||
% params = {'cmd' 'search' 'db' 'pubmed' 'term' 'wtf batman'}; | ||
% queryString = http_paramsToString(params); | ||
% queryString => cmd=search&db=pubmed&term=wtf+batman | ||
% | ||
% IMPORTANT: This function does not filter parameters, sort them, | ||
% or remove empty inputs (if necessary), this must be done before hand | ||
if ~exist('encodeOption','var') | ||
encodeOption = 1; | ||
end | ||
if size(params,2) == 2 && size(params,1) > 1 | ||
params = params'; | ||
params = params(:); | ||
end | ||
str = ''; | ||
for i=1:2:length(params) | ||
if (i == 1), separator = ''; else separator = '&'; end | ||
switch encodeOption | ||
case 1 | ||
param = urlencode(params{i}); | ||
value = urlencode(params{i+1}); | ||
% case 2 | ||
% param = oauth.percentEncodeString(params{i}); | ||
% value = oauth.percentEncodeString(params{i+1}); | ||
% header = http_getContentTypeHeader(1); | ||
otherwise | ||
error('Case not used') | ||
end | ||
str = [str separator param '=' value]; %#ok<AGROW> | ||
end | ||
switch encodeOption | ||
case 1 | ||
header = http_createHeader('Content-Type','application/x-www-form-urlencoded'); | ||
end | ||
function [str,header] = http_paramsToString(params,encodeOption) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are these entire files being recommitted? It doesn't look like they have changed at all? This makes it very difficult to review your code. |
||
%http_paramsToString Creates string for a POST or GET requests | ||
% | ||
% [queryString,header] = http_paramsToString(params, *encodeOption) | ||
% | ||
% INPUTS | ||
% ======================================================================= | ||
% params: cell array of property/value pairs | ||
% NOTE: If the input is in a 2 column matrix, then first column | ||
% entries are properties and the second column entries are | ||
% values, however this is NOT necessary (generally linear) | ||
% encodeOption: (default 1) | ||
% 1 - the typical URL encoding scheme (Java call) | ||
% | ||
% OUTPUTS | ||
% ======================================================================= | ||
% queryString: querystring to add onto URL (LACKS "?", see example) | ||
% header : the header that should be attached for post requests when | ||
% using urlread2 | ||
% | ||
% EXAMPLE: | ||
% ============================================================== | ||
% params = {'cmd' 'search' 'db' 'pubmed' 'term' 'wtf batman'}; | ||
% queryString = http_paramsToString(params); | ||
% queryString => cmd=search&db=pubmed&term=wtf+batman | ||
% | ||
% IMPORTANT: This function does not filter parameters, sort them, | ||
% or remove empty inputs (if necessary), this must be done before hand | ||
|
||
if ~exist('encodeOption','var') | ||
encodeOption = 1; | ||
end | ||
|
||
if size(params,2) == 2 && size(params,1) > 1 | ||
params = params'; | ||
params = params(:); | ||
end | ||
|
||
str = ''; | ||
for i=1:2:length(params) | ||
if (i == 1), separator = ''; else separator = '&'; end | ||
switch encodeOption | ||
case 1 | ||
param = urlencode(params{i}); | ||
value = urlencode(params{i+1}); | ||
% case 2 | ||
% param = oauth.percentEncodeString(params{i}); | ||
% value = oauth.percentEncodeString(params{i+1}); | ||
% header = http_getContentTypeHeader(1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spacing |
||
otherwise | ||
error('Case not used') | ||
end | ||
str = [str separator param '=' value]; %#ok<AGROW> | ||
end | ||
|
||
switch encodeOption | ||
case 1 | ||
header = http_createHeader('Content-Type','application/x-www-form-urlencoded'); | ||
end | ||
|
||
|
||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to keep these comments? I don't understand if they are helpful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which one ?