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
| select * | |
| from dbo.March2010 A | |
| where A.Date >= Convert(datetime, '2010-04-01' ) |
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
| $(function () | |
| { | |
| require(['WorkOrderStatusConfiguration'], function (workOrderStatusConfig) | |
| { | |
| var data = $.parseJSON('@Html.Raw(Json.Encode(Model))'); | |
| workOrderStatusConfig.Init({ | |
| services: { | |
| SaveWOConfigUrl: '@Url.Action("SaveWorkOrderConfiguration", "WorkOrderStatusConfiguration")', | |
| }, | |
| bindingContainerId: 'WorkOrderStatusContainer', |
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
| <Window x:Class="WpfApplication1.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase" | |
| Title="MainWindow" Height="350" Width="525"> | |
| <Grid> | |
| <TextBlock Text="{Binding ThereIsNoDataContext, | |
| diag:PresentationTraceSources.TraceLevel=High}"/> | |
| </Grid> | |
| </Window> |
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
| get add contains next remove(0) iterator.remove | |
| ArrayList O(1) O(1) O(n) O(1) O(n) O(n) | |
| LinkedList O(n) O(1) O(n) O(1) O(1) O(1) | |
| CopyOnWrite-ArrayList O(1) O(n) O(n) O(1) O(n) O(n) | |
| add contains next notes | |
| HashSet O(1) O(1) O(h/n) h is the table capacity | |
| LinkedHashSet O(1) O(1) O(1) | |
| CopyOnWriteArraySet O(n) O(n) O(1) | |
| EnumSet O(1) O(1) O(1) |
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
| # first make sure that the virtual machine is running | |
| docker-machine start dev | |
| Set environment variables to dictate that docker should run a command against a particular machine: | |
| $ eval "$(docker-machine env dev)" | |
| Check if environment is set: | |
| $ env | grep DOCKER | |
| DOCKER_HOST=tcp://192.168.99.100:2376 | |
| DOCKER_CERT_PATH=/Users/dm/.docker/machines/.client | |
| DOCKER_TLS_VERIFY=1 |
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
| curl 'localhost:9200/_cat/indices?v' => list of index | |
| curl 'localhost:9200/_cluster/health?pretty' => health | |
| curl -XGET 'http://localhost:9200/_mapping/twitter' => map of index twitter | |
| curl -XPOST 'localhost:9200/bank/_search?pretty' -d ' | |
| { | |
| "size": 0, | |
| "aggs": { |
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
| db.audit.remove({"reqTime" : { $lt : new Date('01/01/2016').getTime()}}) #remove everything is older than (bad performance) | |
| db.audit.find().sort({"createdAt" : -1}).limit(1) #get latest created | |
| db.collection.stats() #info about collection | |
| export collection mongo in cvs file | |
| mongoexport -h host -d dbname -c collectionname --type=csv -f name,side,type,field --out ~/export20160426.csv | |
| db.fs.files.aggregate([{$group: {_id: "$contentType", total : { $sum: 1 }}}]) # count type on FS Grid |
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
| systemctl stop mysqld / systemctl stop mariadb | |
| service mysqld stop / service mariadb stop | |
| mysqld --skip-grant-tables --user=root & | |
| > mysql | |
| FLUSH PRIVILEGES; | |
| ALTER USER 'root'@'localhost' IDENTIFIED BY 'root_passowrd'; | |
| exit |
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
| vi /etc/environment | |
| add these lines... | |
| LANG=en_US.utf-8 | |
| LC_ALL=en_US.utf-8 |
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
| git rm -rf --cached . | |
| git add . | |
| git commit -m ".gitignore caching" | |
| push |