• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:31
CEST 15:31
KST 22:31
  • 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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
ZeroSpace Early Access is Now Live!20Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters2Balance hotfix patch 5.0.16b (July 16)88Reynor: GSL Loss Wasn't About Preparation Format17[IPSL] Spring 2026 Grand Finals - This Weekend!18
StarCraft 2
General
Reynor: GSL Loss Wasn't About Preparation Format Balance hotfix patch 5.0.16b (July 16) How would you feel about frequent/monthly balance patches for SC2? Clem: "I don't have that much hope in Blizzard" Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters
Tourneys
IntoTheTV X SOOP SC2 League : Weekly & Monthly INu's Battles#18 - Cure, herO, Rogue & ByuN RSL Revival: Season 6 - Qualifiers and Main Event Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026
Strategy
[G] Having the right mentality to improve
Custom Maps
[M] (2) Industrial Park New Map Maker - Looking for Advice - Love or Hate
External Content
Mutation # 535 Assembly of Vengeance The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together
Brood War
General
BW General Discussion Animated Gateway BGH Auto Balance -> http://bghmmr.eu/ HORROR STARCRAFT MOVIE How Famous was FlaSh before his Debut?
Tourneys
Escore Tournament - Season 3 [Megathread] Daily Proleagues [IPSL] Spring 2026 Grand Finals - This Weekend! Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers PvT advise for noobs Fighting Spirit mining rates Creating a full chart of Zerg builds
Other Games
General Games
ZeroSpace Early Access is Now Live! Path of Exile Nintendo Switch Thread General RTS Discussion Thread Diablo IV
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Artificial Intelligence Thread US Politics Mega-thread Russo-Ukrainian War Thread How to buy a book - shipping from Korea to Europe The Games Industry And ATVI
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
How Games can Help with Majo…
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
An Exploration of th…
waywardstrategy
Customize Sidebar...

Website Feedback

Closed Threads



Active: 3412 users

The Big Programming Thread - Page 475

Forum Index > General Forum
Post a Reply
Prev 1 473 474 475 476 477 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.
Warri
Profile Joined May 2010
Germany3208 Posts
May 07 2014 20:00 GMT
#9481
Reinstalling internet explorer 11 fixed it, although firefox was the system default browser and eclipse was set to use firefox.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
May 07 2014 20:46 GMT
#9482
--- Nuked ---
Prillan
Profile Joined August 2011
Sweden350 Posts
May 07 2014 21:06 GMT
#9483
On May 08 2014 05:46 Nesserev wrote:
Show nested quote +
On May 08 2014 05:00 Warri wrote:
Reinstalling internet explorer 11 fixed it, although firefox was the system default browser and eclipse was set to use firefox.

