Wednesday 31 May 2017

css media layout responsive

main html
canada big
canada small

change screen width to display different layouts (change happens at 503/504px width)


<html>

<head>
 <title>main html</title>
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <link href="./mycss.css" media="all" rel="stylesheet" type="text/css"></link>

        <style>
@media screen and (max-width:503px){
 #big_screen{
  display:none;
 }
 #footer_display::after{
  content:"for small screen display";
 }
}

@media screen and (min-width:504px){
 #small_screen{
  display:none;
 }
 #footer_display::after{
  content:"for big screen display";
 }
}
        </style>
</head>

<body>
 <div id="big_screen">
  <img alt="canada big" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHqkiW02tCQKhMjPkB7KRJsjHNQZTUYAs55TiwdvUVlv_ToFydA6bW3AmDCith_5vF87sIAf6BDKhYu-ppNchOY0dEUDIsFEsKXeFUviGdusH1RdwVFslAC_q1KufbbIgQn7X2GcpjE4/s320/canada.png" />  
 </div>
<div id="small_screen">
 <img alt="canada small" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB_iBcxTKckmZMIZwYR3PIKIrQYZ0M8e5YiSxzD1q8cCdvE8cBUjSRqk0f0uw7_f6t7sSS1ysZTNUuG5xvRSOC09pntMRJiELpmtCBeEbzZD7vHi8L-A14Secujxha72_eWHjBAiKpG5I/s1600/canada+1.png" /> 
</div>
<div id="footer_display">
 </div>
</body>

</html>

How to Safely Upgrade Android Marshmallow 6.0 to Nougat 7.0

Useful tips for Android Marshmallow 6.0 to Nougat 7.0 Update

Android operating system has now been updating from 6.0 to 7.0, with a sweet new name called Nougat. Nexus users will be the first to taste Android Nougat 7.0 on their phones, later are going to be Samsung, HTC, Motorola, LG, Sony and Huawei...Speaking of the methods to upgrade Android Marshmallow 6.0 to Nougat 7.0, we'd like to discuss something.
Primarily, no matter which way users are going to adopt, backup Android to PC is highly recommended. As we've heard many people encountered data loss after Marshmallow update, so did it happen by Android 6.0 to 7.0 update. You should know how important it is to backup contacts, photos, SMS, memos, app data and other types of files. Therefore, feel no hesitate to download EaseUS MobiSaver for Android and safeguard data on your device right now.
backup android to pc before upgrading android marshmallow 6.0 to nougat 7.0
Connect Android mobile to PC -> Scan all Android data -> Save Android data to the computer
Next, the two popular ways for Android Marshmallow to Nougat are via OTA update and a factory image. What's the difference? Generally, we won't suggest people upgrade their devices using factory image, as it's for advanced users who want to taste the flavor of Nougat before anyone could. What's more, the process of using factory images to upgrade from Marshmallow to Nougat is quite risky, which might damage your mobile. If you're experienced users who are confident enough (with backup created), go and download Android Nougat 7.0 system image by clicking the download link in the below.

How to Upgrade from Android Marshmallow 6.0 to Nougat 7.0 via OTA Update

Being different from factory image update, using OTA (Over The Air) update is much easier with little risk. Again, do remember to backup all your contacts and data to a PC with EaseUS Android data recovery tool, because the process will install Android Nougat 7.0 on your device and will wipe out the old Marshmallow. The step-by-step guide for Android 6.0 to 7.0 update is as follows.
Important: Make sure you are connected to wifi connection, and there are at least 50% of battery life before proceeding.
Step 1. Go to Settings panel and scroll down to see About Phone option where you will find all the details of your device.
Step 2. Tap on About Phone option. In that tap on System Updates option to check for the latest Android version.
Step 3. If your Device is still running on Android Lollipop , you may need to update Lollipop to Marshmallow 6.0 and then you are allowed to update from Marshmallow to Nougat 7.0 if the update is available for your device.
Step 4. If Nougat 7.0 OTA update is available for your device, you can download Nougat update and proceed to upgrade from Marshmallow to Nougat 7.0 seamlessly.
Step 5. Once the update is downloaded, your device will install Android Nougat and will reboot into Android Nougat smoothly.

