Tag:content

  • JS modify override pseudo class style

    Time:2019-12-4

    It is very convenient for JQ to operate CSS style, but it is difficult to directly operate JQ by changing the style of pseudo class. The following methods will be applied quickly`Var linewid = ‘content‘ //Then apply the following methods document.styleSheets[0].addRule(‘.test::after’, ‘left:’ + lineNeedWid + ‘px’); document.styleSheets[0].addRule(‘.test::before’, ‘left:’ + (lineNeedWid + 1) + ‘px’); document.styleSheets[0].addRule(‘.test::before’, […]

  • JQuery mouse over horizontal timeline style

    Time:2019-12-3

    Daily sharing effect, today’s sharing content is: jQuery mouse over horizontal timeline styleDesign sketch:HTML code:`<!DOCTYPE html><html><head> <title></title> <link rel=”stylesheet” type=”text/css” href=”css/style.css”> </head><body> <div class=’container’> <ul> <li> 1993 <div class=’time’> <h1>1993</h1> <p>Content introduction</p> </div> </li> <li> 1999 <div class=’time’> <h1>1999</h1> <p>Content introduction</p> </div> </li> <li> 2006 <div class=’time’> <h1>2006</h1> <p>Content introduction</p> </div> </li> <li> 2019 <div […]

  • Android list dialog setitems

    Time:2019-12-3

    private Button button; Private final charsequence [] items = {“Beijing”, “Shanghai”, “Guangzhou”}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button = (Button) findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); Builder.settitle (“please select the following cities”); //Builder. SetMessage (“please select the following […]

  • Monitor return key in Vue

    Time:2019-12-3

    Question: in projects, we often need to add a pop-up window when users fill in the form and click back. Are you sure to leave? The confirmation will be saved as a draft Solution: take advantage of H5’s pushstate feature and onpopup events Analysis: pushstate from the method name, we can know that adding a […]

  • Linux common command classification collection

    Time:2019-12-2

    1. System information arch #Display the processor architecture of the machine (1) uname -m #Display the processor architecture of the machine (2) uname -r #Show the kernel version in use dmidecode -q #Display hardware system components – (SMBIOS / DMI) hdparm -i /dev/hda #List the architecture features of a disk hdparm -tT /dev/sda #Performing a […]

  • Call pin interface to send message

    Time:2019-12-2

    1. First log in the pin developer background https://ding-doc.dingtalk.com/ 2. Select H5 micro application and create application 4. After creation, view the created application information Among them, AgentID, appkey and appsecret are very important, which need to be used when calling   5. Directly go to the code to see the effect string appkey = […]

  • Create client projects and read the service-oriented configuration center (consult + spring cloud config)

    Time:2019-12-2

    Create client project and read the service configuration center Register the configuration center with the service center (consul) POM file add dependency: org.springframework.boot spring-boot-starter-actuator org.springframework.cloud spring-cloud-starter-consul-discovery 2.1.3.RELEASE Profile add content: spring.cloud.consul.host=127.0.0.1 spring.cloud.consul.port=8500 #Service name registered to consumer spring.cloud.consul.discovery.serviceName=spring-cloud-config Start consul service discovery: @SpringBootApplication //Start configuration center @EnableConfigServer //Start service discovery @EnableDiscoveryClient public class SpringCloudConfigServerApplication { […]

  • Laravel integrated swoole tutorial

    Time:2019-12-2

    1. Preparation Install laravel laravel new laravel-swoole       I use Valet for development, and can use laravel-swoole.test       Visit 2. Introduction of swoole For specific swoole installation, please go to the official website to download, compile and install, which is not described here. 1. Create a server folder in the project […]

  • Refresh client configuration content manually (spring cloud config)

    Time:2019-12-2

    Refresh client configuration content manually Add dependency to client project org.springframework.boot spring-boot-starter-actuator Client project modification profile Add management. Endpoints. Web. Exposure. Include = refresh, health, info spring.application.name=spring-cloud-config-client server.port=9006 spring.cloud.consul.host=127.0.0.1 spring.cloud.consul.port=8500 #Settings do not need to be registered in consumer spring.cloud.consul.discovery.register=false #Exposed access points shown management.endpoints.web.exposure.include=refresh,health,info Client program adds support for refreshing annotation Add @ refreshscope […]

  • Realize automatic refresh of client configuration through bus mechanism (consul, spring cloud config, spring cloud bus)

    Time:2019-11-30

    Automatic refresh of client configuration through bus mechanism Schematic diagram Using the webhook notification function of GIT service, after each configuration update, GIT server will call the / Actor / bus refresh interface of configuration center by post mode, and the bus service of configuration center will broadcast this event to all clients joining the […]

  • The mobile terminal H5 determines whether to scroll to the bottom and pull down to load

    Time:2019-11-27

    How to judge whether the scroll reaches the bottom? The first thing to knowscrollHeight,clientHeight,scrollTop scrollHeight Read only property, height includes all contents, including inner margin, but not including horizontal scroll bar, border and outer margin. clientHeight Also read-only property, undefinedCSSOr the element of the inline layout box is 0, which is the height inside the […]

  • Spring boot 2. X basic tutorial: building powerful API documents with swagger2

    Time:2019-11-25

    With the popularity of front-end and back-end separation architecture and microservice architecture, we use spring boot to build restful API projects in more and more scenarios. Generally, a restful API may serve multiple developers or development teams: IOS development, Android development, web development and other back-end services. In order to reduce the cost of frequent […]