• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:38
CEST 07:38
KST 14:38
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL22] Ro16 Preview: Rough Waters10[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 244
Community News
StarCraft open world shooter announced at BlizzCon54Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism10Official StarCraft website teases new content ahead of BlizzCon?162Stellar Fest TWO the Moon (Dec 16-20)9Weekly Cups (August 24-30): Patches' balance mod takes over3
StarCraft 2
General
How do you feel about the StarCraft shooter announcement at BlizzCon 2026? StarCraft open world shooter announced at BlizzCon Balance hotfix patch 5.0.16b (July 16) Team Liquid Map Contest #22: Results and Winners Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism
Tourneys
RSL goes to London! 2026 Offline Finals Nov 21-22 KSL Week #92 IntoTheTV X SOOP SC2 League : Weekly & Monthly 2026 GSTL Announcement Sparkling Tuna Cup - Weekly Open Tournament
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 542 The Ascended Mutation # 541 Binary Choice The PondCast: SC2 News & Results Mutation # 540 Dodge This
Brood War
General
Official StarCraft website teases new content ahead of BlizzCon? BGH Auto Balance -> http://bghmmr.eu/ Broodwar Prediction Market Practice Partners (Official) [D] Brainstorming a balance patch for Brood war
Tourneys
[ASL22] Ro16 Group A [ASL22] Ro16 Group B Escore Tournament - Season 3 Small VOD Thread 2.0
Strategy
Replay Review Process - What do you do? Simple Questions, Simple Answers Odyssey Mineral Stack Saturation Game Theory for Starcraft
Other Games
General Games
Diablo IV EVE Corporation Nintendo Switch Thread [Maplestory Hardcore] Let's Play~!! General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
Trading/Investing Thread US Politics Mega-thread UK Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Diablo Animated Series on Netflix Movie Discussion!
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Virtual Romance, Real-Life C…
TrAiDoS
Regacy Esports:Our Goa…
regacyesports
Dreaming of BW patches (mod…
c3rberUs
LOCKPICKING NOOB
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6776 users

The Big Programming Thread - Page 528

Forum Index > General Forum
Post a Reply
Prev 1 526 527 528 529 530 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2014-10-11 16:20:30
October 11 2014 16:19 GMT
#10541
@FFGenerations:
I don't know about people that will be rating your project, but the word "anime" might turn some people off immediately and influence their judgment. On the other hand, if they're anime fans this might work to your advantage. Seems a bit risky to me. Were I you, I'd go with something generic (not something boring, you still need to feel enthusiastic about it, but something that's pretty neutral).
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
October 11 2014 17:34 GMT
#10542
--- Nuked ---
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2014-10-11 22:17:35
October 11 2014 22:16 GMT
#10543
An interesting concept (I think, but I'm a noob): How about making your own API that searches database for patterns based on Boyer-Moore algorithm (as you type)? The trick here would be to make it responsive while minimizing the amount of DB queries. You would have to probably query DB once, then cache it somehow and work on the cached results after that. If you have a huge database with tons of records you would have to narrow it down somehow because caching 30G of data (or more) isn't very good for the system.

I'm not sure that's even feasible, but food for thought.
Time is precious. Waste it wisely.
Epishade
Profile Blog Joined November 2011
United States2267 Posts
October 12 2014 01:32 GMT
#10544
New problem in java.

I'm trying to count all the characters in a text file and print that out to the user. So far I was able to get it to count all the words present in the file, but have spent too long trying to figure out characters.

+ Show Spoiler +


static String fileLocation;
static Scanner in;
static int lengthInCharacters;
static int lengthInWords;



public static void getTotalWords()
{

while(in.hasNext())
{
in.next();
lengthInWords++;
}

System.out.println("Total number of words is: " + lengthInWords);
}

This does exactly what I need it to. It increments the lengthInWords variable and prints it out to show the user how many words are in the text file.

public static void getTotalCharacters()
{

while(in.hasNextByte())
{
in.hasNextByte();
lengthInCharacters++;
}

System.out.println("Total number of characters is: " + lengthInCharacters);
}

This I can't get to work though. The lengthInCharacters value isn't incrementing and returns 0. When I switched the while loop to 'while(in.hasNext)' instead of 'hasNextByte', the program would get stuck prompting me for input. So I'm not exactly sure how to write this to go through the text file one character at a time and increment the variable correctly.



Pinhead Larry in the streets, Dirty Dan in the sheets.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
October 12 2014 01:34 GMT
#10545

public static void getTotalCharacters()
{

while(in.hasNextByte())
{
in.hasNextByte();
lengthInCharacters++;
}

System.out.println("Total number of characters is: " + lengthInCharacters);
}


in.hasNextByte() is being called again in the while loop o_o doesnt that make your program loop forever?
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
Epishade
Profile Blog Joined November 2011
United States2267 Posts
October 12 2014 01:37 GMT
#10546
Nah, it just prints out:

Total number of characters is: 0

when I run it.
Pinhead Larry in the streets, Dirty Dan in the sheets.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
October 12 2014 01:40 GMT
#10547
found it. because if it detects the word, it immediately returns false

http://www.tutorialspoint.com/java/util/scanner_hasnextbyte.htm

look at the example below.
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
Epishade
Profile Blog Joined November 2011
United States2267 Posts
October 12 2014 01:53 GMT
#10548
Ah crap. Thought byte would include chars.

Still stuck though. I see what you meant with how I called it inside the loop again. It should have been this.

public static void getTotalCharacters()
{
while(in.hasNextByte())
{
in.nextByte();
lengthInCharacters++;
}

System.out.println("Total number of characters is: " + lengthInCharacters);
}

but this doesn't work either.
Pinhead Larry in the streets, Dirty Dan in the sheets.
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2014-10-12 02:03:24
October 12 2014 01:59 GMT
#10549
Why not just do it like that?


String Str = new String(Files.readAllBytes(Paths.get(filePath)));
int len = Str.length();

String StrippedStr = Str.replaceAll("\\s", "");
int lenWithoutCountingWhitespaceAndNonVisibleChars = StrippedStr.length();
Time is precious. Waste it wisely.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
October 12 2014 02:35 GMT
#10550
On October 12 2014 10:53 Epishade wrote:
Ah crap. Thought byte would include chars.

Still stuck though. I see what you meant with how I called it inside the loop again. It should have been this.
Show nested quote +

public static void getTotalCharacters()
{
while(in.hasNextByte())
{
in.nextByte();
lengthInCharacters++;
}

System.out.println("Total number of characters is: " + lengthInCharacters);
}

but this doesn't work either.

nextByte still doesnt work on chars =/

http://www.tutorialspoint.com/java/util/scanner_nextbyte.htm
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
MysteryMeat1
Profile Blog Joined June 2011
United States3292 Posts
Last Edited: 2014-10-12 08:09:53
October 12 2014 06:48 GMT
#10551
-deleted- figured out my own question
"Cause ya know, Style before victory." -The greatest mafia player alive
MysteryMeat1
Profile Blog Joined June 2011
United States3292 Posts
October 12 2014 06:49 GMT
#10552
On October 12 2014 10:34 icystorage wrote:

public static void getTotalCharacters()
{

while(in.hasNextByte())
{
in.hasNextByte();
lengthInCharacters++;
}

System.out.println("Total number of characters is: " + lengthInCharacters);
}


in.hasNextByte() is being called again in the while loop o_o doesnt that make your program loop forever?


doesn't hasnextmethod not move the cursor?
"Cause ya know, Style before victory." -The greatest mafia player alive
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2014-10-12 13:33:50
October 12 2014 13:33 GMT
#10553
On October 12 2014 02:34 Nesserev wrote:
First of all, I agree with Manit0u. The longer it takes for people to get familiar with, and take in the context of your project, the worse it probably is for a final year project. Normally, it's the other way around... your client knows everything and has to convey all their thoughts to you, but final year projects are different.

You have to introduce the people that will be rating your project to the whole idea that otakus make lists of animes on the internet and fanatically rant about it. You will have to make clear to them why you make some of these design choices: do people use this? why share the lists in .jpg? ... Otakus and anime lovers have their own antics that might be very strange to them.

They probably will have a very difficult time to understand everything, and might look at things badly, even though those things are what otakus/anime lovers want. It will be one big mindfuck misunderstanding...

Second of all, yes... this is too easy for a final year project. It basically comes down to:
- using an API (ezpz) and a database (ezpz)
- generating an image (ezpz)
All of this requires you to know the basics of programming, and how to use three or four tools.

There are probably not a lot of opportunities to show them your worth:
- depth of knowledge
- using slick design patterns and algorithms
- research (!!!)

The central problem is... it's just that web applications are fucking boring. That said, everything that is used to make web applications work, is very interesting:
- Why don't you design an API, and show that it works in your application?
- Why don't you implement your own RDBMS... there are books that guide you through the process of implementing a working RDBMS. It won't be as efficient as most RDMBS's, but still, it shows your depth of knowledge.
- Why don't you implement your own (virtual) operating system or server; maybe an emulator?
- ...

You should show them more qualities and interest than just "Yo, I can build web applications".



Thanks for your replies both.


1) I don't honestly feel like explaining an anime list image generator is a big deal. I mean I can example a ton of existing anime list/mobile apps etc. The concept is unique in the whole world (maybe lol) which is a pretty fucking big bonus point right there.

2) You say "why don't you design an API (and show it works in your app)?" . would you mind please giving me a theoretical example of something like this? (i will go google "API" a lot in the meantime)