mlais m7 replacement battery

BL243 Battery

http://www.ebay.ca/itm/122489671840?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

http://www.dx.com/p/replacement-3-8v-1800mah-li-ion-battery-for-lenovo-bl243-black-428969#.WS6-l2jyuUk

Sunday 28 May 2017

加拿大打工仔3月平均周薪966元按年升0.9%  

统计局公布,本国3月份的非农业受薪雇员,平均每星期薪酬按年上升百分之0.9,而安省则升百分之1.3。

数据显示,3月整体的平均周薪,为966元,按月增长百分之0.2,按年升百分之0.9。各个领域中,以批发、膳宿、及教育的工资增长最显著,介乎百分之2.7至3.9之间。

地域方面,有6个省份平均周薪上升,纽芬兰、沙省、和缅省都升超过百分之2,安省则升百分之1.3,达到每星期982元,省内以批发业和资讯文化界的工资增长最高。

另外,全国3月份非农业雇员数目,共有1612万5千人,按年增加百分之1.7,安省则有629万2千名受薪雇员,增幅百分之2.4。

统计局表示,2015年的除税后家庭入息中位数,为5万6千元,按年没大变化。其中,双亲有子女的家庭,入息中位数是9万4千2百元,比2012年增长百分之6.8;而单亲家庭的入息中位数是4万5千7百元,跟2012年比较几乎不变。

  报告又指,以整体入息中位数的一半作为分界,全国共有498万人,生活于低收入家庭中,占总人口百分之14.2,按年增多1.2个百分点。而未满18岁的儿童之中,有103万人,或百分之15.2,生活于低收入家庭;其中26万儿童,来自女性单亲家庭,比率达到百分之38.2,但比起过去几年已有改善。

  另一方面,国民的工作收入,2015年中位数为3万3千1百元,全年都有做全职工作的人之中,收入中位数是5万1千2百元,安省为5万3千元,按年上升百分之2.9。

Friday 26 May 2017

javascript scroll img

Slide Show

Slideshow
  





<html>
<head>
<script type="text/javascript">
var myPix = new Array("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTuwZ80gMP3G5Y0C2uo2cxkp8dqBcmJTcbZ5TO5AD9VDzgDplx6D3XlMKGtXsRXHdg2pNJASvoePjKboXspP-qnQrmYvKJFWXQIITzRlYEFXe5WFrJWSFTY7auQKWZfK95oXYUWoNVxDI/s1600/img1.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9uYPaXsQFSXAicSyFDn0HgT5qEgwEXtX3NWQ52xDn4a60_MJ0yeqS1f9QMCoPNdV0ArFh2J8dbjUhiIoxuhfQo4IhgBMROwJTpGSdOjzCX-F6XDHKdQyImSQ7fsLmQBOCEbzkFNGIVu8/s1600/img2.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiibsEDH38Eg54AeZvUzkGxm41tsAASuhzRS6MBnLsGizaNGqEFqV5m2f4S4DxJ1vURvwITX7cv2v8lviYvv5Bwo9Bi3jPto4DFwD51KHwIARnyBWjqqHsIkZqUTSL879Q_FXkkk62YsbE/s1600/img3.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJpCMJ6uwYazpLt2f9Fyn_a6fr9bRswAlfeTmYT8N8ToAVsXGhk2IMJtMEve8lDrCSvxdoGzG1gGyg5P7vSsfHPqk5kMDDKf_jMbsYL4xO5XDnAaQ1l747T5fZeAmWhpr2m9tylp7iVvQ/s1600/img4.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdgYCSipUcWpgjzeAphx2p-eHO1pY-ajYtXhFbmUJuhTeMwZtqKNvAj6__V2aAzJ5OJAcb6KyTVyRfFZReSbYllSKyQOVRdWDdvaJEsPlfIrKeJfTCEaVdUqOVppOWTYSjq3ZXBcgxzkw/s1600/img5.jpg");

var pic_index = 0;

function processPrevious() {
 if (pic_index == 0) {
  pic_index = myPix.length;
 }
 pic_index--;
 document.getElementById("myPicture").src = myPix[pic_index];
 return false;
}

