text 节点+ cassandra

节点+ cassandra

node cassandra
http://alexminnaar.com/building-a-shoutbox-app-with-cassandra-and-nodejs.html

text 数据vertical.txt

data-vertical.txt
{
  tableSize: {
    height: 7,
    width: 5
  },

  contentCoordinates: {
    startPoint: { x: 3, y: 2 },
    endPoint: { x: 5, y: 7 }
  },

  headers: [
      // tr-1
      [
        {
          'index': 0,
          'title': 'Секции на сдирке',
          'colspan': 2,
          'rowspan': 2,
        },
        {
          'index': 2,
          'title': '',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 3,
          'title': 'Принято',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 4,
          'title': 'Содрано',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 5,
          'title': 'Сдано',
          'colspan': 1,
          'rowspan': 1,
        },
      ],

      // tr-2
      [
        {
          'index': 2,
          'title': '',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 3,
          'title': 'A',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 4,
          'title': 'B',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 5,
          'title': 'C',
          'colspan': 1,
          'rowspan': 1,
        },
      ],

      // tr-3
      [
        {
          'index': 0,
          'title': 'B1',
          'colspan': 1,
          'rowspan': 3,
        },
        {
          'index': 1,
          'title': 'Катоды',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 2,
          'title': '1',
          'colspan': 1,
          'rowspan': 1,
        },
        
      ],

      // tr-4
      [
        {
          'index': 1,
          'title': 'Скрап',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 2,
          'title': '2',
          'colspan': 1,
          'rowspan': 1,
        },
        
      ],

      // tr-5
      [
        {
          'index': 1,
          'title': 'Шлам',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 2,
          'title': '3',
          'colspan': 1,
          'rowspan': 1,
        },
       
      ],


      // tr-6
      [
        {
          'index': 0,
          'title': 'B1',
          'colspan': 1,
          'rowspan': 3,
        },
        {
          'index': 1,
          'title': 'Катоды',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 2,
          'title': '4',
          'colspan': 1,
          'rowspan': 1,
        },
        
      ],

      // tr-7
      [
        {
          'index': 1,
          'title': 'Скрап',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 2,
          'title': '5',
          'colspan': 1,
          'rowspan': 1,
        },
        
      ],

      // tr-8
      [
        {
          'index': 1,
          'title': 'Шлам',
          'colspan': 1,
          'rowspan': 1,
        },
        {
          'index': 2,
          'title': '6',
          'colspan': 1,
          'rowspan': 1,
        },
        
      ],

  ];  
}

text 渲染组件中的其他组件

render other component in component
in HTML:

<ng-template #entry></ng-template>

constructor:
private resolver: ComponentFactoryResolver

in component:

@ViewChild('entry', { read: ViewContainerRef })
entry: ViewContainerRef;
component: ComponentRef<any>;

if (this.entry){
 this.entry.clear();
}

const comFactory = this.resolver.resolveComponentFactory(toggleComponent);
this.component = this.entry.createComponent(comFactory);

text 出版社-8-14

出版社-8-14

-8-14
Sub reference_write(ByVal control As IRibbonControl)
Select Case control.ID
Case "in_proceedings"
Selection.TypeText Text:="In Proceedings of the"
Case "Available_online"
Selection.TypeText Text:="Available online:"
Case "Accessed_on"
Selection.TypeText Text:="(accessed on)."
Case "Springer"
Selection.TypeText Text:="Berlin/Heidelberg, Germany, "
Case "Elsevier"
Selection.TypeText Text:="New York, NY, USA, "
Case "John_Wiley_Sons"
Selection.TypeText Text:="Hoboken, NJ, USA, "
Case "Tailor_Francis_Group"
Selection.TypeText Text:="Abingdon, UK, "
Case "CRC_Press"
Selection.TypeText Text:="Bocaton, FL, USA, "
Case "WHO"
Selection.TypeText Text:="Geneva, Switzerland, "

Case "ACM"
Selection.TypeText Text:="New York, NY, USA, "

Case "CRC"
Selection.TypeText Text:="Bocaton, FL, USA, "

Case "AAAI"
Selection.TypeText Text:="Palo Alto, CA, USA, "

Case "Universities_Press"
Selection.TypeText Text:="Telangana, India, "

Case "Oxford_University_Press_Demand"
Selection.TypeText Text:="Ontario, Canada, "
End Select
End Sub

text #ogr2ogr上传到#postgres

#ogr2ogr上传到#postgres

outp
ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=geospatial user=arminakvn" -t_srs EPSG:4326 $PWD/tlgdb_2017_a_us_substategeo.gdb.zip -overwrite -progress --config PG_USE_COPY YES -lco SRID=4326 -nlt PROMOTE_TO_MULTI -nln public.place Incorporated_Place -overwrite

