• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 02:15
CET 08:15
KST 16:15
  • 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
herO wins SC2 All-Star Invitational3SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0
Community News
Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion8Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)16Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7
StarCraft 2
General
herO wins SC2 All-Star Invitational PhD study /w SC2 - help with a survey! SC2 Spotted on the EWC 2026 list? Starcraft 2 will not be in the Esports World Cup When will we find out if there are more tournament
Tourneys
$70 Prize Pool Ladder Legends Academy Weekly Open! SC2 All-Star Invitational: Jan 17-18 Sparkling Tuna Cup - Weekly Open Tournament SC2 AI Tournament 2026 $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)
Strategy
Simple Questions Simple Answers
Custom Maps
[A] Starcraft Sound Mod
External Content
Mutation # 509 Doomsday Report Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone
Brood War
General
[ASL21] Potential Map Candidates BGH Auto Balance -> http://bghmmr.eu/ Gypsy to Korea BSL Season 2025 - Full Overview and Conclusion A cwal.gg Extension - Easily keep track of anyone
Tourneys
[Megathread] Daily Proleagues [BSL21] Non-Korean Championship - Starts Jan 10 Small VOD Thread 2.0 Azhi's Colosseum - Season 2
Strategy
Current Meta Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Game Theory for Starcraft
Other Games
General Games
Nintendo Switch Thread Battle Aces/David Kim RTS Megathread Stormgate/Frost Giant Megathread Beyond All Reason Awesome Games Done Quick 2026!
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread NASA and the Private Sector Canadian Politics Mega-thread
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Navigating the Risks and Rew…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1649 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 States17274 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
Hyrule19189 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
Hyrule19189 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 2h 45m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
actioN 358
Larva 204
Light 142
Movie 99
Shine 90
Shinee 89
Hm[arnc] 74
ZergMaN 60
Nal_rA 30
EffOrt 23
[ Show more ]
Bale 18
HiyA 12
Icarus 8
NotJumperer 1
League of Legends
JimRising 777
C9.Mang0473
Other Games
summit1g6720
WinterStarcraft338
XaKoH 143
Mew2King105
Organizations
Other Games
gamesdonequick1199
StarCraft: Brood War
UltimateBattle 90
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Laughngamez YouTube
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1379
• Stunt388
Other Games
• Shiphtur209
Upcoming Events
The PondCast
2h 45m
OSC
3h 45m
Clem vs Cure
ByuN vs TBD
TBD vs Solar
MaxPax vs TBD
Krystianer vs TBD
ShoWTimE vs TBD
Big Brain Bouts
2 days
Serral vs TBD
BSL 21
3 days
BSL 21
4 days
Wardi Open
5 days
Monday Night Weeklies
5 days
WardiTV Invitational
6 days
Liquipedia Results

Completed

Proleague 2026-01-20
SC2 All-Star Inv. 2025
NA Kuram Kup

Ongoing

C-Race Season 1
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
OSC Championship Season 13
Underdog Cup #3
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025

Upcoming

Escore Tournament S1: W5
Acropolis #4 - TS4
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 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.