• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 18:29
CEST 00:29
KST 07:29
  • 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 (2026) - RO4 & Finals Preview4[ASL21] Ro4 Preview: On Course12Code S Season 1 - RO8 Preview7[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13
Community News
Code S Season 1 (2026) - RO8 Results2Weekly Cups (May 4-10): Clem, MaxPax, herO win1Maestros of The Game 2 announcement and schedule !11Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event12
StarCraft 2
General
Team Liquid Map Contest #22 - The Finalists Code S Season 1 (2026) - RO4 & Finals Preview Code S Season 1 (2026) - RO8 Results Code S Season 1 (2026) - RO12 Results MaNa leaves Team Liquid
Tourneys
GSL Code S Season 1 (2026) Sparkling Tuna Cup - Weekly Open Tournament KSL Week 89 2026 GSL Season 2 Qualifiers Maestros of The Game 2 announcement and schedule !
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Mutation # 526 Rubber and Glue Mutation # 525 Wheel of Misfortune The PondCast: SC2 News & Results Mutation # 524 Death and Taxes
Brood War
General
vespene.gg — BW replays in browser Data needed BGH Auto Balance -> http://bghmmr.eu/ Pros React to: TvT Masterclass in FlaSh vs Light BW General Discussion
Tourneys
[ASL21] Semifinals B [BSL22] RO8 Bracket Stage + Another TieBreaker [ASL21] Ro8 Day 4 Escore Tournament StarCraft Season 2
Strategy
Muta micro map competition Fighting Spirit mining rates [G] Hydra ZvZ: An Introduction Simple Questions, Simple Answers
Other Games
General Games
Warcraft III: The Frozen Throne Nintendo Switch Thread Path of Exile Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread YouTube Thread Russo-Ukrainian War Thread UK Politics Mega-thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
Travel Agencies vs Online Booking Platforms The Automated Ban List
Blogs
How EEG Data Can Predict Gam…
TrAiDoS
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1598 users

The Big Programming Thread - Page 229

Forum Index > General Forum
Post a Reply
Prev 1 227 228 229 230 231 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.
MiyaviTeddy
Profile Blog Joined October 2008
Canada697 Posts
January 10 2013 04:31 GMT
#4561
I have a quick question about boolean expression:

! ( True || False) evaluates to False.
! ( ( true || false) && false ) evaluates to True.

But why is that?

I was reading jumping into C++ and there were some examples of boolean expressions. Can someone help me out?
Aiyeeeee
Craton
Profile Blog Joined December 2009
United States17282 Posts
January 10 2013 04:36 GMT
#4562
(true or false) = true
not true = false

(true or false) = true
(true) && false = false
not false = true
twitch.tv/cratonz
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
January 10 2013 05:19 GMT
#4563
On January 10 2013 13:31 MiyaviTeddy wrote:
I have a quick question about boolean expression:

! ( True || False) evaluates to False.
! ( ( true || false) && false ) evaluates to True.

But why is that?

I was reading jumping into C++ and there were some examples of boolean expressions. Can someone help me out?

! ( ( true || false) && false ) evaluates to True.
>>
! ( ( true || false) && false )
>>
! ( ( true) && false )
>>
! ( false )
>>
true
tofucake
Profile Blog Joined October 2009
Hyrule19213 Posts
January 10 2013 05:25 GMT
#4564
karnaugh maps are really awesome once you learn how to work with them. Boolean logic is pretty simple. Take a look at the laws specifically. Keep in mind that ∧ is &&, ∨ is ||, and ¬ is ! and it's pretty straightforward.

http://en.wikipedia.org/wiki/Boolean_algebra

Liquipediaasante sana squash banana
tec27
Profile Blog Joined June 2004
United States3702 Posts
Last Edited: 2013-01-10 06:49:48
January 10 2013 06:48 GMT
#4565
On January 09 2013 23:28 fabiano wrote:
Hello, I've found myself coding a lot of PHP lately and I've been wondering what is a better practice:

[1] Leave all the PHP processing code before the <html> and postpone the print/echo of the results of that processing
+ Show Spoiler +
[image loading]

or
[2] Leave the PHP processing entangled in the html as needed
+ Show Spoiler +
[image loading]


Note that the example code is simple, but I mean what would be preffered when we are dealing with much larger scripts?

Personally I find [1] to be much more readable, while theorically [2] should be more efficient. Is there a coding standard or do programmers just code as they please?

R1CH, by your wizardry powers, if you are reading this, what do you recommend?

Ideally you should separate the complex logic out from the display logic. You do the complex logic in its own part, build a set of data to pass to the display part, then in the display part you intertwine the *simple* logic with the display. This gives you an MVCish setup that will likely be easier to maintain and understand (and in this case, example 1 is basically doing that). As for what R1CH would recommend, he'd probably recommend not using PHP
Can you jam with the console cowboys in cyberspace?
Azerbaijan
Profile Blog Joined January 2010
United States660 Posts
January 10 2013 09:45 GMT
#4566
Where do I start if I want to learn emacs while being completely new to linux?
I hate VS 2012 and windows in general lately.
artynko
Profile Joined November 2010
Slovakia86 Posts
January 10 2013 10:11 GMT
#4567
You can pick any EMACs tutorial from google for the basic stuff (the first search hit is decent), but the power of emacs comes with all the plugins which depend on the language you want to use. Once you understand buffers and remember the shortcuts you should be set to go.
However I would not recommend to use EMACs unless you really have to (i.e. you do erlang) Eclipse is a far better option in most cases or vim is sufficient for the extra trivial stuff
Nimelrian
Profile Joined March 2011
Germany142 Posts
January 10 2013 12:31 GMT
#4568
On January 09 2013 08:51 NukeTheBunnys wrote:
Im looking to do some c++\openGL game related programming. Does anyone have any suggestions for a cross platform library (or libraries) that can do windowing, input, and sound. And before someone says I should use an engine like Unity, or a different language - half the point of doing this is I'm interested in the low level game systems like managing the input/threading/audio streams

Windows APIs (not multi-platform, but oh well - I can encapsulate the code anddeal with porting the code if I ever want to port it)
SDL - started working with it but had some troubles getting it set up on windows and visual studio, but otherwise it looks like it would meet all my desires.
Allegro - can be used with openGL, but the documentation of using allegro with openGL (2d or 3d) is pretty sparse

I have also considered using openAL for 3d positional sound, but that will likely come after I get some of the other systems working

Anyone have other suggestions, or experience with the mentioned libraries.


Check out the SFML http://www.sfml-dev.org/ (Use 2.0, not 1.6, it's basically outdated)
tec27
Profile Blog Joined June 2004
United States3702 Posts
January 11 2013 05:11 GMT
#4569
On January 10 2013 19:11 artynko wrote:
You can pick any EMACs tutorial from google for the basic stuff (the first search hit is decent), but the power of emacs comes with all the plugins which depend on the language you want to use. Once you understand buffers and remember the shortcuts you should be set to go.
However I would not recommend to use EMACs unless you really have to (i.e. you do erlang) Eclipse is a far better option in most cases or vim is sufficient for the extra trivial stuff

I'm not sure why you would suggest that emacs isn't worth it but then suggest he use vim for 'trivial stuff'. Vim and emacs are essentially on par in terms of both power and learning curve, and I wouldn't suggest either of them for trivial editing (unless, of course you've already invested time to learn them for other reasons, in which case you probably already use one of them for everything anyway ).

