₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,426 members, 8,445,431 topics. Date: Wednesday, 15 July 2026 at 04:10 AM

Toggle theme

Lekropasky's Posts

Nairaland ForumLekropasky's ProfileLekropasky's Posts

1 2 3 4 5 6 7 8 (of 8 pages)

ProgrammingRe: Java: How To Go To A Line If A Wrong Value Is Inputted by lekropasky(m):
Am sorry for replying this late.
Ok...to the real business.

I can see some error here, you are already overriding the input entered by the user inside your switch statement.

int day = input.nextInt();
//loop indefinitelly
while(true){
//put your switch statement here.
Switch(day){
case 0:
System.out.print("The day is Sunday"wink;
break;
//test other cases here....
default:
System.out.print("you haven't entered a correct value. Please Try again"wink;
}
//then, outside your switch statement, put this,
day = input.nextInt();
//to break of this loop, simply put a condition here...e.g, if you want to break when the user enter 9.
if(day==9){
System.out.print("Thank You for using this program"wink;
break;
}
}
ProgrammingRe: For Real Developers by lekropasky(m): 7:45pm On Jul 14, 2016
I have an idea...this is the largest forum in Africa, i think we can use this opportunity to get it published. Lets see if developers on this forum will turn up. Ok, ill say more when i reach home....
WebmastersRe: Webmasters! Please Come In. by lekropasky(op): 8:27pm On Jul 13, 2016
WebmastersWebmasters! Please Come In. by lekropasky(op): 5:22pm On Jul 13, 2016
I am typically an Android Developer, but recently I have a very important web project i am working on, and since two weeks ago i have been working on the backend(PHP), on Sunday(this week) i started working more on the frontend and Yes!--this is where i have the problem, although i am using bootstrap, yet i still can't find the design to be very sweet as i have imagined it to be. Can anyone please tell me where i can get an editable template(The website is more of social networks) because right now i really need to finish the project ASAP.
Please Help...
Thanks.
ProgrammingRe: Categories Of Programmers (by Areas Of Expertise) by lekropasky(m): 9:59pm On Jul 12, 2016
privatetisa:
ello.
Please, I need to build a mobile app that is capable of mining out a few information/data from a database of regularly updated numerical entries. The app does some random selections, generate some sets or lists or arrays as the case may be. It then does some intersections and some iterations and countings. And that's all.
It's indeed a very simple programme, an Android application.
Is there anyone inhere who can do this for me at a very minimal price? If there is such, please respond by quoting this message here. I'll then tell you how to contact me.
Thanks.
07035452307
ProgrammingRe: Android Programming by lekropasky(m): 1:22pm On Jul 12, 2016
naxman:
My Final year project is about Android Programming, I don't have any idea. If you are good in Android programming please contact me lets negotiate. is all about Tourist Guide
07035452307
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 6:51pm On Jul 11, 2016
cshortz:
Nice one bro, big ups!
Am currently working on an NYSC posting system using Abia state nysc as a case study. Its a project work tho. Am implementing it using php/mysql and bootstrap. Will post it here when am done
ALLRight, GoodLuck Bro..
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 6:48pm On Jul 11, 2016
nene2016:
You did good. You shouldn't worry about not winning. This should be a stepping stone for greater things. All the best!
Thanks Bro....
ProgrammingRe: Shuffling Multidimensional Array Of Values by lekropasky(m): 6:41pm On Jul 11, 2016
This is quite Long. I dont really get what your are trying to do, but i can guess this is what you are trying to do.

Like in quiz System, you want users to see Diffrent questions everytime the press 'Next' or whatever button you link the event with...Ok.
if thats what you are trying to do, try this.

Java is an OOP, so you can create a POJO( Plain Old Java Object) class, which will represent each equation...Like this--->

public class Equation{

//Create the class property/fields
public int variableA;
public int variableB;
public int variableC;
public char operator;
public int answer;

//create a constructor, remember this will be automatically called when the object is created
//Remember the uses of 'this' keyword to make refrence to the member of current class...

public Equation(int varA, int varB, int varC, char op, int ans ) {
this.variableA = varA;
this.variableB = varB;
this.variableC = varC;
this.operator = op;
this.answer = ans;
}

//now, create the getters and setters

public void setVariableA(int v_A ){
this.variableA = v_A;
}
public void setVariableB(int v_B ){
this.variableB = v_B;
}
public void setVariableC(int v_C ){
this.variableC = v_C;
}
public void setOperator(int op ){
this.operator = op;
}
public void setAnswer(int ans ){
this.answer = ans;
}
public int getVariableA(){
return this.variableA;
}
public int getVariableB(){
return this.variableB;
}
public int getVariableC(){
return this.variableC;
}
public char getOperator(){
return this.operator;
}
public int getAnswer(){
return this.answer;
}

//voila, this will make things easy
public String getQuestion(){
//form a question String. so, that it"ll be very easy to call later...
String question = getVariableA() + "x " + getOperator() + " "+getVariableB() + " = " + getVariableC();
return question;
}
}

Then Create an activity that serves as your Question/Quiz activity...

class QuizActivity extends Activity{

//create a list that"ll hold your equations

List<Equation> equationList = new ArrayList<>();
TextView equationTextView;
//create a random object to generate random numbers
Random randomNumber = new Random();
//lets say you bind the event to a Button
Button nextEquation;

protected void onCreate(Bundle instance ) {
//get textView
equationTextView = (TextView) findViewById(R.id.textview);
nextEquation = (Button) findViewById(R.id.nextButton);
//add equations to the list...
//remember equationList takes an Equation object as the List elements
equationList.add( new Equation(1,2,3,"-",5));
equationList.add( new Equation(1,4,0,"-",4));
equationList.add( new Equation(1,5,3,"-",1));
equationList.add( new Equation(1,9,3,"-",2));
equationList.add( new Equation(1,2,1,"-",1));
nextEquation.setOnClickListener(new View.setOnClickListener(){
public void onClick(View view){
//shuffle the List, generate any number between 0 and 5
int currentIndex = randomNumber.nextInt(5);
//now, the real shuffle..
//this will take the equation number 'currentIndex' from equationList and put it on the TextView.
//Each time user click the 'next Button' a new random number will be generated which causes the equationList to return diffrent equation on each click
Equation currentEquation = equationList.get(currentIndex);
equationTextView.setText(currentEquation.getQuestion());
}
});
}

}

Hope this helps...Feel free to ask questions.
ProgrammingAndroid App Monetization Insights... by lekropasky(op): 2:09pm On Jul 10, 2016
Hello Guys, i seriously want to know how profitable is it to monetize android Apps as i have no idea about it. Thanks...
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 3:58pm On Jul 08, 2016
prinzfunchi:
Yeah I've seen you too.. When we resume we'll meet
Allright bro
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 7:33pm On Jul 07, 2016
prinzfunchi:
Okay.. I've done that
Yeah... I think I have seen you before.
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 7:32pm On Jul 07, 2016
yunglary:
I did not say you cant do it, in anything you do try to embrace Nigeria, owner of those pictures dont know you, but if you use your friends picture, do you know happy he will be to be on your program
Wow... I really like this. I will seriously work on it next time. thanks bro
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 11:36pm On Jul 06, 2016
Waleyisco:
oga, I wan knw you o, I'm also a Nacossite from a College of education, I wish to continue at Lautech as soon as i'm done here, pls can we chat by e-mail?
No problem, I love making new friends.
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 11:35pm On Jul 06, 2016
yunglary:
i see white faces, how come ? Are u d real author.
Is it impossible for me to build this ?
ProgrammingRe: Does AJAX Technology Work On Mobile Phones??? by lekropasky(m): 8:30pm On Jul 06, 2016
I have a question puzzling my mind. The instagram native app has a 'follow button' which when clicked sends some request to server in an AJAX-like mode, i dont understand how this works, is there a way to implement AJax funtionality using Java and Android Sdk...Thanks
ProgrammingRe: My Just Completed Android E-voting App by lekropasky(op): 8:12pm On Jul 06, 2016
prinzfunchi:
Nice work bro.. I'm also in CSE lautech 300L.. I missed the exhibition that day cuz we had a class
WoW...so happy i met a ladokite here on Nairaland..Thanks.

Can you add your pics? We might have met before...
ComputersMouse And Keyboard Not Working On Start Up. by lekropasky(op): 5:47pm On Jun 08, 2016
Hi Guys, this morning i was trying to boot into my HP laptop computer and i discovered that the keyboard and mouse are no longer responsive. Note that, keyboard works before the windows splash screen shows up and immediatly stop working after the start up, i dont know what to do. Please help.
ProgrammingJamb Past Questions API In JSON by lekropasky(op): 6:09pm On Jun 03, 2016
Hi guys, I am thinking there should be a way to get the raw JSON format of JAMB past questions. Have you ever seen or heard about that before?
ProgrammingRe: How To Build A One-on-one Chat Im With Phpsockets.io by lekropasky(m): 5:53pm On Jun 02, 2016
Thanks You'll. I dont have any knowledge about node.js, i'll prefer PHP.
WebmastersRe: A Gaze Into The Future Of Nigeria ICT Industry by lekropasky(m): 2:26pm On Jun 02, 2016
nice post....
ProgrammingRe: How To Build A One-on-one Chat Im With Phpsockets.io by lekropasky(m): 2:14pm On Jun 02, 2016
hi bro, can you give me a head up about how this chating stuffs in android. I have google a lot I haven't found a solution. the only thing I have seen so far is this XMPP stuffs. I'll be happy if you can put me through. thanks
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 3:00pm On Jun 01, 2016
dhtml18:
E no work for me. Maybe is spectra net blocking it
OK Bro
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 11:45am On Jun 01, 2016
FrankLampard:
Okok.

It must work, u just have to make sure you have a very good internet for your PC and Phone.
Try and connect your phone and laptop to the same network. E.g, turn on your phone mobile Data and Hotspott and connect to the hotspot with your laptop. It should work that way...
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 3:39pm On May 31, 2016
FrankLampard:
I wanted to do some test on my localhost. That is why I needed the Android Emulator.

I will try and download Genymotion.

Or is there a way I can use to my phone to connect to MySQL on my localhost using WiFi or Cable.
Get your laptop IP address By this->
cmd -> ipconfig.

Next, Click on WAMP icon on the window TaskBar and Click on "put online" inside the menu popup...
After that, you can access your URL like this from anywhere......http://your.ip.adress/YourRootFolder/script.php...
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 6:44pm On May 28, 2016
dhtml18:
I was just revamping an android app now and found out that volley was no more getting maintained, so i am porting back to android-async-http
the library is great. what I like most about it is the easy way of sending FILES to http server using the RequestParams class....
ProgrammingMethod 2go Used To Charge Their Users For Gocredit by lekropasky(op): 9:23am On May 24, 2016
Hi Gurus. Recently i am carrying out a research on how users can pay for a paricular services on the internet using the credit on their mobile phones. If you can try to remember, 2go uses such services to charge user for GoCredit, i want someone that knows or have any idea about this to tell me how it works. Thanks...
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 8:55am On May 24, 2016
FrankLampard:
Thank you, Good morning.

How can I create the Login and Register API?
Can you show me a code spinet?
I dont think theres any need to use a Framework for this kinda task, though, i am not a PHP guy, but simple PHP script that can talk to database and echo a JSON String is all you need to write.

Example...for registration:

<?php
$host = 'localhost';
$user = 'root';
$pass = ' ';
$connection = mysql_connect($host, $user, $pass);
mysql_select_db(
'db name');
//user data
$username = $_POST['user'];
$mail = $_POST['email'];
$password = $_POST['password'];
$json = array();
$query = Insert into users( username, email, password) Values( '$username','$mail','$password')
$result = mysql_query($query);
if($result){
array_push($json, array('success'=>true, 'fail'= >false))
}else{
array_push($json, array('success'=>false, 'fail'= >true))
}
mysql_close($connection);
echo json_encode($json);?>
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 8:40am On May 24, 2016
I finally found a library called android-async-http, i think the library is OK because the popular Instagram uses the Library...Thanks Bro @dhtml18
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 9:44am On May 23, 2016
Thanks Bro. The reason why i dont wanna use base64 encoding is because it causes OutOfMemory Exception in low memory devices when i tried to upload more than one image with size larger than 800KB, so am trying to get a very effective way, say i want to upload maybe a video file of about 10MB, base64 encoding cannot work for that....Thanks for these links. I'll check it.
ProgrammingRe: Android Developers : Building Your Android Library And Add It To Maven Central by lekropasky(m): 8:25pm On May 22, 2016
Hello Guys, Please i need help on simple script to upload Picture to PHP server from android. I dont like to use base64 encoding as its not really effective. Thanks you'll

1 2 3 4 5 6 7 8 (of 8 pages)