• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:07
CEST 22:07
KST 05:07
  • 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
Code S Season 1 - RO8 Preview3[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10
Community News
Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event11Code S Season 1 (2026) - RO12 Results12026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced9
StarCraft 2
General
Code S Season 1 - RO8 Preview Behind the Blue - Team Liquid History Book Weekly Cups (April 27-May 4): Clem takes triple Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Code S Season 1 (2026) - RO12 Results
Tourneys
GSL Code S Season 1 (2026) Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 5 - Qualifiers and Main Event StarCraft Evolution League (SC Evo Biweekly) 2026 GSL Season 2 Qualifiers
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 524 Death and Taxes The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ (Spoiler) Asl ro8 D winner interview BW General Discussion Do we have a pimpest plays list? AI Question
Tourneys
[ASL21] Ro8 Day 4 [ASL21] Ro8 Day 3 [Megathread] Daily Proleagues [ASL21] Ro8 Day 2
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Dawn of War IV Stormgate/Frost Giant Megathread OutLive 25 (RTS Game) Daigo vs Menard Best of 10 Nintendo Switch Thread
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread European Politico-economics QA Mega-thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Movie Stars In Video Games: …
TrAiDoS
ramps on octagon
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1669 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
Poland17743 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
Poland17743 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
Poland17743 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
Next event in 13h 23m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 485
IndyStarCraft 153
JuggernautJason56
BRAT_OK 51
UpATreeSC 50
EmSc Tv 9
StarCraft: Brood War
Britney 16329
Calm 3458
Mini 271
Soma 177
Dewaltoss 84
sSak 49
Mind 48
Aegong 41
Pusan 12
Dota 2
monkeys_forever371
Counter-Strike
fl0m2192
Heroes of the Storm
Liquid`Hasu426
Other Games
Grubby1846
FrodaN1611
Liquid`RaSZi1356
B2W.Neo534
C9.Mang0171
ArmadaUGS170
Fuzer 45
Trikslyr45
ZombieGrub32
Organizations
Other Games
BasetradeTV526
Dota 2
PGL Dota 2 - Main Stream27
StarCraft 2
EmSc Tv 9
EmSc2Tv 9
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 19 non-featured ]
StarCraft 2
• Adnapsc2 16
• Reevou 6
• intothetv
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• 80smullet 22
• Michael_bg 5
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV566
• lizZardDota272
League of Legends
• imaqtpie2094
• TFBlade961
Other Games
• Shiphtur288
Upcoming Events
GSL
13h 23m
SHIN vs Zoun
ByuN vs herO
OSC
14h 53m
OSC
16h 53m
Replay Cast
1d 3h
Escore
1d 13h
The PondCast
1d 13h
WardiTV Invitational
1d 14h
Zoun vs Ryung
Lambo vs ShoWTimE
Big Brain Bouts
1d 19h
Fjant vs Bly
Serral vs Shameless
OSC
2 days
Replay Cast
2 days
[ Show More ]
CranKy Ducklings
2 days
RSL Revival
2 days
SHIN vs Bunny
ByuN vs Shameless
WardiTV Invitational
2 days
Krystianer vs TriGGeR
Cure vs Rogue
uThermal 2v2 Circuit
2 days
BSL
2 days
Replay Cast
3 days
Sparkling Tuna Cup
3 days
RSL Revival
3 days
Cure vs Zoun
Clem vs Lambo
WardiTV Invitational
3 days
BSL
3 days
GSL
4 days
Afreeca Starleague
4 days
Soma vs Leta
Monday Night Weeklies
4 days
CranKy Ducklings
5 days
Afreeca Starleague
5 days
Light vs Flash
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-05-05
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
YSL S3
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W6
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
Escore Tournament S2: W7
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 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.