As for learning resources for emacs, I can't really help much as I use vim, but I just want to say that its well worth the time investment to learn vim or emacs
Can you jam with the console cowboys in cyberspace?
phar
Profile Joined August 2011
United States1080 Posts
January 11 2013 07:36 GMT
#4570
Either one is a godsend when you end up having to code something quick over a spotty remote connection.
Who after all is today speaking about the destruction of the Armenians?
Frigo
Profile Joined August 2009
Hungary1023 Posts
January 11 2013 17:21 GMT
#4571
On January 11 2013 16:36 phar wrote:
Either one is a godsend when you end up having to code something quick over a spotty remote connection.

Or you know, you could just code it on localhost and upload it.
http://www.fimfiction.net/user/Treasure_Chest
Chairman Ray
Profile Blog Joined December 2009
United States11903 Posts
January 11 2013 21:24 GMT
#4572
Has anyone worked with Google Maps api or any other street maps? I'm trying to create a tower defense game, but instead of making levels myself, the user will be able to select a location somewhere, and it will generate a level based off the roads (one ways and overpasses will work as intended). Has anyone had any experience with this kinda thing?
phar
Profile Joined August 2011
United States1080 Posts
January 12 2013 03:29 GMT
#4573
On January 12 2013 02:21 Frigo wrote:
Show nested quote +
On January 11 2013 16:36 phar wrote:
Either one is a godsend when you end up having to code something quick over a spotty remote connection.