3) You say "implemnent your own relational dataabnase management system?" Do you mean create my own database software?? Or just use a database in my application? I think you just broke my mind lol

4) you said There are probably not a lot of opportunities to show them your worth:
- depth of knowledge
- using slick design patterns and algorithms
- research (!!!)"

So this is where my real question is. isn't there a ton of stuff that can be researched into optimising performance for my system? for example comparison between using ajax and possible alternatives? between using html5 frontend or something else? how can i the system perform better and benchmark it? what technology is more compatible on devices?

Spazer, after calling my idea "dead end project, too broad and too simple which will work just fine however you do it", later on suggested i could improve the project by e.g. looking at: "say you wanted to focus on the optimization of the database search. How can a search be made more efficient on mobile hardware? How can I leverage the benefits of mobile hardware to cache results and speed up the search? Does this reduce power draw and increase battery life? This kind of topic can go as deep as you like, even down to hardware level."

so i am confused now. is my project viable or not? what sort of things can i focus my attention on in order to up the investigative nature of the project e.g. in order to improve performance on X devices or in X fashion with regards to calling the API or utlising own database or frontend or X?

THANKS PLEASE REPLY I FEEL LIKE WE ARE GETTING SOMEWHERE. ANYONE


think im going to read about cloud gaming next, someone said make a game using cloud gaming coz there are a ton of techniques to research....
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
ZenithM
Profile Joined February 2011
France15952 Posts
October 12 2014 14:49 GMT
#10554
On October 12 2014 15:49 MysteryMeat1 wrote:
Show nested quote +
On October 12 2014 10:34 icystorage wrote:

public static void getTotalCharacters()
{

while(in.hasNextByte())
{
in.hasNextByte();
lengthInCharacters++;
}

System.out.println("Total number of characters is: " + lengthInCharacters);
}


in.hasNextByte() is being called again in the while loop o_o doesnt that make your program loop forever?


doesn't hasnextmethod not move the cursor?

Not sure about the double negative there, but HasNext methods don't advance the cursor.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
October 12 2014 16:11 GMT
#10555
--- Nuked ---
MinoMoto
Profile Joined June 2011
Latvia107 Posts
October 12 2014 16:33 GMT
#10556
Guys I need help in C#
I need to create program what checks if password is correct.
The problem is that it must check also symbol number // (for example my password is asdfg (5symbols) if i write asd (3symbols) it must write password have 5 symbols)
How can I get my program to count symbols?
Shenghi
Profile Joined August 2010
167 Posts
October 12 2014 16:41 GMT
#10557
On October 13 2014 01:33 MinoMoto wrote:
Guys I need help in C#
I need to create program what checks if password is correct.
The problem is that it must check also symbol number // (for example my password is asdfg (5symbols) if i write asd (3symbols) it must write password have 5 symbols)
How can I get my program to count symbols?


string.Length?
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
October 12 2014 17:53 GMT
#10558
@FFGenerations