function processNext() {
 pic_index++;
 if (pic_index == myPix.length) {
  pic_index = 0;
 }
 document.getElementById("myPicture").src = myPix[pic_index];
 return false;
}

</script>

<style>
#myPicture{height:300px;}
</style>

</head>
<body>
<div align="center">
  <h1> Slide Show</h1>
  <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTuwZ80gMP3G5Y0C2uo2cxkp8dqBcmJTcbZ5TO5AD9VDzgDplx6D3XlMKGtXsRXHdg2pNJASvoePjKboXspP-qnQrmYvKJFWXQIITzRlYEFXe5WFrJWSFTY7auQKWZfK95oXYUWoNVxDI/s1600/img1.jpg" id="myPicture" alt="Slideshow" />
  <br/>
  <input type="button" class="button" onclick="processPrevious()" value="&lt;&lt; Previous"/>
&nbsp;&nbsp;
  <input type="button" class="button" onclick="processNext()" value="Next &gt;&gt;"/>
 </div>
</body>
</html>

Thursday 25 May 2017

kijiji sell digital microscope




digital microscope, fully working, max amplification 500x, comes with software drivers to enable real time snap shot and save on computer. 

Wednesday 24 May 2017

游客涌入加拿大国家公园 酒店坐地起价已赚翻




 
  Bow Valley沿线所有的酒店、餐馆都已经进入“备战状态”。 

  每一年的维多利亚长周末,是加拿大非官方的夏季第一天,也意味这旅游旺季的正式到来。 

  加拿大今年所有国家公园免门票,其中名气最大的班芙也位列旅游目的地第一名。 

  据CBC报道,班芙国家公园附近,包括班芙镇上所有的度假酒店已近爆满,所有的店铺和餐馆已经在赚得盆满钵满了。 


  比如说班芙公园以南的恩加丁山山林小屋Mount Engadine Lodge,对于一个典型的五口之家来说,已经订不到今年夏天任何一个周末的空房了,除非是工作日的时候。小编在酒店预定网站booking.com上查了一下,6月一个工作日的双人房,一晚的价格已经高达500加元。 
  同一天的路易斯湖城堡酒店,最普通的双人房一晚也要$1199起。 

  恩加丁山山林小屋的经理Simon Harvie坦言,从现在到9月底的任何一个周末,都没房了。其他日期的空房,也在以高于以往的速度被预定掉。 

 

  去年10月,来自加拿大酒店和旅游行业的代表团到访了中国上海、济南、合肥、南京等城市。根据他们的报告,在中国游客眼中,加拿大是一个安全、风景优美的国家,酒店质量比较高,食物也很“有趣”。 

  但落基山周边的酒店在旅游旺季疯狂涨价,也吓跑了一票中国游客。因为订不到价格合理的房间,有人甚至干脆取消了所有行程。 

css cursor

https://developer.mozilla.org/en/docs/Web/CSS/cursor?v=example

cryptocurrency

mining
https://www.cryptocompare.com/mining/guides/#/overview

wallet
https://www.weusecoins.com/en/find-the-best-bitcoin-wallet/

buy $ sell
https://www.buybitcoinworldwide.com/canada/

Monday 22 May 2017

javascript play video/sound from youtube/domain, source string







<html>
<head>

    <script type="text/javascript">

        var youtube_video;

        function play_youtube_video() {
            youtube_video = document.getElementById("human");

            youtube_video.style.display = "block";

            if (!youtube_video.src.includes("autoplay")) {
                youtube_video.src += "?autoplay=1";
            }
            else {
                youtube_video.src.replace("autoplay=0", "autoplay=1");
            }
        }

        function play_sound_after_3s() {
            window.setTimeout(function f_wait() {
                youtube_video = document.getElementById("human");

                if (!youtube_video.src.includes("autoplay")) {
                    youtube_video.src += "?autoplay=1";
                }
                else {
                    youtube_video.src.replace("autoplay=0", "autoplay=1");
                }

            }, 3000);
        }

        var domain_video;

        function domain_video_play() {
            domain_video = document.getElementById("video_on_domain");
            domain_video.style.display = "block";
            domain_video.play();
        }

        function domain_video_pause() {
            domain_video = document.getElementById("video_on_domain");
            domain_video.style.display = "block";
            domain_video.pause();
        }

    </script>
