Tag Archives: DebugAH

[Solved] Warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

Codes:

static int CheckOneReg(uint8_t busNo, char *title, int32_t addr, uint32_t *val, BOOL isPrintfNL, ErrMsg_t const *pMsg)

res |= CheckOneReg(busNo,"fwVer:", HALREG_FW_VER, &val, true, NULL);
res |= CheckOneReg(busNo, "status-0:", HALREG_SYS_STATUS_0 + 0, &val, true, MsgTbl_a3SysStatus);

Error:

ptr2ptr.cpp:224:86: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
res |= CheckOneReg(busNo, (const char *)”fwVer:”, HALREG_FW_VER, &val, true, NULL);
^
ptr2ptr.cpp:225:99: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
res |= CheckOneReg(busNo, “status-0:”, HALREG_SYS_STATUS_0 + 0, &val, true, MsgTbl_a3SysStatus);

How to Solve:

New Codes:

static int CheckOneReg(uint8_t busNo, char const *title, int32_t addr, uint32_t *val, BOOL isPrintfNL, ErrMsg_t const *pMsg)

WARN: Establishing SSL connection without server’s identity verification is not recommended.

When using mysql-java-5.1.41.jar for database connection, the following warning appears:

Establishing SSL connection without server’s identity verification is not recommended.

The reason is that MySQL needs to explicitly specify whether to make SSL connection in higher versions.

Just add SSL = true to the connection MySQL configuration file

connectionURL=” jdbc:mysql :// localhost:3306/xxxxx?useSSL=true “

make: warning: Clock skew detected.

The reason for this warning is that the system time is earlier than the target file (. O). For example, the system time is 2010, and the modification time of the target file is 2017.

The solution is to make clean, delete the target file and recompile it

this.sanitizer.bypassSecurityTrustResourceUrl(url) & WARNING: sanitizing unsafe style value url

https://stackoverflow.com/questions/38593515/warning-sanitizing-unsafe-style-value-url

https://github.com/angular/angular/issues/13849

https://github.com/ionic-team/ionic/issues/7552

import { Pipe, PipeTransform } from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
@Pipe({ 
	name: 'trustAsResourceUrl' 
})
export class TrustAsResourceUrlPipe implements PipeTransform {
	constructor(private sanitizer:DomSanitizer){}
	transform(url:string) {
		//let sanitizedUrl = this.sanitizer.bypassSecurityTrustUrl(url);
		//
		let sanitizedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
		return sanitizedUrl;
	}
}


<video id="videoPlay" width="100%" height="auto" webkit-playsinline=""
           playsinline=""
           preload="none" controls="controls" #player  [src]="resourceUrl" poster='{{resourceInfo.coverPath  || "http://appdownload.allcam.com.cn/cover/no_picture.png"  }}'&></video&>

Watch Tv Series Online Full HD Free

https://www.digitaagenda.wien/en/blog-entry/wacth-s3ep10-power-season-3-episode-10-watch-online-full-free-2016-movierulz
https://www.digitaagenda.wien/en/blog-entry/finallyhdmi-watch-power-season-3-episode-10-online-tmdb-series-1440px
https://www.digitaagenda.wien/en/blog-entry/full-live-power-season-3-episode-10-se3ep10-online-free-netflix-hd
https://www.digitaagenda.wien/en/blog-entry/wacth-s3ep10-once-upon-time-season-6-episode-1-watch-online-full-free-2016-movierulz
https://www.digitaagenda.wien/en/blog-entry/finallyhdmi-watch-once-upon-time-season-6-episode-1-online-tmdb-series-1440px
https://www.digitaagenda.wien/en/blog-entry/full-live-once-upon-time-season-6-episode-1-se3ep10-online-free-netflix-hd
https://www.digitaagenda.wien/en/blog-entry/wacth-s3ep10-quantico-season-2-episode-1-watch-online-full-free-2016-movierulz
https://www.digitaagenda.wien/en/blog-entry/finallyhdmi-watch-quantico-season-2-episode-1-online-tmdb-series-1440px
https://www.digitaagenda.wien/en/blog-entry/full-live-quantico-season-2-episode-1-se3ep10-online-free-netflix-hd