My school judges the four year projects on technical complexity and impact. The idea is that either your idea stands as a strong research/intellectual project or as a possible startup pursuit. If you're making a basic CRUD app with nothing really cool about the implementation, unless you can sell the CRUD app to thousands of people and get funding for it, then you're going to score low on impact. And a CRUD app is low on technical complexity. If you do a very heavy research-y project, like say translating CPU instructions on the GPU efficiently, depending on how well that goes you will probably get very high marks for technical complexity, which supersedes the low impact marks if you fail that project.

Your fourth year project probably isn't at the same scale as mine and maybe the goal of the project is just to use your experiences to build anything you like (in which case go for it), but at the same time other people (programmers) are going to look at your app and go, so you used and API or scraped the site, stored the data in a list, and then made an image? ...

is that it? The concept is unique sure, but it's not like it's difficult or that it kicks ass. Which means you're saying your 4 years of study have culminated in making an API consumer and image generator? If you can demonstrate high technical complexity in your application then sure, but you have to think that your idea of high technical complexity differs from other people's idea of it, and while they're not expecting you to make the next iPhone, they do expect something that's more complex than an API consumer and image generator.
There is no one like you in the universe.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
October 12 2014 18:15 GMT
#10559
On October 13 2014 01:33 MinoMoto wrote:
Guys I need help in C#
I need to create program what checks if password is correct.
The problem is that it must check also symbol number // (for example my password is asdfg (5symbols) if i write asd (3symbols) it must write password have 5 symbols)
How can I get my program to count symbols?


If password is properly encrypted (e.g. MD5), are you even able to tell its length? I thought it was one way process. Of course, I understand if a string is used instead but I'm asking in general.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-10-12 18:45:25
October 12 2014 18:40 GMT
#10560
--- Nuked ---
Prev 1 526 527 528 529 530 1032 Next
Please log in or register to reply.
Live Events Refresh
OSC
20:30
Masters Cup #151
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
FoxeR 56
StarCraft: Brood War
Shuttle 2178
Aegong 90
910 53
yabsab 28
Dota 2
ODPixel308
NeuroSwarm199
Other Games
summit1g9999
JimRising 533
PiGStarcraft309
RuFF_SC243
Organizations
Other Games
BasetradeTV230
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH307
• Sammyuel 16
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21884
• lizZardDota249
League of Legends
• Jankos767
• Lourlo722
• Stunt311
Upcoming Events
Sparkling Tuna Cup
4h 22m
WardiTV Invitational
5h 22m
ByuN vs Percival
Cure vs Classic
Shopify Rebellion Sundays
9h 22m
Spirit vs Mixu
Clem vs TBD
RSL Revival
10h 22m
Serral vs Rogue
BlizzCon
12h 52m
IdrA vs MC
Replay Cast
18h 22m
Afreeca Starleague
1d 4h
Light vs JyJ
Soulkey vs hero
WardiTV Weekly
1d 5h
Monday Night Weeklies
1d 10h
Afreeca Starleague
2 days
Snow vs Shinee
Shine vs EffOrt
[ Show More ]
GSL
2 days
PiGosaur Cup
2 days
The PondCast
3 days
Kung Fu Cup
3 days
Replay Cast
3 days
KCM Race Survival
4 days
IntoTheTV X SOOP
4 days
Replay Cast
4 days
IntoTheTV X SOOP
5 days
Replay Cast
5 days
GSL
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Acropolis #5 - TRS
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
ASL Season 22
Super Anchor Qualifying S3
CSL 2026 AUTUMN (S22)
Acropolis #5
Blizzard Classic Cup 2026
Blizzard Classic Cup 2026
RSL Revival: Season 6
Calamity Invitational
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026

Upcoming

Acropolis #5 - GSA
Acropolis #5 - GSB
Acropolis #5 - GSC
SC4ALL II: Brood War
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.