Or you know, you could just code it on localhost and upload it.

Not if you're not allowed to code locally.
Who after all is today speaking about the destruction of the Armenians?
JeanLuc
Profile Joined September 2010
Canada377 Posts
January 12 2013 08:57 GMT
#4574
On January 12 2013 06:24 Chairman Ray wrote:
Has anyone worked with Google Maps api or any other street maps? I'm trying to create a tower defense game, but instead of making levels myself, the user will be able to select a location somewhere, and it will generate a level based off the roads (one ways and overpasses will work as intended). Has anyone had any experience with this kinda thing?


seems like a cool idea, but I think taking the map and interpreting it into a tower defence level should be more difficult
than learning the google maps api
If you can't find it within yourself to stand up and tell the truth-- you don't deserve to wear that uniform
ObliviousNA
Profile Joined March 2011
United States535 Posts
Last Edited: 2013-01-12 09:10:59
January 12 2013 09:08 GMT
#4575
On January 12 2013 06:24 Chairman Ray wrote:
Has anyone worked with Google Maps api or any other street maps? I'm trying to create a tower defense game, but instead of making levels myself, the user will be able to select a location somewhere, and it will generate a level based off the roads (one ways and overpasses will work as intended). Has anyone had any experience with this kinda thing?


The only way I know to access the Google Maps data is through their javascript API. In this case, you're using their API to access raster/image data rather than vector data. Hence, it would be very difficult to resolve that into some kind of Tower Defense path. It might be possible for you to grab these tiles and do static image analysis to look for white pixels and call these 'creep paths', but that's iffy at best.

A better approach is to get the vector data defining different streets. This is what OpenStreetMap provides, and it's also royalty free.

http://www.openstreetmap.org/

Complex task, but if you're serious I would take a look at their data/API
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
January 12 2013 22:38 GMT
#4576
Heya, I PMed asking for further assistance, but if anyone else here would like to take a look please feel free!
Here's the PM I sent with details


heya, im coming into more stupid problems.

everyone else is just doing a stupid no relationship 1-table database because its only worth 15 marks and you just need to make a form which adds, deletes and updates (edit) a record on the form.

but im pretty close to doing it this way..

i have a Main form, which displays the full record (items from tables Person, Email, Association, HomeNo and MobileNo). it displays all of those things at once.

however, this form suffers from a similar problem as the previous AddNewPersonDetails form, in which i had to use your trick to update the related tables alongside the "parent" Person table.

i want to be able to Update (edit) and Delete a record shown on this form, but the form gives an error message when I try this using a Wizard button (or simply try pressing delete on keyboard): "This Recordset is not updateable" (in the taskbar) or "Records can't be deleted from this form." (popup msg).

