• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:59
CEST 13:59
KST 20:59
  • 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: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Chinese SC2 server to reopen; live all-star event in Hangzhou17Weekly Cups (Oct 13-19): Clem Goes for Four2BSL Team A vs Koreans - Sat-Sun 16:00 CET7Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)81
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" 5.0.15 Patch Balance Hotfix (2025-10-8) Weekly Cups (Oct 13-19): Clem Goes for Four Chinese SC2 server to reopen; live all-star event in Hangzhou Weekly Cups (March 17-23): Clem Bounces Back
Tourneys
Tenacious Turtle Tussle RSL Season 3 Qualifier Links and Dates $1,200 WardiTV October (Oct 21st-31st) SC2's Safe House 2 - October 18 & 19 INu's Battles #13 - ByuN vs Zoun
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
BW General Discussion SnOw's Awful Building Placements vs barracks BSL Team A vs Koreans - Sat-Sun 16:00 CET Is there anyway to get a private coach? BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues 300$ 3D!Community Brood War Super Cup #4 [ASL20] Semifinal B Azhi's Colosseum - Anonymous Tournament
Strategy
Current Meta BW - ajfirecracker Strategy & Training Roaring Currents ASL final [I] Funny Protoss Builds/Strategies
Other Games
General Games
Nintendo Switch Thread Path of Exile Stormgate/Frost Giant Megathread Dawn of War IV ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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 The Chess Thread Men's Fashion Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023 Formula 1 Discussion NBA General 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
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Rocket League: Traits, Abili…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1331 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 States17256 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
Hyrule19144 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
Hyrule19144 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
The PondCast
10:00
Episode 68
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko332
StarCraft: Brood War
actioN 2827
Hyuk 2071
GuemChi 1905
Bisu 862
ZerO 784
Jaedong 759
firebathero 462
Hyun 407
Mini 308
Stork 300
[ Show more ]
hero 272
BeSt 246
Light 194
Pusan 156
Last 148
ggaemo 146
EffOrt 143
Barracks 120
Larva 115
zelot 110
ToSsGirL 92
Shine 92
Rush 76
Mind 50
TY 44
Sea.KH 34
sorry 32
Free 25
Sharp 22
Shinee 19
Icarus 17
soO 15
Noble 15
Sexy 14
Yoon 14
Terrorterran 13
HiyA 11
Sacsri 10
Dota 2
XaKoH 290
BananaSlamJamma193
XcaliburYe161
Dendi160
canceldota30
League of Legends
JimRising 445
Counter-Strike
olofmeister2658
zeus641
x6flipin473
allub210
oskar144
markeloff117
byalli71
edward37
Super Smash Bros
Westballz34
Other Games
summit1g6569
singsing1904
B2W.Neo957
crisheroes317
Mew2King48
Trikslyr13
Organizations
StarCraft: Brood War
Kim Chul Min (afreeca) 966
Counter-Strike
PGL224
Other Games
BasetradeTV144
StarCraft 2
WardiTV88
StarCraft: Brood War
UltimateBattle 52
lovetv 10
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• LUISG 35
• StrangeGG 23
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV601
League of Legends
• Jankos2081
• Lourlo451
Upcoming Events
OSC
2m
WardiTV Invitational
23h 2m
Online Event
1d 4h
RSL Revival
1d 14h
RSL Revival
1d 22h
WardiTV Invitational
1d 23h
OSC
2 days
SKillous vs goblin
Spirit vs GgMaChine
ByuN vs MaxPax
Afreeca Starleague
2 days
Snow vs Soma
Sparkling Tuna Cup
2 days
WardiTV Invitational
3 days
[ Show More ]
CrankTV Team League
3 days
RSL Revival
3 days
Wardi Open
4 days
CrankTV Team League
4 days
Replay Cast
4 days
WardiTV Invitational
5 days
CrankTV Team League
5 days
Replay Cast
5 days
CrankTV Team League
6 days
Replay Cast
6 days
The PondCast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
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
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 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.