• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:55
CET 14:55
KST 22:55
  • 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
TL.net Map Contest #21: Winners10Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
StarCraft, SC2, HotS, WC3, Returning to Blizzcon!33$5,000+ WardiTV 2025 Championship6[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win10
StarCraft 2
General
Mech is the composition that needs teleportation t TL.net Map Contest #21: Winners Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win RotterdaM "Serral is the GOAT, and it's not close" 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Sparkling Tuna Cup - Weekly Open Tournament Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
[ASL20] Ask the mapmakers — Drop your questions BW General Discussion [BSL21] RO32 Group Stage BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review
Tourneys
[Megathread] Daily Proleagues [ASL20] Grand Finals [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile Should offensive tower rushing be viable in RTS games? Dawn of War IV
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1412 users

The Big Programming Thread - Page 295

Forum Index > General Forum
Post a Reply
Prev 1 293 294 295 296 297 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.
cydial
Profile Blog Joined September 2010
United States750 Posts
May 07 2013 02:58 GMT
#5881
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.
Roe
Profile Blog Joined June 2010
Canada6002 Posts
May 07 2013 03:19 GMT
#5882
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?
waxypants
Profile Blog Joined September 2009
United States479 Posts
May 07 2013 03:25 GMT
#5883
On May 07 2013 12:19 Roe wrote:
Show nested quote +
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


What is your environment (mainly talking just about OS here).
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-05-07 03:52:19
May 07 2013 03:51 GMT
#5884
On May 07 2013 12:25 waxypants wrote:
Show nested quote +
On May 07 2013 12:19 Roe wrote:
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


What is your environment (mainly talking just about OS here).

If it's windows then you can only run .exe's(starcraft) (and other files with default opening methods set up(.docx files)) or .bat(windows batch) files natively.

You can probably set up shell scripts(or any other language) to run with double click I think using cygwin but that's more complex. Also .bat files are looked down upon because they're hard to work with. You could have one .bat file that both compiles and runs the compiled file.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
cydial
Profile Blog Joined September 2010
United States750 Posts
May 07 2013 04:04 GMT
#5885
On May 07 2013 12:19 Roe wrote:
Show nested quote +
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


I'd like to do it in python (linux) or c++ / c (windows).
JeanLuc
Profile Joined September 2010
Canada377 Posts
Last Edited: 2013-05-07 04:41:05
May 07 2013 04:30 GMT
#5886
On May 07 2013 13:04 cydial wrote:
Show nested quote +
On May 07 2013 12:19 Roe wrote:
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


I'd like to do it in python (linux) or c++ / c (windows).


In windows you just double click the exe file and it should run. Create a shortcut for the .exe file or whatever and give it a different picture other than the default. You might need to put in some code that will wait for the user to press a keystroke before exiting (in your console io application)
(when you are compiling C program in windows an .exe file will get created. just look for that)
If you can't find it within yourself to stand up and tell the truth-- you don't deserve to wear that uniform
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
Last Edited: 2013-05-07 06:14:09
May 07 2013 06:10 GMT
#5887
On May 07 2013 09:20 Craton wrote:
How does one go about writing a select statement (PL/SQL) that will accomplish the following:

Assume a "lookup" table with a pair of fields "match" and "replace" that have values like: À, A; È, E (such that you have pairs of "accented" characters in the match and "normal" characters in the replace).

Assume you have another table with n number of records, any of which have one or more characters matching this pattern. The end translation should go something like ÀNYWHÈRÈ -> ANYWHERE.

For a single value, I can use a CONNECT BY LEVEL to split each character into a separate field, join to the lookup table, and then use a MODEL construct to perform the replacement and concatenation of each character (ordering maintained), taking only the final "built" value. However, I can't make it work when I have multiple values (i.e. from a table), since I can't just connect it by level.

I feel there might also be a way to skip the CONNECT BY step altogether, but I can't make it happen.

Thoughts?

I've only had experience with Microsoft T-SQL, and my solution there would be to build a cursor, loop through the multiple values, and process them one at a time. Not sure what would be the PL/SQL equivalent. Instead of processing them one by one, you could even group them together by string length and process all the values that are the same length all at once.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
May 07 2013 12:06 GMT
#5888
Shouldn't unsigned int a = -10 give 0? Is there a way to make a number that will only go as low as 0, so if you got a = 5-10 -> 0?
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
DertoQq
Profile Joined October 2010
France906 Posts
May 07 2013 12:18 GMT
#5889
no, -10 is probably represented by something like that in binary (on 8 bits) : 10001010. The bit on the left represent the negative value. But if you tell the computer it is an unsigned int, the bit on the left will be interpreted as a 'real' number, so : 138

If you want to do that, you can create your own class
"i've made some empty promises in my life, but hands down that was the most generous" - Michael Scott
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
May 07 2013 12:31 GMT
#5890
Isn't there an easier way to declare a variable that can't get less than zero?
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
netherh
Profile Blog Joined November 2011
United Kingdom333 Posts
May 07 2013 12:47 GMT
#5891
On May 07 2013 21:31 Arnstein wrote:
Isn't there an easier way to declare a variable that can't get less than zero?


I suggest using an int, and just checking to make sure it doesn't go below zero where necessary.

int i = ...;

i = std::max(i, 0);
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
Last Edited: 2013-05-07 12:48:31
May 07 2013 12:48 GMT
#5892
On May 07 2013 21:31 Arnstein wrote:
Isn't there an easier way to declare a variable that can't get less than zero?

In object oriented languages, you would probably implement it as a property.

Something like: (C#)

private int _notbelowzero;

public int NotBelowZero
{
get { return _notbelowzero; }
set {
if (value < 0)
_notbelowzero = 0;
else
_notbelowzero = value;
}
}
Kambing
Profile Joined May 2010
United States1176 Posts
May 07 2013 13:21 GMT
#5893
On May 07 2013 21:48 Tobberoth wrote:
Show nested quote +
On May 07 2013 21:31 Arnstein wrote:
Isn't there an easier way to declare a variable that can't get less than zero?

In object oriented languages, you would probably implement it as a property.

Something like: (C#)

private int _notbelowzero;

public int NotBelowZero
{
get { return _notbelowzero; }
set {
if (value < 0)
_notbelowzero = 0;
else
_notbelowzero = value;
}
}


In a standard OO language (Java, C++) this is the only way to do it. Unsigned in the context of C and C++ is insufficient because it only tells the compiler how to interpret the underlying memory rather than enforce any kind of property about that value. Refinement types allow you to do exactly that (in general, specify an arbitrary predicate over a type) but are not in any mainstream languages. For example, in an extension of F#, the property you want would be ascribed to a variable as follows:


x : int { x > 0 }
cydial
Profile Blog Joined September 2010
United States750 Posts
May 07 2013 16:24 GMT
#5894
On May 07 2013 13:30 JeanLuc wrote:
Show nested quote +
On May 07 2013 13:04 cydial wrote:
On May 07 2013 12:19 Roe wrote:
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


I'd like to do it in python (linux) or c++ / c (windows).


In windows you just double click the exe file and it should run. Create a shortcut for the .exe file or whatever and give it a different picture other than the default. You might need to put in some code that will wait for the user to press a keystroke before exiting (in your console io application)
(when you are compiling C program in windows an .exe file will get created. just look for that)


How would I do it in python?
Rannasha
Profile Blog Joined August 2010
Netherlands2398 Posts
Last Edited: 2013-05-07 16:32:12
May 07 2013 16:31 GMT
#5895
On May 08 2013 01:24 cydial wrote:
Show nested quote +
On May 07 2013 13:30 JeanLuc wrote:
On May 07 2013 13:04 cydial wrote:
On May 07 2013 12:19 Roe wrote:
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


I'd like to do it in python (linux) or c++ / c (windows).


In windows you just double click the exe file and it should run. Create a shortcut for the .exe file or whatever and give it a different picture other than the default. You might need to put in some code that will wait for the user to press a keystroke before exiting (in your console io application)
(when you are compiling C program in windows an .exe file will get created. just look for that)


How would I do it in python?


Create a new shortcut (typically with the menu opened by rightclicking on the desktop) and in the shortcut options, enter "python /path/to/file/nameofyourfile.py".

Basically call the 'python' program with the path to your python-file as argument and make a shortcut out of it.
Such flammable little insects!
Perscienter
Profile Joined June 2010
957 Posts
May 07 2013 18:03 GMT
#5896
That would still require Python to be installed on the end-user-system. You are probably looking for this:

http://cx-freeze.sourceforge.net/
cydial
Profile Blog Joined September 2010
United States750 Posts
May 07 2013 18:36 GMT
#5897
On May 08 2013 01:31 Rannasha wrote:
Show nested quote +
On May 08 2013 01:24 cydial wrote:
On May 07 2013 13:30 JeanLuc wrote:
On May 07 2013 13:04 cydial wrote:
On May 07 2013 12:19 Roe wrote:
On May 07 2013 11:58 cydial wrote:
I'm doing basic computer science atm and I'm wondering how people actually get a program to be executed through double clicking it.

Atm all I do is type it into a command prompt, first to compile, a second time to run.

what language is the program written in?


I'd like to do it in python (linux) or c++ / c (windows).


In windows you just double click the exe file and it should run. Create a shortcut for the .exe file or whatever and give it a different picture other than the default. You might need to put in some code that will wait for the user to press a keystroke before exiting (in your console io application)
(when you are compiling C program in windows an .exe file will get created. just look for that)


How would I do it in python?


Create a new shortcut (typically with the menu opened by rightclicking on the desktop) and in the shortcut options, enter "python /path/to/file/nameofyourfile.py".

Basically call the 'python' program with the path to your python-file as argument and make a shortcut out of it.


Ahh kk hadn't thought of that.
tec27
Profile Blog Joined June 2004
United States3702 Posts
May 07 2013 20:24 GMT
#5898
On May 07 2013 21:18 DertoQq wrote:
no, -10 is probably represented by something like that in binary (on 8 bits) : 10001010. The bit on the left represent the negative value. But if you tell the computer it is an unsigned int, the bit on the left will be interpreted as a 'real' number, so : 138

If you want to do that, you can create your own class

You have the right idea, but that's not actually how negative numbers are represented, generally.

See: http://en.wikipedia.org/wiki/Two's_complement

What the actual value will be therefore depends on the size of the int. For 8 bits, the representation of -10 would be: 11110110 (or 246 unsigned).
Can you jam with the console cowboys in cyberspace?
DertoQq
Profile Joined October 2010
France906 Posts
May 07 2013 20:40 GMT
#5899
On May 08 2013 05:24 tec27 wrote:
Show nested quote +
On May 07 2013 21:18 DertoQq wrote:
no, -10 is probably represented by something like that in binary (on 8 bits) : 10001010. The bit on the left represent the negative value. But if you tell the computer it is an unsigned int, the bit on the left will be interpreted as a 'real' number, so : 138

If you want to do that, you can create your own class

You have the right idea, but that's not actually how negative numbers are represented, generally.

See: http://en.wikipedia.org/wiki/Two's_complement

What the actual value will be therefore depends on the size of the int. For 8 bits, the representation of -10 would be: 11110110 (or 246 unsigned).


I know, I just though the "sign" method would be easier to explain (and understand) than the two's complement one.
"i've made some empty promises in my life, but hands down that was the most generous" - Michael Scott
Abductedonut
Profile Blog Joined December 2010
United States324 Posts
Last Edited: 2013-05-07 22:31:30
May 07 2013 22:30 GMT
#5900
Hey guys - this isn't really a "programming/technical" question but it's about hiring and it has bothered me for some time now.

I've been looking for software engineering internships/jobs as I'm almost out of school and I'm royally confused about some of the job requirements these employers have.

Most if not all job requirements that I look at for non-huge tech companies often want expertise in a certain language, including internships. Are these requirements bullshit/just there for show?

Companies like Microsoft, Amazon, Google, etc etc generally don't list specific language requirements. They'll say experience with C/C++/Java or other object oriented languages which to me, says they want someone who knows both theoretical software engineering as well some practical application of it. I ran into an undergraduate internship positions who wanted Erlang as a language requirement. This is how I figure: if you know how to program in general then you basically know every language (excluding different paradigms, bear with me here). To truly claim to know and understand a language then you must know the dark corners of it, and that takes YEARS of programming experience. Do these companies honestly expect me to have spent years learning Erland - a language I and most people haven't heard of? If they don't, then why the hell even bothering listing it as a requirement? If I know one language I can find my way around it.

The same issues pops up with the J2SE and J2EE. I know Java - isn't that enough? I understand J2EE is more for enterprise software but having theoretical experience in distributed systems would be more important than knowing the J2EE dialect of the language, right? Why bother listing it as a requirement?

And another thing - why bother listing language requirements at all? They're pointless. Software Engineering is not about programming, it's about the engineering behind the design of software. That's the job I'm applying for, C# just happens to be the tool I use to implement my design. I'm just so lost.
Prev 1 293 294 295 296 297 1032 Next
Please log in or register to reply.
Live Events Refresh
CranKy Ducklings
10:00
Sea Duckling Open #140
CranKy Ducklings84
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 198
Railgan 42
Creator 14
StarCraft: Brood War
Sea 6694
Horang2 4040
GuemChi 1668
Jaedong 862
actioN 292
Mini 259
BeSt 247
Killer 230
Soma 220
EffOrt 210
[ Show more ]
Rush 169
Mind 92
Hyun 87
Bonyth 72
ToSsGirL 69
Backho 61
sas.Sziky 33
JYJ28
PianO 27
zelot 24
Aegong 14
soO 12
Terrorterran 10
Sacsri 9
sorry 9
HiyA 8
Dota 2
Gorgc6041
singsing2292
qojqva1772
Dendi596
XcaliburYe214
BananaSlamJamma90
Heroes of the Storm
Khaldor209
Other Games
B2W.Neo1194
Sick244
Lowko237
Fuzer 197
Hui .121
XaKoH 81
nookyyy 54
MindelVK19
Organizations
StarCraft 2
WardiTV622
Counter-Strike
PGL242
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 67
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2050
League of Legends
• Stunt689
• HappyZerGling113
Upcoming Events
IPSL
4h 5m
dxtr13 vs OldBoy
Napoleon vs Doodle
LAN Event
4h 5m
Lambo vs Clem
Scarlett vs TriGGeR
ByuN vs TBD
Zoun vs TBD
BSL 21
6h 5m
Gosudark vs Kyrie
Gypsy vs OyAji
UltrA vs Radley
Dandy vs Ptak
Replay Cast
9h 5m
Sparkling Tuna Cup
20h 5m
WardiTV Korean Royale
22h 5m
LAN Event
1d 1h
IPSL
1d 4h
JDConan vs WIZARD
WolFix vs Cross
BSL 21
1d 6h
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
1d 19h
[ Show More ]
Wardi Open
1d 22h
WardiTV Korean Royale
2 days
Replay Cast
3 days
Kung Fu Cup
3 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
4 days
The PondCast
4 days
RSL Revival
4 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
4 days
WardiTV Korean Royale
4 days
RSL Revival
5 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
5 days
CranKy Ducklings
6 days
RSL Revival
6 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 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.