Is there a shortcut to insert the unix time stamp into the code in Android Studio? - android-studio

Inserting the unix time stamps is common technique to create ids within the code. I guess this can be done by Live Templates. Other solutions are also welcome.
Background:
As an official of IntelliJ was asking, why I call it common. I know it from TYPO3 to give unique ids to exceptions. They point to a wiki page, where the community can give specific solutions.
https://wiki.typo3.org/Exception/CMS/1313855175
Many developers use PHPStorm.
In my current Android project I give unique ids while wiring up a graph of hundreds of objects. The relations are hardcoded in a setup file.

Related

How to independently change the volume of two different MediaPlayers in Android Studio?

I'm trying to create an app that can play two different media files, say Ambience.mp3 and fgAudio.mp3. I've created two different MediaPlayers, say ambienceMP and fgAudioMP.
Playing both the files at the same time is not an issue. I want to add two sliders that can control the volumes of each of the files separately. However, setVolume() doesn't work in this case and the other solutions that I found recommend different methods which seem overly complicated for this simple task (programming in a nutshell).
Is there a simple way to fix this, or do I need to import some library? I would highly appreciate some simple code that uses hard-coded volumes for each of the files, I can extend it to sliders myself.
I'm not sure if this is relevant, but I'm using Kotlin and not Java.

Is there a drive time functionality in Excel 2016 similar to MapPoint?

I'm using the drive time zone functionality in Map Point a lot, but the software is no longer supported. I was wondering if it was possible to get similar functionality in Excel 2016, I've tried to replicate it in 3D Maps but I couldn't find anything. Does anyone know if this can be done with Excel or any add ins?
I haven't seen anything like this in the Excel 3d Maps or PowerMaps. We have been recommending our MapPoint customers move to Caliper's Maptitude product. Yes this does cost money (as did MapPoint, of course) but has more functionality than MapPoint, data is updated more frequently (and there is more of it), and they have a working, useful support service - more than can be said for Microsoft's support of MapPoint!
The latest versions do support drive time zones, and these can be created using the API. It supports the GIS concept of layers, so the drive time zones are 'drawn' as a polygon (area) layer. This can then be used to query/ manipulate other map layers as per any standard GIS.
(the API has a lot more methods/functions than MapPoint's API, and can be used via COM or Caliper's own macro language)
We've also ported some of our MapPoint products to Maptitude.
An alternative would be to roll your own (or pay someone like me to do it :-) ). If you do this, you would need a source of road data.
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/e84ec3a9-2ccc-4644-a2e2-70a471848ef8/drivetime-zone-using-bing-map-v8?forum=bingmaps It looks like Bing Maps no longer supports drivetime zones, and all Microsoft mapping is powered by this, so I'm thinking that an Excel option doesn't currently exist. If anyone finds something different that would be very helpful, but for now I'm going on the assumption that it doesn't exist.

Edit Windows 10 start menu programmatically

To begin with, I understand that Microsoft offers no way to programatically alter the (modern) start menu - on purpose.
Nevertheless, I'm looking for a way to still do it. I might use it to make a tool to sync the start menu between devices - or to automatically place often used items into thematically sorted groups (office, games, tools). The reason is that I have multiple devices, and really suck at manually managing the start menu - so I just use search or the alphabetic list most of the time.
So, does anybody know how to programatically add, remove, edit tiles? I could imagine solutions including:
Using undocumented APIs (can you still call it an API if it is not documented?)
Directly editing the tile database (e.g. TileDataLayer) - downside is that it seems to be a binary format, which is not known, and you'd have to restart the shell for changes to take effect.
Hooking DLLs or poking around in memory - yikes - but not worse than what other "desktop modding" tools like WindowBlinds would do
Using accessibility APIs, or faking mouse/keyboard input - this would most probably work, but it would be a bit spooky seeing the cursor move around, and it seems even more frail than the others.
I searched a bit, and think there is probably no solution available right now, but you can see this as a challenge to come up with a solution :-)
As you say, there isn't a way to do this.
As an alternative, did you know that you can easily find apps to launch by pressing the windows key and then typing the name of the app you want to launch? This is how I launch anything that isn't pinned to my taskbar. The device I'm on and the order of items in a list or what's pinned where become irrelevant when working this way.