</head>
<body>

    <iframe style="display:none" allowfullscreen="" frameborder="0" height="315" id="human" src="https://www.youtube.com/embed/L3wKzyIN1yk" width="560"></iframe>

    <input class="button" onclick="play_youtube_video()" type="button" value="play youtube video" />
    <input class="button" onclick="play_sound_after_3s()" type="button" value="play sound track after 3s" />

    <video controls="true" id="video_on_domain" style="display: none;">
        <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4"></source>
        Your browser does not support HTML5 video.
    </video>

    <br /><br />

    <input class="button" onclick="domain_video_play()" type="button" value="play video on domain" />
    <input class="button" onclick="domain_video_pause()" type="button" value="pause video on domain" />
</body>
</html>

reference:

Wednesday 17 May 2017

material design

https://material.io/
https://material.angularjs.org/latest/demo/tabs
https://material.io/icons/

javascript radio button for loop, check box

chen assignment 3
asset value
depreciation rate (0-100)
years of depreciation
value after years

Choose pizza size
small $8
medium $10
large $15
extra large $18

Add specials
none
super cheesy $3
extra meaty $5
really veggy $2

Add extras
extra cheese $1.5
extra pepperoni $1.5
extra mushrooms $1.5
extra bacon $1.5
extra olives $1.5

name
address
phone number



total: $

//default.html


<!DOCTYPE html>
<html>
<head>
    <title>chen assignment 3</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="javascript.js">    
    </script>
</head>

<body>
    <table>
        <tr>
            <td>asset value</td>
            <td><input type="number" id="asset_value" /></td>
        </tr>
        <tr>
            <td>depreciation rate (0-100)</td>
            <td><input type="number" id="depreciation_rate" /></td>
        </tr>
        <tr>
            <td>years of depreciation</td>
            <td><input type="number" id="years" /></td>
        </tr>
        <tr>
            <td>value after years</td>
            <td><span id="value_after_years"></span></td>
        </tr>
        <tr>
            <td colspan="2"><input type="button" value="calculate value after depreciation" onclick="calculate()" /></td>
        </tr>
    </table>

    <hr />

    <form name="pizza_order">
        <b>Choose pizza size</b><br />
        <input type="radio" name="pizza_type" value="8" checked/>small $8<br/>
        <input type="radio" name="pizza_type" value="10" />medium $10<br />
        <input type="radio" name="pizza_type" value="15" />large $15<br />
        <input type="radio" name="pizza_type" value="18" />extra large $18<br />
        <br />
        <b>Add specials</b><br />
        <input type="radio" name="specials" value="0" checked/>none<br />
        <input type="radio" name="specials" value="3" />super cheesy $3<br />
        <input type="radio" name="specials" value="5" />extra meaty $5<br />
        <input type="radio" name="specials" value="2" />really veggy $2<br />
        <br />
        <b>Add extras</b><br />
        <input type="checkbox" name="extra_cheese" />extra cheese $1.5<br/>
        <input type="checkbox" name="extra_pepperoni" />extra pepperoni $1.5<br />
        <input type="checkbox" name="extra_mushrooms" />extra mushrooms $1.5<br />
        <input type="checkbox" name="extra_bacon" />extra bacon $1.5<br />
        <input type="checkbox" name="extra_olives" />extra olives $1.5<br />
        <br />
        <table>
            <tr>
                <td>name</td>
                <td><input type="text" /></td>
            </tr>
            <tr>
                <td>address</td>
                <td><input type="text" /></td>
            </tr>
            <tr>
                <td>phone number</td>
                <td><input type="text" /></td>
            </tr>
        </table>
        <br />
        <input type="button" value="place order" onclick="order();"/><br />
        <br />
        <b>total: $</b> <span id="total_cost"></span>
    </form>
</body>

</html>

//javascript.js


