• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 04:04
CET 10:04
KST 18:04
  • 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] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5[ASL22] Ro8 Preview: In A Tizzy11[ASL22] Ro16 Preview: Holy Diver5
Community News
Weekly Cups (October 19-25): Clem triples first in 5.0.175Evil Geniuses - shutting down21ISSL (IntoTheTV x SOOP SC2 League): Premier7Weekly Cups (October 12-18): 5.0.17 era begins1[$1250] International ShieldBattery League99
StarCraft 2
General
Behind the Blue - Team Liquid History Book No more SC2 streamers on team liquid? 5.0.17 Patch Notes - October 7, 2026 Evil Geniuses - shutting down SC2 Power Rank: epic29
Tourneys
ISSL (IntoTheTV x SOOP SC2 League): Premier Stellar Fest TWO the Moon (Dec 16-20) Sparkling Tuna Cup - Weekly Open Tournament RSL goes to London! 2026 Offline Finals Nov 21-22 RSL 2026 Offline Finals LCQ Sign-Ups
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[D] the control group Simple Questions/Answers [G] How to playtest arcade maps [A] Nemrods 1/4 players
External Content
Mutation # 550 Graveyard Shift The PondCast: SC2 News & Results Mutation # 549 Endless Sparkles Mutation # 548 Shining Bright
Brood War
General
Rollback Netcode in Brood War ฉันสามารถซื้อที่นอนขนาด 3 ฟุตคุณภาพสูงทางออนไลน์ได BW General Discussion Top Players of October 2026 (EBPD Rankings) Mathematicians needed to calc "Low Econ Epicness"
Tourneys
2v2v2v2 Tournament Stage 1: Community Poll [Megathread] Daily Proleagues [IPSL] IPSL Winter 26-27 Ro24 is HERE! [$1250] International ShieldBattery League
Strategy
50,000-Word Terran Builds Memo 2026-10-22 Cliff Jump Revisited (1 in a 1000 strategy) Simple Questions, Simple Answers
Other Games
General Games
Deus Ex 3!? Stormgate/Frost Giant Megathread Nintendo Switch Thread Mobile Legends: Bang Bang Armies of Exigo - YesYes?
Dota 2
Dota 2 Champions League Season 3 Begins April 25!
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread The Chess Thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
Fan Clubs
Reynor Fan Club The Flash Fan Club Serral Fan Club
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece
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
Recent Gifted Posts
Blogs
Why I built Repalyzer (1.1.…
BlueStar
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
[ASL22] Ro4 Day1 Ticket Giv…
bITt.mAN
Can Bots Beat Pros?? Starcr…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 10764 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
Poland17868 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
Poland17868 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
Poland17868 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 2h 57m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Codebar 24
StarCraft: Brood War
Rain 2555
Bisu 513
Larva 233
Hyuk 187
Mong 92
sorry 81
Leta 77
Killer 61
Light 51
soO 51
[ Show more ]
ggaemo 50
Sharp 33
ZergMaN 27
Shine 20
Aegong 18
yabsab 16
Noble 15
Hm[arnc] 9
hero 6
Terrorterran 1
Dota 2
ODPixel298
League of Legends
JimRising 734
Counter-Strike
fl0m3491
Super Smash Bros
Mew2King122
Other Games
summit1g12019
ceh9498
crisheroes131
Sick57
Organizations
Other Games
gamesdonequick735
Counter-Strike
PGL451
StarCraft: Brood War
lovetv 8
[ Show 11 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Laughngamez YouTube
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2232
League of Legends
• Stunt455
Upcoming Events
WardiTV Weekly
2h 57m
Ultimate Battle
2h 57m
Rush vs BeSt
Replay Cast
13h 57m
Rogue vs Classic
Patches Events
1d 3h
PiGosaur Cup
1d 15h
Kung Fu Cup
2 days
Replay Cast
2 days
The PondCast
3 days
KCM Race Survival
3 days
IntoTheTV X SOOP
5 days
herO vs Rogue
Reynor vs Solar
ByuN vs SHIN
Clem vs MaxPax
[ Show More ]
WardiTV Invitational
5 days
IPSL
5 days
WorsT vs nOmaD
Dewalt vs andersOn
IntoTheTV X SOOP
6 days
WardiTV Invitational
6 days
IPSL
6 days
Azhi_Dahaki vs ggnore13
Double vs WIZARD
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-11-01
Blizzard Classic Cup 2026
HCC Season 3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
IPSL Winter 2026-27
IEM Beijing 2026
PGL Masters Bucharest 2026
Stake Ranked Episode 5
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
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026

Upcoming

1xBet Invitational
SC4ALL II: Brood War
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
BLAST Bounty Winter 2027
eXTREMESLAND 2026
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals 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.