Web of Science API

Web of science API is an application program interface to obtain web of science online data through web service, which can be called by various programming languages. In short, you can get real-time and dynamic web of science data according to the API, such as citation frequency, original Link visit times, citation list, etc.

The paper self citation in wos extension browser is to grab the citation list of the paper through the web of science API, and then remove the citation of the same author according to the enhanced organization information and the corresponding relationship between the author.

The web of science API provides two sets of functions: authenticate and search .

You need to verify before searching, and let the server know your permission to call API through the verification function. If you have an API account and password, or your network has ordered incites, both of the above can pass the verification.

The search function has five operations: search, retrievebyid, citedreferences, citingarticles and relatedrecords. Each operation returns the XML data of the paper.

search

According to a set of search formulas, a set of system matching paper records are returned.

Retrieval construction rules are equivalent to advanced retrieval, including operators (and/or/not/same/near), fuzzy matching and retrieval fields.

retrieveById

Specify one or more UTS to return the corresponding paper records.

citedReferences

Obtain the reference list of the specified ut.

citingArticles

Obtain the citation list of the specified ut papers in wos.

relatedRecords

Obtain the similar papers of the specified ut papers, and judge the relevance according to the literature coupling relationship.

return result

The API returns XML data, and the content is exactly the same as the content displayed on the web page. The director divided them into four categories as follows:

Basic information: keywords, abstract, DOI, UT, citation frequency, document type, subject, language, time

Author information: display_ name、full_ name、wos_ standard、last_ name、daisng_ id、research_ id,orcid_ ID, reprint, email, corresponding relationship with organization

Organization information: organization, suborganization, enhanced organization, address information (country, postcode, province, city)

Journal information: title, ISSN, year, volume, page number, publisher.

This article is mainly to tell you that there is such a good thing as web of science API. I hope it can help you expand some ideas of work. For the specific use of API, please check the help document on the official website.

Web project management web.xml Listener monitoring summary

Listener for properties in listening domain object

The event listener of property change in domain object is used to listen for property change information events in ServletContext, httpsession and HttpServletRequest.
The three listener interfaces are ServletContextAttributeListener, HttpSessionAttributeListener and ServletRequestAttributeListener have defined three methods to handle the events of adding, deleting and replacing attributes in the monitored object. The corresponding method names of the same event in the three interfaces are exactly the same, but the parameter types are different.

The first thing to be sure is that the loading order is related to them web.xml There is no order in the file. That is, the filter will not be loaded first because it is written in front of the listener. The final conclusion is: listener – &> filter – &> servlet

At the same time, there is such a configuration section: context param, which is used to provide ServletContext with key value pairs, that is, application context information. Our listeners and filters use the information in these contexts during initialization. Should the context param configuration section be written before the listener configuration section?In fact, the context param configuration section can be written anywhere, so the real loading order of is: context param – &> listener – &> filter – &> servlet

For a certain type of configuration section, it is related to the order in which they appear. Take filter as an example, web.xml Of course, multiple filters can be defined in. A configuration section related to filter is filter mapping. Here, it must be noted that for filter and filter mapping configuration sections with the same filter name, filter mapping must appear after filter. Otherwise, when resolving to filter mapping, its corresponding filter name will be changed Not yet defined. When the web container is started, each filter is initialized according to the order in which the filter configuration section appears. When the request resource matches multiple filter mapping, the filter intercepting resource calls the dofilter() method in turn according to the order in which the filter mapping configuration section appears.

The servlet is similar to the filter , which will not be repeated here.

From this, we can see that, web.xml The order of loading is: context param – &> listener – &> filter – &> servlet , and the order of actual program calls between the same type is based on the corresponding mapping order.

An example of implementing HttpSessionAttributeListener

web.xml Medium configuration:

<listener&>

<listener-class&>

org.springframework.web . context.ContextLoaderListener

</listener-class&>

</listener&>

<listener&>

<listener-class&> com.brand.common . listener.LogoutListener&lt ;/listener-class&>