i looked at using a Query to allow a user to update a record but i doubt this is the right way to do it (and i have no idea how to turn a form into a query, if thats what you're supposed to do, but i can find out by looking up queries and how they work).

i looked at the data tab of the form's property sheet and things like (allow) Data entry and Allow edits are set to Yes.

I would be open to the idea of dumping my forms altogether if i could use a subform which displays all 5 tables info at once but the wizard only seems to give 1 subform. there is clearly a "proper" way to do what i'm doing.

Another idea is having an Edit form on which you can first select a Person and then choose to navigate to individual Email, HomeNo and MobileNo forms - which would display only those things and therefore not be screwed up by the problem - and update those individually. i think this would work but it might be unecessarily long-winded (meaning it'd take me an unecessary time to figure out because i'm clueless and would probably have to ask for help again).

the final option is to start again, make a 1-table database in 5 minutes, add the buttons with the wizard and stop wasting time on this -.-

i've uploaded the database again, remember to enable it if the warning pops up.

many thanks,

http://www.sendspace.com/file/iu09bi


TLDR - my Main form doesn't allow editing/deleting and all I want to do is add an Update and Delete button . i dont have to have a relational database to get top marks but it'd be nice to see why its not working more clearly before i move on
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
lannisport
Profile Joined February 2012
878 Posts
Last Edited: 2013-01-13 22:26:56
January 13 2013 22:26 GMT
#4577
I hope it's kosher to ask HTML related questions here. I can't figure out this seemingly simple problem where I have a div that is fixed to the bottom right of the page (where there is a shopping cart widget from WordPress). So the CSS is

#footer-cart { position:fixed; top: 93%; left: 70%; }

Now when people add an item to the cart I want it to expand vertically, since it's fixed on the bottom. I also have the cart on the non home page where it's fixed to the sidebar and when items are added it expands downwards naturally.
tec27
Profile Blog Joined June 2004
United States3702 Posts
January 13 2013 22:32 GMT
#4578
On January 14 2013 07:26 lannisport wrote:
I hope it's kosher to ask HTML related questions here. I can't figure out this seemingly simple problem where I have a div that is fixed to the bottom right of the page (where there is a shopping cart widget from WordPress). So the CSS is

#footer-cart { position:fixed; top: 93%; left: 70%; }

Now when people add an item to the cart I want it to expand vertically, since it's fixed on the bottom. I also have the cart on the non home page where it's fixed to the sidebar and when items are added it expands downwards naturally.

If you want it fixed to the bottom-right, you should probably be using the bottom and right attributes, instead of top and left, IE:
#footer-cart {
position: fixed;
bottom: 0;
right: 0;
}
Can you jam with the console cowboys in cyberspace?
lannisport
Profile Joined February 2012
878 Posts
January 13 2013 23:16 GMT
#4579
On January 14 2013 07:32 tec27 wrote:
Show nested quote +
On January 14 2013 07:26 lannisport wrote:
I hope it's kosher to ask HTML related questions here. I can't figure out this seemingly simple problem where I have a div that is fixed to the bottom right of the page (where there is a shopping cart widget from WordPress). So the CSS is

#footer-cart { position:fixed; top: 93%; left: 70%; }

Now when people add an item to the cart I want it to expand vertically, since it's fixed on the bottom. I also have the cart on the non home page where it's fixed to the sidebar and when items are added it expands downwards naturally.

If you want it fixed to the bottom-right, you should probably be using the bottom and right attributes, instead of top and left, IE:
#footer-cart {
position: fixed;
bottom: 0;
right: 0;
}


.... bottom:0; seemed to do it O_O I thought that somehow helped what I was already trying (floating each of the li elements thats dynamically added to the div and putting a clear:div at the bottom) but I took all that out and it still worked.... THANKS A MILLION.
tofucake
Profile Blog Joined October 2009
Hyrule19213 Posts
January 14 2013 00:43 GMT
#4580
clear is left, right, or both. div is not an option
Liquipediaasante sana squash banana
Prev 1 227 228 229 230 231 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 1h 31m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft259
CosmosSc2 91
Ketroc 61
SpeCial 38
UpATreeSC 35
JuggernautJason3
StarCraft: Brood War
Artosis 359
firebathero 140
Dota 2
monkeys_forever442
NeuroSwarm86
LuMiX1
League of Legends
JimRising 342
Other Games
Grubby25596
gofns16687
summit1g13252
tarik_tv9828
Liquid`RaSZi2922
FrodaN1520
B2W.Neo590
Pyrionflax173
ToD114
Livibee76
Organizations
Other Games
gamesdonequick1402
BasetradeTV123
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• musti20045 30
• Hupsaiya 26
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• imaqtpie1458
• Scarra814
Upcoming Events
OSC
1h 31m
Replay Cast
10h 31m
Monday Night Weeklies
17h 31m
Replay Cast
1d 1h
The PondCast
1d 11h
Kung Fu Cup
1d 12h
GSL
2 days
Replay Cast
3 days
GSL
3 days
WardiTV Spring Champion…
3 days
[ Show More ]
Replay Cast
4 days
Sparkling Tuna Cup
4 days
WardiTV Spring Champion…
4 days
Replay Cast
5 days
RSL Revival
5 days
Classic vs SHIN
Rogue vs Bunny
BSL
5 days
Replay Cast
6 days
Afreeca Starleague
6 days
Flash vs Soma
RSL Revival
6 days
BSL
6 days
Liquipedia Results

Completed

Escore Tournament S2: W7
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
SCTL 2026 Spring
RSL Revival: Season 5
Heroes Pulsing #1
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
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

Upcoming

YSL S3
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
WardiTV Spring 2026
2026 GSL S2
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 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.