This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static boolean twitterAccountIsValid(String username) { | |
try { | |
URL u = new URL("https://www.twitter.com/" + username.replace("@", "")); | |
HttpURLConnection huc = (HttpURLConnection) u.openConnection(); | |
huc.setRequestMethod("HEAD"); | |
huc.connect(); | |
return huc.getResponseCode() == 200; | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArrayList<String> serialized = new ArrayList<>(); | |
Map<String, Map<Player, HashMap<Material, Boolean>>> rows = table.rowMap(); | |
for (Map.Entry<String, Map<Player, HashMap<Material, Boolean>>> row : rows.entrySet()) { | |
for (Map.Entry<Player, HashMap<Material, Boolean>> column : row.getValue().entrySet()) { | |
for (Map.Entry<Material, Boolean> secondColumn : column.getValue().entrySet()) { | |
serialized.add(serializer(row.getKey(), column.getKey(), secondColumn.getKey(), secondColumn.getValue())); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (side != EnumFacing.UP && side != EnumFacing.DOWN) { | |
boolean top = hitY >= 0.7f, bottom = hitY <= 0.3; | |
boolean left = (side.getAxis() == EnumFacing.Axis.Z ? hitX : hitZ) >= 0.7f; | |
boolean right = (side.getAxis() == EnumFacing.Axis.Z ? hitX : hitZ) <= 0.3f; | |
if (side == EnumFacing.NORTH || side == EnumFacing.SOUTH) { | |
if (side == EnumFacing.SOUTH) { | |
if (top) mirror.setPitch(mirror.getPitch() - 1); | |
else if (bottom) mirror.setPitch(mirror.getPitch() + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- Minecraft Crash Report ---- | |
// Don't do that. | |
Time: 11/20/16 1:48 PM | |
Description: There was a severe problem during mod loading that has caused the game to fail | |
net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: com/teamwizardry/refraction/common/block/BlockLaser | |
at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:186) | |
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:576) | |
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:calendarro/calendarro.dart'; | |
import 'package:calendarro/date_utils.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
class CustomDayTileBuilder extends DayTileBuilder { | |
@override | |
Widget build(BuildContext context, DateTime date, DateTimeCallback onTap) { | |
return _CustomDayTile(date, Calendarro.of(context), onTap); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:chacha/logic/firebase/chacha_user.dart'; | |
import 'package:chacha/logic/playlist.dart'; | |
import 'package:chacha/logic/track.dart'; | |
import 'package:flutter/foundation.dart'; | |
abstract class FirebaseCommon with ChangeNotifier { | |
Future<void> initFirebase(); | |
Future<void> initData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export 'unsupported_firebase.dart' if (dart.library.io) 'firebase_mobile.dart' if (dart.library.html) 'firebase_web.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final FirebaseMobile firebase = FirebaseMobile._private(); | |
FirebaseCommon getFirebase() => firebase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void createWaveForm(byte[] audioBytes) { | |
lines.removeAllElements(); // clear the old vector | |
AudioFormat format = audioInputStream.getFormat(); | |
if (audioBytes == null) { | |
try { | |
audioBytes = new byte[ | |
(int) (audioInputStream.getFrameLength() | |
* format.getFrameSize())]; | |
audioInputStream.read(audioBytes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flutter run --verbose -d chrome --web-hostname localhost --web-port 5000 | |
[ +36 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H | |
[ +64 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H | |
[ ] 9437639590adaa91e3df31cd9ce85133e401cd51 | |
[ ] executing: [C:\flutter/] git fetch https://github.com/flutter/flutter.git --tags | |
[+34496 ms] Exit code 0 from: git fetch https://github.com/flutter/flutter.git --tags | |
[ +2 ms] From https://github.com/flutter/flutter | |
* branch HEAD -> FETCH_HEAD | |
[ ] executing: [C:\flutter/] git describe --match v*.*.* --first-parent --long --tags | |
[ +87 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags |
OlderNewer