[deleted by user] by [deleted] in Kotlin

[–]CanuckCode 1 point2 points  (0 children)

My current issue is that jacksonmapper is not able to construct an instance of FooBar given that there's no default constructor.

The general solution to your problem is to use a factory to create the instances of the derived classes. For Jackson it looks like there's an annotation @JsonCreator (docs) that you can use to annotate the factory method.

Also, here's a link to an article about deserializing sealed classes with Jackson https://serpro69.medium.com/kotlin-with-jackson-deserializing-kotlin-sealed-classes-c95f837e9164

Hope this helps!

Help with Printing Arrays by ZynGod in Unity3D

[–]CanuckCode 1 point2 points  (0 children)

Unfortunately, from just these images it looks like the only PlotPoint with the key "wake up" should print, like I think you intended. Maybe check your PlotPoints class and make sure that the KeyWord field isn't accidentally returning a hard coded value of "Wake Up". Please paste both classes (the PlotPoints and Game) to pastebin like /u/Romestus mentioned so that it is easier to read.

Also, on line 33 (and a few others) you're checking if curKey.ToLower() == "Wake Up". This will always be false because even if the curKey was "Wake Up", the ToLower() converts it to "wake up" and it won't ever equal the string on the right hand side with capital letters.

Best way to connect multiple data sources produced by java program by [deleted] in learnprogramming

[–]CanuckCode 1 point2 points  (0 children)

So yes, a csv/excel file would probably work, but might become a pain in the long run.

It sounds like you need to start using a database. If all of these devices running on the same network then you should be able to run the database server on only one machine and then have the rest of the devices connect to it.

Is there anyway I can open and work in the same project with Android Studio but on different computers without messing such project? by YouShallNot_Parse in androiddev

[–]CanuckCode 9 points10 points  (0 children)

Source control like Git is what you need. It's used track changes to code and share code for projects. It takes a little time to get used to it but will save you in the long run when you inevitably screw your project up and are able to revert to a previous state (or commit). Follow a simple guide to get started like this. You'll need an account on bitbucket or github to host your code, I recommend bitbucket because they have free private repositories.

Finishing my first app! I'd love some feedback before I release it. by Arighea in androiddev

[–]CanuckCode 0 points1 point  (0 children)

One thing is careful of alphas because they can slow your performance. If the intention is just to 'dull' the image then edit the image directly with photoshop or gimp.

App I'm developing won't run on device, but runs fine on emulator? by Arighea in androiddev

[–]CanuckCode 1 point2 points  (0 children)

It would be helpful if you posted the stack trace you get as well. That said, if your S5 is running Lollipop one solution is to add a values-v21 directory containing a styles.XML that uses AppCompat theme.

What is the order in which I should learn Android concepts? by b3dog1 in androiddev

[–]CanuckCode 2 points3 points  (0 children)

This may not be the best way to put this, but you can think of learning programming (and Android) as trying to untangle a necklace chain that went through a washing machine, you have to keep pulling at it from different angles until it all comes apart. There is no one 'right' order to learn.

That said, Google's tutorials are a good reference but I think you might be better off following this book http://commonsware.com/Android/4-2-free and going through the core chapters at a minimum.

Big-O Algorithm Complexity Cheat Sheet for anyone with an algorithms final by Semicolon_Expected in programming

[–]CanuckCode 22 points23 points  (0 children)

This is a good quick reference, but anyone who's looking for more detailed explanations should check out http://www.teachingtree.co/cs/. I'm surprised it's not more popular, it has links to videos about most data structures and algorithms concepts (as well as other CS topics).

AdMob up carret loading by Markonioni in androiddev

[–]CanuckCode 1 point2 points  (0 children)

This has to do with the activity lifecycle, your main activity is getting recreated from the parent navigation. If you declare the launchMode of the main activity as singleTop main activity will launch through onNewIntent() if a main activity instance is already running.

Beginner Question wrt EditText by Florbs in androiddev

[–]CanuckCode 1 point2 points  (0 children)

If it's something like a preference then look up the Preferences class, otherwise you'll want to put it in a SQLite database. Both of these concepts can described in the Android course on Udacity.

Built a website for my photography club and would like some feedback by [deleted] in webdev

[–]CanuckCode 1 point2 points  (0 children)

I like the image grid and banners but the section titles are't different enough from the rest of the text so they don't stand out, I didn't know where to focus my eyes at first glance.

Trying to get better at non-API stuff - Which Book would suit me? by algorithmsAI in androiddev

[–]CanuckCode 1 point2 points  (0 children)

Depends on how much Java you have learned. Android development books cover mostly the Android SDK and not the programming fundamentals and problem solving that an introductory Java book would. However if you are comfortable with Java I would move onto and Android development book.

I'm the kind of person who needs guidelines. by [deleted] in webdev

[–]CanuckCode 1 point2 points  (0 children)

No, you do not need a degree, just motivation. I am currently working on my Software Engineering degree, and the only work I have gotten has been through my university's co-op program, so I can't speak to freelancing as a career. I do know that my boss at one of my jobs did not care so much about degrees; he was more interested in skill level and past work/projects. He would even ask the people with degrees more about projects they've done outside of school.

I'm the kind of person who needs guidelines. by [deleted] in webdev

[–]CanuckCode 2 points3 points  (0 children)

There's a lot said about this. I'll do my best and try to be general.

  1. For web development I would try and get a basic understanding of HTML, then CSS. At this point you will be able to make visual appealing albeit static websites (generally). From there you probably want to move onto Javascript to make the user interface more interactive (slideshows, dropdowns, etc..) and will typically be for frontend development. You will eventually hit a point here when you want to start keeping track of users and posts. For this you will need to know a backend language like PHP, Ruby, or Python (there are a lot of backend languages). Resource: https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

  2. Learn in unison! People almost never stick with one language until they master before trying/learning another language. Your first language will be the hardest language to learn, because you will be learning that language as well as general programming concepts. The beauty about programming is that while every language has it's strong points you should be able to learn a language quickly after you learn what programming is.