function calculate() {
    var asset_value = document.getElementById("asset_value").value;
    var depreciation_rate = document.getElementById("depreciation_rate").value;
    var years = document.getElementById("years").value;

    asset_value = parseFloat(asset_value);
    depreciation_rate = parseFloat(depreciation_rate) / 100;
    years = parseInt(years);
   

    for (var i = parseInt(1); i <= years; i++)
    {
        asset_value *= (1 - depreciation_rate);
    }

    document.getElementById("value_after_years").innerHTML = asset_value.toFixed(2);
}

function order() {
    var total = parseFloat(0);

    for (var i = parseInt(0); i < document.pizza_order.pizza_type.length; i++)
    {
        if (document.pizza_order.pizza_type[i].checked)
        {
            total += parseFloat(document.pizza_order.pizza_type[i].value);
        }
    }

    for (var i = parseInt(0); i < document.pizza_order.specials.length; i++)
    {
        if (document.pizza_order.specials[i].checked) {
            total += parseFloat(document.pizza_order.specials[i].value);
        }
    }

    if (document.pizza_order.extra_cheese.checked)
    {
        total += 1.5;
    }

    if (document.pizza_order.extra_pepperoni.checked) {
        total += 1.5;
    }

    if (document.pizza_order.extra_mushrooms.checked) {
        total += 1.5;
    }

    if (document.pizza_order.extra_bacon.checked) {
        total += 1.5;
    }

    if (document.pizza_order.extra_olives.checked) {
        total += 1.5;
    }

    document.getElementById("total_cost").innerHTML = total;
}

Monday 15 May 2017

Saturday 13 May 2017

css buttons



reference:


<html>
<head>
<style>
.button {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color: #fff;
    background-color: #4CAF50;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px #999;
}

    .button:hover {
        background-color: #3e8e41
    }

    .button:active {
        background-color: #3e8e41;
        box-shadow: 0 2px #666;
        transform: translateY(4px);
    }
</style>
</head>
<body>
<input class="button" type="button" value="click me" />
</body>
</html>

Best Documentary 2016


https://www.youtube.com/user/420musicEuphoria/videos

javascript cookie

<html>
<head>
  <script type="text/javascript">
function setCookie(cname, cvalue, exdays) {
    var cname = document.getElementById("cookie_name").value;
    var cvalue = document.getElementById("cookie_value").value;
    var exdays = document.getElementById("cookie_expire").value;
    exdays = parseFloat(exdays);
    var d = new Date();
    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
    var expires = "expires=" + d.toGMTString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function getAllCookie() {
    var decodedCookie = decodeURIComponent(document.cookie);
    document.getElementById("all_cookie").innerHTML = decodedCookie;
}

function getCookie() {
    var cname = document.getElementById("cookie_name_search").value;
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            document.getElementById("cookie_by_name").innerHTML = c.substring(name.length, c.length);
            return
        }
    }
}
  </script>
</head>
<body>
    <input id="cookie_name" placeholder="cookie name" type="text" />
    <input id="cookie_value" placeholder="cookie value" type="text" />
    <input id="cookie_expire" placeholder="cookie life (days)" type="number" />
    <input onclick="setCookie()" type="button" value="create cookie" />
    <br />
    <input onclick="getAllCookie()" type="button" value="show all cookie" />
    <span id="all_cookie"></span>
    <br />
    <input id="cookie_name_search" placeholder="cookie name search" type="text" />
    <input onclick="getCookie()" type="button" value="show cookie by name" />
    <span id="cookie_by_name"></span>
</body>
</html>

reference:
https://www.w3schools.com/js/js_cookies.asp
https://www.google.ca/search?q=chrome+cookie&oq=chrome+cookie&aqs=chrome..0j69i57j0l4.7115j0j8&sourceid=chrome&ie=UTF-8



html send email

Send e-mail to someone@example.com:



reference:
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_mail


<html>
<head>
</head>
<body>
<h2>Send e-mail to someone@example.com:</h2>
<form action="mailto:" enctype="text/plain" method="post">
<input type="submit" value="Open e-mail" />
</form>
</body>
</html>

Sunday 7 May 2017

javascript settimeout onload/beforeclose dialog open new window/redirect



<input onclick="chuanshuo()" type="button" value="click this button will open new blog of chuanshuoge after 10 second" />

//wait for 10s before try to open new window.
//if new window is blocked, show dialog box,
//if confirmed, redirect to new address