Semantic Technologies for different Operating Systems

I'm trying to write an application that categorizes a certain type of file, music for example, or pictures. As part of the application users would be able to tag items so as to make searching more efficient. These tags could be location and place of a picture, or it could be the camera it was taken with, or even the emotion that a person feels when looking at the picture.
I can foresee that this information would be very useful to the operating system for it's desktop wide searches. That way users would not have to open my application to search for content based on the tags they provide.
I'd like to know what technologies are native to different operating systems/desktop environments. I know of (meta?)tracker for Gnome, and I'd be interested in hearing about equivalent for KDE, Windows and Mac OSX.
For KDE I can point out:
digiKam for images management
amaroK for music
I think they both do what you want. However, I'm not quite sure what is the scope of your question: are you just looking for existing tool for tagging/rating images/music?
Well, this question has been out for a while and I've done research since I asked this question, and here is what I've found.
For KDE there is a component called Strigi, which is required by plasma, and this provides the file tagging and search functionalities along with something called Nepomuk.
Gnome has tracker, which does the same thing, and seems to be a component of the Gnome desktop.
Windows has tagging, but I haven't found out how one can programmatically access the tags on the files, or how generic they are. However it is only possible to tag certain file types, so txt files for example can not be tagged.

Migrating a Character Based Oracle Form

I have an OLD server running DG/UX that will in the near future be unsupported. I have some character based oracle forms that need to be migrated off of this machine. Does anyone know what sort of migration strategy Oralce has for upgrading these Character Based reports. It doesnt have to be the newest version, it doesnt even have to be to a GUI version, but I do need to migrate to a supported OS such as linux.
The easy answer is to tell you to check out Migration from 6i to 10g.
Having done it before, what I think the much more useful answer is to tell you to rewrite those forms and reports from scratch. Probably in another tool - especially if you want to have a web interface, etc. rather than being hobbled by an ancient Java runtime.
There are products out there that will let you translate the old forms code into PL/SQL. Kumaran is an example of one, but I found it buggy and had to do a lot of hand editing of the code to get it work the same as the original.
As far as I'm concerned, the CUI is dead so you might as well go all the way to a GUI. The last time I was looking at it, there was almost no documentation for CUI forms and frequently things that worked in the GUI wouldn't work in the CUI at all.
There are some problems you may run into in converting CUI based forms applications to GUI.
Sometimes there is validation and special processing done when the user moves to the next or previous field/block/etc. When you switch over to a proper GUI, your user can skip those events by just clicking on another field. So you are left with two choices - #1 audit all of the forms or #2 disable navigation in the form with the mouse
Option #1 is less work than redeveloping but look at how much work we've already put into it.
Option #2 your users will HATE you and come after you with pitch forks and torches. They will perceive that they've got nothing of value for all the work you put into it. Then you will end up doing Option #1 anyway.
Sometimes a UI that works fine in (or is required by the limitations of) a CUI is just plain wrong and breaks the UI metaphor that users are used to working with in the rest of the GUI (e.g., a pop-up window with list that you have to select an entry in rather than pull down where you can just pick the right value directly)
When converted to a GUI the CUI may end up with different fonts, text sizes and other formatting defaults than a freshly written form (it did for me). So now either the whole set of forms has to be updated to follow Oracle's new default theme for forms/reports or every new form/report has to reverted back to the old clunky style you had before - or it will stick out like a sore thumb (and your users will want them all to be like the pretty one now).
Not the answer you wanted; huh. But you can use this as an excuse to get out of the Forms/Reports upgrade tread mill and maybe even clean up some of the hacks that have had to happen over the years.

Resources