• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:49
CEST 09:49
KST 16:49
  • 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
Maestros of the Game: Week 1/Play-in Preview12[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy13
Community News
LiuLi Cup - September 2025 Tournaments2Weekly Cups (August 25-31): Clem's Last Straw?39Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris53Weekly Cups (Aug 11-17): MaxPax triples again!15
StarCraft 2
General
#1: Maru - Greatest Players of All Time Hire a professional forensic recovery experts Geoff 'iNcontroL' Robinson has passed away Production Quality - Maestros of the Game Vs RSL 2 Heaven's Balance Suggestions (roast me)
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris RSL: Revival, a new crowdfunded tournament series LiuLi Cup - September 2025 Tournaments Sea Duckling Open (Global, Bronze-Diamond) Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
External Content
Mutation # 489 Bannable Offense Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies
Brood War
General
ASL20 General Discussion Victoria gamers Pros React To: herO's Baffling Game BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
[IPSL] ISPL Season 1 Winter Qualis and Info! [Megathread] Daily Proleagues Is there English video for group selection for ASL Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Path of Exile Warcraft III: The Frozen Throne
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Canadian Politics Mega-thread YouTube Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! [\m/] Heavy Metal Thread
Sports
MLB/Baseball 2023 2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Collective Intelligence: Tea…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1085 users

The Big Programming Thread - Page 229

Forum Index > General Forum
Post a Reply
Prev 1 227 228 229 230 231 1031 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 States17250 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
Hyrule19083 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 States3701 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 States3701 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 States3701 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
Hyrule19083 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 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 2h 12m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Leta 906
actioN 606
Larva 542
PianO 334
Pusan 198
Zeus 183
Noble 44
yabsab 24
Purpose 19
sSak 17
[ Show more ]
Sacsri 9
zelot 3
Dota 2
The International15001
NeuroSwarm119
XcaliburYe102
Fuzer 87
League of Legends
Reynor50
Heroes of the Storm
Khaldor110
Other Games
summit1g2420
singsing562
JimRising 480
C9.Mang0267
Hui .191
Maynarde190
Mew2King25
Organizations
StarCraft: Brood War
lovetv 531
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 11 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Stunt802
Upcoming Events
CranKy Ducklings
2h 12m
RSL Revival
2h 12m
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
6h 12m
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
Maestros of the Game
9h 12m
Solar vs Bunny
Clem vs Rogue
[BSL 2025] Weekly
10h 12m
OSC
14h 12m
RSL Revival
1d 2h
Cure vs Bunny
Creator vs Zoun
Maestros of the Game
1d 9h
Maru vs Lambo
herO vs ShoWTimE
BSL Team Wars
1d 11h
Team Hawk vs Team Sziky
Sparkling Tuna Cup
2 days
[ Show More ]
Monday Night Weeklies
2 days
The PondCast
5 days
Online Event
6 days
BSL Team Wars
6 days
Team Bonyth vs Team Dewalt
BSL Team Wars
6 days
Liquipedia Results

Completed

Proleague 2025-09-02
SEL Season 2 Championship
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
Chzzk MurlocKing SC1 vs SC2 Cup #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL Polish World Championship 2025: Warsaw LAN
BSL Season 21
BSL 21 Team A
EC S1
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
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.