I am using visual studio 6 for coding in opengl . Here is my code to build a lamp post .
glColor3f(0.5, 0.27, 0.07);
glBegin(GL_QUADS);
{
glVertex3f(0,0,0);
glVertex3f(2,2,10);
glVertex3f(2,6,10);
glVertex3f(0,10,0);
}glEnd();
glColor3f(0.5, 0.27, 0.07);
glBegin(GL_QUADS);
{
glVertex3f(0,0,0);
glVertex3f(10,0,0);
glVertex3f(8,2,10);
glVertex3f(2,2,10);
}glEnd();
glColor3f(0.5, 0.27, 0.07);
glBegin(GL_QUADS);
{
glVertex3f(2,2,10);
glVertex3f(2,2,22);
glVertex3f(2,6,25);
glVertex3f(2,6,10);
}glEnd();
glColor3f(0.5, 0.27, 0.07);
glBegin(GL_QUADS);
{
glVertex3f(2,2,10);
glVertex3f(8,2,10);
glVertex3f(8,2,25);
glVertex3f(2,2,22);
}glEnd();
glColor3f(0.5, 0.27, 0.07);
glBegin(GL_QUADS);
{
glVertex3f(2,2,10);
glVertex3f(8,2,10);
glVertex3f(8,2,25);
glVertex3f(2,2,22);
}glEnd();
glColor3f(0.5, 0.27, 0.07);
glBegin(GL_QUADS);
{
glVertex3f(2,2,22);
glVertex3f(8,2,25);
glVertex3f(8,6,22);
glVertex3f(2,6,22);
}glEnd();
The output will be as the follows :
But according to my code is the output should be
Why ? Is it a visual studio colpiler problem ? How can I solve this ?
TThe problem will be solved if the project is cleaned . After that , I have to compile and run the software .
Related
Selenium grid is configured on windows server 2016 and we observer the windows server is crashing due to the error 0x000000c2 (0x0000000000000007, 0x0000000074654e56, 0x0000000004070007, 0xffffd988f7f0b5d0). A dump was saved in: C:\Windows\MEMORY.DMP. Report Id: c2a8b94d-67ee-4e3f-aa4a-ebf8855cc4d9.
Our windows server management team suspects the issue is with selenium instance running on the server and we have hub and selenium running on individual windows server. Selenium jar which we are using to configure the hub and node is selenium-server-standalone-3.141.59.jar .
Hub is started with below command
java -jar selenium-server-standalone-3.141.59.jar -role hub -hubConfig hub.json -log hublog.log
Hub configuration file
{
"port": 4444,
"log": "hublog.txt",
"newSessionWaitTimeout": -1,
"servlets" : [],
"withoutServlets": [],
"custom": {},
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
"throwOnCapabilityNotPresent": true,
"cleanUpCycle": 5000,
"role": "hub",
"debug": true,
"browserTimeout": 900,
"timeout": 600,
"_comment" : "Configuration for Hub - hub.json",
"prioritizer": null,
"nodePolling": 2000,
"unregisterIfStillDownAfter" : 1000,
"downPollingLimit" : 2,
"nodeStatusCheckTimeout": 1000,
"platform": "WINDOWS"
}
Node is started with below command
java -Dwebdriver.chrome.driver="chromedriver.exe" -Dwebdriver.gecko.driver="geckodriver.exe" -Dwebdriver.edge.driver="msedgedriver.exe" -jar selenium-server-standalone-3.141.59.jar -role node -nodeConfig node1.json -log nodelog.log
Node config file
{
"capabilities": [
{
"browserName": "firefox",
"maxInstances": 5,
"platform": "WINDOWS",
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"platform": "WINDOWS",
"seleniumProtocol": "WebDriver"
},
{
"browserName": "MicrosoftEdge",
"maxInstances": 5,
"platform": "WINDOWS",
"seleniumProtocol": "WebDriver"
}
],
"cleanUpCycle":5000,
"timeout":600,
"browserTimeout":900,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 15,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "<<seleniumhubip>>",
"log":"nodelog.log",
"id":"<<nodehostname>>",
"downPollingLimit" :2,
"nodeStatusCheckTimeout": 1000,
"nodePolling": 2000,
"role": "node",
"unregisterIfStillDownAfter": 1000
}
As per the documentation in Configuring the nodes by command line:
By default, starting the node allows for concurrent use of 11 browsers.
You are seeing the error as you are trying to start 15 nodes through your configuration as:
"capabilities": [
{
"browserName": "firefox",
"maxInstances": 5,
"platform": "WINDOWS",
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"platform": "WINDOWS",
"seleniumProtocol": "WebDriver"
},
{
"browserName": "MicrosoftEdge",
"maxInstances": 5,
"platform": "WINDOWS",
"seleniumProtocol": "WebDriver"
}
]
Solution
As you are using Selenium v3.x keeping the total number of nodes at 11(maximum) will solve the issue.
How to enable Ctrl+Shift+←/→ to select (highlight) previous or next word at the integrated terminal of VSCode?
Ctrl+←/→ in order to move the cursor by one word works perfectly, but Ctrl+Shift+←/→ outputs D's and C's.
I tried these to the keybindings.json (same for right):
{
"key": "ctrl+shift+left",
"command": "-cursorWordStartLeftSelect",
"when": "textInputFocus"
},
{
"key": "ctrl+shift+left",
"command": "-workbench.action.terminal.resizePaneLeft",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+left",
"command": "cursorWordStartLeftSelect",
"when": "textInputFocus || terminalFocus"
},
and
{
"key": "ctrl+shift+left",
"command": "-workbench.action.terminal.resizePaneLeft",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+left",
"command": "cursorWordStartLeftSelect",
"when": "terminalFocus"
},
but didn't work. Any suggestions?
VSCode version: 1.40.2 x64
os: Ubuntu 19.10
NiFi Cluster
2 Node(CPU: 4/8, Memory: 32GB; NiFi JVM: 1GB) NiFi Cluster.
This NiFi is for ETL use, main processor is ExecuteSQL. Total Processor reach 2K.
Here is the problem: Non-head usage took more then 3GB memory which jvm just set to 1GB.
jvm setting
java.arg.2=-Xms1G
java.arg.3=-Xmx1G
// other args set to default
usage
{
"systemDiagnostics": {
"aggregateSnapshot": {
"totalNonHeap": "7.56 GB",
"totalNonHeapBytes": 8118382592,
"usedNonHeap": "7.38 GB",
"usedNonHeapBytes": 7927382112,
"freeNonHeap": "182.15 MB",
"freeNonHeapBytes": 191000480,
"maxNonHeap": "-2 bytes",
"maxNonHeapBytes": -2,
"nonHeapUtilization": "-1.232114368E9%",
"totalHeap": "2 GB",
"totalHeapBytes": 2147483648,
"usedHeap": "1.66 GB",
"usedHeapBytes": 1784031344,
"freeHeap": "346.62 MB",
"freeHeapBytes": 363452304,
"maxHeap": "2 GB",
"maxHeapBytes": 2147483648,
"heapUtilization": "83.0%",
"availableProcessors": 16,
"processorLoadAverage": 7.529999999999999,
"totalThreads": 768,
"daemonThreads": 617,
"uptime": "218:04:38.693",
"flowFileRepositoryStorageUsage": {
"freeSpace": "727.24 GB",
"totalSpace": "984.06 GB",
"usedSpace": "256.82 GB",
"freeSpaceBytes": 780865024000,
"totalSpaceBytes": 1056621576192,
"usedSpaceBytes": 275756552192,
"utilization": "26.0%"
},
"contentRepositoryStorageUsage": [
{
"identifier": "default",
"freeSpace": "727.24 GB",
"totalSpace": "984.06 GB",
"usedSpace": "256.82 GB",
"freeSpaceBytes": 780865024000,
"totalSpaceBytes": 1056621576192,
"usedSpaceBytes": 275756552192,
"utilization": "26.0%"
}
],
"provenanceRepositoryStorageUsage": [
{
"identifier": "default",
"freeSpace": "727.24 GB",
"totalSpace": "984.06 GB",
"usedSpace": "256.82 GB",
"freeSpaceBytes": 780865024000,
"totalSpaceBytes": 1056621576192,
"usedSpaceBytes": 275756552192,
"utilization": "26.0%"
}
],
"garbageCollection": [
{
"name": "G1 Young Generation",
"collectionCount": 442716,
"collectionTime": "12:12:02.124",
"collectionMillis": 43922124
},
{
"name": "G1 Old Generation",
"collectionCount": 8,
"collectionTime": "00:00:20.826",
"collectionMillis": 20826
}
],
"statsLastRefreshed": "11:24:32 CST",
"versionInfo": {
"niFiVersion": "1.9.2",
"javaVendor": "Oracle Corporation",
"javaVersion": "1.8.0_161",
"osName": "Linux",
"osVersion": "4.4.0-93-generic",
"osArchitecture": "amd64",
"buildTag": "nifi-1.9.2-RC2",
"buildRevision": "ff01ff6",
"buildBranch": "NIFI-6169-RC2",
"buildTimestamp": "04/03/2019 15:25:53 CST"
}
}
}
}
How could I low the non-head usage?
Is it about the almost 2k processors? or other reasons?
update
add jmap -histo:live [pid] > histo-live.txt file
histo-live.txt
I use a d3 bar chart with react.js
I use a code from http://www.reactd3.org/docs/basic/
Graph appears with wrong and have some errors.
Code is here
import React from 'react';
import ReactDOM from 'react-dom';
import {Chart} from 'react-d3-core';
import {BarChart} from 'react-d3-basic';
class StatusChannelChart extends React.Component{
render() {
var generalChartData = [
{"A": "0.08167"},
{"B": "0.01492"},
{"C": "0.02782"},
{"D": "0.04253"},
{"E": "0.12702"},
{"F": "0.02288"},
{"G": "0.02015"},
{"H": "0.06094"},
{"I": "0.06966"},
{"J": "0.00153"}
];
console.log(generalChartData);
var width = 700,
height = 400,
title = "Bar Chart",
chartSeries = [
{
field: 'frequency',
name: 'Frequency'
}
],
x = function(d) {
return d.letter;
},
xScale = 'ordinal',
xLabel = "Letter",
yLabel = "Frequency",
yTicks = [10, "%"];
return (
<BarChart
title= {title}
data= {generalChartData}
width= {400}
height= {300}
chartSeries = {chartSeries}
x= {x}
xLabel= {xLabel}
xScale= {xScale}
yTicks= {yTicks}
yLabel = {yLabel}
/>
)
}
}
export default StatusChannelChart;
Grape appears but wrong like this
I got some error like this
My package.json
{
"name": "Dashboard",
"version": "0.1.4",
"description": "Reporting Dashboard",
"author": "Victoria",
"license": "MIT",
"scripts": {
"start": "webpack-dev-server --progress",
"build": "NODE_ENV=production node_modules/.bin/webpack -p --progress --colors"
},
"devDependencies": {
"babel-core": "~6.7.*",
"babel-loader": "~6.2.*",
"babel-preset-es2015": "~6.6.*",
"babel-preset-react": "~6.5.*",
"css-loader": "^0.23.1",
"react-sidenav": "^1.0.4",
"style-loader": "^0.13.1",
"webpack": "~1.12.*",
"webpack-dev-server": "~1.14.*"
},
"dependencies": {
"chart.js": "^1.1.1",
"dsv-loader": "^1.1.0",
"json-loader": "^0.5.4",
"react": "^15.3.1",
"react-bootstrap": "^0.30.3",
"react-chartjs": "^0.8.0",
"react-d3-basic": "^1.6.11",
"react-dom": "^15.3.1",
"react-router": "^2.7.0"
}
}
Change your generalChartData from this:
var generalChartData = [
{"A": "0.08167"},
{"B": "0.01492"},
{"C": "0.02782"},
{"D": "0.04253"},
{"E": "0.12702"},
{"F": "0.02288"},
{"G": "0.02015"},
{"H": "0.06094"},
{"I": "0.06966"},
{"J": "0.00153"}
];
To this:
var generalChartData = [
{letter: "A", frequency: 0.08167},
{letter: "B", frequency: 0.01492},
{letter: "C", frequency: 0.02782},
...
{letter: "J", frequency: 0.00153}
];
Shift + right-click feels unintuitive to me.
How can I tell ST3 to allow Alt + drag to do column selection, like in many other programs?
I got this to work on Windows 7 using Sublime Text 3.
I created a file "C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\Default (Windows).sublime-mousemap", and put this in it:
[
{
"button": "button1","modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"by": "columns"}
},
]
The accepted answer by dwn is correct, but it is not complete answer.
This is more complex, because sometimes you need select two columns or just unselect some.You need something like this:
[
{
"button": "button1", "modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"by": "columns"}
},
{
"button": "button1", "modifiers": ["alt", "shift"],
"press_command": "drag_select",
"press_args": {"by": "columns", "additive": true}
},
{
"button": "button1", "modifiers": ["alt", "ctrl"],
"press_command": "drag_select",
"press_args": {"by": "columns", "subtractive": true}
}
]
Tested on Win 7 and Sublime Text 3