I Believe That The Education And Entertainment Should Be Available For People Who Deserve It.
Tuesday, 1 September 2020
Drum Beginner - Unpossible POG Musics | Free HIP-HOP Music | LMMS Experi...
This is the second time I am creating my own music using LMMS Software.
It is a bit awkward to upload music on the internet. I hope it is not
cringey. Enjoy.
Thursday, 20 August 2020
Connecting Java Gradle With Google Drive | Part 1 | Groovy
You can download library from:- https://unpossiblepog.com/research-and-development/GRADLE+JAVA/Google-Gradle-API-In-Java-For-Google-Drive-And-Google-Calendar
Create a connection between java and google drive using gradle.
Quickstart link:-
https://developers.google.com/drive/api/v3/quickstart/java
Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1
Facebook Page:-
https://www.facebook.com/UnpossibleNS
Twitter Account:-
https://twitter.com/UnpossiblePOG
Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------
Hey guys.
This video is about creating a connection between java and your google drive through gradle.
In this part, we shall display files list in command prompt.
Linux OS is mostly recommended.
Java version 1.8 or greater & also gradle version 2.3 or greater are required.
You will also need google account with google drive enabled.
Open the browser and search “java google drive quickstart”.
Go inside this link.
Check versions in terminal or command prompt before proceeding forward.
Click on “Enable the Drive API” button.
Download configuration.
Create a folder.
Open it in terminal.
Paste the first command.
Select 1 for groovy and for second question, hit enter without typing anything.
It will create basic files & folders for gradle.
Second command will also create 2 more folders.
Now, copy that credentials.json file into src -> main -> resources folder.
Rename it if the file name is not credentials.json.
Go back and open build.gradle file in text-editor.
Paste the gradle code, save it and close it.
Create a java file with same name as they told at location src -> main -> java.
Open java file in editor. Paste the code.
Remove _READONLY.
SetPageSize decides how many results do you want to be displayed.
I shall type 4.
Now open the command prompt and type “gradle run” and hit enter.
It will open link in browser.
Click on “allow".
Close the tab.
Now if you check terminal, you will see the list of files.
Lets try again, now it will not open any link on browser and will display results directly.
Required links are given in the description.
Don’t forget to like, share and subscribe.
Thanks for watching.
Monday, 17 August 2020
Root Cause & Solution Of The UnsupportedClassVersionError | Linux Only |...
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: JavaProgram has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Commands:-
update-alternatives --config java
update-alternatives --config javac
Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1
Facebook Page:-
https://www.facebook.com/UnpossibleNS
Twitter Account:-
https://twitter.com/UnpossiblePOG
Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------
Hey guys.
Now we shall find out the root cause & solution of the UnsupportedClassVersionError which occurs while running java program for LINUX users only.
This thing occurs when we successfully compiles the code using javac command but throws an error when we run the program.
Lets create a program.
I am opening the terminal where our java file is present.
Now, there is nothing wrong with syntax, compiling is successful but this error is thrown.
The main reason is that we are using different JVM version for compiling and different JVM for running the code.
Don’t forget to add sudo before commands.
Type your password.
If we check runtime version, the version 8 is set.
Press enter or already set number.
However, if we check compiler version, the 11th version is set.
So to change it, enter the SELECTION number which is in front of it. In my case, its 2.
And now, if we recompile and execute, it shall work fine.
Code is given in the description.
Don’t forget to like, share and subscribe.
Thanks for watching.
Sunday, 2 August 2020
Google Calendar API Tutorial #3 | Delete Events | Get Event IDs | 2020
Download VENDOR Folder (Only for PHP version 7.2+): https://unpossiblepog.com/research-and-development/php/Vendor-Folder-For-Google-Sheet-Drive-Calendar-With-PHP-Version-7.2-And-Onward
PHP Google Calendar Delete EVENTS.
Google Calendar PHP Connection:-
https://youtu.be/Q-498CAa1xE
Google Update Alert :-
https://youtu.be/5COjnEc4d9E
Delete event Code Link:-
https://developers.google.com/calendar/v3/reference/events/delete
Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1
Facebook Page:-
https://www.facebook.com/UnpossibleNS
Twitter Account:-
https://twitter.com/UnpossiblePOG
Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------
Hey guys.
In this tutorial, we shall delete google event using PHP code.
For that, you must first connect PHP with google calendar which are shown in those tutorials.
Both of those links are given in the description.
Now, if you are able to display or add events, you can continue watching further.
I gave a link in the description for a code for deleting event.
In that function, first argument is calendar ID and second is event id.
To find calendar ID, follow my steps.
You will find calendar ID here, which I am already using in code.
Now, we can get the event ID in two ways.
1, while adding a new event. And 2nd by getting events list from LOOPS.
1st, I shall comment the loop code, and add the event.
Here, use getID function.
Lets run the code.
We do get the ID, but ignore the “slash N”, which I accidentally printed in code.
You can store that ID in database or session or anywhere for later use.
Comment that ADD-EVENT code.
Now we shall just copy that in our code directly.
Now we use that provided code.
And use calendar ID and event ID.
As you can see, the event was added by the code is here.
If we refresh, it will be vanished as you can see.
However what if you don’t have event ID, so for that, enable the DISPLAY EVENT code.
& use that delete function here.
Lets create some events manually.
Notice that the third event is from different calendar which will not be delete as it belongs to different calendar.
Now they are vanished like a magic.
Code link & other required links are given in the description.
Don’t forget to like, share and subscribe.
Thanks for watching.
Sunday, 26 July 2020
Evil Within Human - Unpossible POG | Free HIP-HOP Music | LMMS Experiment
This is the first time I am creating my own music using LMMS Software.
It is a bit awkward to upload music on the internet. I hope it is not
cringey. Enjoy.
Tuesday, 14 July 2020
Quickest & Easiest Way To Sort Date Array In Java
Quickest way to sort date-time array in JAVA.
------------------------------------------------
Code :
package tutorials;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Set;
import java.util.TreeSet;
public class SortDateTime {
public static void main(String[] args) throws ParseException {
String dateArray[]={
"2019-01-02 03:05",
"2019-01-02 03:05",
"2019-01-02 03:00",
"2019-01-02 05:00",
"2019-01-01 15:00",
"2018-05-05 00:30",
"2020-04-03 40:00",
"2020-02-01 59:00"
};
SimpleDateFormat f=new SimpleDateFormat("yyyy-MM-dd HH:mm");
Set<Long> s=new TreeSet<Long>();
for(int i=0;i<dateArray.length;i++)
{
s.add(f.parse(dateArray[i]).getTime());
}
for(Long l:s)
{
System.out.println(f.format(l));
}
}
}
------------------------------------------------
Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1
Facebook Page:-
https://www.facebook.com/UnpossibleNS
Twitter Account:-
https://twitter.com/UnpossiblePOG
Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------
Hey guys.
In this video, we shall sort date-time array in java in the quickest and easiest way possible.
This technique has one drawback which i shall explain at the ending of this video.
I already created a file and inside it there is a string array which has format of like date-time.
I am recommending you to use netbeans as it provides auto-suggestions.
We are going to need a SimpleDateFormat class.
Import required package.
Then we are using set & treeset with LONG as data-type.
In for loop, we are going to find out the length of array and add each array element in set.
but before that, we are converting date-string into long number using simpledateformat’s function called getTime().
The SET class already ordered data in ascending order.
Then we are going to use FOR:EACH loop.
and in that, we call each data and again convert long into Date-time format.
As per input and output, 2018 should be at the top.
Also, if date is same but hours and minutes are different, then also those values get sorted.
The only drawback of this technique is that, it skips one element if that same element is already present in array.
Code link & other required links are given in the description.
Don’t forget to like, share and subscribe.
Thanks for watching.
Sunday, 5 July 2020
JAVA Google Calendar API | Part 2 | Display All Events On Browser Using JSP Framework
You can download library from:- https://unpossiblepog.com/research-and-development/GRADLE+JAVA/Google-Gradle-API-In-Java-For-Google-Drive-And-Google-Calendar
Please avoid or flag spams/hateful comments. And do not spam. Enjoy :)
------------------------------------------------
Google Calendar Java Part 1 :-
https://youtu.be/zPsSUEGDfVY
Google Calendar Java Part 1. 5:-
https://youtu.be/0daf87wjLs4
Subscribe my Channel:-
http://www.youtube.com/user/SanketRooney?sub_confirmation=1
Facebook Page:-
https://www.facebook.com/UnpossibleNS
Twitter Account:-
https://twitter.com/UnpossiblePOG
Blog :-
https://unpossiblepog.blogspot.in/
------------------------------------------------
Hey guys.
In part 2 of Google Calendar connection with JAVA, we are going to display events from beginning & display them on web browser using JSP framework.
There are two parts that I have made. Links are given in the description. 1st part is mandatory which shows how to connect java with google calendar and display events in terminal.
The second part, which is actually 1.5, is the tutorial on how to create JSP Project using Gradle.
The reason why it is mentioned as 1.5 and not 2 is because it is a separate topic on its own.
And in this part, we are going to merge whatever we made in 1 & 1.5, which reduces redundant steps and also makes this video short.
Form part 1 & 1.5, those two folders were created.
From 1st, we first get all available events by making small changes in code.
As you can see, no future events are available.
Go to our java file, and just add zero in DateTime constructor and that is it.
Now if you re-execute, you will get result starting from first event.
You can make changes in setMaxResults function value to change maximum count of results.
Now from part 1.5, which has JSP enabled, we shall copy some files and folders from part 1.
So go inside Connection folder, go inside src-> main, copy JAVA and RESOURCES folder and go to JSP, paste them in src -> main folder.
Now, again go to connection folder and copy tokens folder, and paste it in JSP where the build.gradle file is.
Now the copy-pasting is done, now go to connection folder, and open build.gradle file in text-editor, in my case, the sublime text.
Now go to JSP and also open it’s build.gradle in text editor.
We have to cut-paste the Calendar JAVA file inside ORG folder to access package.
Now we have to copy-paste the build gradle requirements from connection’s gradle to JSP’s gradle.
First, for the plugin, use JSP gralde’s syntax.
Then copy-paste that whole paragraph.
Copy-paste the function.
Copy paste the libraries and commands.
Now we are going to run to make sure that build.gradle is correct or not.
Run that IP address in browser’s URL.
It is working.
Now, open servlet in text editor at where we are going to call calendar class.
Notice that we move this quickstart file inside org folder, open that in text editor.
Because it is inside ORG folder, name the package as ORG.
Also notice that servlet has the package called org.gradle.demo which denotes the servet file is inside which folder.
Now import that org package to access CalendarQuickstart.java file.
In CalendarQuickstart file, rename the function from main to getEvents, you can use any new name and return type as string.
What we are going to do is to convert events into string and return them to display them in Servlet.
Make sure to return that string at the ending of function.
Now call that class inside servlet, and create and instance, in my case CQ.
I forgot to append string here.
Notice that the function throws Exception, so we have to call that function in try-catch block.
Copy the output link and call that function.
Lets go to terminal, close previously executed gradle using CTRL+C, and execute the command again.
Now if we click on hello, we shall see all the events.
Required links are given in the description.
Don’t forget to like, share and subscribe.
Thanks for watching.
Subscribe to:
Posts (Atom)