Initialization lists seem a little more awkward with the mentioned closely related values though. Turns out I intuitively used .Setting() only in situations where I had that kind of values.
The Big Programming Thread - Page 348
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. | ||
spinesheath
Germany8679 Posts
Initialization lists seem a little more awkward with the mentioned closely related values though. Turns out I intuitively used .Setting() only in situations where I had that kind of values. | ||
Deleted User 101379
4849 Posts
On August 27 2013 02:28 tapuchi wrote: Hello , i'm currently re-writing an image processing program i created using vc++ and matlab in c# and trying to implement the object-oriented paradigms correctly . My previous implementation was my first real and big programming experience and after spending the summer reading Design Patterns , Code Complete and Object Roles and Responsibilites i realized how bad my code structure/design/implementation was ![]() The thing is i just cant decide how to do things properly even after spending alot of time at stack overflow or just googling stuff. For example , i got some algorithms doing the same work on the images and thought of implementing the strategy pattern but then again i figured why complicate it and not just make a static class with each algorithm as a different method ( System.Math style ) . Another problem is how to pass each algorithms settings to it while at the same time avoiding a huge parameter list . A Parameter Object just moves the parameter list from the algorithm to the structure constructor , a builder pattern seems abit too much for it because the object needs to be bound to a control that changes the settings values . How does a novice actually make these decisions ? Even the simple creation of the settings control is driving me mad , do i give the settings object a .ToControl() method ( is it its Responsibility to make a view of itself or not? ) or do i pass the object as an argument to the SettingsControl constructor ( does the control need to know about the settings object implementation ? ).All in all i think i just mashed up all that knowledge without really understanding it im afraid . Thanks for any help/opinion/advice beforehand . I have written an example for a structure that i would consider decent. There are ways to optimize it with reflection, automatically generated settings dialogs and all that stuff but i kept it simple and maintainable. Basically it consists of the filters, the settings dialogs that create the filters and the main form that uses the settings dialogs. BlurFilter and ResizeFilter are two examples for filters that basically just do something to the image. They could as well be "ComplexImageFilterThatDoesADozenThings" classes but i kept it simple for the example. The ApplyTo method defined in the IFilter interface that each filter implements is where the image processing magic happens. The filters don't know about the settings controls and are completely independent of the rest of the program (apart from the IFilter interface). BlurFilterSettingsControl and ResizeFilterSettingsControl both define how the settings dialogs look. Simply going through all properties and generating a control just creates a messy UI, so defining custom UserControls allows you to make it pretty. Both controls inherit ISettingsControl which defines an event each SettingsControl raises when the "apply filter" button is clicked and that returns an IFilter. Each SettingsControl is basically a factory for an IFilter. The MainForm is simply a drop down of all the SettingsControls and selecting one puts it into a container where you can then modify the settings and click the "Apply filter" button. MainForm also connects to the "ApplyFilterClicked" event and simply calls IFilter.ApplyTo() on whatever that event passes to it and doesn't care what the filter exactly does. It's a very simplified example but it should give you a good base on how to proceed. | ||
tapuchi
Greece7 Posts
| ||
Rollin
Australia1552 Posts
On August 27 2013 05:33 Morfildur wrote: I have written an example for a structure that i would consider decent. There are ways to optimize it with reflection, automatically generated settings dialogs and all that stuff but i kept it simple and maintainable. Basically it consists of the filters, the settings dialogs that create the filters and the main form that uses the settings dialogs. BlurFilter and ResizeFilter are two examples for filters that basically just do something to the image. They could as well be "ComplexImageFilterThatDoesADozenThings" classes but i kept it simple for the example. The ApplyTo method defined in the IFilter interface that each filter implements is where the image processing magic happens. The filters don't know about the settings controls and are completely independent of the rest of the program (apart from the IFilter interface). BlurFilterSettingsControl and ResizeFilterSettingsControl both define how the settings dialogs look. Simply going through all properties and generating a control just creates a messy UI, so defining custom UserControls allows you to make it pretty. Both controls inherit ISettingsControl which defines an event each SettingsControl raises when the "apply filter" button is clicked and that returns an IFilter. Each SettingsControl is basically a factory for an IFilter. The MainForm is simply a drop down of all the SettingsControls and selecting one puts it into a container where you can then modify the settings and click the "Apply filter" button. MainForm also connects to the "ApplyFilterClicked" event and simply calls IFilter.ApplyTo() on whatever that event passes to it and doesn't care what the filter exactly does. It's a very simplified example but it should give you a good base on how to proceed. I'm curious, how long did that take you to make? | ||
Deleted User 101379
4849 Posts
On August 27 2013 23:07 Rollin wrote: I'm curious, how long did that take you to make? About 15 minutes pure programming time, mostly because i followed a different, more complex approach first but then decided to scrap it and go a simple route. The total time was maybe 30 minutes because i was watching some youtube videos on the second screen and was eating dinner while writing it. C#, .NET and Visual Studio really make development fast. | ||
sob3k
United States7572 Posts
Making very basic Div site frame. All it is is two centered containers, then a heading, a left navbar, and now a black box. I'd like the black box to go in the blue heading. HTML: + Show Spoiler + <!DOCTYPE html> CSS: + Show Spoiler +
Super simple. When I display it it look just like I would expect: ![]() However, If I try to move the black div inside the blue div, this happens. ![]() Why is the green moving like that? even if I just move the black div in between the blue and the green: ![]() The result is this: ![]() Why isn't it appearing between them? Whats going on here? | ||
nunez
Norway4003 Posts
| ||
Yoshi-
Germany10227 Posts
You don't close the <div> Tag, but open another one | ||
sob3k
United States7572 Posts
On August 28 2013 08:15 Yoshi- wrote: <div id= "blacksquare"><div> You don't close the <div> Tag, but open another one rofllol, whoops haha I patched over the whole issue with relative positioning, now it implodes when I close that div. Guess i'll just start over :D | ||
3FFA
United States3931 Posts
On August 28 2013 10:15 sob3k wrote: rofllol, whoops haha I patched over the whole issue with relative positioning, now it implodes when I close that div. Guess i'll just start over :D Hehe. It comes with the learning and experimenting part of any language. ![]() Thanks for the laugh though. | ||
spinesheath
Germany8679 Posts
| ||
Samsa
Germany72 Posts
On August 28 2013 15:23 spinesheath wrote: Can't you check syntactical correctness of html on W3C? Or where was it? You can, with the W3C Validator: http://validator.w3.org/ Always check your site after you are finished, non clean code is a sin ![]() | ||
obesechicken13
United States10467 Posts
Eg. This guy made one: http://www.mattdempsey.com/ There are a few more links on this site:http://www.lessannoyingsoftware.com/resources/Programmer_Portfolio Considering making one, but it'd take like 2 hours+ to make an ugly one. That's like 2 LoL games. On the other hand, I think when an interviewer looks at a resume they just think that they can't trust a resume unless they can see the work. | ||
Deleted User 101379
4849 Posts
On August 29 2013 05:19 obesechicken13 wrote: Question: When you guys make a personal website, do you include demos of all the things you've learned in the past? Eg. This guy made one: http://www.mattdempsey.com/ There are a few more links on this site:http://www.lessannoyingsoftware.com/resources/Programmer_Portfolio Considering making one, but it'd take like 2 hours+ to make an ugly one. That's like 2 LoL games. On the other hand, I think when an interviewer looks at a resume they just think that they can't trust a resume unless they can see the work. If you want to get employed, the more you can show, the better, and if it even looks pretty, even better. It just depends on what you want to do with your personal website. | ||
Blisse
Canada3710 Posts
But your personal website can be absolutely whatever you want. You can just have a section off to the side saying, "Previous Projects" with a page that lists them, or with pictures, or an interactive portion. But it's not a deal breaker if you can't show your work online. It's just a matter of, if a person with the exact same credentials as you applies and it's down between you two and the other guy shows his/her work, then he'll probably have an edge. But this never happens so don't fret about it. I would show my work for the fun of showing my work. on a side note, i hate learning android development so much. why is it so complicated. ugh. having power sucks. :3 | ||
Manit0u
Poland17277 Posts
On August 28 2013 08:07 sob3k wrote: CSS/HTML Problem Making very basic Div site frame. All it is is two centered containers, then a heading, a left navbar, and now a black box. I'd like the black box to go in the blue heading. HTML: + Show Spoiler + <!DOCTYPE html> CSS: + Show Spoiler +
+ Show Spoiler + Why isn't it appearing between them? Whats going on here? Dude... + Show Spoiler [HTML] +
+ Show Spoiler [CSS] +
Result: ![]() Is this what you wanted? It would appear so from your post. It could probably be made a lot cleaner but I did it the dirty way that took just a couple of minutes of my precious time... Edit: Just noticed you wanted blue header in the pink container. Here's a version doing just that: + Show Spoiler [HTML] +
+ Show Spoiler [CSS] +
| ||
KurtistheTurtle
United States1966 Posts
I'll be pursuing a job, would an employer be likely to provide me with a laptop? edit: fleshed out my question - 13'' screen preferred - matte + 1920 x 1080 screen if possible - high powered dream machine OR -refurbished upgradable older macbook pro or something with a lot of punch would do - cheaper "used civic" kind of laptop main uses would be intelliJ idea for sure possibly all the .net development stuff from dreamspark (if I look into it) | ||
phar
United States1080 Posts
a lot of employers will provide you with laptops, but it does depend on the employer | ||
Teim
Australia373 Posts
Anyway, thanks for your time. | ||
sob3k
United States7572 Posts
I want a div to start somewhere midpage and go all the way to the edge of the page in one direction. Like the blue box in pic below: ![]() How do I do this? | ||
| ||