问:
Can't make 2 Player Tic Tac Toe game work JavaScript
HTML

```<code><div class="container"> <-- div container -->

<div id="div1" onclick="canvasClicked(1);"></div>
<div id="div2" onclick="canvasClicked(2);"></div>
<div id="div3" onclick="canvasClicked(3);"></div>
<div id="div4" onclick="canvasClicked(4);"></div>
<div id="div5" onclick="canvasClicked(5);"></div>
<div id="div6" onclick="canvasClicked(6);"></div>
<div id="div7" onclick="canvasClicked(7);"></div>
<div id="div8" onclick="canvasClicked(8);"></div>
<div id="div9" onclick="canvasClicked(9);"></div>

</div> <-- div container end -->
</code>```

Css

```<code>  .container{     /*some css*/
border: 2px solid red;
width: 400px;
height: 400px;
margin: 0 auto;
margin-top: 10%;
}

.container div{
float: left;
height: 132px;
width: 131.3px;
border: 1px solid black;
}
</code>```

JavaScript

```<code>var painted; //global variables
var content;
var winningCombinations;
var theCanvas;
var c;
var cxt;
var w;
var y;

var turn = 0;
var squaresFilled = 0; //global variables end

window.onload = function(){               //instantiating variables
painted = new Array();   //to check if the canvas contains something already
content = new Array();  //to see what the canvas contains 'X' or 'O'

winningCombinations = [[1,2,3],[4,5,6],[7,8,9],[1,4,7],[2,5,8],[3,6,9],
[1,5,9],[3,5,7]]; //all possible combinations :P

for(var i=0; i<=8; i++){
    painted[i] = false;
    content[i]=false;
}
}

function canvasClicked(number){

theCanvas = "div" + number; //takes the div Id from html
c = document.getElementById(theCanvas);

if(painted[number-1]==false){
    if(turn%2==0){               //use X here
        c.innerHTML = '<img src="cross image" alt="x" width=100%
height=100%>';
        content[number-1] = 'X'; //storing value in content array
    }else{                       // user O here
        c.innerHTML = '<img src=" O image" height="100%"
width="100%" alt="O">';
        content[number-1] = 'O'; //storing value in content array
    }
}
else{
    alert('This block is already occupied, try another block');
    turn--;
    squaresFilled--;
}
turn++;
painted[number-1]= true;
squaresFilled++;
checkForWinner(content[number-1]);

if(squaresFilled == 9){
    alert('It is a TIE');
    playAgain();
}
}

function checkForWinner(symbol){  // This functions seems to be the problem

for(var a = 0; a < winningCombinations.length; a++){

    if(content[winningCombinations[a][0]]==symbol &&
content[winningCombinations[a][1]]==symbol && content[winningCombinations[a]
[2]]==symbol){
        console.log(symbol + ' won!!');
    }

}
}
function playAgain(){ // just another function to reset the game
    y=confirm("PLAY AGAIN?");
    if(y==true){
        location.reload(true);
    }else{
        alert('Good Bye Then!!');
    }
}
</code>```

It runs normally but the results are not expected. It sometimes randomly make anyone winner(i guess), i can't seem to find the bug, i used debugger as well but i just can't find the problem...any help would be appreciated.
Thanks

答:
In the function checkForWinner change:

```<code>    if(content[winningCombinations[a][0]]==symbol &&
       content[winningCombinations[a][1]]==symbol &&
       content[winningCombinations[a][2]]==symbol){
</code>```

to:

```<code>    if(content[winningCombinations[a][0]-1]==symbol &&
       content[winningCombinations[a][1]-1]==symbol &&
       content[winningCombinations[a][2]-1]==symbol){
</code>```

It would make things easier if you numbered everything from 0 instead of 1. Then you don't need all those -1.

Body:
HTML

 <-- div container -->

 <-- div container end -->

Css

  .container{     /*some css*/
border: 2px solid red;
width: 400px;
height: 400px;
margin: 0 auto;
margin-top: 10%;
}

.container div{
float: left;
height: 132px;
width: 131.3px;
border: 1px solid black;
}

JavaScript

var painted; //global variables
var content;
var winningCombinations;
var theCanvas;
var c;
var cxt;
var w;
var y;

var turn = 0;
var squaresFilled = 0; //global variables end

window.onload = function(){               //instantiating variables
painted = new Array();   //to check if the canvas contains something already
content = new Array();  //to see what the canvas contains 'X' or 'O'

winningCombinations = [[1,2,3],[4,5,6],[7,8,9],[1,4,7],[2,5,8],[3,6,9],
[1,5,9],[3,5,7]]; //all possible combinations :P

for(var i=0; i<=8; i++){
    painted[i] = false;
    content[i]=false;
}
}

function canvasClicked(number){

theCanvas = "div" + number; //takes the div Id from html
c = document.getElementById(theCanvas);

if(painted[number-1]==false){
    if(turn%2==0){               //use X here
        c.innerHTML = '';
        content[number-1] = 'X'; //storing value in content array
    }else{                       // user O here
        c.innerHTML = '';
        content[number-1] = 'O'; //storing value in content array
    }
}
else{
    alert('This block is already occupied, try another block');
    turn--;
    squaresFilled--;
}
turn++;
painted[number-1]= true;
squaresFilled++;
checkForWinner(content[number-1]);

if(squaresFilled == 9){
    alert('It is a TIE');
    playAgain();
}
}

function checkForWinner(symbol){  // This functions seems to be the problem

for(var a = 0; a < winningCombinations.length; a++){

    if(content[winningCombinations[a][0]]==symbol &&
content[winningCombinations[a][1]]==symbol && content[winningCombinations[a]
[2]]==symbol){
        console.log(symbol + ' won!!');
    }

}
}
function playAgain(){ // just another function to reset the game
    y=confirm("PLAY AGAIN?");
    if(y==true){
        location.reload(true);
    }else{
        alert('Good Bye Then!!');
    }
}

It runs normally but the results are not expected. It sometimes randomly make anyone winner(i guess), i can't seem to find the bug, i used debugger as well but i just can't find the problem...any help would be appreciated.
Thanks

