• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:00
CEST 20:00
KST 03:00
  • 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: Holy Diver2[ASL22] Ro16 Preview: Rough Waters10[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915
Community News
StarCraft open world shooter announced at BlizzCon73Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism10Official StarCraft website teases new content ahead of BlizzCon?172Stellar 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 Revival: Season 6 - Qualifiers and Main Event Sparkling Tuna Cup - Weekly Open Tournament RSL goes to London! 2026 Offline Finals Nov 21-22 KSL Week #92 IntoTheTV X SOOP SC2 League : Weekly & Monthly
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
The PondCast: SC2 News & Results Mutation # 542 The Ascended Mutation # 541 Binary Choice Mutation # 540 Dodge This
Brood War
General
[ASL22] Ro16 Preview: Holy Diver Official StarCraft website teases new content ahead of BlizzCon? ASL22 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Broodwar Prediction Market
Tourneys
[ASL22] Ro16 Group C [ASL22] Ro16 Group B [ASL22] Ro16 Group A Escore Tournament - Season 3
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 Nintendo Switch Thread EVE Corporation [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
US Politics Mega-thread UK Politics Mega-thread Things Aren’t Peaceful in Palestine Trading/Investing Thread Russo-Ukrainian War Thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Diablo Animated Series on Netflix
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: 9414 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
Poland17843 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
Poland17843 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
Poland17843 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 31m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 972
Tasteless 934
mouzHeroMarine 342
IndyStarCraft 294
SHIN 174
BRAT_OK 87
Railgan 25
StarCraft: Brood War
Britney 33959
Calm 3540
Shuttle 1123
Artosis 748
firebathero 165
Mini 151
Dewaltoss 104
Bonyth 89
Sea.KH 39
Trap 35
[ Show more ]
Mong 30
zelot 25
sSak 18
Dota 2
qojqva4372
Fuzer 273
canceldota73
febbydoto32
Counter-Strike
fl0m1040
Super Smash Bros
hungrybox282
Chillindude15
Heroes of the Storm
Liquid`Hasu474
MindelVK9
Other Games
Grubby4886
Liquid`RaSZi2025
singsing1034
B2W.Neo573
mouzStarbuck368
Mlord308
QueenE237
Hui .146
Mew2King116
Organizations
Other Games
gamesdonequick3028
StarCraft 2
StarCraft2387
Other Games
EGCTV1335
StarCraft 2
ComeBackTV 890
Heroes of the Storm
Heroes of the Storm679
StarCraft: Brood War
Afreeca ASL 548
StarCraft 2
TaKeTV 37
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH306
• EnkiAlexander 104
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• 80smullet 11
• Michael_bg 7
• Pr0nogo 5
• Azhi_Dahaki4
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Shiphtur257
Upcoming Events
BlizzCon
31m
IdrA vs MC
Afreeca Starleague
16h 1m
Light vs JyJ
Soulkey vs hero
WardiTV Weekly
17h 1m
Monday Night Weeklies
22h 1m
Afreeca Starleague
1d 16h
Snow vs Shinee
Shine vs EffOrt
GSL
1d 17h
PiGosaur Cup
2 days
The PondCast
2 days
Kung Fu Cup
2 days
Replay Cast
3 days
[ Show More ]
KCM Race Survival
3 days
IntoTheTV X SOOP
3 days
Replay Cast
4 days
IntoTheTV X SOOP
4 days
Replay Cast
5 days
GSL
5 days
Replay Cast
6 days
GSL
6 days
Shopify Rebellion Sundays
6 days
Spirit vs Mixu
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.