Fruit
- Apple
- Orange
Vegetable
- Onion
- Carrot
Obviously categories shouldn't be selectable. I've searched Google but I wasn't lucky to find anything useful about JComboBox with groups. Does Java even support groups/categories?
| Forum Index > General Forum |
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. | ||
|
Shield
Bulgaria4824 Posts
August 04 2014 14:03 GMT
#10121
Fruit - Apple - Orange Vegetable - Onion - Carrot Obviously categories shouldn't be selectable. I've searched Google but I wasn't lucky to find anything useful about JComboBox with groups. Does Java even support groups/categories? | ||
|
nunez
Norway4003 Posts
August 04 2014 15:29 GMT
#10122
it silently strangled itself at the callsite of functions that used alias templates for convenience in SFINAE-induced static polymorphism! update 2 had broken alias templates (how do you break something that simple? something something default template parameter). at the time i thought the updated compiler was calling me out, that i was out of my league. what a relief to find out it simply couldn't keep up with my fly std::moves. another battle i recently had with vs 2013 was over a non-conforming extension that allowed a senior programmer to write something akin to: struct t{};due to compatability concerns with some old windows code. it does not emit warning unless you're on /W4 and no error since extensions are turned on by default.the time in purgatory between raising concerns about the code we were being showed, being told that 'no, this works completely fine, what are you talking about', looking like a fool on the scrum floor, and finding out that the compiler was once again attempting mutiny made my eventual self-righteous triumph even sweeter. gcc, how i miss you. #humblebrag | ||
|
Arnstein
Norway3381 Posts
August 04 2014 16:59 GMT
#10123
| ||
|
nunez
Norway4003 Posts
August 04 2014 17:07 GMT
#10124
good prac for me too. gotta get familiar. | ||
|
Arnstein
Norway3381 Posts
August 04 2014 20:28 GMT
#10125
Luckily in the company I worked for you could use whatever you wanted. I've become a Vim master, MOAHHAHA | ||
|
nunez
Norway4003 Posts
August 04 2014 22:14 GMT
#10126
powel in trondheim actually. my vim skills have stagnated lately, but getting familiar with regexps as i am utilizing flex / bison. | ||
|
Arnstein
Norway3381 Posts
August 04 2014 22:16 GMT
#10127
![]() | ||
|
nunez
Norway4003 Posts
August 04 2014 22:30 GMT
#10128
does anyone use m4 or any other preprocessing language (separate from the native one) in their deving? some input on its uses and usefulness would be appreciated. | ||
|
Shield
Bulgaria4824 Posts
August 05 2014 04:10 GMT
#10129
Frankly, his bite at OOP makes me think he is that retarded. Yes, Linus is a legend but his opinions aren't. | ||
|
tofucake
Hyrule19173 Posts
August 05 2014 04:15 GMT
#10130
| ||
|
Nesserev
Belgium2760 Posts
August 05 2014 05:21 GMT
#10131
| ||
|
Blisse
Canada3710 Posts
August 05 2014 09:22 GMT
#10132
| ||
|
Shield
Bulgaria4824 Posts
August 05 2014 10:01 GMT
#10133
On August 05 2014 18:22 Blisse wrote: I think void pointers are the coolest thing ever TBH much more fun than "Objects" The void pointer, also known as the generic pointer, is a special type of pointer that can be pointed at objects of any data type! A void pointer is declared like a normal pointer, using the void keyword as the pointer’s type: 1 void *pVoid; // pVoid is a void pointer Erm, whether you write your template stuff in C++ or Java generics is kind of the same compared to void pointers. I don't see what the big deal is. Generics is actually a smarter concept because you (hopefully) don't have to cast your stuff like in the case of C. | ||
|
Blisse
Canada3710 Posts
August 05 2014 10:20 GMT
#10134
| ||
|
bangsholt
Denmark138 Posts
August 05 2014 16:01 GMT
#10135
On August 05 2014 13:10 darkness wrote: I know Linus Torvalds' comment about C++ has been brought up many times, yet I know almost nothing about C++. But isn't he too extreme? I've heard C++ has a bunch of everything but I'm sure if there are certain programming standards within an organisation, then even that could be more or less avoided. Frankly, his bite at OOP makes me think he is that retarded. Yes, Linus is a legend but his opinions aren't. Try to learn C++, it's a carwreck of a language because you have three different ISOs, you have the C++11, C++03, C++98 which all strives not to introduce any major code breaking, meaning that you have 3 distinct ways of programming in C++ that are all valid, correct and will compile as expected, which unless as you say, you have a coding standard in place, everyone will use what they are most familiar with. It's only natural to be wanting to use the newest features, which is why quite a few C++ codebases are scattered across all of standards. So basically you *need* to remove parts of the language that you don't want, in order to have a subset of the language that is possibly to understand thoroughly. With regards to the OOP comment, why do you think he's retarded? No matter how you look at it, you do lose *some* (not much, but some) performance by using OOP (i.e. Java/C# is ~5-10% slower in most cases), so when performance is the most important thing, you go with C on Linux - which was one of the main criteria that was behind the decision not to use Monotone when the big switch of version control software happened with the linux kernel. | ||
|
Ninoah
7 Posts
August 05 2014 16:03 GMT
#10136
I've been thinking about external sorting, but are there any other approaches to this problem? | ||
|
spinesheath
Germany8679 Posts
August 05 2014 16:36 GMT
#10137
On August 06 2014 01:01 bangsholt wrote: With regards to the OOP comment, why do you think he's retarded? No matter how you look at it, you do lose *some* (not much, but some) performance by using OOP (i.e. Java/C# is ~5-10% slower in most cases), so when performance is the most important thing, you go with C on Linux - which was one of the main criteria that was behind the decision not to use Monotone when the big switch of version control software happened with the linux kernel. When performance is the most important thing, you sometimes use Fortran. You might use a limited amount of ASM. C is not the end all be all of performance. Also performance is never the most important thing, you have to be able to afford the programmer time needed to achieve sufficient performance and correctness. With a given amount of resources, you might achieve far better performance in non-C languages. On August 06 2014 01:03 Ninoah wrote: So I came a across a problem where someone tries to write a program that reads a Unicode text file of unlimited size and unlimited words. The end result of it would be outputting a text file with everything sorted. I've been thinking about external sorting, but are there any other approaches to this problem? Maybe checking out how databases sort datasets too large to fit into memory would be a good starting point. How large is "unlimited size", anyways? Are we talking "unlimited, but in the range of 1GB or less", or "as large as physically possible"? | ||
|
bangsholt
Denmark138 Posts
August 05 2014 17:07 GMT
#10138
On August 06 2014 01:36 spinesheath wrote: Show nested quote + On August 06 2014 01:01 bangsholt wrote: With regards to the OOP comment, why do you think he's retarded? No matter how you look at it, you do lose *some* (not much, but some) performance by using OOP (i.e. Java/C# is ~5-10% slower in most cases), so when performance is the most important thing, you go with C on Linux - which was one of the main criteria that was behind the decision not to use Monotone when the big switch of version control software happened with the linux kernel. When performance is the most important thing, you sometimes use Fortran. You might use a limited amount of ASM. C is not the end all be all of performance. Also performance is never the most important thing, you have to be able to afford the programmer time needed to achieve sufficient performance and correctness. With a given amount of resources, you might achieve far better performance in non-C languages. It of course depends on the application. Now I was talking about Git - as the comment linked to is about it - and there's of course languages that can be just as performance tuned as C, heck Mercurial is written in Python and is as fast as Git (of course they cheat a bit by using a lot of C extensions, but details), but I don't think you would want to write Git or Mercurial in FORTRAN - it's after all build to do calculations, not to write a DCVS :o) While you can "easily" get better performance than C in specific cases (See: Heavy calculation -> FORTRAN), in the general case, which language can you tune to run faster than C? Please be aware, I'm not saying that writing C is a magic fix to get slow code to run fast, bad algorithms will be bad regardless of your language choice ![]() (In the professional part I do C - but that's exclusively for embedded. For desktops I use Java/C#) | ||
|
Nesserev
Belgium2760 Posts
August 05 2014 17:37 GMT
#10139
| ||
|
tofucake
Hyrule19173 Posts
August 05 2014 17:54 GMT
#10140
And performance is usually not significant enough a factor to say "C always over C++". Hell, Northrup Grumman uses loads of .Net and they have a lot of stuff that relies on performance (e.g. Predator drones). Torvalds falls into the category of fantatic, in the true sense of the word. He sees languages as a way of life, not as a tool. Different tools for different jobs. | ||
| ||
StarCraft 2 StarCraft: Brood War Dota 2 League of Legends Other Games Organizations
StarCraft 2 • Berry_CruncH91 StarCraft: Brood War• practicex • AfreecaTV YouTube • intothetv • Kozan • IndyKCrew • LaughNgamezSOOP • Migwel • sooper7s League of Legends |
|
The PondCast
OSC
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
Korean StarCraft League
CranKy Ducklings
WardiTV 2025
SC Evo League
BSL 21
Sziky vs OyAji
Gypsy vs eOnzErG
OSC
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
[ Show More ] WardiTV 2025
OSC
BSL 21
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
Wardi Open
StarCraft2.fi
Monday Night Weeklies
Replay Cast
WardiTV 2025
StarCraft2.fi
PiGosaur Monday
StarCraft2.fi
Tenacious Turtle Tussle
|
|
|