« first day (1491 days earlier)      last day (2611 days later) » 

12:05 AM
hey I'm trying to learn about svg and adding lines with js not sure I'm doing it right. Heres my code
`function drawLine (row1, num1, row2, num2){
var newLine = "";
var div1 = "#"+row1+"-"+num1;
var div2 = "#"+row2+"-"+num2;
var pos1 = $(div1).position();
var pos2 = $(div2).position();
newLine = "<line style = 'stroke:blue;stroke-width:2' y2='"+pos2.top+"' x2='"+pos2.left+"' y1='"+pos1.top+"' x1='"+pos1.left+"'/>";
$("svg").append(newLine);
}

drawLine("one", 1, "two", 2);`
 
1 message moved from JavaScript
 
 
3 hours later…
user6110959
2:55 AM
import java.util.*;
class Pascalme
{
/**
* 1
* 1 1
* 1 2 1
* 1 3 3 1
* 1 4 6 4 1
*/
public static void main(String args[])throws InputMismatchException
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter n : ");
int n = sc.nextInt();
int spaces = n;
int i,j,k;
long store;
for(i=0;i<n;i++)
{
for(j=spaces;j>=1;j--)
{
System.out.print(" ");
}
spaces--;
store = (long)Math.pow(11,i);
long num = store;
while(num!=0)
{
System.out.print((num%10) + " ");
num = num/10;
}
System.out.println();
 
3:29 AM
1 message moved from Java // NOT ANDROID OR JAVASCRIPT
 
 
4 hours later…
7:05 AM
`// mycomponent.js
module.exports = {
view: function() {return "hello from a module"}
}`

I changed the string value to "something random" but it still outputs "hello from a module"
 
1 message moved from JavaScript
 
1 message moved from Android
 
 
6 hours later…
12:57 PM
var texture = new Texture();

function Texture(){
var shineDamper = 1;
this.test = {
get shineDamper(){
return shineDamper;
},
}
}

console.log(texture.test.shineDamper);
 
1 message moved from JavaScript
 
1:30 PM
what is this place?
 
 
2 hours later…
3:16 PM
13 messages moved from SOBotics
 

« first day (1491 days earlier)      last day (2611 days later) »