hey guys, I'm trying to view the demo for this npm match3 package and I can't seem to get it running. I downloaded the master branch (there are a ton of branches) and opened demo.html within the site folder, and the page just displays a big black square where the game would be. In the console, it says "error file not found: bundle.js". bundle.js is in another branch. What do I do to be able to view the 3 match game demo?
https://github.com/PlaytestersKitchen/match-three-js
npm install: https://www.npmjs.com/package/match3
Any help will be greatly appreciated :grinning:
I tried npm start but then I run into this:
if ($('[id^=input]').each().val() == '') {}
(I want to make sure all fields are empty)
let empty = false;
$('[id^=input]').each((i, e) => {
if($(e).val() === '') {
empty = true;
}
}
});
aguyinmontreal sends brownie points to @christophszcz and @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 590 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 403 | @christophszcz |http://www.freecodecamp.com/christophszcz
$.each($('[id^=input]'), function(i, val) {
if(!$(this).val()) {
console.log($(this).attr('id') + ' is empty');
}
});
$('[id^=input]')
and the syntax for $.each()
is: $.each( obj, function( key, value ) { }
var isEmpty = [...document.querySelectorAll('[id^=input]')].every((el) => el.value == "");
amitp88 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 591 | @korzo |http://www.freecodecamp.com/korzo
id="all"
to your "All" button
jtan3 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 215 | @piteto |http://www.freecodecamp.com/piteto
offlineCards
, onlineCards
, and allCards
variables outside of the hideOff, hideOn, and showAll functions
[onButton, offButton, allButton].forEach(el => {
el.addEventListener("click", () => {
if(el.id.includes('off')) buttonFilter('.online');
if(el.id.includes('on')) buttonFilter('.offline');
if(el.id.includes('all')) buttonFilter();
})
});
function buttonFilter(className) {
document.querySelectorAll('.online, .offline').forEach(el => el.style.display = "inline-block");
document.querySelectorAll(className).forEach(el => el.style.display = "none");
}
jtan3 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
padunk sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 353 | @iangracia |http://www.freecodecamp.com/iangracia
alteducation sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @iangracia |http://www.freecodecamp.com/iangracia
alteducation sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
alteducation sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
eval()
- as long as you are limiting input to the calculator buttons, it's a good approach for the calculator.eval(1+3-4+8)
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 356 | @iangracia |http://www.freecodecamp.com/iangracia
iangracia sends brownie points to @alteducation :sparkles: :thumbsup: :sparkles:
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
alteducation sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 217 | @piteto |http://www.freecodecamp.com/piteto
var test;
document.getElementById('one').addEventListener('click', function() {
test = 1;
});
console.log(test);
artoodeeto sends brownie points to @dsschapira :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @dsschapira |http://www.freecodecamp.com/dsschapira
@voiddemon
Can anyone please help me with the below code
import java.sql.*;
public class Vogellatest2 {
Connection c = null;
Statement s = null;
ResultSet r = null;
public void readDataBase() {
try {
Class.forName("com.mysql.jdbc.Driver");
c = DriverManager
.getConnection("jdbc:mysql://localhost/employees" + "user=sameerboppana & password = space");
s = c.createStatement();
r = s.executeQuery("Select * from salaries where salary > 155500");
writeResultSet(r);
} catch (Exception e) {
//throw e;
} finally {
close();
}
}
private void writeMetaData(ResultSet r) throws SQLException {
System.out.println("The columns in the table are: ");
System.out.println("Table: " + r.getMetaData().getTableName(1));
for (int i = 1; i <= r.getMetaData().getColumnCount(); i++) {
System.out.println("Column " + i + " " + r.getMetaData().getColumnName(i));
}
}
private void writeResultSet(ResultSet resultSet) throws SQLException {
// ResultSet is initially before the first data set
while (resultSet.next()) {
// It is possible to get the columns via name
// also possible to get the columns via the column number
// which starts at 1
// e.g. resultSet.getSTring(2);
System.out.print(resultSet.getString(1) + " ");
System.out.println(resultSet.getString("salary" + " "));
}
}
private void close() {
try {
if (r != null) {
r.close();
}
if (s != null) {
s.close();
}
if (c != null) {
c.close();
}
} catch (Exception e) {
}
public static void main (String args[]) {
///i'm getting an error here saying void is an invalid type for main
new Vogellatest2().readDataBase();
}
}
}
i'm getting an error saying void is an invalid type for main
voiddemon sends brownie points to @dsschapira :sparkles: :thumbsup: :sparkles:
:cookie: 292 | @dsschapira |http://www.freecodecamp.com/dsschapira
arr=["chan1","chan2"]
arr.forEach(function(user){
//your getJSON code and what you're gonna do with it, you write this once instead of once per user
}
function(esl_sc2sdata) {
console.log("esl_sc2s");
console.log(esl_sc2sdata);
if (esl_sc2sdata.stream===null) {
$("#esl_sc2s").html("Offline");
}
else {
$("#esl_sc2s").html("Streaming");
$("#esl_sc2g").html(esl_sc2sdata.game);
}
game:"StarCraft II"