<script type="text/javascript">
   function chuanshuo() {
    window.setTimeout(function f_wait() {
        var win = window.open("http://chuanshuoge1.blogspot.ca/", "chuanshuoge2");

        if (!win) {
            var dialog = confirm("chuanshuoge invites you to check his new blog.\nhttp://chuanshuoge1.blogspot.ca/");
            if (dialog == true) {
                window.location = "http://chuanshuoge1.blogspot.ca/";
            }
        }

    }, 10000);

}  
</script>

reference:

http://stackoverflow.com/questions/19851782/how-to-open-a-url-in-a-new-tab-using-javascript-or-jquery
https://www.sitepoint.com/community/t/redirect-to-another-page-on-load/2649
http://stackoverflow.com/questions/8517891/how-to-redirect-a-user-to-a-url-page-when-the-close-x-button-is-clicked
https://www.w3schools.com/jsref/met_win_confirm.asp
http://stackoverflow.com/questions/4057236/how-to-add-onload-event-to-a-div-element
http://stackoverflow.com/questions/14226803/javascript-wait-5-seconds-before-executing-next-line
http://stackoverflow.com/questions/8683528/embed-image-in-a-button-element
http://stackoverflow.com/questions/7274875/center-image-in-html-button

徐晓冬专访完整版:一百年内没有人像我这样揭开中国武术的黑幕

Saturday 6 May 2017

西红柿不能和这些东西搭配着吃

夏天快到了,又到了西红柿的季节,很多人认为西红柿是百搭的,虽然西红柿和很多事物都何以一起搭配,但是,和这些东西却不能一起吃。



西红柿和虾、河蟹、不能一起吃

吃虾或螃蟹等最好不要和维生素C一起吃,而番茄中含大量的维生素C,两个在一起吃很容易过敏的,如果是大量的去吃的话就可能危及到自己的生命,所以吃的东西一定要注意的,有时候美味可能就是毒药。如果和河蟹一起吃,会出现腹泻。

其次,西红柿和以下这些食物一起吃虽然不会有中毒现象,但是会使他们的营养价值大大降低,甚至出现不良反应。

西红柿和鱼肉,比如草鱼、鲢鱼、青鱼、鱼干不能一起吃

西红柿和鱼肉一起食用时,西红柿中的维生素C会对鱼肉中铜元素的释放会产生抑制作用,不仅会降低蛋白质的营养价值,而且容易产生可刺激胃粘膜形成不易消化的鞣酸物质,使人出现腹痛、恶心、呕吐等症状。

西红柿和红薯不能一起吃

西红柿和红薯一起吃会发生不良生化反应,长期积累会使人得结石病,呕吐、腹痛、腹泻等。

西红柿和黄瓜不能一起吃

西红柿是典型的含维生素C丰富的蔬菜,但是黄瓜中含有一种维生素C分解酶,会破坏其他蔬菜中含量丰富的维生素C。如果他们一起食用,就相当于我们从西红柿中摄取了维生素C,再被黄瓜中的分解酶破坏,根本达不到补充营养的效果。

西红柿与胡萝卜不能一起吃

胡萝卜作为营养价值很高的蔬菜,在餐桌上非常常见。但是和黄瓜一样,胡萝卜含有维生素C的分解酶,会破坏番茄中富含的维生素C,虽然不会产生有毒物质,但浪费营养。

西红柿和猪肝不能一起吃

猪肝中含有的铜、铁,能使维生素C氧化为脱氢抗坏血酸而失去原来的功能

西红柿和土豆不能一起吃

土豆会在人体的胃肠中产生大量的盐酸,西红柿在较强的酸性环境中会产生不溶于水的沉淀,容易导致人没有食欲,消化不良等。

除此以外,西红柿和白酒一起吃会造成胸闷气短,和南瓜一起吃会降低营养,和香菇一起吃会破坏胡萝卜素,和石榴一起吃会影响营养素的吸收。

看完这些,你是不是想问,西红柿到底还能和什么一起吃?