Uh, what? How could Internet Explorer 11 be related to Eclipse... sounds like magic to me (aka this shouldn't happen, right?)

It was probably using IE to render the links inside the pop-up. It's not that uncommon.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
May 08 2014 04:56 GMT
#9484
Anyone have experience managing user logins via different platforms? Did you end up treating each platform as a separate user?
There is no one like you in the universe.
phar
Profile Joined August 2011
United States1080 Posts
May 08 2014 07:25 GMT
#9485
Can you provide a bit more detail? Do you mean supporting multiple ways of logging into the same service?
Who after all is today speaking about the destruction of the Armenians?
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
May 09 2014 01:24 GMT
#9486
On May 08 2014 16:25 phar wrote:
Can you provide a bit more detail? Do you mean supporting multiple ways of logging into the same service?


Not supporting it, but what to do when you do have a user using multiple services and you want to combine them all into one person. Do you just treat all the different log-ins as different people? Then that means if that one person logs in to multiple accounts/services to do something, does the person appear as the same person or as different people?
There is no one like you in the universe.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-05-09 10:24:23
May 09 2014 10:24 GMT
#9487
--- Nuked ---
Garfailed
Profile Joined May 2011
Netherlands409 Posts
May 09 2014 19:28 GMT
#9488
i've got a quick question.
I have to build a twitter client for a school assignment. Hashtags and stuff dont need to be clickable, but do need to be hightlighted, by writing them in bold for instance.
I've read the position of hashtags, and the hashtag itself from a JSON file, however, i cant seem to print the hashtag in bold, while the rest of the text remains normal.
Manit0u
Profile Blog Joined August 2004
Poland17799 Posts
Last Edited: 2014-05-09 19:52:58
May 09 2014 19:52 GMT
#9489
On May 10 2014 04:28 Garfailed wrote:
i've got a quick question.
I have to build a twitter client for a school assignment. Hashtags and stuff dont need to be clickable, but do need to be hightlighted, by writing them in bold for instance.
I've read the position of hashtags, and the hashtag itself from a JSON file, however, i cant seem to print the hashtag in bold, while the rest of the text remains normal.


What are you writing the client in? PHP? C#? JS?
Time is precious. Waste it wisely.
Garfailed
Profile Joined May 2011
Netherlands409 Posts
May 09 2014 20:23 GMT
#9490
Android Somehow i forgot this crucial detail
Manit0u
Profile Blog Joined August 2004
Poland17799 Posts
May 09 2014 20:30 GMT
#9491
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?
Time is precious. Waste it wisely.
Garfailed
Profile Joined May 2011
Netherlands409 Posts
May 09 2014 21:38 GMT
#9492
On May 10 2014 05:30 Manit0u wrote:
Show nested quote +
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?


Not really, i get the string from a JSONObject. Not xml.
I have the hashtag in a substring already, but i can't seem to make that 1 substring bold, when i add the entire thing together and set the TextView
Manit0u
Profile Blog Joined August 2004
Poland17799 Posts
Last Edited: 2014-05-09 22:30:12
May 09 2014 22:26 GMT
#9493
On May 10 2014 06:38 Garfailed wrote:
Show nested quote +
On May 10 2014 05:30 Manit0u wrote:
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?


Not really, i get the string from a JSONObject. Not xml.
I have the hashtag in a substring already, but i can't seem to make that 1 substring bold, when i add the entire thing together and set the TextView


Maybe try making it a separate string instead of a substring?

Or try this: http://developer.android.com/reference/android/text/SpannableStringBuilder.html
Time is precious. Waste it wisely.
teamamerica
Profile Blog Joined July 2010
United States958 Posts
May 09 2014 22:35 GMT
#9494
On May 10 2014 06:38 Garfailed wrote:
Show nested quote +
On May 10 2014 05:30 Manit0u wrote:
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?


Not really, i get the string from a JSONObject. Not xml.
I have the hashtag in a substring already, but i can't seem to make that 1 substring bold, when i add the entire thing together and set the TextView


Can you use Html.fromHtml() method? So it's like:

mTextView.setText(Html.fromHtml(str + "<b>" + hashtag + "</b>))

From http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview

Not a huge fan of using string concatenation to style it but seems like a pretty simple approach. Also not sure how this would play with any markup in the tweet body itself.
RIP GOMTV. RIP PROLEAGUE.
Ottoxlol
Profile Blog Joined November 2010
735 Posts
May 09 2014 23:21 GMT
#9495
Have been googling and thinking for a couple of hours I can't crack whats wrong with my program. Would make my day if someone could help. Its a simple inventory system where I have to use heterogeneous collection, dynamic memory allocation and classes in C++. I am finished if not for the Save() function that I would use to write my objects out to a file the same way I read them. For the parent I use:
virtual void Save(fstream &file) {file << thingsformattedinawayineedthem; } ,
for the children:
void Save(fstream &file){file << 'x' ; Camera::Save(file); file << otherthingsformattedinawayineedthem; }
the function that calls for every object to save itself is:
void Saveall(vector<Parent*> inventory,fstream &file){for (unsigned i=0; i<inventory.size(); i++){inventory[i]->Save(file);}
I did almost exactly the same for a Listall function that prints every objects variables and it worked so I think it has to do something with the way I handle the fstream(currently it does nothing to the file)
Bonus question: is there a clear command for files? if not is there an elegant solution to clearing it(txt in this case).
Garfailed
Profile Joined May 2011
Netherlands409 Posts
Last Edited: 2014-05-09 23:35:33
May 09 2014 23:33 GMT
#9496
On May 10 2014 07:35 teamamerica wrote:
Show nested quote +
On May 10 2014 06:38 Garfailed wrote:
On May 10 2014 05:30 Manit0u wrote:
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?


Not really, i get the string from a JSONObject. Not xml.
I have the hashtag in a substring already, but i can't seem to make that 1 substring bold, when i add the entire thing together and set the TextView


Can you use Html.fromHtml() method? So it's like:

mTextView.setText(Html.fromHtml(str + "<b>" + hashtag + "</b>))

From http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview

Not a huge fan of using string concatenation to style it but seems like a pretty simple approach. Also not sure how this would play with any markup in the tweet body itself.


Thats what i have implemented now, however it does not seem to work. My code does succeed in setting the textView properly, but fails to make the hashtag bold, ill paste it here.

EDIT: ill have a look at the SpannableStringBuilder tomorrow, looks like it could do the trick.


 
ArrayList<String> hashtags = entity.getHashTags();
ArrayList<String> hashtagsPos = entity.getHashTagPos();
Scanner sc;

for(int i = 0; i < hashtags.size(); i++) {
sc = new Scanner(hashtagsPos.get(i));
int pos1 = Integer.parseInt(sc.next());
int pos2 = Integer.parseInt(sc.next());
String result = tweet.getText();

Log.d("position",pos1 + ", " + pos2 );

String sub1 = result.substring(0,pos1);
String sub2 = result.substring(pos1, pos2);
String sub3 = result.substring(pos2, result.length());
text.setText(sub1 + Html.fromHtml("<b>" + sub2 + "</b>") + sub3);
sc.close();
}
Garfailed
Profile Joined May 2011
Netherlands409 Posts
Last Edited: 2014-05-09 23:35:02
May 09 2014 23:34 GMT
#9497
Sorry, double post.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-05-10 00:00:57
May 09 2014 23:40 GMT
#9498
--- Nuked ---
teamamerica
Profile Blog Joined July 2010
United States958 Posts
May 09 2014 23:57 GMT
#9499
On May 10 2014 08:33 Garfailed wrote:
Show nested quote +
On May 10 2014 07:35 teamamerica wrote:
On May 10 2014 06:38 Garfailed wrote:
On May 10 2014 05:30 Manit0u wrote:
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?


Not really, i get the string from a JSONObject. Not xml.
I have the hashtag in a substring already, but i can't seem to make that 1 substring bold, when i add the entire thing together and set the TextView


Can you use Html.fromHtml() method? So it's like:

mTextView.setText(Html.fromHtml(str + "<b>" + hashtag + "</b>))

From http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview

Not a huge fan of using string concatenation to style it but seems like a pretty simple approach. Also not sure how this would play with any markup in the tweet body itself.


Thats what i have implemented now, however it does not seem to work. My code does succeed in setting the textView properly, but fails to make the hashtag bold, ill paste it here.

EDIT: ill have a look at the SpannableStringBuilder tomorrow, looks like it could do the trick.


 
ArrayList<String> hashtags = entity.getHashTags();
ArrayList<String> hashtagsPos = entity.getHashTagPos();
Scanner sc;

for(int i = 0; i < hashtags.size(); i++) {
sc = new Scanner(hashtagsPos.get(i));
int pos1 = Integer.parseInt(sc.next());
int pos2 = Integer.parseInt(sc.next());
String result = tweet.getText();

Log.d("position",pos1 + ", " + pos2 );

String sub1 = result.substring(0,pos1);
String sub2 = result.substring(pos1, pos2);
String sub3 = result.substring(pos2, result.length());
text.setText(sub1 + Html.fromHtml("<b>" + sub2 + "</b>") + sub3);
sc.close();
}



You need to do it:
text.setText(Html.fromHtlm(sub1 + "<b>" + sub2 + "</b>")

i.e the whole setText needs to be the return value from Html.fromHtml.

I guess it has something to do with what you doing being
tv.setText(String)
vs
tv.setText(Spanned) (using pure Html.fromHtml)

Because what you have becomes tv.setText(sub1 + Html.fromHtml(..).toString()) basically. I don't know for sure to be honest.
RIP GOMTV. RIP PROLEAGUE.
Garfailed
Profile Joined May 2011
Netherlands409 Posts
May 10 2014 00:01 GMT
#9500
On May 10 2014 08:57 teamamerica wrote:
Show nested quote +
On May 10 2014 08:33 Garfailed wrote:
On May 10 2014 07:35 teamamerica wrote:
On May 10 2014 06:38 Garfailed wrote:
On May 10 2014 05:30 Manit0u wrote:
On May 10 2014 05:23 Garfailed wrote:
Android Somehow i forgot this crucial detail


http://stackoverflow.com/questions/17783084/how-to-make-xml-strings-bold-underlined-etc

Does this help?


Not really, i get the string from a JSONObject. Not xml.
I have the hashtag in a substring already, but i can't seem to make that 1 substring bold, when i add the entire thing together and set the TextView


Can you use Html.fromHtml() method? So it's like:

mTextView.setText(Html.fromHtml(str + "<b>" + hashtag + "</b>))

From http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview

Not a huge fan of using string concatenation to style it but seems like a pretty simple approach. Also not sure how this would play with any markup in the tweet body itself.


Thats what i have implemented now, however it does not seem to work. My code does succeed in setting the textView properly, but fails to make the hashtag bold, ill paste it here.

EDIT: ill have a look at the SpannableStringBuilder tomorrow, looks like it could do the trick.


 
ArrayList<String> hashtags = entity.getHashTags();
ArrayList<String> hashtagsPos = entity.getHashTagPos();
Scanner sc;

for(int i = 0; i < hashtags.size(); i++) {
sc = new Scanner(hashtagsPos.get(i));
int pos1 = Integer.parseInt(sc.next());
int pos2 = Integer.parseInt(sc.next());
String result = tweet.getText();

Log.d("position",pos1 + ", " + pos2 );

String sub1 = result.substring(0,pos1);
String sub2 = result.substring(pos1, pos2);
String sub3 = result.substring(pos2, result.length());
text.setText(sub1 + Html.fromHtml("<b>" + sub2 + "</b>") + sub3);
sc.close();
}



You need to do it:
text.setText(Html.fromHtlm(sub1 + "<b>" + sub2 + "</b>")

i.e the whole setText needs to be the return value from Html.fromHtml.

I guess it has something to do with what you doing being
tv.setText(String)
vs
tv.setText(Spanned) (using pure Html.fromHtml)

Because what you have becomes tv.setText(sub1 + Html.fromHtml(..).toString()) basically. I don't know for sure to be honest.


well, that actually did the trick! i feel rather dumb now...
Thanks alot though!
Prev 1 473 474 475 476 477 1032 Next
Please log in or register to reply.
Live Events Refresh
WardiTV Summer Champion…
12:00
Summer Cup Group C
WardiTV691
IndyStarCraft 122
Rex111
TKL 37
LiquipediaDiscussion
CrankTV Team League
11:00
Crank Gathers S4: Playoffs
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko503
IndyStarCraft 122
Rex 111
TKL 37
StarCraft: Brood War
Rain 6283
Calm 5245
Bisu 1594
BeSt 1019
Zeus 666
Horang2 644
firebathero 608
EffOrt 382
Mini 380
Light 331
[ Show more ]
Shuttle 303
Larva 223
Stork 211
Soulkey 181
Last 159
Snow 139
Rush 128
actioN 125
Hyun 109
Dewaltoss 106
ggaemo 90
Mong 87
Pusan 84
Sea.KH 59
Mind 55
hero 51
ToSsGirL 50
Movie 47
[sc1f]eonzerg 38
sorry 32
Shine 31
Barracks 30
JYJ 26
Sacsri 22
Sharp 21
NaDa 20
Sexy 19
Bale 18
yabsab 18
Yoon 16
JulyZerg 15
IntoTheRainbow 14
HiyA 14
zelot 14
ajuk12(nOOB) 12
Noble 9
Icarus 9
Dota 2
Dendi912
XcaliburYe221
Counter-Strike
fl0m2402
shoxiejesuss1057
markeloff226
byalli103
edward67
Other Games
FrodaN2586
singsing2201
hiko697
B2W.Neo690
crisheroes362
RotterdaM319
uThermal254
Mlord230
OGKoka 201
Sick170
Liquid`LucifroN124
DeMusliM120
Liquid`VortiX94
ArmadaUGS74
CosmosSc2 20
Trikslyr11
Organizations
StarCraft: Brood War
UltimateBattle 27
StarCraft 2
angryscii 18
StarCraft: Brood War
lovetv 12
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2490
• WagamamaTV431
League of Legends
• Jankos1921
• TFBlade778
Upcoming Events
Replay Cast
10h 29m
Escore
20h 29m
CrankTV Team League
21h 29m
Big Brain Bouts
1d 2h
Soulspirit vs goblin
TriGGeR vs Bunny
OSC
1d 8h
Korean StarCraft League
1d 13h
Afreeca Starleague
1d 14h
RSL Revival
1d 19h
Serral vs SHIN
herO vs Solar
Online Event
2 days
Replay Cast
2 days
[ Show More ]
RSL Revival
2 days
Clem vs ByuN
Rogue vs Lambo
OSC
2 days
WardiTV Weekly
3 days
Sparkling Tuna Cup
4 days
INu's Battles
4 days
Cure vs herO
ByuN vs Rogue
PiGosaur Cup
5 days
The PondCast
5 days
Kung Fu Cup
5 days
Patches Events
6 days
Replay Cast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-07-22
HSC XXIX
Eternal Conflict S2 E3

Ongoing

CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026

Upcoming

Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
ASL Season 22: Qualifier #1
ASL Season 22: Qualifier #2
CSLAN 4
ASL Season 22
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 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.