Capnd143's Posts
Nairaland Forum › Capnd143's Profile › Capnd143's Posts
1 2 3 4 5 6 7 8 ... 15 16 17 18 19 20 21 22 23 (of 53 pages)
Javanian:both |
the thing is i want to simply extract text from a text file and store in an array, then String FileName; |
@javanian @ @ALL_java_pros how do i read lines of text from a a JtextAREA correctly, calling the .getText() method returns a one line concatenated string of all lines in the jtextarea, i tried doing this: String text= JtextArea.getText().toString() String [] splited_file = gt.split("\n" ;for(i=0;i<splited_file.length) {string newFile=splited_file.toString(); AwriteFileClassObject.writeFileMethod(newfile)} this just returns and object to the textfile and write to instead of a formated text with linefeeds! Help me out guys wat i want to do is just read the lines of string from a JtextArea and Write same to a file |
These are not too hard but the questions are rather too ambiguos! Well apart from the A part though! |
Anagor13: [img]http://2.bp..com/-BGzxp5di3uU/VBWJ3hToSqI/AAAAAAAABdo/p6kBNhq5xTw/s1600/nigerian-alpha-jet%2B.jpg[/img]this is how bloggers support terrorism by misinterpreting defense sources and giving out wrong infomation just for cheap traffic! DHq said that the jet was the "only jet used during that Konduga operations" not the only operational aircraft used to fight the insurgents! They airforce currently uses over 40 aircrafts in the war in the north east, including alpha jets, 2 beecraft, 4 C130's , 4 F7-NI, alenia Gtr for intel and handful of different russian made Gunships, i.e Mi- series |
Lol. Dont be daunted or shaken by the "Programming is math" scareScrow, heck that even made me 'want to' rethink my programming dreams, just that am one resilient dude, that just made me head forward, and just realized that programming is not that "Mathematical" as my supposed "role models" made it look. Though you need thats in programs, bt at least strike of the taught of doing a long division,solving quadratic equations,plotting from "scratch" as it was back then in schools, most programming languages has ready "Math class" to handle those stuff to some point. E.g in Java, You wouldnt need to round of some figures with hilariously large number of trailing zero mentally, or find the SquareRoot of that terribly huge number maybe 2594645375679 mentally either... Or not just yet, the language pretty much does most of the dirty maths, leaving you to control the results!. I hope i didnt scare you aware from programming? |
uken73: I currently don't have a Java compatible editor on my system to assist me with syntacs errors but I made some modification on your codes with comments and emphasis on the modifications. I hope this solves your problem.thanks bro, your explanation panned out right, thanks a lot!public class Workers extends javax.swing.JFrame |
What 13 successful people do before going to bed Business Insider By Jacquelyn Smith and Vivian Giang August 29, 2014 2:47 PM Morning routines are important — but bedtime rituals can have a serious impact on your success. That’s because the very last thing you do before bed affects your mood and energy level the following day, since it often determines how well and how much you sleep. Knowing that, we decided to find out how the most successful spend their nights before surrendering to sleep. Turns out some — like President Obama and writer Michael Lewis — are night owls, preferring to work while the rest of the world sleeps; while others —like Arianna Huffington and Sheryl Sandberg — know how important sleep is, and force themselves to cool down. President Barack Obama is a "night owl" and likes to work late. View gallery . REUTERS/Kevin Lamarque REUTERS/Kevin Lamarque Unlike Obama's predecessor George W. Bush, who prefers to rise in the early hours, the current president stays up late, reports Carrie Budoff Brown at Politco. He is said to hold conference calls with senior staff as late as 11 p.m. and reads or writes before heading to bed. In a 2011 interview with Newsweek, Obama calls himself a "night owl" and describes his typical evening: "Have dinner with the family, hang out with the kids, and put them to bed about 8:30 p.m. And then I'll probably read briefing papers or do paperwork or write stuff until about 11:30 p.m., and then I usually have about a half hour to read before I go to bed ... about midnight, 12:30 a.m. — sometimes a little later." Obama has also said that if he's home late at night, he'll try to catch "The Daily Show." "I think Jon Stewart's brilliant," Obama tells Rolling Stone. Inventor Benjamin Franklin asked himself the same self-improvement question every night. View gallery . AP Photo/Pablo Martinez Monsivais AP Photo/Pablo Martinez Monsivais In his autobiography, Franklin outlined a schedule that would lead him to "moral perfection." In this ideal schedule, Franklin asked himself the same self-improvement question every night: "What good have I done today?" He described his other rituals before bed as "put things in their places, supper, music or diversion or conversation, and examination of the day." Franklin tracked his progress on self-improvement daily. Facebook COO Sheryl Sandberg turns off her phone at night. View gallery . REUTERS/Rick Wilking REUTERS/Rick Wilking Sandberg might work for a tech company, but she knows when to unplug. Sandberg tells Jefferson Graham at USAToday that it's "painful," but she turns her phone off at night so that she "won't get woken up." "I check my e-mail the first thing in the morning, and the last thing at night," says Sandberg. Winston Churchill had an evening ritual that included a short nap, bath, and drinks well past midnight. View gallery . Getty Images Getty Images The British prime minister kept to a similar daily routine no matter what happened. In the book "Daily Rituals: How Artists Work," author Mason Currey recorded Churchill's schedule: Around 5 p.m., the prime minister would drink a weak whisky and soda before taking a nap for an hour and a half. Churchill said this siesta, or short nap, allowed him to work for 1.5 days every 24 hours. When he woke, he bathed and got ready for dinner. At 8 p.m., Churchill would eat dinner, which was often followed by drinks and cigars well past midnight. Due to his irregular sleep schedule, Churchill was said to hold War Cabinet meetings in his bath. Stephen King's nightly routine includes washing his hands and making sure all the pillows face a certain way. View gallery . AP Photo/CBS, Brownie Harris AP Photo/CBS, Brownie Harris "It’s not any different than a bedtime routine," says King as recorded in Lisa Rogak's book "Haunted Heart: The Life and Times of Stephen King." "I brush my teeth, I wash my hands. Why would anybody wash their hands before they go to bed? I don’t know. And the pillows are supposed to be pointed a certain way. The open side of the pillowcase is supposed to be pointed in toward the other side of the bed. I don’t know why." Arianna Huffington only reads "real books" before bed. View gallery . D Dipasupil/Getty Images D Dipasupil/Getty Images Sleep advocate Huffington recommends banning iPads, Kindles, laptops, and any other electronics from the bedroom to unwind. Instead, she likes to read the old-fashioned way, "real books." Michael Lewis prefers to write between the hours of 7 p.m. and 4 a.m. View gallery . REUTERS/Lucas Jackson REUTERS/Lucas Jackson Author Robert Boynton asked Lewis about his ideal writing routine, as recorded in the book "The New New Journalism": "Left to my own devices, with no family, I'd start writing at 7 p.m. and stop at 4 a.m.," says Lewis. "That is the way I used to write. I liked to get ahead of everybody. I'd think to myself, 'I'm starting tomorrow's workday, tonight!' Late nights are wonderfully tranquil. No phone calls, no interruptions. I like the feeling of knowing that nobody is trying to reach me." Former Googler Keval Desai works at night, so he can concentrate. View gallery . AdAge via YouTube AdAge via YouTube Desai, a former Google product director and current partner at InterWest Partners, says that staying up is a habit of his. Desai tells Lydia Dishman at Fast Company that he likes to pick one project per night and doesn't go to bed until the project is done. "During the day most of my time is spent in meetings with entrepreneurs, and the only time I can find alone to do work that requires some concentration is when the rest of the household is asleep," he says. Kate White, former Cosmo editor-in-chief, likes to write while standing up in the kitchen. View gallery . Getty Images/Jemal Countess Getty Images/Jemal Countess As a magazine editor, White preferred to work on her fiction writing in the early morning hours and switch to magazine editing and blogging at night. "My craziest trick is that I regularly do my work standing up at a rolling butcher block counter in my kitchen. If I were to work sitting down, I’d fall asleep," White told Dishman at Fast Company. "I know it sounds awful, but I think of it as if I’m tending bar in the evening — a bar of ideas. And I always keep the kitchen TV on so it doesn’t seem too lonely. I drink several espressos at night, which really helps." Bill Gates reads for an hour before bed, no matter what time he gets home. View gallery . REUTERS/Rick Wilking REUTERS/Rick Wilking The Microsoft billionaire told the Seattle Times: "I read an hour almost every night. It's part of falling asleep." He enjoys "deeply informative and beautifully written" books (in June he released a list of six books he recommends) and his reading topics range from healthcare to climate change to business and politics. Gates says he considers himself a very fast reader, despite never taking a speed-reading course. Vera Wang uses this "peaceful" time to look over materials her staffers send her. View gallery . Michael Loccisano/Getty Images Michael Loccisano/Getty Images "My bedroom is my sanctuary," the fashion designer told Fortune in 2006. "It's like a refuge, and it's where I do a fair amount of designing — at least conceptually if not literally." She said staffers send her stuff at home, "and I always read it at night — the only time when seven people aren't coming to me at once," Fortune reported. Buffer CEO Joel Gascoigne walks every evening right before bed. View gallery . Buffer Buffer Gascoigne takes a 20-minute walk every evening to allow total disengagement from his work before turning off the lights. "This is a wind down period, and allows me to evaluate the day’s work, think about the greater challenges, gradually stop thinking about work, and reach a state of tiredness," he writes in a blog post. Kenneth Chenault, CEO of American Express, writes down three things he wants to accomplish the next day. View gallery . Brian Ach /AP Images for American Express Brian Ach /AP Images for American Express Before retiring for the night, Chenault says he likes to write down the top three things he wants to accomplish the next day. This helps him prioritize first thing the next morning. |
Javanian: OKAY, Let's start. Capnd143: |
|
The idea of using pidgin is cool, but we should remember pidgin is not a standardized language with established lexis and structure. I forsee potential difficulties during team work to establish language syntax. But all the same it would be nice to have an "african programming language", a name like "Pidginatic" or "pidmatrix" from pidgin would be so cool |
uken73: Yes Null Pointer Exception indicates an attempt to access an uninitialized variable and like Javanian has already said, it's most likely the ResultSet rs. Confirm that it has been initialized.please help me check the code above! Thanks |
Javanian: First of all, this is not a logical error, it is a run time error. You are most likely trying to utilize a variable you haven't initialized or a variable that points to null hence the 'NullPointerException'. I can't see the rest of your code but i suspect it is comming from the result set variable 'rs'. Check to see if it has been initialized and if it actually holds any value.you were right, i didnt initialize my ResultSet (rs) object variable thats why i got the NullPointerException, i fixed that by declaring and assigning values for my ResultSet variable under the button press event, which i had to create a connection to the database each time the button is pressed rather than use a method, this is giving me undesired result : E.g //i am using mobile nw so excuse //my bad formating and syntax btnNextActionPerformed(java.awt....){ try { String host="jdbc:derby://localhost:1527/Employees"; String uName="admin1"; String uPass="admin"; connection cont =DriverManager.getConnection(host,uName,uPass); Statement stmtt= cont.CreateStatement(); String SQL="SELECT * FROM Workers"; ResultSet rs3=stmtt.executeQuery(SQL); while (rs3.next()) { //get value string fname=rs3.getString(Fname); //set value txtFirstName.setText(fname); } cont.close(); } //catch some Exception here catch(){} ====== == all this code does is return the last record from my data table probably due to the while loop (i tried if,esle statement too, didnt work either) i want to go step by step throw my data table and retrieve the value at the current cursor position and set those values as the value of a text field... Am dying here please |help out a newbie| |
@javanian and all the pros in the house please help me out i am having problem with navigating a jdbc, in created a button, and i want the button to load the next record from a datase when clicked but i keep getting a weird looking logical error when i try it out, this is my code: private void btnNextActionPerformed(java.awt.event.ActionEvent evt) { try{while( rs.next( )); int id_col = rs.getInt("ID" ;String first_name = rs.getString("First_Name" ;String last_name = rs.getString("Last_Name" ;String job = rs.getString("Job_Title" ;String id = Integer.toString( id_col ); textID.setText(id); textFirstName.setText(first_name); textLastName.setText(last_name); textJobTitle.setText(job);} catch(SQLException err){System.out.println(err.getMessage());} this is the error i get when i run the the application: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at Employees.Workers.btnNextActionPerformed(Workers.java:204) at Employees.Workers.access$200(Workers.java:17) at Employees.Workers$3.actionPerformed(Workers.java:138) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703) at java.awt.EventQueue.access$000(EventQueue.java:102) at java.awt.EventQueue$3.run(EventQueue.java:662) at java.awt.EventQueue$3.run(EventQueue.java:660) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:676) at java.awt.EventQueue$4.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:673) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) @javanian @ @programmer @seun ![]() ![]() |
DharkPoet: It aint that much bro!!by much you mean? Size? Price? |
Ok am in. But the problem is i will be using my phone. I have a PC bt only have Java,C++ AND Vb6 installed, i cant Download Python because of the hilariously slow Network in my State, and i cant buy it from a vendor either because it is not available! I am really interested in this. Help me out. |
Saw a news flash on canadianTv and On Wall street Journal that nigerian scientist have synthesised an "unproven" ebola cure called Nano-Silver... And its been aproved for trial by WHO. Am on mobile right now so i can copy&paste, here the link below; someone should please do that. http://online.wsj.com/articles/nigerian-ebola-patients-to-be-given-experimental-drug-1408034006 Tags:Seun,Mynd44,Ebola,nobody |
Nice, what language? |
asalimpo: Get any telco modem. And update ur software. Write d internet cost as learng expenses. Download ebooks, and software and ide.now thats quite easy to say, the network around here gets as bad as 5kb/sec "sometimes" so the very idea of downloading an IDE or better still streaming youtube video with that crappy signal is a hoax! |
uken73: I have sent you a mail. You may want to delete your e-mail address from your last post.ya will check it out, as 4 my mail, any email scrubber can do anytin with it, i've marked that one as public, dont do private biz with dat! |
uken73: You are even based in Akwa Ibom. I'm in Akwa Ibom too. It's difficult to get these stuff over here, but you can get someone in Lagos to buy & send it to you. The latest you can grab, the better. VB6 is just damn too old and a serious waste of time.which part of a.k? Uyo? Am in Eket, And would it be posible to get the IDE you own already? Would really love to! The mere mention of my vb 6 studio makes me wanna cry! ![]() |
uken73: Like I said, I'm not into mobile development (yet). But I think the following resources should be of help.Thanks. About your prisec school software, i had a similar idea with vb6 earlier, but i decided to postpone the project becos i was quite new to programming world or so i taught! I would to get an overview of how your solution works. Thanks Email: Timothymaxwell149@gmail.com |
uken73: VB 6 is good as a 1st language, but you should consider learning the latest version which is VB.NET. Most VB6 programmers found it challenging to port to .NET, so it would be wise to just learn .NET at once.how relevant is the .NET in mobile development and which the best microsoft language to learn? |
Kennyinusa: For me i develop Android and windows phone.love your analysis, but like i said am self taught, never got a formal education on this stuffs, so pardon my ignorance. And i live in Akwa ibom state and unlike lagos, its quite hard to get your hands on this tools, even if i knew, downloading is a no! no! , with the crappy internet speed around here, it is a case of hilarious combination of fustration! How do i get my hands on these these please! |
uken73: I'm not into mobile programming (yet), but I would advice that you avoid tools that are too old (like Visual Studio 6).thanks, bt i am using VS 6 FOR learning only, tried it out becos its a good begginers tools, and i am not knowledgable on the best tools, would be glad if u helped me out |
Am pretty much a newbie to the programming world (SELF TAUGHT), i got my first laptop about 3-4 weeks ago, installed some basic programming(those i could get my hands on). I have the MS Visual Studio 6.0 which i use for learning vb6, Jcreator(has some glitches) and the NetBeans 7 IDE for java. So far i can write and deploy softwares as basic as timers,stopwatch,scientific calculators to malwares like keyloggers(basic)and simple computer worms to Testing softwares and media players. But what i seem to be lacking is knowledge of mobile development(which i actualy needed), [b]So to the gurus out there what tools, IDE etc do i need for mobile developemt(android,windows,BB,iphone etc) in java, how do i get these tools, and the pros and cons of mobile development thanks |
9japipper: it is mobile compatible but its just preferable you use a pc cus it gets to load so much to your browser. We have plans of making mobile specific versionbelive me, if at all you have such plans it should be very high in the "to-do-list" considering most nigerians prefer to surf the net and use web services on mobile due to data constraints and sundry limitations |
9japipper: Hello NL programmers, I and my team have been working on a school management project. We just released a beta version for the admin backend. Please help me review the app and tell me your observations and reservations.site is not mobile compatible, keeps displaying 17%, 22% in the loading.php page in some mobile browsers |
moruphb: i have a very clean and perfect condition 05 model for sale for 1.2m, send me a pm if you are interested.1.2mil ? Can i see the pics please? Am interested |
ccaramel: https://www.nairaland.com/1789998/tokunbo-2006-gold-toyota-corolla1.5 mil...? Oops..! Are u a car dealer? if yes can u urgently arrange a budget ride of 650-750k for me urgently? I need it like bad! |
Needed urgently please and price tag |
Please i need help on an ideal laptop to get for a 60k budget! Currently using Dell, but need a back up laptop for Programming, video editing etc! Most preferrably a new Laptop, am confused and intend to get the laptop tommorow. Thanks |
1 2 3 4 5 6 7 8 ... 15 16 17 18 19 20 21 22 23 (of 53 pages)
;