Skip to main content

Posts

Showing posts from May, 2020

Unity simulation shell

    Simulation shell built from Unity. Players can plan how many stations(milk tea) wanted and the number of workers(reader). When a worker is attached to a station, the sales increase and also the pressure. When detached the worker from the station, the pressure decreases.       Now is only the shell. Game logic is illogical. But the following steps are game recording at server-side and simple report. Better game logic also depends on accumulated effect. Then return back to game design. Project development is a looping circle. Further development needs other parts and accumulation of usage. Actually, the original idea of this simulation game is for training. Games explain experience sometimes better than lecture or communication. But the investment costs more, of course.       Here are some notes deserve recording.  point tracking  UI elements depends on event queue. Game content depends more on overall scanning. Event object will automatically generated when deploy event actions (i.

Unity (mouse & clone)

Squeezed out some time to move forward a little.  No. I'm not creating a game, but a simulator, trying to solve currently encountered problem.  How could you tell someone the time management is harmful, if the culture of environment is "the superior knows the all"? I knew this is far-fetched. And hopefully I soon need not to worry about it, but giving this out as a gift.  Useful function: public void OnMouseUp()     {         if (!bMouseDown) return;         //keep it simple. just return if irrelevant         bMouseDown = false;         if (id != 0)         {             origin = transform.position;             return;         }         //if the genuin, make clone.          Vector3 pos = Input.mousePosition;         pos = Camera.main.ScreenToWorldPoint(pos);         pos.z = origin.z;         if (pos.x > Boundary.x || pos.y < Boundary.y)         {             stationact newob = Instantiate(this);             newob.id = ++idMax;             newob.transform.position

Unity 2D game connects to Bookmk REST

Yeah~~~!! I collect the last piece of my puzzle!!  I used to say I like C and Java, but just don't know what to do with it. Python is my new collection, I'm looking for good data to try its scientific libraries. For Java, I got Spring server. Finally I got C on Unity! Games got talent on dumping garbage (just kidding). It's a great playground! 

Bookmark service (MongoDB & Spring REST) -2/2

    I accidentally deleted my development VM. I got lucky having the habit of taking notes. This blog is useful. Development VM is doom to be lost. Rebuild it waste time, but having a clean slate is refreshing~. What concerns me more is my AWS free quota this month is reaching 85%. The second VM I launched but never being used might be the one to blame. (Of course, my mistake.) I terminated the wrong VM. Now I got Linux 2 built. Great, just threw away everything happened on AMI.  1st layer: Page Page class   Originally, I need to prepare getter/setter for all class properties for Spring. By using lombok, I only need to create constructors. lombok will deal with getter/setter and toString(). But there are chances to call getter/setter, but how? .......Naming convention.... Capitalize the 1st character with the prefix get/set.  Annotation @Data was used on this class.  Repository class Spring Docs: Repository https://docs.spring.io/spring-data/mongodb/docs/3.0.0.RELEASE/reference/html/#m

I accidentally deleted my Development VM

source  http://www.dbbqb.com/detail/122531.html

Bookmark service (MongoDB & Spring REST)

Completed a working version of Bookmark service. Feeling great~~ ha! ha! Finding something to practice is an efficient way of learning. The project concept is redesigned from a MongoDB project. Weeks ago, I was learning MongoDB and NodeJS. Mixing everything together is my hobby. There might be conflictions, but putting all strengths together has higher potential to resolve difficult and complex problems. Elites getting together might sometimes not be easy, I mean technology, of course. Nice things deserve practice.  Building your first application with MongoDB: Creating a REST API using the MEAN Stack https://www.mongodb.com/blog/post/building-your-first-application-mongodb-creating-rest-api-using-mean-stack-part-1   After redesign…… is ….extremely simple…. But contains enough new topics for me to explore. I’m just a starter of Spring (and a veteran of OO and Cloud programming). Keep everything simple and fast.    I applied to cloud services (like AWS), online artist supporting platfor

Spring simple and MongoDB (Finally)

    Finally~~~ I could start a Spring project ~~~~ 3 days ago.        Following the user's guide is simple. ...... and then difficult. Not to go astray is a difficult task for my curiosity.... My second day fell in the trap of using an external DB and then found my development server was not whitelisted. The third day fell into mysterious naming convention..... Why is it not noted on User's Guide?        In case Spring 2.3.0 covers up everything (just kidding) or I forget everything while moving on, I keep a note here.    Building an Application with Spring Boot https://spring.io/guides/gs/spring-boot/ This “quick start” was not well designed, but provides a more comprehend snapshot of Spring Boot full stack development. Only when I encountered various issues then I found this is a saviour.    Accessing MongoDB Data with REST https://spring.io/guides/gs/accessing-mongodb-data-rest/     No property found for type… custom Spring Data repository https://stackoverflow.com/questions

File upload Servlet/JSP

I want to start my first Spring project, and found I can not skip its initializr. (Of course not!) I'm too lazy to open ftp port. Therefore I created a file-upload page to receive initializr I downloaded. (I may have a different definition of time....)    I usually don’t use IDE while experimenting/learning on my PC. So I made a video showing how I complete my work. It’s very much like looking up dictionaries. When hired by companies, they usually provide great IDE. Or some definitely need specialized IDE, i.e. developing Wii or 3DS.    I created two versions in this video. One referred to Oracle’s example, the other referred to Apache’s explanation. It seems since Servlet 3.0, the maintenance switched to Apache. And the library,  Apache Common FileUpload is very much simplified, compared to the previous sample.    BootStrap  Here I used BootStrap contempt to design the form. It is a mobile-first design. Roughly speaking…. I’d say it designs the screen by percentage; Bootstrap also

Setup Maven and two basic projects

    The interesting implementation of Java I proceed to is Spring. And, only getting Java running is not enough. I also need to set up Maven. This name is new to me, and I found many Spring tutorials just skip this part. At least I need Maven to generate templates for me. I should learn it more. ( I knew there is a great tool -- Eclipse -- can make tedious things disappear. I’m taking a strategy to install all experiments I want to try and throw away when it's full. And that's an external VM, not my PC. I, not yet, want to do research about installing Eclipse on AMI. )    Upgrade to Java 8     First is to upgrade Java on AMI to Java8. AWS provides advanced tools for Linux 2. And DIY for Linux2. At least there are solutions for my choice.  Amazon Corretto 8 Installation Instructions for Amazon Linux 2 https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/amazon-linux-install.html Here are commands I used: >wget */amazon-corretto-8-x64-linux-jdk.deb >wget */amazon-corre

Linux socket in C and Java

    Finally, I found good reason to practice on Java. First, start with Linux network socket.      I'm using Windows OS, so I setup AWS EC2:AMI to be the developing VM. Installing development tools is required: For C:  sudo yum groupinstall "Development Tools" For Java: sudo yum install java-devel     I worked on Linux socket in my early IT career path. I love cloud computing and admire its greatness. Does it mean I adore technology more than humanity? No. Both are fair. How about thinking in this way:  Technology paves the way to listen to everyone who has access to it. No matter you're rich or poor, old or young, brilliant or stupid.      IT doesn't make decisions; the people behind IT do. If the administrator decides to silence/filler out  certain information or opinions, it’s nothing different from you sending inquiry to the court, petitions to the government, complaints to customer services, even the advice to your parents/children. But to developers, we need

Notes on learning WordPress

    Finally I finished study the book : WordPress Theme Development with Bootstrap: The Beginner’s Guide to Building Your Own Mobile-First Theme from Scratch     It is practical.      Here are some notes I’d like to share during study: I was using IIS+PHP. Windows Active Directory is sophisticated. Make sure WordPress was granted to use its own folder. “Application pool” authentication is effective. By default is IUSR. I couldn’t see uploaded-pictures’ thumbnails, even when I granted “Everyone/ full control” on a specific picture. Then I removed inherited-hierarchy, and lost the right to delete it, even with admin rights.   PHP module gd2 After correcting authentication, the functionality “Edit Image” on WordPress still didn’t work. I validated minimum required modules while installing PHP. Maybe most developers validated the gd2 (JPEG related) module. It took me quite a long to find out my server needs gd2.   wp_enqueue_script Developers use wp_enqueue_script() to ask WordPress to loa