其实,作为西红柿的脑残粉,我也很苦恼,要知道,我最爱吃的就是西红柿了。不过还好,西红柿不仅营养价值高,而且和大部分食物搭配营养价值都很高的,比如说最常见的西红柿和鸡蛋搭配可以预防心血管疾病、补充维生素和豆腐搭配可以补脾健胃,和西蓝花搭配可以抗癌等等。

但是,青西红柿一定不要吃,青西红柿含有毒的龙葵碱。吃青西红柿会感到苦涩,吃多了,严重的可导致中毒,出现头晕、恶心、周身不适、呕吐及全身疲乏等症状,严重的还会发生生命危险。

了解了这些后,选用正确的搭配食用西红柿吧。

Friday 5 May 2017

二氧化碳“变”汽油

20170504153135582.jpg
  二氧化碳加氢“变”汽油
  从中国科学院获悉,中科院大连化学物理研究所孙剑、葛庆杰研究员团队发现了CO2高效转化新过程,并设计了一种新型Na-Fe3O4/HZSM-5多功能复合催化剂,首次实现了二氧化碳(CO2)直接加氢制取高辛烷值汽油,相关过程和催化材料已申报多项发明专利。
  该研究成果2日发表于英国学术刊物《自然通讯》杂志上,被誉为“CO2催化转化领域的突破性进展”。
  《自然通讯》是全球排名第三的多学科类期刊,仅次于《自然》和《科学》。该刊2010年创刊时为混合型期刊,出版开放获取及订阅形式的论文,每月收到的投稿约1500篇。该刊发表的所有科学研究都代表着某一领域具有重要意义的研究进展,这涵盖生物学、物理、化学和地球科学等学科。
  难题:CO2的活化与选择性转化ADVERTISINGinRead invented by Teads
  在自然界中,植物从空气中吸收CO2,经光合作用转化为有机物和氧气,该过程缓慢,所以一直以来化学家们努力想通过化学方式回收利用CO2。
  如果以CO2作为原料生产汽油,将是一种潜在替代化石燃料的清洁能源策略,不仅可有效降低CO2造成的温室效应,还可减轻对传统化石能源的依赖。
  科学家解释,用CO2作为原料生产汽油是一种潜在的替代化石燃料的清洁能源策略,但CO2的活化与选择性转化是个难题。
  孙剑说:“相比于更活泼的‘孪生兄弟’一氧化碳,二氧化碳分子非常稳定,难以活化,与经典的费托合成路线相比,CO2与氢分子的催化反应更易生成甲烷、甲醇、甲酸等小分子化合物,而很难生成长链的液态烃燃料。”
20170504154309143.jpg
  技术优势
  据科学网5月3日报道,为了解决这一问题,研究团队设计了一种高效稳定的Na-Fe3O4/HZSM-5多功能复合催化剂。
  孙剑介绍,这种催化剂有三个优势:
  一是,在接近工业生产的条件下,该催化剂实现了甲烷和一氧化碳的低选择性,烃类产物中汽油馏分烃(C5-C11)的选择性达到78%,有利于大规模生产;
  二是,这种方法生产的汽油排放能满足环保要求,汽油馏分主要为高辛烷值的异构烷烃和芳烃,基本满足国V标准对苯、芳烃和烯烃的组成要求;
  三是,该催化剂还具有较好的稳定性,可连续稳定运转1000小时以上,显示出潜在的应用前景。
  此外,对CO2直接转化制取汽油的反应途径研究表明,对多活性位结构及其亲密性效应(proximity effect)的精准调控是实现CO2加氢制汽油的关键。
  该技术不仅为CO2加氢制液体燃料的研究拓展了新思路,还为间歇性可再生能源(风能、太阳能、水能等)的利用提供了新途径。

Thursday 4 May 2017

javascript radio buttons, dropdowns, hide

Solar system

select object type for calculating volume

cube
cylinder

Temperature converter




//index.html

<!DOCTYPE html>
<html>
<head>
    <title>Solar system</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="javascript.js"></script>
</head>

