• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 03:38
CET 09:38
KST 17: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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband
Tourneys
RSL Offline Finals Info - Dec 13 and 14! StarCraft Evolution League (SC Evo Biweekly) RSL Offline FInals Sea Duckling Open (Global, Bronze-Diamond) $5,000+ WardiTV 2025 Championship
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
BW General Discussion Which season is the best in ASL? Data analysis on 70 million replays BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[BSL21] RO16 Group D - Sunday 21:00 CET [BSL21] RO16 Group A - Saturday 21:00 CET [Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Nintendo Switch Thread ZeroSpace Megathread Stormgate/Frost Giant Megathread The Perfect Game Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
Physical Exertion During Gam…
TrAiDoS
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1631 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
Poland17496 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
Poland17496 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
Poland17496 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
Replay Cast
00:00
WardiTV Mondays #62
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 134
-ZergGirl 69
StarCraft: Brood War
Britney 2401
Tasteless 231
Sharp 123
BeSt 119
Sacsri 102
Pusan 102
Dewaltoss 69
Killer 61
Shine 57
sorry 39
[ Show more ]
Bale 27
Shinee 26
ZergMaN 26
ToSsGirL 25
Hm[arnc] 6
Dota 2
febbydoto173
NeuroSwarm114
canceldota43
League of Legends
JimRising 522
Reynor74
Counter-Strike
shoxiejesuss288
Super Smash Bros
Westballz29
Other Games
summit1g11091
WinterStarcraft568
crisheroes342
C9.Mang0286
Mew2King34
Happy30
Organizations
Other Games
gamesdonequick626
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH231
• Light_VIP 11
• LUISG 11
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1014
Upcoming Events
The PondCast
1h 22m
OSC
7h 22m
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
15h 22m
Korean StarCraft League
1d 18h
CranKy Ducklings
2 days
WardiTV 2025
2 days
SC Evo League
2 days
BSL 21
2 days
Sziky vs OyAji
Gypsy vs eOnzErG
OSC
2 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
3 days
[ Show More ]
WardiTV 2025
3 days
OSC
3 days
BSL 21
3 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
4 days
Wardi Open
4 days
StarCraft2.fi
4 days
Monday Night Weeklies
4 days
Replay Cast
4 days
WardiTV 2025
5 days
StarCraft2.fi
5 days
PiGosaur Monday
5 days
StarCraft2.fi
6 days
Tenacious Turtle Tussle
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
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 © 2025 TLnet. All Rights Reserved.