Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Monday, 4 May 2015

Synergy Shift Problem with Windows Server (windows 10)

Just thought I'd get this down as all I found on the net failed to help me.

A while ago there was a windows 8 update that caused machines to crash. Said update also stopped Synergy servers from sending the shift key to clients. See the link here for information on that.

github discussion about windows update k27blahblah

None of the workarounds or fixes worked for me as I'm currently using Windows 10 tech preview.

So I found a solution:

Either switch to the linux machine as the server...

Or:

[step 1]
On whichever distro you're using workout how to assign keys to a command. Then pick two keys you don't think you'll need as much as shift..

[step 2]
Make sure you have xdotool installed:

code:
(ubuntu/mint/deb)

             sudo apt-get install xdotool

[step 3]
Open the keyboard shortcut settings menu

[step 4]
Add a shortcut and assign it to a key, naming it shift_up.

[step 5]
In the 'command' field type:

             xdotool keydown Shift

[step 6]
Repeat steps 4 and 5 for a shift up key using 'keyup' instead of 'keydown'

I did this in mint. It will have a similar equivalent in Ubuntu and is definitely easily figured out in Suse etc.

If your machine is quick you could write a shell script and point the shortcut to it which has an if else statement so you can use just one key.

Friday, 28 November 2014

balance

Finding balance in your life is a difficult, but important goal. But computer science/maths is teaching me some useful ways to define it.
Defining it, after all is key to creating and maintaining it. So here's my question to you; "How do you define balance?"
Here's my two pennies worth.
  1. Define it - sit down and set your goals for things, relationships, finance and the your development this might help. it helps me
  2. Refocus each day - here are some tools I use personally. But you can do it on paper or in your head in the shower. I sometimes use a recording to give me headings to think on and brief/debrief each day
  3. Take Action - make sure when you have filtered your action plan to the daily level you follow it and record your progress towards each goal
  4. Refocus twice a year - I do the goalsetting thing every six months to refresh my goals and adjust for new priorities. That's why I made it
I hope you find all that useful. It is the system I use to manage my development as a computer scientist, musician, martial artist, parent, security operative, teacher, lover, friend, uncle, brother, son, and everything else that I turn my skills towards in the future.
My website has had some pretty big updates lately, including a new web based image editor (beta) and some new videos. check out www.meds-place.com for regular updates.

Tuesday, 13 May 2014

Jogging algorithms

Wrote this as a comment on a g+ joke post about how geeks run.. So while I don't take credit for the idea, this was my take on the algorithm which I share now for posterity :)

for(int i = 0; i < routeSteps.length;i++){
do{
   jog()
}while(!stitch);
System.out.println("gasp!");
Panic() imLiterallyGoinToDie = new Panic();
System.out.println(disproportionateSwearWord);
}

Tea cuppa = new Tea();
System.out.println("never again");

//I spent WAY too much time on this

Thursday, 9 January 2014

IDE or not to IDE - Pitfalls for would be coders (like me) to avoid (unlike me)

That is the question? If you are starting out, what do you use to write your code in and how do you compile it or check its working (if its interpreted)?

In the last year I've been struggling forth trying to level up my coding ability on multiple fronts. I started, luckily by finding www.newthinktank.com (starring the hyper-generous Derek Banas) and attempting his Java Tutorials. All of this in an effort to prepare for the start of my degree.

In the past of course I had taught myself HTML, CSS and a little javascript. But this endeavour really kickstart my journey into the code.

Back in the early 00s I tried building websites with macromedia (sickface). This experience put me off for a long time. Until, during my time running my own dojo business it fell upon me to write the website.

After 3 days locked in a dark room with just me, my PC and www.w3schools.com I emerged bleary eyed to a new world. A world where, armed with nothing but a browser and a simple text editor you can create websites without wanting to eat your own fist or headbutt the PC (who is an innocent bystander in all this).

Returning to my more recent excursion into OOP and Java, I discovered Netbeans. Overall my experience with netbeans was very good, and I still use it occasionally. But it is quite 'heavyweight'. Especially after developing in notepad..

So spin on through the summer and I delve back into web scripting. I ventured deep into the murky depths of HTML5, Javascript, CSS, JQuery and PHP. My steed on this journey: Akelpad (google it ;) ), a fantastically simple and light-weight text editor that is totally free (as is netbeans). Akelpad is feature rich and with a little tweaking and some plugins becomes a viable IDE like experience. Especially when using chrome as a pack mule (to preview I mean). Here's something I made with it while learning about HTML5 Canvas.

Then I began formal education and discovered that on all the comp science machines they encourage you to use notepad++. At first I was put off by its microsoftiness. Then I gave it a whirl and now I'm hooked.

Especially after a little confidence in your code is built up you really don't need to be in an IDE with its preloaded library recognition stuff. It doesn't eat your memory and it DOES NOT MESS WITH YOUR ENCODING!

So my advice to anyone getting into programming is look up notepad++. The best way is to head over to www.portableapps.com and get it from there. Or just get their platform because that's ace too. Loads of free and legal software that you can move around on a chip with you. I don't leave home without it.

If you want an IDE for Java there is a portable version of eclipse knocking around the ether, but you can just get the full version for free any way. I do prefer netbeans however. I find it more intuitive for some reason but many programmers seem to blow the eclipse trumpet.

Avoid windows 8 apps or coding software in general unless you have looked up peoples experience with it. Especially if you are starting out like me. It really is a minefield and there's a lot that can go wrong that you may not yet understand that will make you chew through your desk in frustration.

Here's some great sources of info:

www.khanacademy.org
www.codeacademy.com
www.newthinktank.com

Once you've got going and think you are getting the idea of OOP, program architecture etc; find a book on a proper language, like C or C++, Java or similar and read. Read like your eyes will die tomorrow.

One last note on the programming community. Ask them questions. They love it and there are only a few complete nobs in a sea of nice and helpful people. They do appreciate it if you have done your homework so before you go cap in hand to www.stackoverflow.com make sure you've at least tried to get your head around the source code/documentation in question.

I hope that's all helpful and... this is me www.meds-place.com