Body:
In the function checkForWinner change:

    if(content[winningCombinations[a][0]]==symbol &&
       content[winningCombinations[a][1]]==symbol &&
       content[winningCombinations[a][2]]==symbol){

to:

    if(content[winningCombinations[a][0]-1]==symbol &&
       content[winningCombinations[a][1]-1]==symbol &&
       content[winningCombinations[a][2]-1]==symbol){

It would make things easier if you numbered everything from 0 instead of 1. Then you don't need all those -1.


来源: stackexchange

问:
ggplot2 v2.21.9 sec.axis in polar plot
I am currently trying to add a secondary axis using the recently introduced function sec.axis in ggplot2. This function works well with scatter/bar plots, but not for polar plot: In the following code, the name for the second y-axis appears, but not the axis.

Is there any workaround or option, that I have not figured out?

```<code>require(ggplot2)
set.seed(40);
Location <- data.frame(Winkel = round(runif(1000, 0, 24), 0))
Location$BAD <- Location$Winkel %in% c(seq(7, 18))
Abschnitte <- c(0:24)

polar <- data.frame(Winkel2 = c(1.5, 2.34, 1.2, 3.45, 1.67, 2.61, 1.11, 13.2),
                    value = c(0.1, 0.03, 0.02, 0.015, 0.01, 0.04, 0.09, 0.06))

ggplot(Location, aes(x = Winkel, fill = BAD, y = (..count..)/sum(..count..))) +
  geom_histogram(breaks = seq(0,24), colour = "black") +
  coord_polar(start = 0) + theme_minimal() +
  scale_fill_brewer(type = "seq", palette = 3) +
  ylab("Percentual allocation time") +
  ggtitle("") +
  scale_x_continuous("", limits = c(0, 24), breaks = Abschnitte, labels = Abschnitte) +
  scale_y_continuous(labels = scales::percent,
           sec.axis = sec_axis(~.*5, name = "mean direction")) +
  geom_segment(data = polar, aes(x = Winkel2, y = 0, xend = Winkel2, yend = value, fill = NA),
               arrow = arrow(angle = 30, type = "closed", length = unit(0.3, "cm")))
</code>```

答:
As @henrik mentioned in the comments, this is a bug. It's been patched and is available if you use the development version from GitHub (i.e., devtools::install_github("tidyverse/ggplot2")).

Here's the example after the patch:

require(ggplot2)
#> Loading required package: ggplot2
set.seed(40);
Location <- data.frame(Winkel = round(runif(1000, 0, 24), 0))
Location$BAD <- Location$Winkel %in% c(seq(7, 18))
Abschnitte <- c(0:24)

polar <- data.frame(Winkel2 = c(1.5, 2.34, 1.2, 3.45, 1.67, 2.61, 1.11, 13.2),
                    value = c(0.1, 0.03, 0.02, 0.015, 0.01, 0.04, 0.09, 0.06))

ggplot(Location, aes(x = Winkel, fill = BAD, y = (..count..)/sum(..count..))) +
  geom_histogram(breaks = seq(0,24), colour = "black") +
  coord_polar(start = 0) + theme_minimal() +
  scale_fill_brewer(type = "seq", palette = 3) +
  ylab("Percentual allocation time") +
  ggtitle("") +
  scale_x_continuous("", limits = c(0, 24), breaks = Abschnitte, labels = Abschnitte) +
  scale_y_continuous(labels = scales::percent,
           sec.axis = sec_axis(~.*5, name = "mean direction")) +
  geom_segment(data = polar, aes(x = Winkel2, y = 0, xend = Winkel2, yend = value, fill = NA),
               arrow = arrow(angle = 30, type = "closed", length = unit(0.3, "cm")))
#> Warning: Ignoring unknown aesthetics: fill
```

ContentLicense: CC BY-SA 3.0

Title: ggplot2 v2.21.9 sec.axis in polar plot

Body:
I am currently trying to add a secondary axis using the recently introduced function sec.axis in ggplot2. This function works well with scatter/bar plots, but not for polar plot: In the following code, the name for the second y-axis appears, but not the axis.

Is there any workaround or option, that I have not figured out?

require(ggplot2)
set.seed(40);
Location <- data.frame(Winkel = round(runif(1000, 0, 24), 0))
Location$BAD <- Location$Winkel %in% c(seq(7, 18))
Abschnitte <- c(0:24)

polar <- data.frame(Winkel2 = c(1.5, 2.34, 1.2, 3.45, 1.67, 2.61, 1.11, 13.2),
                    value = c(0.1, 0.03, 0.02, 0.015, 0.01, 0.04, 0.09, 0.06))

ggplot(Location, aes(x = Winkel, fill = BAD, y = (..count..)/sum(..count..))) +
  geom_histogram(breaks = seq(0,24), colour = "black") +
  coord_polar(start = 0) + theme_minimal() +
  scale_fill_brewer(type = "seq", palette = 3) +
  ylab("Percentual allocation time") +
  ggtitle("") +
  scale_x_continuous("", limits = c(0, 24), breaks = Abschnitte, labels = Abschnitte) +
  scale_y_continuous(labels = scales::percent,
           sec.axis = sec_axis(~.*5, name = "mean direction")) +
  geom_segment(data = polar, aes(x = Winkel2, y = 0, xend = Winkel2, yend = value, fill = NA),
               arrow = arrow(angle = 30, type = "closed", length = unit(0.3, "cm")))


问:
Eclipse IDE make: *** No rule to make target...... needed by 'core/abi.cpp.o'. Stop
I'm trying to make Arduino projects with eclipse IDE and I have followed this video tutorial and I am getting this error:

```<code>Building ArduinoTest
make: *** No rule to make target 'Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/abi.cpp', needed by 'core/abi.cpp.o'.  Stop.
</code>```

I'm new with this and I don't know what I could be doing wrong.

This is my makefile, it's the one that was generated by Eclipse:

```ifeq ($(OS),Windows_NT)
SHELL = $(ComSpec)
RMDIR = rmdir /s /q
RM = del /q
mymkdir = if not exist "$1" mkdir "$1"
else
RMDIR = rm -fr
RM = rm -f
mymkdir = mkdir -p $1
endif

PROJECT_OBJS = \
    project/ArduinoTest.cpp.o \

PLATFORM_CORE_OBJS = \
    core/abi.cpp.o \
    core/CDC.cpp.o \
    core/HardwareSerial.cpp.o \
    core/HardwareSerial0.cpp.o \
    core/HardwareSerial1.cpp.o \
    core/HardwareSerial2.cpp.o \
    core/HardwareSerial3.cpp.o \
    core/hooks.c.o \
    core/IPAddress.cpp.o \
    core/main.cpp.o \
    core/new.cpp.o \
    core/PluggableUSB.cpp.o \
    core/Print.cpp.o \
    core/Stream.cpp.o \
    core/Tone.cpp.o \
    core/USBCore.cpp.o \
    core/WInterrupts.c.o \
    core/wiring.c.o \
    core/wiring_analog.c.o \
    core/wiring_digital.c.o \
    core/wiring_pulse.c.o \
    core/wiring_pulse.S.o \
    core/wiring_shift.c.o \
    core/WMath.cpp.o \
    core/WString.cpp.o \

PLATFORM_VARIANT_OBJS = \

LIBRARIES_OBJS = \

TARGETS = \
    ArduinoTest.hex \

all: $(TARGETS)

ArduinoTest.hex: ArduinoTest.elf
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-objcopy" -O ihex -R .eeprom  "./ArduinoTest.elf" "./ArduinoTest.hex"

ArduinoTest.elf: $(PROJECT_OBJS) $(LIBRARIES_OBJS) core.a
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560  -o "./ArduinoTest.elf" $(PROJECT_OBJS) $(LIBRARIES_OBJS) "./core.a" "-L." -lm

core.a: $(PLATFORM_CORE_OBJS) $(PLATFORM_VARIANT_OBJS)

clean:
    -$(RMDIR) project core variant libraries
    -$(RM) *.hex *.eep *.bin *.elf *.a *.ar *.d

size:
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-size" -A "./ArduinoTest.elf"

project/ArduinoTest.cpp.o: ../../ArduinoTest.cpp project/ArduinoTest.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"

project/ArduinoTest.cpp.d: ;

-include project/ArduinoTest.cpp.d

core/abi.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/abi.cpp core/abi.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/abi.cpp.d: ;

-include core/abi.cpp.d

core/CDC.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/CDC.cpp core/CDC.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/CDC.cpp.d: ;

-include core/CDC.cpp.d

core/HardwareSerial.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial.cpp core/HardwareSerial.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial.cpp.d: ;

-include core/HardwareSerial.cpp.d

core/HardwareSerial0.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial0.cpp core/HardwareSerial0.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial0.cpp.d: ;

-include core/HardwareSerial0.cpp.d

core/HardwareSerial1.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial1.cpp core/HardwareSerial1.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial1.cpp.d: ;

-include core/HardwareSerial1.cpp.d

core/HardwareSerial2.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial2.cpp core/HardwareSerial2.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial2.cpp.d: ;

-include core/HardwareSerial2.cpp.d

core/HardwareSerial3.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial3.cpp core/HardwareSerial3.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial3.cpp.d: ;

-include core/HardwareSerial3.cpp.d

core/hooks.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/hooks.c core/hooks.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/hooks.c.d: ;

-include core/hooks.c.d

core/IPAddress.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/IPAddress.cpp core/IPAddress.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/IPAddress.cpp.d: ;

-include core/IPAddress.cpp.d

core/main.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/main.cpp core/main.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/main.cpp.d: ;

-include core/main.cpp.d

core/new.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/new.cpp core/new.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/new.cpp.d: ;

-include core/new.cpp.d

core/PluggableUSB.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/PluggableUSB.cpp core/PluggableUSB.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/PluggableUSB.cpp.d: ;

-include core/PluggableUSB.cpp.d

core/Print.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/Print.cpp core/Print.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/Print.cpp.d: ;

-include core/Print.cpp.d

core/Stream.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/Stream.cpp core/Stream.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/Stream.cpp.d: ;

-include core/Stream.cpp.d

core/Tone.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/Tone.cpp core/Tone.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/Tone.cpp.d: ;

-include core/Tone.cpp.d

core/USBCore.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/USBCore.cpp core/USBCore.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/USBCore.cpp.d: ;

-include core/USBCore.cpp.d

core/WInterrupts.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/WInterrupts.c core/WInterrupts.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/WInterrupts.c.d: ;

-include core/WInterrupts.c.d

core/wiring.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring.c core/wiring.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring.c.d: ;

-include core/wiring.c.d

core/wiring_analog.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_analog.c core/wiring_analog.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_analog.c.d: ;

-include core/wiring_analog.c.d

core/wiring_digital.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_digital.c core/wiring_digital.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_digital.c.d: ;

-include core/wiring_digital.c.d

core/wiring_pulse.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_pulse.c core/wiring_pulse.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_pulse.c.d: ;

-include core/wiring_pulse.c.d

core/wiring_pulse.S.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_pulse.S
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_shift.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_shift.c core/wiring_shift.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_shift.c.d: ;

-include core/wiring_shift.c.d

core/WMath.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/WMath.cpp core/WMath.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/WMath.cpp.d: ;

-include core/WMath.cpp.d

core/WString.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/WString.cpp core/WString.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/WString.cpp.d: ;

-include core/WString.cpp.d
```

Does anybody have any ideas as to what could be causing this error?

答:
That's a common problem when you have your computer username with spaces.

```<code>core/CDC.cpp.o: C:/Users/Bryam Ulloa/
</code>```

I've extracted this from a random location of your makefile. Because the path is defined without "" the compiler is interpreting that path as two smaller arguments instead of the full path. Try putting "" around it, or, to save you from this kind of errors that are not always easy to fix as this one, do yourself a favor and use a space free username.

Body:
I'm trying to make Arduino projects with eclipse IDE and I have followed this video tutorial and I am getting this error:

Building ArduinoTest
make: *** No rule to make target 'Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/abi.cpp', needed by 'core/abi.cpp.o'.  Stop.

I'm new with this and I don't know what I could be doing wrong.

This is my makefile, it's the one that was generated by Eclipse:

ifeq ($(OS),Windows_NT)
SHELL = $(ComSpec)
RMDIR = rmdir /s /q
RM = del /q
mymkdir = if not exist "$1" mkdir "$1"
else
RMDIR = rm -fr
RM = rm -f
mymkdir = mkdir -p $1
endif

PROJECT_OBJS = \
    project/ArduinoTest.cpp.o \

PLATFORM_CORE_OBJS = \
    core/abi.cpp.o \
    core/CDC.cpp.o \
    core/HardwareSerial.cpp.o \
    core/HardwareSerial0.cpp.o \
    core/HardwareSerial1.cpp.o \
    core/HardwareSerial2.cpp.o \
    core/HardwareSerial3.cpp.o \
    core/hooks.c.o \
    core/IPAddress.cpp.o \
    core/main.cpp.o \
    core/new.cpp.o \
    core/PluggableUSB.cpp.o \
    core/Print.cpp.o \
    core/Stream.cpp.o \
    core/Tone.cpp.o \
    core/USBCore.cpp.o \
    core/WInterrupts.c.o \
    core/wiring.c.o \
    core/wiring_analog.c.o \
    core/wiring_digital.c.o \
    core/wiring_pulse.c.o \
    core/wiring_pulse.S.o \
    core/wiring_shift.c.o \
    core/WMath.cpp.o \
    core/WString.cpp.o \

PLATFORM_VARIANT_OBJS = \

LIBRARIES_OBJS = \

TARGETS = \
    ArduinoTest.hex \

all: $(TARGETS)

ArduinoTest.hex: ArduinoTest.elf
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-objcopy" -O ihex -R .eeprom  "./ArduinoTest.elf" "./ArduinoTest.hex"

ArduinoTest.elf: $(PROJECT_OBJS) $(LIBRARIES_OBJS) core.a
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560  -o "./ArduinoTest.elf" $(PROJECT_OBJS) $(LIBRARIES_OBJS) "./core.a" "-L." -lm

core.a: $(PLATFORM_CORE_OBJS) $(PLATFORM_VARIANT_OBJS)

clean:
    -$(RMDIR) project core variant libraries
    -$(RM) *.hex *.eep *.bin *.elf *.a *.ar *.d

size:
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-size" -A "./ArduinoTest.elf"

project/ArduinoTest.cpp.o: ../../ArduinoTest.cpp project/ArduinoTest.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"

project/ArduinoTest.cpp.d: ;

-include project/ArduinoTest.cpp.d

core/abi.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/abi.cpp core/abi.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/abi.cpp.d: ;

-include core/abi.cpp.d

core/CDC.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/CDC.cpp core/CDC.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/CDC.cpp.d: ;

-include core/CDC.cpp.d

core/HardwareSerial.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial.cpp core/HardwareSerial.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial.cpp.d: ;

-include core/HardwareSerial.cpp.d

core/HardwareSerial0.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial0.cpp core/HardwareSerial0.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial0.cpp.d: ;

-include core/HardwareSerial0.cpp.d

core/HardwareSerial1.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial1.cpp core/HardwareSerial1.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial1.cpp.d: ;

-include core/HardwareSerial1.cpp.d

core/HardwareSerial2.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial2.cpp core/HardwareSerial2.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial2.cpp.d: ;

-include core/HardwareSerial2.cpp.d

core/HardwareSerial3.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/HardwareSerial3.cpp core/HardwareSerial3.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/HardwareSerial3.cpp.d: ;

-include core/HardwareSerial3.cpp.d

core/hooks.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/hooks.c core/hooks.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/hooks.c.d: ;

-include core/hooks.c.d

core/IPAddress.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/IPAddress.cpp core/IPAddress.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/IPAddress.cpp.d: ;

-include core/IPAddress.cpp.d

core/main.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/main.cpp core/main.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/main.cpp.d: ;

-include core/main.cpp.d

core/new.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/new.cpp core/new.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/new.cpp.d: ;

-include core/new.cpp.d

core/PluggableUSB.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/PluggableUSB.cpp core/PluggableUSB.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/PluggableUSB.cpp.d: ;

-include core/PluggableUSB.cpp.d

core/Print.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/Print.cpp core/Print.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/Print.cpp.d: ;

-include core/Print.cpp.d

core/Stream.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/Stream.cpp core/Stream.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/Stream.cpp.d: ;

-include core/Stream.cpp.d

core/Tone.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/Tone.cpp core/Tone.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/Tone.cpp.d: ;

-include core/Tone.cpp.d

core/USBCore.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/USBCore.cpp core/USBCore.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/USBCore.cpp.d: ;

-include core/USBCore.cpp.d

core/WInterrupts.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/WInterrupts.c core/WInterrupts.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/WInterrupts.c.d: ;

-include core/WInterrupts.c.d

core/wiring.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring.c core/wiring.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring.c.d: ;

-include core/wiring.c.d

core/wiring_analog.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_analog.c core/wiring_analog.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_analog.c.d: ;

-include core/wiring_analog.c.d

core/wiring_digital.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_digital.c core/wiring_digital.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_digital.c.d: ;

-include core/wiring_digital.c.d

core/wiring_pulse.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_pulse.c core/wiring_pulse.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_pulse.c.d: ;

-include core/wiring_pulse.c.d

core/wiring_pulse.S.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_pulse.S
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_shift.c.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/wiring_shift.c core/wiring_shift.c.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/wiring_shift.c.d: ;

-include core/wiring_shift.c.d

core/WMath.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/WMath.cpp core/WMath.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/WMath.cpp.d: ;

-include core/WMath.cpp.d

core/WString.cpp.o: C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino/WString.cpp core/WString.cpp.d
    @$(call mymkdir,$(dir $@))
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/cores/arduino" -I"C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/hardware/avr/1.6.19/variants/mega" "$<" -o "$@"
    "C:/Users/Bryam Ulloa/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs  "./core.a" "$@"

core/WString.cpp.d: ;

-include core/WString.cpp.d

Does anybody have any ideas as to what could be causing this error?

Body:
That's a common problem when you have your computer username with spaces.

core/CDC.cpp.o: C:/Users/Bryam Ulloa/

I've extracted this from a random location of your makefile. Because the path is defined without "" the compiler is interpreting that path as two smaller arguments instead of the full path. Try putting "" around it, or, to save you from this kind of errors that are not always easy to fix as this one, do yourself a favor and use a space free username.


问:
Proximity search by city, or state, or ZIP
For some reason we still don't have this feature yet. We can make it work using zip codes, but how about City or State? The Views set of Modules are great and I would love to see Proximity Search options expanded. There are requests for this in the Drupal forums: http://drupal.org/node/489904 but that thread has been stagnant for months. The "fix" is inconsistent and no longer works on my end, using Views and Location series modules. Does anyone know a workaround to this issue? The custom module shown in Drupal forum worked at some point with limitations, but now its no longer displaying any search results. Trying to hit this from any angle -- have the US zipcodes in MySQL database for the former configuration; have Apache SOLR ready to go; even got Spatial SOLR ready to go if that ever picks up. Any help much appreciated.</p>

答:
May be you have to try geoname module im not sure you should try

http://geonames.edesign.no/node/13

Give a try

Thanks,
Gobi :)

ContentLicense: CC BY-SA 2.5


问:
Using CSS in Laravel views?
I've just began learning Laravel, and can do the basics of a controller and routing.

My OS is Mac OS X Lion, and it's on a MAMP server.

My code from routes.php:

```<code>Route::get('/', function() {
    return View::make('home.index');
});

Route::get('businesses', function() {
    return View::make('businesses.index');
});

Route::get('testing', function() {
    return View::make('testing.index');
});

Route::get('hello', function() {
    return "<h3>Hello world!</H3>";
});
</code>```

That works, the views display perfectly, ''however'' what I want to try and do is include CSS within the views, I tried adding in a link to a stylesheet within the directory but the page displayed it as the default browser font even though the css was in the HTML!

This is index.php from businesses within the views folder:

```<code><head>
   <link rel="stylesheet" type="text/css" href="mystyle.css">
</head>

<p>Business is a varied term. My content here.
</code>```

I tried using the Blade template engine in my other views folder (testing) to display CSS but again the CSS did not show despite it being in the testing folder!

How can I overcome this problem, and get better - as I'm slowly learning this framework.

答: Put them in public folder and call it in the view with something like  href="{{ asset('public/css/style.css') }}". Note that the public should be included when you call the assets.

Title: Using CSS in Laravel views?

Body:
I've just began learning Laravel, and can do the basics of a controller and routing.

My OS is Mac OS X Lion, and it's on a MAMP server.

My code from routes.php:

Route::get('/', function() {
    return View::make('home.index');
});

Route::get('businesses', function() {
    return View::make('businesses.index');
});

Route::get('testing', function() {
    return View::make('testing.index');
});

Route::get('hello', function() {
    return "
Hello world!
";
});

That works, the views display perfectly, ''however'' what I want to try and do is include CSS within the views, I tried adding in a link to a stylesheet within the directory but the page displayed it as the default browser font even though the css was in the HTML!

This is index.php from businesses within the views folder:

   <link rel="stylesheet" type="text/css" href="mystyle.css">

Business is a varied term. My content here.

I tried using the Blade template engine in my other views folder (testing) to display CSS but again the CSS did not show despite it being in the testing folder!

How can I overcome this problem, and get better - as I'm slowly learning this framework.


问:
How to call a function after HTML content refresh in angular2?
When I hit an api to get data from server in constructor and store it in local variable. I loop this variable in html to build table and show data in table. But when I call a function on api success and in it I loop the same variable which is used in HTML, the loop in function will run first and after that HTML loop. My requirement is to run HTML loop first and after its completion loop in function.

HTML CODE

```<code><table>
   <tr *ngFor="let booking of jobHistory>
      <td>{{booking}}</td>
   </tr>
</table>
</code>```

TYPESCRIPT CODE

```<code>jobHistory : any;
constructor()
{
  this.service.getCustomerJobHistory().subscribe(   res => { this.jobHistory = res},
                                                    err => console.log(err),
                                                    () => this.setRating()
                                              );

}

setRating()
{
   //I want to run this loop after HTML loop completion.
   for(let booking of this.jobHistory)
   {
     console.log(booking);
   }
}
</code>```

答:
```<code><table>
    <tr *ngFor="let booking of jobHistory; let last = last">
        <td>{{booking}}</td>
        <ng-container *ngIf="last">{{setRating()}}</ng-container>
    </tr>
</table>

setRating() {
   //I want to run this loop after HTML loop completion.
   for(let booking of this.jobHistory) {
       console.log(booking);
   }
}
</code>```

The above solution will detect the last iteration of the ngFor loop. setRating will be called if the last index is not null.

Try this solution and let me know, if you need any help.

Edit: To avoid multiple execution problems,

```<code>lastValue:any;
setRating(last:any) {
   if (this.lastValue==last)
return;

   //I want to run this loop after HTML loop completion.
   for(let booking of this.jobHistory) {
       console.log(booking);
   }
   this.lastValue=last
}
</code>```

Body:
When I hit an api to get data from server in constructor and store it in local variable. I loop this variable in html to build table and show data in table. But when I call a function on api success and in it I loop the same variable which is used in HTML, the loop in function will run first and after that HTML loop. My requirement is to run HTML loop first and after its completion loop in function.

HTML CODE

      {{booking}}

TYPESCRIPT CODE

jobHistory : any;
constructor()
{
  this.service.getCustomerJobHistory().subscribe(   res => { this.jobHistory = res},
                                                    err => console.log(err),
                                                    () => this.setRating()
                                              );

}

setRating()
{
   //I want to run this loop after HTML loop completion.
   for(let booking of this.jobHistory)
   {
     console.log(booking);
   }
}

Body:
<table>
    <tr *ngFor="let booking of jobHistory; let last = last">
        <td>{{booking}}</td>
        <ng-container *ngIf="last">{{setRating()}}</ng-container>
    </tr>
</table>

setRating() {
   //I want to run this loop after HTML loop completion.
   for(let booking of this.jobHistory) {
       console.log(booking);
   }
}

The above solution will detect the last iteration of the ngFor loop. setRating will be called if the last index is not null.

Try this solution and let me know, if you need any help.

Edit: To avoid multiple execution problems,

lastValue:any;
setRating(last:any) {
   if (this.lastValue==last)
return;

   //I want to run this loop after HTML loop completion.
   for(let booking of this.jobHistory) {
       console.log(booking);
   }
   this.lastValue=last
}


问:
Error 2 Cannot implicitly convert type 'int' to 'string' c#
I am trying to look at the available ports before to connecting. I have seen tons of explanations, but none of them are working.

This is my code

```<code>public int portxt = 27001;
public void GetOpenPort()
    {
        using (TcpClient tcpClient = new TcpClient())
        {

            try
            {
                tcpClient.Connect("192.168.1.32", portxt);
                MessageBox.Show("Port open");
            }
            catch (Exception)
            {
                MessageBox.Show("Port closed");
                randomport();

                txtPort.Text = portxt;
            }
        }
    }
    public void randomport()
    {
        Random portx = new Random();
        int month = portx.Next(0, 65535);
    }
</code>```

i finally discovery how to make it work
This is the final code

```<code>public void GetOpenPort()
    {
        using (TcpClient tcpClient = new TcpClient())
        {

            try
            {
                tcpClient.Connect("192.168.1.32", portxt);
                MessageBox.Show("Port open");
            }
            catch (Exception)
            {
                MessageBox.Show("Port closed");
                randomport();
                //txtPort.Text = portxt.ToString();

            }
        }
    }
    public void randomport()
    {
        Random portx = new Random();
        int month = portx.Next(27001, 65535);
        txtPort.Text = portx.Next(Convert.ToInt32("0"), Convert.ToInt32("65535")).ToString();
    }
</code>```

答:
You need to convert your int to a string (using the .ToString() method) so that it can be displayed on a textbox:

```<code>public int portxt = 27001;

public void GetOpenPort()
{
    using (TcpClient tcpClient = new TcpClient())
    {
        try
        {
            tcpClient.Connect("192.168.1.32", portxt);
            MessageBox.Show("Port open");
        }
        catch (Exception)
        {
            MessageBox.Show("Port closed");
            randomport();

            txtPort.Text = portxt.ToString();  // convert your INT to a string!
        }
    }
}
</code>```

Body:
I am trying to look at the available ports before to connecting. I have seen tons of explanations, but none of them are working.

This is my code

public int portxt = 27001;
public void GetOpenPort()
    {
        using (TcpClient tcpClient = new TcpClient())
        {

            try
            {
                tcpClient.Connect("192.168.1.32", portxt);
                MessageBox.Show("Port open");
            }
            catch (Exception)
            {
                MessageBox.Show("Port closed");
                randomport();

                txtPort.Text = portxt;
            }
        }
    }
    public void randomport()
    {
        Random portx = new Random();
        int month = portx.Next(0, 65535);
    }

i finally discovery how to make it work
This is the final code

public void GetOpenPort()
    {
        using (TcpClient tcpClient = new TcpClient())
        {

            try
            {
                tcpClient.Connect("192.168.1.32", portxt);
                MessageBox.Show("Port open");
            }
            catch (Exception)
            {
                MessageBox.Show("Port closed");
                randomport();
                //txtPort.Text = portxt.ToString();

            }
        }
    }
    public void randomport()
    {
        Random portx = new Random();
        int month = portx.Next(27001, 65535);
        txtPort.Text = portx.Next(Convert.ToInt32("0"), Convert.ToInt32("65535")).ToString();
    }

Body:
You need to convert your int to a string (using the .ToString() method) so that it can be displayed on a textbox:

public int portxt = 27001;

public void GetOpenPort()
{
    using (TcpClient tcpClient = new TcpClient())
    {
        try
        {
            tcpClient.Connect("192.168.1.32", portxt);
            MessageBox.Show("Port open");
        }
        catch (Exception)
        {
            MessageBox.Show("Port closed");
            randomport();

            txtPort.Text = portxt.ToString();  // convert your INT to a string!
        }
    }
}


问:
What is the use of the @Temporal annotation in Hibernate?
The Hibernate Documentation has the information below for the @Temporal annotation:

In plain Java APIs, the temporal precision of time is not defined.
  When dealing with temporal data you might want to describe the
  expected precision in database. Temporal data can have DATE, TIME, or
  TIMESTAMP precision (ie the actual date, only the time, or both). Use
  the @Temporal annotation to fine tune that.

What does temporal precision of time is not defined mean? What is temporal data and its precision? How does it fine tune?

答:
@Temporal is a JPA annotation which can be used to store in the database table on of the following column items:

DATE (java.sql.Date)

TIME (java.sql.Time)

TIMESTAMP (java.sql.Timestamp)

Generally when we declare a Date field in the class and try to store it.

It will store as TIMESTAMP in the database.

```<code>@Temporal
private Date joinedDate;
</code>```

Above code will store value looks like 08-07-17 04:33:35.870000000 PM

If we want to store only the DATE in the database,

We can use/define TemporalType.

```<code>@Temporal(TemporalType.DATE)
private Date joinedDate;
</code>```

This time, it would store 08-07-17 in database

There are some other attributes as well as @Temporal which can be used based on the requirement.

Body:
@Temporal is a JPA annotation which can be used to store in the database table on of the following column items:

DATE (java.sql.Date)

TIME (java.sql.Time)

TIMESTAMP (java.sql.Timestamp)

Generally when we declare a Date field in the class and try to store it.

It will store as TIMESTAMP in the database.

@Temporal
private Date joinedDate;

Above code will store value looks like 08-07-17 04:33:35.870000000 PM

If we want to store only the DATE in the database,

We can use/define TemporalType.

@Temporal(TemporalType.DATE)
private Date joinedDate;

This time, it would store 08-07-17 in database

There are some other attributes as well as @Temporal which can be used based on the requirement.

ContentLicense: CC BY-SA 4.0


问:
How to set multilevel index in a dataframe with existing columns
I have a dataframe as below:

```<code>     A      B     C     D
0    hola   32    43    54
1    hey    87    67    45
2    hi     10    54    89
3    hola   19    34    12
4    hi     11    59    09
</code>```

I need to set a multilevel index using A and B , which is grouped by A
I need the following dataframe

```<code> A      B     C     D
hola   32    43    54
       19    34    12
hey    87    67    45
hi     10    54    89
       11    59    09
</code>```

I have tried using df.set_index(['A','B'])
and i get

```<code>A      B     C     D
hola   32    43    54
hola   19    34    12
hey    87    67    45
hi     10    54    89
hi     11    59    09
</code>```

Body:
I have a dataframe as below:

     A      B     C     D
0    hola   32    43    54
1    hey    87    67    45
2    hi     10    54    89
3    hola   19    34    12
4    hi     11    59    09

I need to set a multilevel index using A and B , which is grouped by A
I need the following dataframe

 A      B     C     D
hola   32    43    54
       19    34    12
hey    87    67    45
hi     10    54    89
       11    59    09

I have tried using df.set_index(['A','B'])
and i get

A      B     C     D
hola   32    43    54
hola   19    34    12
hey    87    67    45
hi     10    54    89
hi     11    59    09

Body:
You need to sort first.

df.sort_values(['A','B']).set_index(['A','B'])
Out[60]:
          C   D
A    B
hey  87  67  45
hi   10  54  89
     11  59   9
hola 19  34  12
     32  43  54


问:
Python/Selenium: How can I emulate extensions such as uBlock or AdBlock using a headless Chrome driver?
I'm using Selenium/ChromeDriver in Python. Using the ChromeDriver options in my code:

```<code>options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('load-extension=' +uBlockExtensionPATH)
browser = webdriver.Chrome(chrome_options=options)
</code>```

However, headless Chrome does not support the use of extensions as per this answer. I was able to get headless Chrome working with my current Python script, and everything works fine, but it takes a long time to reach sites due to third-party advertisements/analytics/requests.

Before I implemented the headless ChromeDriver, I used the standard non-headless ChromeDriver and imported the uBlock extension to eliminate third-party sites from slowing down my tests.

For example, completing my tests without the -headless option and with uBlock extension would take roughly 20 seconds or so. However, completing my tests with the -headless option and without uBlock, my tests take about a minute to complete. This defeats the purpose of my original goal of cutting down testing time, which was why I wanted to use the headless Chrome Driver in the first place.

Since I can't import Chrome extensions in headless mode, how can I block third-party ads/analytics/requests (a.k.a. the purpose of uBlock)?

I'm not too knowledgeable in proxies or anything network related. I know an option would be to blacklist any hosts that are causing the slow connection, but these hosts are constantly changing and would be too much to blacklist each individually.

答:
As extensions are not supported in headless mode, Proxy servers seem to be the best possible course of action here.

You can try using https://github.com/epitron/mitm-adblock to setup a local proxy server (written in python and easy to set up) and add --proxy-server=localhost:8118 when starting up chrome. It supports AdblockPlus easylist which should be fairly comprehensive.

You can also try https://github.com/Artificial-University/adblock-proxy which is written in node but seems more full-fledged and recently updated.

Body:
I'm using Selenium/ChromeDriver in Python. Using the ChromeDriver options in my code:

options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('load-extension=' +uBlockExtensionPATH)
browser = webdriver.Chrome(chrome_options=options)

However, headless Chrome does not support the use of extensions as per this answer. I was able to get headless Chrome working with my current Python script, and everything works fine, but it takes a long time to reach sites due to third-party advertisements/analytics/requests.

Before I implemented the headless ChromeDriver, I used the standard non-headless ChromeDriver and imported the uBlock extension to eliminate third-party sites from slowing down my tests.

For example, completing my tests without the -headless option and with uBlock extension would take roughly 20 seconds or so. However, completing my tests with the -headless option and without uBlock, my tests take about a minute to complete. This defeats the purpose of my original goal of cutting down testing time, which was why I wanted to use the headless Chrome Driver in the first place.

Since I can't import Chrome extensions in headless mode, how can I block third-party ads/analytics/requests (a.k.a. the purpose of uBlock)?

I'm not too knowledgeable in proxies or anything network related. I know an option would be to blacklist any hosts that are causing the slow connection, but these hosts are constantly changing and would be too much to blacklist each individually.


问:
Upload images to temporary image folder
I have a hosted website and i want to upload my images to image directory and link the image to mysql database .

What i did:

Creating form as :

```<code><form method=POST align=center enctype="multipart/form-data">
<input type=file name=image>
</code>```

Php code :

```<code>$uploaddir = 'images/';
     // echo $uploaddir;
        $target = "$uploaddir".basename($_FILES['image']['name']);
              echo $target;

        $image = $_FILES['image']['name'];
    $sql="insert into News2(image_News2)
    values($image)";
    $res=mysqli_query($con,$sql);
    copy($_FILES['tmp_name']['name'],$target,true);
</code>```

What this code actually do is only inserting the image into the database not copying the image into the images folder.

What i searched for and found :

You shouldn't specify a http:// URL as $uploaddir but a path relative to the path where the php script is running from.

So i what i really wanted to do is :

1- Copying the image into image folder directory on website.
2- Linking the copied image to the database.

答:
as per your given data you must close Form tag then give form action ="" attribute to specify url . and if your oprating system is linux then check folder permission in set or not , also check your database table if field name is set unique or not ?
then write below code in given url file </p>

Title: Upload images to temporary image folder

Body:
I have a hosted website and i want to upload my images to image directory and link the image to mysql database .

What i did:

Creating form as :

<form method=POST align=center enctype="multipart/form-data">
<input type=file name=image>

Php code :

$uploaddir = 'images/';
     // echo $uploaddir;
        $target = "$uploaddir".basename($_FILES['image']['name']);
              echo $target;

        $image = $_FILES['image']['name'];
    $sql="insert into News2(image_News2)
    values($image)";
    $res=mysqli_query($con,$sql);
    copy($_FILES['tmp_name']['name'],$target,true);

What this code actually do is only inserting the image into the database not copying the image into the images folder.

What i searched for and found :

You shouldn't specify a http:// URL as $uploaddir but a path relative to the path where the php script is running from.

So i what i really wanted to do is :

1- Copying the image into image folder directory on website.
2- Linking the copied image to the database.


问:
Transparent 3D bar graphs
I would like to generate 3D bar graphs with transparent surfaces so that I can see what is going on behind tall bars.

The mplot3d API docs say that keywords are allowed for the bar3d function. I pass all the required parameters but can only output graphs with solid surfaces. These and these bar graphs clearly show semi-transparent surfaces.

I tried the keyword alpha (as it is used elsewhere for a similar purpose) but that was not recognized:

```<code>Exception Value:  bar3d() got an unexpected keyword argument 'alpha'
</code>```

and the zsort parameter doesn't seem to be working either although it is used in one of the examples above:

```<code>Exception Value: bar3d() got an unexpected keyword argument 'zsort'
</code>```

How can I generate transparent bar graphs?

答:
My best guess is that you might find bar3d() Order of Coloring and Matlibplot Colors of some use.

That is to say, my understanding is that transparency should be handled in the alpha value of any given color used (as an RGBA argument used in the manner described in the first link).

Having said that, I can't explain why the example source code you linked to works at all (maybe it doesn't?)!

Title: Transparent 3D bar graphs

Body:
I would like to generate 3D bar graphs with transparent surfaces so that I can see what is going on behind tall bars.

The mplot3d API docs say that keywords are allowed for the bar3d function. I pass all the required parameters but can only output graphs with solid surfaces. These and these bar graphs clearly show semi-transparent surfaces.

I tried the keyword alpha (as it is used elsewhere for a similar purpose) but that was not recognized:

Exception Value:  bar3d() got an unexpected keyword argument 'alpha'

and the zsort parameter doesn't seem to be working either although it is used in one of the examples above:

Exception Value: bar3d() got an unexpected keyword argument 'zsort'

How can I generate transparent bar graphs?


问:
How to read an SMS from Arduino and get LED to switch on or off

#include <SoftwareSerial.h>
char inchar; //Will hold the incoming character from the serial port.
SoftwareSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.

 int led1 = A2;

 void setup()
 {
     // Prepare the digital output pins
     pinMode(led1, OUTPUT);
     digitalWrite(led1, HIGH);

     //Initialize GSM module serial port for communication.
     cell.begin(19200);
     delay(30000); // Give time for GSM module to register on network, etc.
     cell.println("AT+CMGF=1"); // Set SMS mode to text
     delay(200);
     cell.println("AT+CNMI=3,3,0,0"); // Set module to send SMS data to serial out upon receipt
     delay(200);
 }

 void loop()
 {
     //If a character comes in from the cellular module...
     if(cell.available() >0)
     {
         delay(10);
         inchar=cell.read();
         if (inchar=='a')
         {
             delay(10);
             inchar=cell.read();
             if (inchar=='0')
             {
                 digitalWrite(led1, LOW);
             }
             else if (inchar=='1')
             {
                 digitalWrite(led1, HIGH);
             }
             delay(10);
             delay(10);
         }
         cell.println("AT+CMGD=1,4"); // Delete all SMS
     }
 }
```

This is the code for receiving SMSes from the cellular network. I am using the Arduino Gboard with SIM900. There is no error in the code, but the LED on the board doesn't switch on or off in response to an SMS.

Why?

答:
The simplest way is the best way.

```<code>// if You use SoftwareSerial lib, declare object for GSM
SoftwareSerial gsm(8,9); // TX, RX
void setup(){
     // initialise UART and GSM communication between Arduino and modem
     Serial.begin(115200);
     gsm.begin(115200);
     // wait 5-10sec. for modem whitch must connect to the network
     delay(5000);
     // configure modem - remember! modem didn't remeber Your's configuration!
     gsm.print("at+cmgf=1\r"); // use full functionality (calls, sms, gprs) - see app note
     gsm.print("at+clip=1\r"); // enable presentation number
     gsm.print("at+cscs=\"GSM\"\r"); // configure sms as standard text messages
     gsm.print("at+cnmi=1,2,0,0,0\r"); // show received sms and store in sim (probobly, I don't compre this settings with app note but it's working :)
}
void loop(){
     String response = gsmAnswer();
    if(response.indexOf("+CMT:") > 0 ) { // SMS arrived
    // Now You can parse Your Message, if You wont controll only LED, just write
       if(response.indexOf("LED ON") > 0) {
          digitalWrite(LED_PIN, HIGH); // enable it
       }else if(response.indexOf("LED OFF") > 0) {
          digitalWrite(LED_PIN, LOW); // turn off
       }
       delay(1000);
    }
}

String gsmAnswer(){
   String answer;
   while(!gsm.available());
   while(gsm.available()){
     delay(5);
     if(Serial.available() > 0){
       char s = (char)gsm.read();
       answer += s;
     }
  }
  return answer;
}
</code>```

One think more, incomming sms has the following format:

```<code>+CMT: "+48xxxxxxxxx","","17/07/07,21:57:04+08"
Test of arrived messages
</code>```

Body:
#include <SoftwareSerial.h>
char inchar; //Will hold the incoming character from the serial port.
SoftwareSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.

 int led1 = A2;

 void setup()
 {
     // Prepare the digital output pins
     pinMode(led1, OUTPUT);
     digitalWrite(led1, HIGH);

     //Initialize GSM module serial port for communication.
     cell.begin(19200);
     delay(30000); // Give time for GSM module to register on network, etc.
     cell.println("AT+CMGF=1"); // Set SMS mode to text
     delay(200);
     cell.println("AT+CNMI=3,3,0,0"); // Set module to send SMS data to serial out upon receipt
     delay(200);
 }

 void loop()
 {
     //If a character comes in from the cellular module...
     if(cell.available() >0)
     {
         delay(10);
         inchar=cell.read();
         if (inchar=='a')
         {
             delay(10);
             inchar=cell.read();
             if (inchar=='0')
             {
                 digitalWrite(led1, LOW);
             }
             else if (inchar=='1')
             {
                 digitalWrite(led1, HIGH);
             }
             delay(10);
             delay(10);
         }
         cell.println("AT+CMGD=1,4"); // Delete all SMS
     }
 }

This is the code for receiving SMSes from the cellular network. I am using the Arduino Gboard with SIM900. There is no error in the code, but the LED on the board doesn't switch on or off in response to an SMS.

Why?

Body:
The simplest way is the best way.

// if You use SoftwareSerial lib, declare object for GSM
SoftwareSerial gsm(8,9); // TX, RX
void setup(){
     // initialise UART and GSM communication between Arduino and modem
     Serial.begin(115200);
     gsm.begin(115200);
     // wait 5-10sec. for modem whitch must connect to the network
     delay(5000);
     // configure modem - remember! modem didn't remeber Your's configuration!
     gsm.print("at+cmgf=1\r"); // use full functionality (calls, sms, gprs) - see app note
     gsm.print("at+clip=1\r"); // enable presentation number
     gsm.print("at+cscs=\"GSM\"\r"); // configure sms as standard text messages
     gsm.print("at+cnmi=1,2,0,0,0\r"); // show received sms and store in sim (probobly, I don't compre this settings with app note but it's working :)
}
void loop(){
     String response = gsmAnswer();
    if(response.indexOf("+CMT:") > 0 ) { // SMS arrived
    // Now You can parse Your Message, if You wont controll only LED, just write
       if(response.indexOf("LED ON") > 0) {
          digitalWrite(LED_PIN, HIGH); // enable it
       }else if(response.indexOf("LED OFF") > 0) {
          digitalWrite(LED_PIN, LOW); // turn off
       }
       delay(1000);
    }
}

String gsmAnswer(){
   String answer;
   while(!gsm.available());
   while(gsm.available()){
     delay(5);
     if(Serial.available() > 0){
       char s = (char)gsm.read();
       answer += s;
     }
  }
  return answer;
}

One think more, incomming sms has the following format:

+CMT: "+48xxxxxxxxx","","17/07/07,21:57:04+08"
Test of arrived messages


问:
How to send the array in $_POST array in ajax using form.serialize()
How to send the array in $_POST array in ajax (data : form.serialize()) form data is  like array('name'=>'test','accom'=>array(0=>'test2'.1=>'test3')) :

```<code>$.ajax({
    url     :   'add_tour_apply_control.php',
    type    :   "POST",
    dataType:   "json",
    data    :   $('#form_tour_mov').serialize(),
    success :   function (messData){
    }
})
</code>```

答:
You can use .serializeArray().

It will directly encode form elements as an array of names and values.

Then send the array of values across to your data field.

For example - var fields = $("#form_tour_mov").serializeArray();.
Then field.value will have the values from the form.

Body:
How to send the array in $_POST array in ajax (data : form.serialize()) form data is  like array('name'=>'test','accom'=>array(0=>'test2'.1=>'test3')) :

$.ajax({
    url     :   'add_tour_apply_control.php',
    type    :   "POST",
    dataType:   "json",
    data    :   $('#form_tour_mov').serialize(),
    success :   function (messData){
    }
})


问:
What is a non recursive solution for Fibonacci-like sequence in Java?
Given this pseudo code of a function

```<code>f(0) = 1;
f(1) = 3;
f(n) = 3 * f(n - 1) - f(n - 2); // for n >= 2.
</code>```

Is there a non recursive way of doing this?

答:
Here is simply a function with minimum line of code and maximum flexibility.

You can add any "initial values" and any other recursive "function" you want simply.

```<code>def fib(n):
  fibs = [1, 3]       # <--  your initial values here
  if n == 1:
    return fibs[0]
  if n == 2:
    return fibs[:1]
  for i in range(2, n):
    fibs.append(3*fibs[-1] - fibs[-2])  # <-- your function here
  return fibs
</code>```

And the result is:

```<code>n=10
print(fib(n))

[1, 3, 8, 21, 55, 144, 377, 987, 2584, 6765]
</code>```

Body:
Given this pseudo code of a function

f(0) = 1;
f(1) = 3;
f(n) = 3 * f(n - 1) - f(n - 2); // for n >= 2.

Is there a non recursive way of doing this?

Body:
Here is simply a function with minimum line of code and maximum flexibility.

You can add any "initial values" and any other recursive "function" you want simply.

def fib(n):
  fibs = [1, 3]       # <--  your initial values here
  if n == 1:
    return fibs[0]
  if n == 2:
    return fibs[:1]
  for i in range(2, n):
    fibs.append(3*fibs[-1] - fibs[-2])  # <-- your function here
  return fibs

And the result is:

n=10
print(fib(n))

[1, 3, 8, 21, 55, 144, 377, 987, 2584, 6765]


问:
Adding Substitutions for BCC recipients using SendGrid's Node library
My use case is such that I need to send a single email with multiple BCC recipients, each with their own substitutions.

I'm attempting to use SendGrid's Node Library "Kitchen Sink" example with some static test data. I'm able to create a message with BCC recipients, however, each recipient is receiving the last set of substitution values.

Here are the relevant portions of my code:

```<code>const mail = new helper.Mail();
const personalization = new helper.Personalization();
const testData = [
  {
    email: 'recipient1@gmail.com',
    name: 'Bob Smith',
    dollars: '100',
    points_for_play: '2500',
  },
  {
    email: 'recipient2@gmail.com',
    name: 'Mary Smith',
    dollars: '50',
    points_for_play: '1000',
  },
];

testData.forEach(function(recipientData) {
  var substitutionValues = _.omit(recipientData, ['email', 'name']);
  var bccRecipient = new helper.Email(recipientData.email, recipientData.name);

  personalization.addBcc(bccRecipient);

  _.forOwn(substitutionValues, function(value, key) {
    var substitution = new helper.Substitution('%' + key + '%', value);
    personalization.addSubstitution(substitution);
  });
});

mail.addPersonalization(personalization);
</code>```

The result is that each bcc recipient will receive the last substitution values:

```<code>%dollars% = 50
%points_for_play% = 1000
</code>```

I've also tried creating a new Personalization for each BCC recipient, but that results in an error stating the personalization instance needs a "to" array, which doesn't seem correct... where am I going wrong?

答: BCC substitutions aren't supported yet in the v3 API as of 7/2017, but they are in the SMTP API according to SendGrid support.</p>

Body:
My use case is such that I need to send a single email with multiple BCC recipients, each with their own substitutions.

I'm attempting to use SendGrid's Node Library "Kitchen Sink" example with some static test data. I'm able to create a message with BCC recipients, however, each recipient is receiving the last set of substitution values.

Here are the relevant portions of my code:

const mail = new helper.Mail();
const personalization = new helper.Personalization();
const testData = [
  {
    email: 'recipient1@gmail.com',
    name: 'Bob Smith',
    dollars: '100',
    points_for_play: '2500',
  },
  {
    email: 'recipient2@gmail.com',
    name: 'Mary Smith',
    dollars: '50',
    points_for_play: '1000',
  },
];

testData.forEach(function(recipientData) {
  var substitutionValues = _.omit(recipientData, ['email', 'name']);
  var bccRecipient = new helper.Email(recipientData.email, recipientData.name);

  personalization.addBcc(bccRecipient);

  _.forOwn(substitutionValues, function(value, key) {
    var substitution = new helper.Substitution('%' + key + '%', value);
    personalization.addSubstitution(substitution);
  });
});

mail.addPersonalization(personalization);

The result is that each bcc recipient will receive the last substitution values:

%dollars% = 50
%points_for_play% = 1000

I've also tried creating a new Personalization for each BCC recipient, but that results in an error stating the personalization instance needs a "to" array, which doesn't seem correct... where am I going wrong?


Title: Resampling dataframe by hours and date

Body:
I have a dataframe like this:

                 Maximum Demand (KVA)  Consumption (KVAh)  Power Factor
Timestamp
2017-04-01 01:00:00                 127.0               261.0          0.81
2017-04-01 02:00:00                 133.0               268.0          0.79
2017-04-01 03:00:00                 119.0               273.0          0.92
2017-04-01 04:00:00                 118.0               263.0          0.78
2017-04-01 05:00:00                 135.0               271.0          0.86
2017-04-01 06:00:00                 130.0               257.0          0.82
2017-04-01 23:00:00                 120.0               261.0          0.78
2017-04-02 00:00:00                 121.0               272.0          0.83
2017-04-02 01:00:00                 126.0               263.0          0.90
2017-04-02 02:00:00                 132.0               266.0          0.83
2017-04-02 03:00:00                 132.0               275.0          0.90
2017-04-02 04:00:00                 122.0               259.0          0.77
2017-04-02 05:00:00                 119.0               271.0          0.78
2017-04-02 06:00:00                 122.0               259.0          0.81
2017-04-02 23:00:00                 115.0               264.0          0.87
2017-04-03 00:00:00                 129.0               273.0          0.86

I want to resample data by the time of 01:00 - 0:00 of another date:

I tried this:

off_sum = offpeak_hist.resample('h', base=8).sum().dropna()

But the desired output is not achieved. Please help me on this.

Body:
If I understand you correctly, you want to do this:

off_sum = df.groupby(df.index.time).sum()

to achieve this:

          Maximum Demand (KVA)  Consumption (KVAh)  Power Factor
00:00:00                 250.0               545.0          1.69
01:00:00                 253.0               524.0          1.71
02:00:00                 265.0               534.0          1.62
03:00:00                 251.0               548.0          1.82
04:00:00                 240.0               522.0          1.55
05:00:00                 254.0               542.0          1.64
06:00:00                 252.0               516.0          1.63
23:00:00                 235.0               525.0          1.65

if not, you need to update your question with desired output.