<body>

    <div>
        <h2>select object type for calculating volume</h2>
        <input type="radio" name="object_type" value="cube" onclick="object_type_selector()" />cube <br />
        <input type="radio" name="object_type" value="cylinder" onclick="object_type_selector()" />cylinder <br />
    </div>

    <div id="cube_calculator" style="display:none">
        <h2>Dimensions of a cube</h2>
        <table>
            <thead>
                <tr>
                    <td>Length (ft)</td>
                    <td>Width (ft)</td>
                    <td>Height (ft)</td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><input type="number" id="cube_length" /></td>
                    <td><input type="number" id="cube_width" /></td>
                    <td><input type="number" id="cube_height" /></td>
                </tr>
                <tr>
                    <td colspan="3">
                        <input type="button" value="calculate volume" onclick="cube_cal()" style="width:100%" />
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right">Volume = </td>
                    <td style="text-align:center"><span id="cube_volume" /></td>
                    <td>ft<sup>3</sup></td>
                </tr>
            </tbody>
        </table>
    </div>

    <div id="cylinder_calculator" style="display:none">
        <h2>Dimensions of cylinder</h2>
        <table>
            <thead>
                <tr>
                    <td>radius (ft)</td>
                    <td>height (ft)</td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><input type="number" id="cylinder_radius" /></td>
                    <td><input type="number" id="cylinder_height" /></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="button" value="calculate volume" onclick="cylinder_cal()" style="width:100%" />
                    </td>
                </tr>
                <tr>
                    <td style="text-align:center">Volume =</td>
                    <td style="text-align:center">
                        <span id="cylinder_volume"></span>
                        <span> ft<sup>3</sup></span>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <hr />

    <div>
        <h2>Temperature converter</h2>
        <span><input type="number" id="temperature1" /></span>
        <select id="select_method" onchange="temperature_convert()">
            <option selected="selected">Choose coversion method</option>
            <option value="c_f">Celsius to Fahrenheit</option>
            <option value="f_c">Fahrenheit to Celsius</option>
        </select>
        <span id="temperature2"></span>
    </div>
</body>

</html>

-------------------------------------------------------------------

//javascript.js


function object_type_selector() {
    var types = document.getElementsByName("object_type");
    var selected_type;

    var cube_calculator = document.getElementById("cube_calculator");
    var cylinder_calculator = document.getElementById("cylinder_calculator");

    for (var i = 0; i < types.length; i++) {
        if (types[i].checked) { selected_type = types[i].value; }
    }

    if (selected_type == "cylinder") {
        cylinder_calculator.style.display = "block";
        cube_calculator.style.display = "none";
    }
    else {
        cylinder_calculator.style.display = "none";
        cube_calculator.style.display = "block";
    }
}

function cube_cal() {
    var l = document.getElementById("cube_length").value;
    var w = document.getElementById("cube_width").value;
    var h = document.getElementById("cube_height").value;

    var l = parseFloat(l);
    var w = parseFloat(w);
    var h = parseFloat(h);

    document.getElementById("cube_volume").innerHTML = (l * w * h).toFixed(2);
}

function cylinder_cal() {
    var r = document.getElementById("cylinder_radius").value;
    var h1 = document.getElementById("cylinder_height").value;

    var r = parseFloat(r);
    var h1 = parseFloat(h1);

    document.getElementById("cylinder_volume").innerHTML = (Math.PI * Math.pow(r, 2) * h1).toFixed(2);
}

function temperature_convert() {
    var t = document.getElementById("temperature1").value;
    var methods = document.getElementById("select_method");
    var selected_method = methods.options[methods.selectedIndex].value;

    var t = parseFloat(t);

    if (selected_method == "c_f") {
        document.getElementById("temperature2").innerHTML = (t * 9 / 5 + 32).toFixed(2);
    }

    if (selected_method == "f_c") {
        document.getElementById("temperature2").innerHTML = (5 / 9 * (t - 32)).toFixed(2);
    }
}

reference:

http://stackoverflow.com/questions/1423777/how-can-i-check-whether-a-radio-button-is-selected-with-javascript
http://stackoverflow.com/questions/6242976/javascript-hide-show-element
http://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript
http://stackoverflow.com/questions/2928688/how-to-hide-elements-without-having-them-take-space-on-the-page
https://www.w3schools.com/jsref/jsref_pi.asp
http://chuanshuoge2.blogspot.ca/2017/03/add-html-to-blog.html