text localStorage待办事项列表资源

localStorage-todo-resources
*Some Helpful Methods for this Activity:*

*JSON.stringify()* (to store an object/array in localStorage, you'll need to stringify it first): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

*JSON.parse()* (converts a JSON string back into an object): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse

*Array .splice()* (add or remove items from arrays): https://www.w3schools.com/jsref/jsref_splice.asp

*Array.isArray()* (allows you to check whether a value is an array or not): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
*^^^ hint: use this to help you determine whether there is an existing array of to-dos from localStorage, or whether you need to create a brand new one*

text Mongo Basics演习

Mongo Basics Drills
db.restaurants.find()
db.restaurants.find().sort({name: 1}).limit(10).pretty();
db.restaurants.find({_id: ObjectId("59074c7c057aaffaafb10acb")});
db.restaurants.find({borough: "Queens"});
db.restaurants.count();
db.restaurants.find( { "address.zipcode": "11206" } ).count();
db.restaurants.remove({_id: ObjectId("59074c7c057aaffaafb11cb2")});
db.restaurants.update({_id: ObjectId("59074c7c057aaffaafb11fbf")}, {$set: {name: "Bizz Bar Bang"}});
db.restaurants.update({"address.zipcode": "10035"}, {$set: {"address.zipcode": "10036"}});

text 智能合约上的eth调用方法仅适用于web3

智能合约上的eth调用方法仅适用于web3

gistfile1.txt
const contract = new web3.eth.Contract(abiArray, contractAddr);
var func = contract.methods.myMethod('foo', 'bar')

var encodedFunc = func.encodeABI();

var tx = {
    from: ownerWallet,
    to: contractAddr,
    gas: web3.utils.toHex(1000000), //1m, also tried string '1000000'
    gasPrice: web3.utils.toHex(20000000000), //20gwei, also tried string '20000000000'
    data: encodedFunc
}

//might just be unnecessary three lines
const account = web3.eth.accounts.privateKeyToAccount(ownerPrivate)
console.log(account)
web3.eth.getBalance(ownerWallet).then(console.log)

const signed = await web3.eth.accounts.signTransaction(tx, ownerPrivate)
var trans = web3.eth.sendSignedTransaction(signed.rawTransaction)

text 表的data.txt

table-data.txt
// build TR
[
    // tr-1
    [
      {
        'index': 0,
        'title': 'Наименование операций',
        'colspan': 1,
        'rowspan': 3,
      },
      {
        'index': 1,
        'title': 'Наименование показателей',
        'colspan': 1,
        'rowspan': 3,
      },
      {
        'index': 2,
        'title': '',
        'colspan': 1,
        'rowspan': 2,
      },
      {
        'index': 3,
        'title': 'Секция А1',
        'colspan': 1,
        'rowspan': 2,
      },
      {
        'index': 4,
        'title': 'Секция B1',
        'colspan': 1,
        'rowspan': 2,
      },
      {
        'index': 5,
        'title': 'Дополнительный участок',
        'colspan': 2,
        'rowspan': 1,
      },
    ],

    // tr-2
    [
      {
        'index': 5,
        'title': '1C',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 6,
        'title': '1Ю',
        'colspan': 1,
        'rowspan': 1,
      },
    ],

    // tr-3
    [
      {
        'index': 2,
        'title': '',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 3,
        'title': 'А',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 4,
        'title': 'B',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 5,
        'title': 'C',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 6,
        'title': 'D',
        'colspan': 1,
        'rowspan': 1,
      },
    ],


    // tr-4
    [
      {
        'index': 0,
        'title': 'Токовая нагрузка',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 1,
        'title': 'mA',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 2,
        'title': '1',
        'colspan': 1,
        'rowspan': 1,
      },      
    ],

    // tr-5
    [
      {
        'index': 0,
        'title': 'Плотность тока',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 1,
        'title': 'a/m^2',
        'colspan': 1,
        'rowspan': 1,
      },
      {
        'index': 2,
        'title': '2',
        'colspan': 1,
        'rowspan': 1,
      },
      
    ],



  ];

text 居中Div与图像和文本相邻

居中Div与图像和文本相邻

Centered Div With an Image and Text next to each other
<!DOCTYPE html>
<html>
<head>
<style>
.container {
    white-space: nowrap;
    text-align: center;   
}
.box {
    display: inline-block;
    width: 100px;
    vertical-align: middle;
}
</style>
</head>
<body>

<div class = "container">
    <img src = "img.png" class = "box"/>
    <div class = "box">Text</div>
  
</div>

</body>
</html>