</listener&>

LogoutListener.java Program code:

package com.brand.common .listener;

import java.util.Map ;

import javax.servlet.http .HttpSessionEvent;

import javax.servlet.http .HttpSessionListener;

import com.tugou.bean .UserInofrmationBean;

public class LogoutListener implements HttpSessionListener {

public void sessionCreated(HttpSessionEvent event) {

}

@SuppressWarnings(“unchecked”)

public void sessionDestroyed(HttpSessionEvent event) {

//when the session is destroyed, clear the key value pairs saved in loginusermap

UserInofrmationBean user = (UserInofrmationBean) event.getSession ()

.getAttribute( UserInofrmationBean.USER_ FRONT_ SESSION);

Map<String, String&> loginUserMap = (Map<String, String&>) event.getSession ().getServletContext().getAttribute(

“loginUserMap”);

if(loginUserMap!=null){

loginUserMap.clear ();

}

event.getSession ().getServletContext().setAttribute(“loginUserMap”,loginUserMap);

}

}

2. Implementation of ServletContextAttributeListener listening example, read fdfs.properties Configuration file
0

web.xml Configuration:

<listener&>

& lt; Description &> initialize resource information & lt; & Description & gt

<listener-class&> com.brand.common . listener.InitEnvListener&lt ;/listener-class&>

</listener&>

InitEnvListener.java Program code:

package com.brand.common .listener;

import java.io.File ;

import java.io.FileInputStream ;

import java.io.InputStreamReader ;

import java.util.Properties ;

import javax.servlet.ServletContextEvent ;

import javax.servlet.ServletContextListener ;

import org.springframework.web . context.WebApplicationContext ;

public class InitEnvListener implements ServletContextListener {

@SuppressWarnings(“unused”)

private WebApplicationContext springContext;

public void contextDestroyed(ServletContextEvent evt) {

}

public void contextInitialized(ServletContextEvent evt) {

try{

FileInputStream in =null;

InputStreamReader inreader=null;

try{

Properties props = new Properties();

File fdfsConfig=new File( Thread.currentThread ().getContextClassLoader().getResource(” fdfs.properties “).getPath());

in= new FileInputStream(fdfsConfig);

inreader=new InputStreamReader(in,”utf-8″);

props.load (inreader);

String imagerootpath = props.getProperty (“imagerootpath”);

evt.getServletContext ().setAttribute(” fdfs.imagerootpath “, imagerootpath);// use application when fetching on the page

}finally{

if(inreader!=null){

inreader.close ();

}

}

}catch(Exception e){

e.printStackTrace();

}

}

}

web.xml In the file < mime mapping >

common MIMEND-type

Sub-text-to-text-to-htm, html text/html
normal .txt text/plain
RTF-text .rtf application/rtf
GIF image .gif image/gif
JPEG image .ipeg., jpg image/jpeg
audio files .au audio/basic
MIDImusic files between, midi audio/midi,audio/x-midi
RealAudioMusic file .ra, .ram audio/x-pn-realaudio
MPEGfile .mpg., mpeg video/mpeg
AVIFILE .avi video/x-msvideo
GZIPfile .gz application/x-gzip
TARfile .tar application/x-tar

<mime-mapping&>

<mime-type&>application/ vnd.ms -word </mime-type&>

</mime-mapping&>

<mime mapping&>

<mime-type&>application/msexcel</mime-type&>

</mime-mapping&>

<mime mapping&>

<mime-type&>application/ vnd.ms -powerpoint</mime-type&>

</mime-mapping&>

<mime mapping&>

<extension&>docx</extension&>

<mime-type&>application/ vnd.openxmlformat – officedocument.wordprocessingml.document&lt ;/MIME-type&>

</mime-mapping&>

<mime mapping&>

<mime-type&>application/ vnd.openxmlformat – officedocument.presentationml.presentation&lt ;/MIME-type&>

</mime-mapping&>

<mime mapping&>

<mime-type&>application/ vnd.openxmlformat – officedocument.spreadsheetml.sheet< ;/MIME-type&>

</mime-mapping&>