What are the differences of String, StringBuffer, and StringBuilder in Java? When we talk about Strings, we’re typically referring to instances of joined characters. Strings can be created with the declaration of String or generating an instance of a StringBuffer or StringBuilder in Java. String String example = “example”; If we want to change example, we lose the reference to the original object. Each modification of a String creates a new instance of the String in Java. example += ” added”;...
While running Android Studio, you can instantly connect an Android device via USB on Mac or Linux, and run a developing app on that device. What about Windows? For Windows, you’ll need to install the Google USB Driver before running your developing app on your Android device, phone, or tablet. Official docs: http://developer.android.com/tools/extras/oem-usb.html List of steps for Windows 7, 8, and 10 Connect your Android device to the PC. Open Android Studio, open the SDK Manager, and install the Google...
This article will outline how to check memory on linux and unix based machines. I’ll demonstrate a couple of useful commands that check memory on the hard drive on your machine. df -h df -h, which stands for disk free, checks for the space left on the drive in a human friendly format. It’s very useful to see the overall disk space left on the device. df -h du -hs The opposite of disk free is disk usage. du...
Windows 10 is the next best thing coming from Microsoft. Here’s a few things to keep in mind when you’re considering the switch. Its free! Windows 10 is free for most people – but if you’re running Windows 7 or Windows 8.1. Don’t worry, you have one year, until July 29th, 2016 to make the jump. If you miss out on the free upgrade for whatever reason, it’ll cost $119. To upgrade your existing installation, look for the windows icon in your notification...
This article will go over how to connect to MySQL with the Java JDBC driver. The tutorial will go over step-by-step on how to make your first connection with the Java JDBC driver to MySQL and get started. Installation of MySQL For starters, you must have MySQL on your machine. To install MySQL, you can easily use the following command on Ubuntu or Debian machines: sudo apt-get install mysql-server sudo apt-get install mysql-client sudo mysql -u root -ppassword Create...
It’s harder than I thought to get your current installation’s of Windows 7, 8, or 10’s product key. There’s no easy way to find it except for this nice script. 1) Open Notepad Search for the Notepad program that comes with every installation of Windows. When you open Notepad, an Untitled instance of Notepad should open. 2) Copy and paste the following script into Notepad:
Dim objshell,path,DigitalID, Result
Set objshell = CreateObject("WScript.Shell")
'Set registry key path
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
'Registry key value
DigitalID = objshell.RegRead(Path & "DigitalProductId")
'Get ProductName, ProductID, ProductKey
ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName")
ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID")
ProductKey = "Installed Key: " & ConvertToKey(DigitalID)
ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey
'Show messbox if save to a file
If vbYes = MsgBox(ProductData & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") then
'Convert binary to chars
Const KeyOffset = 52
Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert
'Check if OS is Windows 8
isWin8 = (Key(66) \ 6) And 1
Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4)
i = 24
Maps = "BCDFGHJKMPQRTVWXY2346789"
j = 14
Current = Current* 256
Current = Key(j + KeyOffset) + Current
Key(j + KeyOffset) = (Current \ 24)
Current=Current Mod 24
j = j -1
Loop While j >= 0
i = i -1
KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput
Last = Current
Loop While i >= 0
keypart1 = Mid(KeyOutput, 2, Last)
insert = "N"
KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)
If Last = 0 Then KeyOutput = insert & KeyOutput
ConvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5)
'Save data to a file
Dim fso, fName, txt,objshell,UserName
Set objshell = CreateObject("wscript.shell")
'Get current user name
UserName = objshell.ExpandEnvironmentStrings("%UserName%")
'Create a text file on desktop
fName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set txt = fso.CreateTextFile(fName)
File, Save As File name: product-key.vbs Save as type: All Files 3)...
This guide shows you how to flash SD cards to mount files, specifically .img files for Raspberry Pi, Android TV Shield, and any other device. Make sure your SD card is empty. If not, you can use Mac’s disk utility application to erase the contents of your SD card. 1. Plug in your SD card and verify that your SD card is attached by typing in: diskutil list Keep track of which path is your SD card because if you...
On Mac, Android does not automatically allow you to transfer files. Unfortunately, you’ll need an extra program to transfer files from your Mac to Android devices. One of the programs that allows you to do this is called Android File Transfer. 1) Download Android File Transfer. Hit the green Download Now button. 2) Open the downloaded androidfiletransfer.dmg Drag and drop Android File Transfer into the Applications folder. 3) Open Android File Transfer. At this point, Android File Transfer...
Normally, you would use git checkout to change branches or change to a previous commit. How do you git checkout a single file from another commit or branch? git branch git branch lists all the branches that you’ve checked out in your working directory. Let’s say that I have two branches: master devel Let’s say that I am on the master branch. But I wanted slothparadise.txt from the devel branch. git checkout devel — slothparadise.txt You can also get a...
Why do you need unicode? This article’s purpose is to tell you the purpose of unicode and briefly, how it is used in Python. Let’s start from square one. As you know, bytes compose all of the characters, strings, and values that we have on the machine. When you use a computer, for instance, you see the world at a much higher level, and for a language like Python, you normally don’t have to worry about every single byte and...