Good morning everybody. As you can see, the title of my talk is M-Ruby on small devices. By now, you are all introduced to M-Ruby. There were two talks on M-Ruby, one by Eric and one by Koshoban. I'm sure I'm butchering the name. So, I did not tell you what M-Ruby stands for. So, M-Ruby is the minimalistic Ruby, which is considered as a lightweight sibling of Ruby. It complies with part of the Ruby ISO standard. It's sponsored by this institute in Japan and I'm going to be following a convention of using the name with a capital R M-Ruby as the language and M-Ruby as the interpreter with a smaller R. Just as we do Ruby with a capital R to indicate the language and Ruby with a small R to indicate that it is an interpreter that I'm talking. So, for the rest of the talk, that's the convention I'm going to follow. Okay. All right. So, M-Ruby the language is derived out of this ISO standard. There is an ISO standard for Ruby, believe it or not. But M-Ruby is not Ruby. It is a little less than Ruby. From my last count on the documentation of M-Ruby and Ruby, I found out that M-Ruby has about 36 classes and seven modules and not all classes that are there have the same list of methods to the classes. So, it's a smaller subset of the larger language that we know as Ruby. And I'm comparing that with Ruby 2.3, which has about 105 classes and 19 modules. Okay. The syntax is compatible with 1.9 version of Ruby not 2.0 because it was conceived before Ruby 2.0 came. So, M-Ruby, the work started in around 2010 is what Matt told me the other day. It has the more liberal license, the MIT license, so you can use it for fun and profit. So, why do we think we should use something like M-Ruby? Well, the stated purpose of M-Ruby is that it is used for embedding and linking. And as we all know, we are in the age of small devices, right? We have Fitbit talking to my phone, talking to something out in the cloud, controlling my Philips Hue, all these devices around us. And these are small devices that we would like to control. And for those small devices to be controlled using smaller languages is one of the purpose of M-Ruby. So, we want to embed it and link it. And also, because Matt is interested. So, just as there is a rich one, there is a rich one. M-Ruby is nice, and so we are nice. Okay, so let's talk a little bit about it being lightweight. What I mean, what I understand as it being lightweight is that it uses less memory during runtime, that the size of the executable that it generates is small because it has to fit on the small devices, that it consumes less CPU cycles. That means that it is a little fast or fast enough to drive that device. And it has minimal dependencies on external libraries. And we'll see what each of these mean in my demo part of this. So, this talk is in two parts. I'll go through the slides and then we'll go through some demos. Okay. All right. So, small devices, what do we mean by small devices? Well, in this context, I'm talking of something like Raspberry Pi. I'm sure you must have heard of Raspberry Pi, a single-board computer. There is a version of Raspberry Pi, which is called Raspberry Pi Zero, costs about $5. And has a CPU that has a 32-bit single-core CPU and 512 MB of RAM. Okay. So obviously, everything that we do on this single-board computer has to fit in that kind of small device. It has storage as microSD. I have a bunch of those over here. And we will have a birds of feather session soon where we will be able to hack these Raspberry Pi's. So, that's the spec of Raspberry Pi.  However, the one that I'm using today is a slightly beefier version because I have to do more things. I have to do demos and I have to run this presentation of Raspberry Pi. So, believe it or not, this is the first time I'm doing this on a Raspberry Pi that is running here at the podium. Thank you. This is not given by my laptop. I'm driving this on the small device. I mean, I'm talking of M-Ruby on small devices. It behaves upon me to run it on a small device, right? So, a huge shout out to the organizers over here. I had made this special request. I was pleasantly surprised that they have heeded to my request. I thanked the AV team for helping me out last night in figuring all this out. So, Raspberry Pi for fun, you know, and we will see all that fun just here shortly. I also do it for profit. I work for a company that it's a credit card company which is a close look credit card system. Not many people here may use it unless you have trucks, a fleet of trucks or a fleet of jets or yachts or something like that. We have fuel cards and these FBOs are the places where you tank up your jet or truck or whatever it is that you use our card for has these point of sale devices that are small devices, okay? Now, they compare to this Raspberry Pi. They are kind of bulky, you know, and heavier. But look at the specs. We are talking of 200 megahertz of arm 9, 32-bit risk, which has 6 MB of RAM, of which only 2 MB of SRAM is available for my program. So, my program, if I have to run anything that I do on that device, it better fit into MB. We are talking of 2 MB here, okay? And these are still out there in production. More beefier versions of these devices are out there. But, you know, we have to support the lowest common denominator. And so, these are the kind of devices that I have to program on. And I thought, well, maybe it would be nice to have these devices or run Mrooby on those devices. I tried very hard. It's an up here task. I haven't gotten that there yet. But that's my ultimate dream, is to be able to drive one of these devices using Mrooby. How is that possible? Well, let's see. So, this is the company that I work for, Shameless Plug. We are hiring. We have Pearl, Ruby, Rails, Ember, Oracle, C as our stack. Go to our website. There is a now hiring link, too, on the homepage. And you'll see what we are interested in. So, hit me up after the talk if you're interested in doing something like this as a career. Okay. So, let's talk about embedding and linking. We saw in the talk yesterday that we have embedding. What we mean by embedding is you take a Ruby script and embed it inside of C. Most of the Ruby code that I will be showing today will have some C component to it. We will, of course, run the Mrooby interpreter. But what I'm doing here is I am creating that string, as you can see, put as hello world. And I'm loading that string into the Mrooby evaluator. And it loads the string and executes that string. And then it closes the evaluator. So, that's the minimalistic kind of approach to embedding a Ruby script inside of C. And then linking, right? We are talking of embedding and linking. So, how do we link this? On my system over here, we have GCC as the compiler. I have invoked the compiler flags on the first line. I give the path to include the Mrooby headers that are required by the secret. How many over here do C? Okay. All right. So, I'm not talking to an audience that does not know what this is all about. All right. At least some of them understand what I'm doing here. And I'm linking. That's where that linking comes in. The Ruby library, LibMrooby.a is where it gets linked into my C code. And then, of course, it creates an executable. And I execute that hello, just like any executable on that device, or in this case, on the Raspberry Pi. And it would execute and run the Ruby code that was embedded inside of C. Okay. So, how do we get that? Mrooby. Well, to install Mrooby, you have to have some prerequisites you need to have get, because I'm going to install it from the source. You need GCC to build. Mrooby itself is written in C. So, you need GCC. You need a parser generator called Bison on a Linux platform. I don't know what is the equivalent of this on Windows. But you would need something like this. And then you do need Ruby. Now, that's one of the difficulties that I'm having in having Mrooby compiled on the device. Okay.  But for Raspberry Pi, that's not a problem, especially the one that I have up here. That's not a problem. I first installed Ruby, got all these things done, and then I compiled it using, from the source, I cloned the git repo and just .mini rake, and it compiled Mrooby for me. So, that's how I got Mrooby on the device, running on my Raspberry Pi. All right, what it does then, it generates a bunch of binaries, and some of them are obvious, like the interpreter gets generated after compilation. You get an interactive shell just as Ruby has IRB. Mrooby has MIRB. You get the compiler that will compile the bytecode into a symbol table or the actual executable, and then we have the debugger to debug your code, and then we, I just learned yesterday that there is a way to remove the debugging information from the code that it generates, and that's where you use RubyStrip. Thank you, Matt, for helping me on that one. All right, so that's what it generates when you run minirake on the source. Okay, so let's see what I mean by embedding the bytecode in C. Here, I have a simple one-liner Ruby program called hello.rb. All it does is put s hello world. If I compile that hello.rb, it would generate a bytecode, and it would generate it in a file called hello.mrb. So, it's a bytecode that the Mrooby compiler would understand how to interpret that bytecode. It's a binary file, so if you want to see open and see what is in there, you would need something like hex dump to see the contents of this file. All right, and then to run this bytecode on or using Mrooby, you will have to give that flag the minus b for bytecode, and sure enough, it will interpret the bytecode and do what you asked it to do, which is to put s hello world on the std out. Okay. You can also generate the bytecode as a C array. Okay. So, in the second example here, the same file, however, you see that I am passing another command line argument here called hw under code symbol. It's just a name I made up with a flag of minus capital B this time for the same program. It produces a symbol table, which is nothing but an array. So, you have to include that generated file into the file that you want to embed it in, which is on the right-hand side, and then instead of loading the string, you can see that the load function is now using iRap, which is the intermediate representation of that bytecode. Okay. So, it is reading that symbol table that you have created using the previous command, and then, of course, when you compile this code just as we did in the earlier case as we saw it, I compile it using a magic shell script, which we'll see here very soon. Compile it, and when you run the executable, it does what you wanted to do. The compiler, again, it's no surprise, except here I have given the path that I used, and I have given the path that I used, and it compiles the code. Okay. So, mruby itself, as you may have known if you have listened to the earlier talks on mruby, the way you generate gems, there is a gem generator in mruby called mrbGems. You can configure, one of the nice things about mruby is it's very modular. You can pick and choose which part of mruby you want in the compile version of your mruby, so you can make your own version of mruby with gems included or compiled into it, baked into it, and that is by virtue of this library manager, and the way you do that is you open up the build config.rb that comes with the source code when you clone the git repo, and modify the config.rb to include or exclude the gems that you want to have in your binary. There is no require in mruby, okay? So, everything that you do, you have to kind of build it into the configuration file, and it generates one single executable, which we will see here very soon how to do that, and there are multiple options of doing that. You can pull it straight away from git, or git hub, or bit bucket, it has interfaces to these reapers, and then when you compile this again using the .mini rake, you get your own version of mruby, which is slightly fatter or thinner depending on what you have included or excluded from the out of the box or the default set of mruby. And then most of the embedded world actually is driven by another embedding language called Lua, which has been around for a long time, so it's not really fair to compare, but we should try to aim to come to that level. Lua is a prototype based language, has no classes, it's much simpler than mruby, has only those data types available in it, it also compiles into bytecode, has a stack based CAPI, I don't know if it is true that mruby also has stacked based CAPI, okay. And then the VM, however in Lua is register based, which is a slightly more complex version of VM, but it also makes it faster. And so because the language itself is smaller than mruby, it's going to be faster. It came out in 1993, whereas mruby came out in 2014, so there is that difference of timing in how much work has gone into Lua that makes it faster. And Lua has LuaJet, which is just in time compiler, I don't know if we have mrubyJet, but I have seen on the internet that some people are working towards it, I don't know that it is considered as production worthy yet. Okay, so Lua example also looks very similar to mruby example in C. This is an example of embedding Lua script inside of the C code, just like we saw earlier, except in this case I am loading up a file that has the Lua script in it. So this line on the right hand side which says Lua underscore do file, hello dot Lua, expects that there is a Lua file existing in the directory that it reads, which has the Lua script in it. You compile that Lua, the C code. I haven't been able to figure out how to do that on my Raspberry Pi. I was able to do it on my Ubuntu laptop, but not on Raspberry Pi because it requires some installations that I couldn't quite figure out. But yes, when you compile this, apparently it will run the code that is in hello dot Lua. And you can see that it is just about as simple as it is in mruby. So that was the intent from the get go that was what Lua was designed for. And it was surprising to me that mruby comes so close to making it as simple as this. So again, it's testament to this design genius. So this is part of the demo. This is where we will switch over to demo. However, if you are interested in learning a little bit, sorry, mruby is so recent that we don't have books yet on it. You have Stack Overflow and the Git repo itself serves as your way to communicate with the authors of mruby or the contributors of mruby. I believe there is an IRC channel where you can jump in and ask questions or you can ask maths when he's around. These two guys are, I have seen a lot of videos of people using mruby, but these are probably one of the best videos that I have seen. They have written mruby on an RTOS. Absolutely fabulous work done by these two people. Okay, so before I switch over to my demo, I also have some announcements. So I'm going to keep this pie running for you guys. So you can SSH into my Raspberry Pi and hack it to your heart's content. I will give you the IP address soon here right after when I go into my demo session. You can SSH into it. That's the password. It does not have pseudo access right now, this account, but if you need to do access, let me know. After I finish my presentation, I will open it up for you guys for doing whatever you want to do. The hard disk on this is a little microSD card. So you can do whatever you want to do on the Raspberry Pi because it's going to get formatted right after the conference is over. So, okay, so now let's go to the demo session which is, again, I'm doing this for the first time. I believe this is still the address. Can somebody confirm that they can SSH with mruby at <IP_ADDRESS>. And then give rubycon 201. I think Prathamesh there was trying it a few minutes ago. I just want to make sure that we're still on. It depends on Wi-Fi being available. You're on? All right. Okay. So feel free to play around on my Raspberry Pi while I'm doing it.  Okay. So the few things that I wanted to do in the demo today, how much time do I have? It comes down, right? Okay. Okay. Oh, sorry. I want to show you what I mean by binary file being small. And remember I said it's lightweight means the binary has to be small and it has to have less dependencies on the operating system. The devices that I use to program it on the POS devices, by the way, are a bit of an operating system. So I'm coding right to the metal. Okay. There is no operating system. Everything that I need on that device, I have to compile it in my code, cross compile it, sorry, in my code. And effectively my code is the operating system on those POS devices. However, over here, we have a much richer environment. And so, okay. So you see here, this is where I have compiled the mruby. Myrb is a little over 1.5 megabytes. So it will fit or mruby is a little over 1.5 megabytes. So my limitations on that POS were that the program should be less than 2 megabytes. This will run. Ruby may or may not run. And the dependencies, you can see those dependencies by doing LDD on Raspberry Pi. The operating system that I'm using here is called Raspbian. The Raspbian is the operating system that the company that produces Raspberry Pi has come up with. It's a variant of Debian. So these commands are pretty much available, I think, on all Linux platforms. So if I do LDD on mruby, you will see that it depends on these many runtime libraries, .so files. However, if I had done this on Ruby on the same device, you would see it has slightly more dependencies. So that's what I meant by it has to have less dependencies on it. And also, if you saw the size of a Ruby, it would be definitely larger. I don't know how to see the size because when I try to do size, I think there is a command called size on mruby. Yeah, see all that. And I try to do the same thing on the version of Ruby that I have. Oh, yeah, there you go. Okay, so here is the thing. So when you look at the size of the compiled version, sometimes it is deceptive because it might have a small size but it depends on a whole bunch of other things. And so when we consider the size of the entire application, you have to take into consideration those things. So this can be confusing. So be careful about how you measure size of a binary. Okay, so that was, you know, in terms of the size and memory. So also, we want to see how much memory it consumes when it is running in RAM. So that's the other requirement that I have. I have only so much of RAM. Does it, will it work or will it run out of RAM? Okay, the device is like I said that I have, I want this to work on, don't have page faults and any sophisticated paging mechanism. So everything that you want to run has to fit into the RAM. Okay, so for that purpose, what I have done is let me, what I have done is I have written a little, I have found this. So here, I am going to run Ruby. Okay? And here, I am going to say, let's name Ruby. Okay, and it shows that it is using about 6.14 megabytes of RAM. Okay, obviously this will not run on that small device that I was intending to run it on. All right? So how does it compare with Ruby? So let's look at that. I run Ruby in this panel and then run the same command for, yeah, this would work, this would work on that small device. So that's how I look at, so every program that you're running, you would want to use this tool and I will make these tools available on the Internet, those that I have either written myself or have got copied from somebody else, and they will all be available by the end of this conference on GitHub. So that's how I look at the size of the memory that it consumes at runtime, not just the size while it is on the hardest compiled version, but also when it is running, actually in the memory. Okay? And then the other thing that we want to see is the speed. How fast is Ruby compared to Ruby or Lua or whatever it is that you're trying to use as an alternate to embed your code in. All right, so to do that, I'm going to try to go to my code. So what I have done here is I have written Fibo.rb, which calculates the Fibonacci of a number, and I've used, this is not the most accurate version of Fibonacci because it might do wrong things depending on smaller values of n such as 0 and minus 1 and 2 and minus 2 negative numbers. But for the purpose of this particular demo, I think this would suffice. Okay, so I'm going to time this with mruby. So time mrubyfibo.rb. And mruby took about, took about 8 seconds. The last time I measured this, it was taking around 8 seconds to run Fibonacci of 32. All right. Oh, it took 10 seconds today. Benchmarking in this way is, you have to be very careful about benchmarking stuff like this. I mean, just a couple of runs is not going to give you. There's a whole study that shows you how to properly benchmark programs against each other. But this is just a rough estimate of how it would look like when you ran. So mruby took 10 seconds, mruby took around 4 seconds because mruby is probably using a lot of resources and therefore making proper use of them. So the idea here is, okay, so let me see if I have something else to compare it with. The other thing that I have to look at when I do these things is see how fast it takes to load the environment. Okay, because, again, my devices have no operating system, so everything that I put on it has to load, and these are POS devices. They have to be constantly on, not crash, be fast, everything, you know, because people are actually swiping their card and has to happen in real time. So the other factor that comes to my mind is how do you load these devices? Let me just, I don't need this session here. So I have a little shell script that shows how long, not in the right directory, CD2, okay, how long it will take to load. I think it is, yeah, okay, so boot times. So that's the time it takes to boot your application. So this shell script runs for different versions of the compiler. All it does is, so for example, let me show you what I'm trying to do. If you run Ruby on the command line like this, which does nothing, okay, it just runs and does nothing. How long does it take? And that's the time it takes for Ruby the interpreter to run. Okay, so if I time this guy, all right, it took about one-tenth of a second to load up and do nothing. If I did the same thing with Ruby, see the difference there? Okay, if I did the same thing with Lua, see the difference there? Okay, and I have on this, I believe there is Perl, so I was comparing with a bunch of these. So this gives you an idea of how long it would take to boot things up when you first load the program. Okay, so as you can see, we have, we have, okay, so let me get this for you. So I had Ruby, Perl, Python, Node, and Ruby and Lua in this boot program, and so when I do this, okay, so let's see, let me scroll. Why is it not scrolling up? That's what's happening. Okay, so let's do this. Oh, so that's why. Okay, so it's the output of time is not going on standard out. It is going to standard error. I believe that's why I was not able to see it. But let's do this at the command line then. Time, that's how long it takes to Python, Lua. So you get the idea. So what I have seen is, is when I play around with Ruby, the biggest challenge that I have is to compile, cross compile it for the devices that I'm interested in running it on. And so one of the hurdles that I'm coming up with in getting this running on the POS device that I was talking about is not all the libraries that Ruby needs for it to run properly are on that device. So it's a challenging task for me to get that Ruby working on the small device. But with support from the community, I might be able to do it. That is all I have for as far as demo is concerned. I have about eight minutes for question answers. So shoot away. Okay, so the question is, since I'm running it on a small device that is so constrained, is there anything in the language itself that will monitor whether it is going out or running out of cache? I don't think so. Is there anything, Matt, that would tell me from within the program that... So the answer there is that it is not there by default. If you want that kind of monitoring, you'll have to write your own code. For most of these answers, like these questions, it is, you probably have to write it on your own. If it is not there given... So these compilers, the cross compilers that are available for those devices are very, very pricey. The compilers themselves have a very stringent restrictions on what you can and cannot compile onto the devices because, obviously, we are playing with credit cards here. So they do a lot of checking of your code before they allow you. And it has to be signed by two authorities before it can be loaded onto the device. So one of the key things that I have learned in playing with these is that you need to know the operating environment in which you want to embed in before you can successfully embed and get it to work the way you want it to work. Any other question? Counting to three. One, two, three. No questions. Okay. Thank you.


This research compared the performance of several geostatistical and deterministic methods for daily rainfall interpolation. The authors found that the best method for daily rainfall interpolation was ordinary cryging, ORK, followed by uncertainty neighborhood cryging, UNK, and cryging with external drift, KED. The authors also noted that the use of multiple variograms improved the performance of the deterministic methods, while the use of external drift improved the performance of the geostatistical methods. This article was authored by S. Ly, C. Charles, and de Degre.


My name is Kostu and I will be talking about the Android Libraries. Now the last, as Mahesh sir told you, the last presentation was little heavy, so hopefully mine will be much simpler. And I won't be covering too much of the stuff about the Android architecture and all the library. So, Nibbith has already covered the Linux kernel, so I will be talking about the libraries. Now in one of the presentations given by the Android engineer, we classified the libraries in 3-4 different parts. So one is the Lipsy, which is very much important and without the Lipsy, the entire Android OS, it cannot function. Surface manager is a surface flinger and another one is audio flinger. So those two are the demons, so those two are the services and once the Android OS starts, they keep on running. And all other libraries which are there, those are just simple SO files, which are similar to the library files which you get in the Linux OS and these are loaded at the dynamic, at the runtime. So first one start looking into the Lipsy, so in general, Lipsy is the standard C library or the library which is there on the Ubuntu is G-Lipsy, which is GNU Lipsy, but for Android the Google, they developed their own library. So in the Lipsy, what are the functions which are provided is first the inbuilt micros, then the type definitions and functions. So whenever you are using, suppose you are writing a simple Hallowall program, so in int main, what we will write is just printf Hallowall. So in that case, the function which is printf, it is defined in the Lipsy. So like these, all the functions are defined in the Lipsy and we just write simple programs and compile them to get the executable. So for the Lipsy, the different implementations are GNU Lipsy, which is GNU Lipsy, then Mewl Lipsy, which is for embedded systems, which is quite smaller than GNU Lipsy. And then Google developed their own version of Lipsy, which is called as Bionic. So the Bionic, they did not do it from the scratch, it is just a port of the BSD Lipsy and it supports the ARM architecture and X86 architecture. The purpose behind creating the different Lipsy and not using GNU Lipsy or the LUC Lipsy was that first is the BSD license. If you use the GPL or LGPL, which is GNU Lipsy has the GPL license and it means that whatever applications you write and if you use the GNU Lipsy, then you will have to make the source code open. So if they have kept the GNU Lipsy, then all the applications which are there, which use the Lipsy, they have to make their source code open, which is not good for the developers. Then second one is small size and the Lipsy is for the embedded systems or for mobile phones and tablets. The size of the library should be very much smaller and the third one is the tablets and the mobile phone, they have very limited power and the processor is also not quite powerful. So the speed is very much important in that case. The now in Lipsy in the Bionic itself, the p-thread is not fully supported. So the smallest implementation they have made and not all the functions which are in p-thread. So the p-thread cannot be completely used in the Lipsy. Next is they have not provided the support for the wide characters. So if the character is more than one byte, you cannot use it in the Lipsy, then not the locals. So only English and these languages, only support is provided for only those languages and C++ exceptions are all the support for those exceptions are also not provided. So suppose if you write a code in C++ and there are two functions, one function calls the other function, but the other function suppose it throws the exception. So in other libraries like G-Lipsy, the first function, the calling function will get informed that the exception has been thrown, but in Bionic the exception even though the call function throws the exception, the calling function will not be notified that the exception has been thrown. Now the additional support they have provided for the system properties and logging. So there is a logging facility available in the Android and the same support is provided in the Bionic also. So all the logs which other demands use the logging facility, so all logs they get logged into the same file. And in the actual mobile user tablet, the library is located at system-lib-slash-lipsy.so. The next thing is many components of Android, they depend on the Bionic. So like let me just show you various, how the system starts booting and how processes and demos they start running. So many of those components they depend on the Lipsy and the next thing is if you have written the code in cc++ that is the native language, then you will have to use the Android NDK. Android NDK is different from the Android SDK, SDK is software development gate whereas NDK is native development gate. So it provides the compiler and tool chains which you can use to compile the cc++ code and to generate the libraries. So for an example the Angry Birds or Adopt Flash Player, they are written in cc++. Now I told you about the four point was the many components of the Android, they depend on the Bionic. This another dependency list, so suppose the bootable, the form file and the true file. So true file are the references or the functions which are used from the Lipsy. So fprintf to write the data in the file, so the bootable slash disk installer slash installer. So it is one of the files from the Android system, so it calls this file. So like these the dependencies are there for many components and in total you can see there are around 1200 pages of this file. So around some 32,000 dependencies are there for the different components. Next library is WebKit. So it is just a web browser engine used to render the HTML pages. It has the full support for the CCS, JavaScript, DOM and Ajax. It is located in this path, system.lib.core.so and the pages can be rendered in a full desktop mode also. So the full screen can be shown as a web page. The next thing, the next library is SQLite. So SQLite is serverless, zero configuration and dataless engine. So why they chose this one? So if we have they chosen the other database engines such as MySQL or other servers, then all those database engines they require a server which has to be run all the time. But for SQLite as this says it is serverless and zero configuration. So you do not need to configure the database and its engine to use it. So now why the Android system it uses the SQLite for many purposes. Some of them are like phone book to store your contacts, then call history, all the received calls, missed calls, your SMS, MMS, etc. The library is located as lib.sqlite.so and one of the warning they have given is that if the Android database is correct, then the Android system it will automatically delete the whole database without even asking the user. So it will automatically get deleted and if the code is there for creating a new database then that code will get execute and the new completely empty database will get created. Next is SGL which is Scalable Graphics Library or SCIA Graphics Library. SCIA is the name of the company which developed this library and which was later acquired by the Google in 2005. It is just a 2D graphics engine. It is written in C++ and it also provides the background for the CPU based rasterizer then to show the PDFs and for OpenGL and it is located at lib.sqlite.so. The last SCIA was the 2D graphics library. It also has a support for the OpenGL system which is a 3D graphics, Open Graphics Library OpenGL is designed for the embedded systems then it has the it can use the in-build graphics processor for the hardware acceleration and or if the that is not available then the software rasterizer is also there. So for the API specification in Android version 1 the provided support was for 1.0 and 1.1 and the CPU based implementation was there. So no graphics or the hardware optimization and from 2.2 that is for the support was started for OpenGL ES 2.0 specification and there they have also provided the GPU acceleration. So like I said the support is provided for both graphics means hardware acceleration and software acceleration. So basically at the system the library level there will be a 1 wrapper and 2 libraries. So whenever you write a code which uses the OpenGL functions and if you have specified that the hardware acceleration should be turned on then the call first will get to the wrapper and wrapper will see that if the hardware acceleration is turned on or off if it is on then the when the implemented library which has the hardware acceleration capability it will be called or if the software acceleration has to be used when the existing Android library will be called. And the library is located at libgl and there are many libraries. So for hardware support the library will be different for the existing Android library the name of the library will be different. The next thing is media framework. So we can in Android system we can play the videos, audios and we can use the camera also. So the Android uses the packet videos OpenCore framework which is an open source framework for this and then the audio supports which are in build in the Android RMP3, AAC, AMAP video is for video formats are MPEG4 and H264 and support for the JPEG and PNG is also there and it also has the support for the hardware and software codec plugins. So if the processor in the mobile order tablet has the inbuilt support for the hardware codec. So the Android system will automatically use that hardware codec to speed up the total rendering part. So this is the media framework overview. As the three different parts are the audio, video and the camera. So the first one is camera, the second is media recording we can use the camera to record the, to capture the still images or to record the video and the third one is media player. So that's all ID Java application there. The next player is this Java framework layer. So for the camera it will use the Android hardware camera there and this Android NU surface. So the camera it will in the native part it will connect to the camera and camera service. Actually the one arrow is not shown here which will be this arrow. So camera service will get connected to the hardware camera and the driver is provided for the capturing of the image or to capture the video and the second flow goes through this the Android NU surface and the surface flinger or ui lip to the main frame buffer. So frame buffer is nothing but the screen of the mobile order tablet. So while capturing the image it is also shown on the tablet. So the second part is that. So that part will capture the image or record the video and the same captured image is at the same time shown on the surface using this L surface and surface flinger. So that was first for the media recorder, media recorder is used this media recorder media recorder and like I said the open course framework is used which is the packet video framework and the same hardware codec are provided for that to record the video and that will get used. For the player part now the file can be the media file can be audio or a video. So when you click on the media player to play a file then the android.media.media player will get open which cause the media player which in term cause the media service. Now there are these three parts first is PV player, MIDI player and Wormis player. So PV player is responsible for the video files then audio files then MIDI player is the MIDI files, MIDI files MIDI files which are there the support is provided for those also and this player it is responsible for the OGG files which are in the audio and video with both the files and in this part. So the audio flinger is responsible for the audio I will cover this part in the next few slides. So the second about the surface flinger is whatever you get to see on the tablet or the media the touchscreen part it goes through the surface flinger library and it in turn is a display subsystem. So it can combine a 2D and 3D surfaces from multiple applications to the frame buffer device. So suppose you have one application which is running and at the same time suppose a pop-up comes on the screen. So at the back there will be an application screen and another will be a pop-up screen. So all the both screen those are managed by the surface flinger and they are overlaid on one another and those will be sent to the surface flinger and in turn it will be displayed on the screen. So for the surfaces to be displayed on the frame buffer the IPC mechanism the binder mechanism is used and the whole surfaces are passed as buffer to display on the screen and it can use the hardware acceleration also for the composition. The last part is audio flinger now the audio can we can hear it from the earpiece means headphones then speakers and from Bluetooth also. So the app suppose multiple apps are running at the same time so and they can connect to the media player or game tone audio or if the application is a suppose it is a game then it can connect to the game audio and both will the multiple inputs can be passed to the audio flinger and accordingly which part is selected. So if you have plugged in the earphone then the audio flinger will send its output to the earphone or if the normal speakers are turned on then it will be sent to the speakers. So it manages the audio output devices then multiple paths are possible the input and the output both. These are the references the limit only about anatomical physiology and different architectures and core libraries.


I think it's often very much misrepresented in the media today. Hopefully, you'll walk away with a different understanding of what self-care is and why it matters, why it's necessary in each of our lives, and why we need to make time for it. Just to begin, the very beginning point is how stressors today differ from stressors decades and centuries ago. And there is a very drastic difference in the way that they present themselves. Now, the way that our body was designed was for self-preservation. So the maximization or the minimization of harm and the maximization of benefit. And harm really was in the form of predators and animals and about survival. And that's how we were wired to be able to protect ourselves from a fight or flight perspective. So we either confront the stressor or we flee from the stressor. And what happens is, centuries ago, the way that the world was designed was in a way that you would just flee from the threat in your environment. You wouldn't necessarily. Or you could face it, but you could also flee. But there was some type of physical response from the body. And today, the stressors drastically differ in the sense that there isn't necessarily something that you're going to flee. There isn't something that you can run away from. And not many people actually confront or face their stressors. And so stress today looks very different in the sense of relationship dynamics, the relationship you have with your spouse or if you're trying to get married or the relationship you have with your children, the relationship that you have with yourself and with your creator and with your community. And so all of these different relationship dynamics are actually add on immense stress to one's load. Also the stress of traffic. And right now, we may not necessarily be experiencing that head on. Everybody's working from home, online schooling. All of the events, such as the one today, are taking place online. And so that also plays a role in added stressors. Your work and degree deadlines and responsibilities, I really believe that these times that we live in, irrespective of the pandemic, we're being tested with ease as opposed to being tested with adversity. Because previous generations were more about survival. We have to be able to get food on the table. I have to provide the best education for my children. It really was about how to make ends meet in a country that is not necessarily my country that I grew up in. And so this is a country that I have to transition into, an environment that I have to acclimate to and adjust to. And so that triggers very much survival. I'm just trying to survive in this new place. I'm trying to learn the language, trying to get accustomed to the different ways in which I can navigate the system. And so that is a test that is different. Our test today is very different than our past generations in this country. Because we're not so much about survival now. We're more about thriving. And thriving also comes with a certain type of awareness of what we need to unlearn from past generations, but also the incredible strengths that we can take from past generations. Because we don't want to unlearn everything. And there are many incredible strengths that we can draw from past generations that we need to learn from today. So today, our test is very different, again, in the sense that it is one of ease. We have a plethora of options. We have many different degrees that we can choose from. Food options, housing options, options of friends, and where you want to live, and where you want to travel. All of these are different types of tests, or afflictions, or tribulations, or trials that we are presented with. And again, they're very different in nature. And so there isn't necessarily, in any of these examples that I have mentioned, when you're stuck in traffic, you can't exactly get out of the car and flee from traffic.  But that is an accumulation of stressors that take a toll on the body. And that's just traffic as one example.  And I need to request that from you, and you need to submit this. And so these are also another form of stressors that you can't exactly flee from, and you can confront them. But we will talk about when that stressor is over. Let's say you submit something for a deadline that you had. What ends up happening to the stress in your body? So the stressor is gone, but the stress is still residing. And this is actually something that we need to address and talk about in the context of self-care. Now, our stress response, again, today differs. And we often can't run from them. So they end up accumulating to a degree of overwhelm. No self-care without self-concept. When you look into research studies that talk about this concept of self-care, and I think that's really important to present, because I don't want to just present the average perspective on what self-care is. What I found in many research studies is that individuals who really don't understand this concept of self-care or resist it, and I found that to be very often the case in past generations, the reason for that is it's not because they don't like the idea, but they just don't find utility in the idea. They don't really understand what it's about. What does it mean to take care of myself other than just eating and sleeping and taking care of my very basic needs? But they don't really see much beyond that. And I found the reason is that the first and foremost reason that I come across is that that individual doesn't really know themselves. You don't know yourself as someone who has agency who is autonomous, who has your own identity. And the reason for that is that our cultures have really driven this concept of enmeshment. And part of being in a collectivistic society is a beautiful thing, because your struggles are shared, your joys are shared and multiplied. However, at the same time, you are functioning so much as one body that you don't necessarily know how to separate from that body at times. And who am I in the absence of that society or that community or that family unit? And so oftentimes, this is a struggle, because when we talk about self-care, we're not necessarily talking about community care, and that is an aspect of it. But self-care is really, for me, as an individual, caring for myself to ensure that my basic needs are met, but also a little bit beyond my basic needs. Because I think our understanding of basic needs is just, again, food, sleep, and intimate connection. However, there's a lot more to it than that. And so the first and foremost reason for why I don't place value in this concept of self-care is because I don't necessarily know myself. I don't necessarily know who I am. And so therefore, I just view myself as part of a unit. And when I view myself as part of a unit, I don't really think about, well, what do I need? And this is really a type of programming that is missing from past generations that I have encountered. Also, this concept of how can you care for something which you don't know? So I cannot care for something or meet the needs of something that I actually do not know I have no familiarity with. So again, when I don't know how to break away from that family unit or from that community unit, then I don't really know, me as an individual, what do I need? What am I in need of that I can provide or cater to or address? And so this is where much of the resistance lies. Also, what is your identity rooted in? And so we all wear multiple hats. And there are studies that allude to this fact that the more hats that you wear, the more happy you are. And that, of course, goes back to this concept of we all have a need to belong. We all want to feel like we're needed. And this is oftentimes why if you are a parent listening in, then you will really understand this concept of when your children grow up and they move on, then this is really a big part of this empty nest syndrome that you feel. I no longer feel needed. And I want to feel needed. I need to feel like there is some utility for me. I need to be utilized for something. Someone needs to rely on me for something. Someone leans on me for something. And so a lot of individuals, when their children leave the house, they find volunteering. They have careers. They have things that they can turn to to continue the cycle of feeling needed because that is necessary to thrive. But you need to identify what your core identity is. And for us as Muslims, I think we tend to forget this ayah. And so it's understanding that our purpose is really rooted in this concept and that I am first and foremost before I am anything else to anyone else or to myself. I am a servant of Allah subhanahu wa ta'ala. And I'm here being utilized, whether I realize it or not for the sake of something, for the purpose of something. And so knowing that that is my first identity and then everything else is kind of a ripple effect that follows. Then you are a daughter or a son.   But we must understand our root identity. And when I understand that root identity, I also understand the obligation that comes with that because that identity is one that I will be held accountable for. How did you take care of this amenah? How did I take care of my body? And how will I return this body back to the Creator when my time is up? What condition will it be in? What state will my mind be in, my soul, my body? And so the dimensions of a human being, according to Imam An-Ghazali is that he broke it down into really four things, right? And that was the ru'ah, which is the soul, which here is the spiritual. Then he has the qalb, which is the emotional, right? Which is the ihsaz. That's where all the ihsaz stems from or the sensations or feelings or senses. And then you have the aqal, which is the mind, which is the psychological. And then you have the nafs, which is the physical. And we know that there are two different, I guess, nutrients that we were created from. One of them being the soul, which is the divine. And then the body, which is really from the earth. And that is what our body will decompose back into, which is the earth. And so we cannot care for ourselves if I do not deposit something into each and every single one of these dimensions on a daily basis, on a daily basis. This is when we talk about being whole and complete as a human being as much as possible. These are really the dimensions that we have to look at. These are the dimensions that we have to tend to. And just like we deposit amounts in our bank accounts, we also have these accounts with Allah's panawatata that we actually have to ensure that we are making deposits into on a daily basis. Now, where did this concept of self-care really come from? So we have it in our faith. It's embedded in our own faith. However, there's been such an increase in hearing about this concept everywhere you go. And it's almost as though it's like this new found awareness. However, it's not. There were initially substantial deficits in professional medical resources in North America and Western Europe after World War II. And this led to the rise in the development and investment in healthcare. And upon investing in healthcare, right? It came to defining the role of the medical practitioner who is servicing the patients. And when they talked about primary prevention, right? An author with the last name of last, he documented that for every category of disease, what physicians saw was only the tip of the iceberg. So whenever you have a patient that is coming in with a complaint or reporting certain symptoms or symptomatology, you would look at their case and what you're seeing is only the tip of the iceberg because the experience is so much deeper than that for the patient. So they're not necessarily, and sometimes actually what I've encountered in the mental health field, forget the medical field itself, is that a lot of individuals don't know how to put terms to what it is that they're feeling or thinking in their body, in their mind, and in their soul because each one senses different things. And this is oftentimes what leads to a state of overwhelm. And when you're overwhelmed, you don't know how to really describe or put a name to the feeling or to the type of experience that you're having. And so part of being a practitioner or a medical clinician is that you are able to help empower your patient or your client in understanding the different terms to be able to understand what is happening to them. Now, Horder and Horder found that less than one third of illnesses experienced were treated by healthcare professionals. It's of no surprise that there's approximately 85% of symptoms that individuals never go to see a doctor for, right? Or they never go to see a mental practitioner for. And I think the statistics vary between mental health and then the medical profession. But this is telling. This is telling because this shows you the necessity as well for self-care because if there are so many things that we experience in our body and in our mind and in our soul that we actually do not talk to anyone about that is equipped to be able to help us or give us the tools to deal with or to treat or heal from, then that means that there is so much that is untended to. There is so much that is being neglected because we tend to minimize things. We come from a culture that it greatly minimizes things, right? And so these studies are not talking about our cultures in particular, but it is talking about a general picture of the human condition. Is that, and especially for us as Muslims or anyone who happens to be non-Muslim also who's listening is that, we tend to minimize things as human beings because we don't want to feed into things. We don't want to think that something is wrong with us. So instead of empowering ourselves to deal with whatever it is that we have or whatever it is that we're facing, we actually want to just sweep it under the rug and we don't want to deal with it. So many of the symptoms that an individual's experience are actually untended to. Now, initial descriptive self-care research concern the types of actions taken in response to illness, right? Now, our nature as human beings, according to Dr. Kelly McGonagall, she's a health psychologist with Stanford University. She's done extensive research on stress and health and wellbeing, et cetera. And she wrote the willpower instinct, which I highly recommend for everyone to read because our biggest muscle that we need to develop as Muslims is our willpower muscle. And this also relates to self-care in the sense that the biggest act of self-care is strengthening my willpower muscle because upon that, the tenets of my faith rely. So according to Dr. McGonagall, she said that when given a choice of anything, you're presented with multiple choices for anything. People tend to choose over and over what's against their long-term interests. So we're not wired to think about our short-term benefits. We generally think about, or long-term benefits are, we generally think about our short-term gain. So what can I gain from this? In this instance or in this moment, as opposed to how will this affect me if I go ahead with this a year from now, six months from now, five years from now, we don't generally think this way. And this is a big problem when it comes to our willpower. Now, we're also often what she found, it doesn't relate necessarily to being weak. Even though we know that in the Quran, Allah SWT tells us that he has created the human being as weak. Now, one of the side effects of being weak is that you will experience exhaustion and fatigue. And so Dr. McGonagall talks about from her studies is that we're often too fatigued to act against our own worst impulses. So we will have many tendencies and inclinations that are not positive. And if we were to feed into them and follow them, they could actually be very detrimental and harmful for our health and our wellbeing, whether it be psychological, emotional, physical or spiritual. So she's saying that we're often too tired to be able to act against those impulses that are actually not good for us. So we can't also control everything. And this is the paradox of willpower is that we can't control everything because we know that Allah SWT is the master controller. But we also need to increase our self-control by stretching our limited capacities. And she alluded to this fact that the only way to do this is by pacing ourselves. And it's really interesting because we have built into our faith this concept of Salah, which comes from Silla or connection with Allah SWT and we're wired for connection. But we are primarily wired for connection with our Creator. And this actually is what she is referring to pacing yourself, right? We have this embedded in our faith because Allah SWT helps us to pace ourselves by strengthening our willpower by praying five times throughout the day. And I'll talk a little bit about this in a little bit. We have a willpower muscle is what she also expounded upon. And she stated that you either use it or lose it just like the muscles in our body when they're not used, right?  And so it's exactly the same thing that you have a willpower muscle that you need to strengthen.  Now, this relates to self-care in many ways. Our three needs as human beings are safety, satisfaction and connection. And when I talk about safety, primarily what I'm really talking about is psychological safety. And it's that feeling that you get when you're with someone and you actually feel like you can talk to them about what is really paining you, what is really causing you so much pain and anxiety and overwhelm.  You can actually lower your guard and connect with this person. And that I actually feel psychological safety with this person. And so we have this with a lost panel with that because we can actually talk and communicate with Allah all the time, all day, every day. We don't need an appointment. We don't need to schedule anything. We can actually just connect with our Creator at any moment of the day, which is the utmost mercy if you think about it. So psychological safety with Allah, but also we need safety with other human beings, other human beings who I share space with, who I actually feel safe in the company of. Now the second one is satisfaction. And that is when I feel a sense of fulfillment with what I'm doing, with my purpose, with how I spend my time. And the third is connection. And that is really connection with our Creator and connection to ourselves because you can dissociate from self. This is what trauma does if it quantifies as trauma. And then also connection with other people with other loved ones, which really triggers oxytocin or activates oxytocin to be released in the brain. And that's known as the bonding hormone. And that is how you thrive. Now when the brain senses that all three of these needs are actually being met, you actually find yourself in the green zone. And the green zone, green was actually our beloved daddy, his thoughts was the favorite color, but it's also the safe zone.  And that is what the color green does, right? But it also is your brain's default mode. This is the mode that you need to be in as often as possible. And this is the sustainable mode as well. This is how I can actually thrive, not just survive, right? And this is my resting state. Your body has the rest and digest nervous system, but it also has the fight, flight or freeze nervous system. You wanna be in the rest and digest nervous system, that aspect of the nervous system. And that is where you will feel peace, satisfaction and love as a result of the need for safety, satisfaction and connection. Now your stress response is the red zone. And this is the area of great discomfort. This is the area of fear, anxiety, shutdown and overwhelm. And this is also where your body burns internal resources much faster than it can actually intake them.  You actually don't have any more of it. And your system is actually greatly disturbed. So it's not in a state of homeostasis or equilibrium. It's in a state of being all over the map, right? So one minute you're feeling anxious, the next minute you're terrified, the next minute you're feeling stomach upset because the stress response triggers your digestive system. Hence why a lot of individuals experience stomach upset. They crave carbs. They find themselves perusing the bathroom frequently. And this is also relating to the hadith in which we are told that many, all diseases lie in the gut. And so there is a stress and gut connection that actually many medical providers or hekems can discuss and often do in their material and their content that relate to this fact to that stress wreaks havoc on your system. And this is another reason why self-care becomes mandatory in order to restore balance, restore homeostasis and just push your body in a state of restoration. Now the brain reacts in non-sustainable bursts. So it's not continuous, but it tends to be in the form of bursts of stress that you feel that in the short-term, there is positive stress, which is called eustress, which was termed by Hans Selle, who was a physician, but also eustresses is positive in the sense it could be marriage, it could be having a baby, it could be getting a promotion, it could be buying a home. And all of these are great things. However, they do come with a sense of stress to them because for example, with a baby, you have many sleepless nights, you're no longer your own person in that season of life, your baby may have many needs, many demands, especially if your baby has special needs, there's another added layer of stress to the mother. Now, when we talk about negative stressors, what I'm really talking about is transitioning from a eustress, a positive stressor into a negative stressor, and that means that I've passed the two week mark usually. So if I've been experiencing immense stress and overwhelm, every single day for a period of two weeks, you go past the two weeks, this is typically identified as prolonged stress, and this is when it begins to really impact your immune system. Now, there's a concept known as allostatic load, and that really refers to the wear and tear on the body as a result of prolonged stressors, not necessarily use stress, positive stressors, but negative stressors that take place in small bursts every single day or larger bursts on a daily basis. You're not tending to yourself, you're continuing to produce and exert yourself and expend energy, and eventually what that leads to is a pile up, almost as though you are piling up garbage, one on top of the other. What ends up happening is it starts to mold and starts to rot, and there's a lot of toxicity in the air as a result of that load of garbage. So it's a very similar effect internally, is that it all adds up, piles up, and then it starts to lead to a collapse in the body in which the body signals to you that I can no longer do this. And this is when you begin to shut down, which necessarily sometimes can be freeze mode, which is depression. Now, stress response has a beginning, and this is what we often don't think about, and this is what we often don't address, is that your stress response cycle in your body has a beginning, middle, and an end. We are very good at addressing the beginning, so what's the immediate stressor? I have this deadline. I didn't complete it. I don't know what I'm gonna tell my boss, my supervisor, my intern in my assignment, my professor. This is gonna be a really big issue. Maybe I'll get kicked out of the college or the university or the program. And so these are all very legitimate stressors. However, we think that when we address the stressor that the stress is now gone. However, that is far from being the case. Now, we'll transition into what self-care is, and then we'll talk about completing the stress cycle. What is self-care, and why does it matter, and why is it absolutely critical and necessary, and not selfish? It's actually a form of mercy and displaying self-compassion for each and every single one of us. Now, self-care is a form of slowing down reactivity, because when we are stressed out, we're highly emotionally reactive. So you will feel constantly, like you are at the edge of the cliff, and every small wind or any car passing by, or any individual walking very calmly past you, not triggering you, you will identify that as a trigger. And everything will start to bother you and everything will start to irritate you. And I know that many people can relate to this experience, especially in the pandemic, when everything changed suddenly for everyone. But also, self-care is also a restoration of body to a state of balance, because when you are exposed to a stressor again, we said that you are knocked out of state of equilibrium. And so you are no longer feeling balanced and at peace within yourself, you're not grounded. And so restoring balance is a part of self-care. There is a disconnect in modern life today between what activates the stress response cycle and completes it, because again, we said that we're no longer being chased by animals and lions or predators that we can actually run away from. And that process of running helps your body to de-stress and restore itself back to a state of equilibrium and homeostasis. We're not running. And we are not fleeing from things in order for that homeostasis to be restored. We are sitting at desks. We are at home. We are dealing with issues and stressors and flooded and being rebarred with them from every angle. And so therefore, how are you actually completing your stress response cycle? And so this is critical to complete the cycle because the stressor is there. You are trying to meet the stressor in some ways. You are making phone calls. You are typing things. You are sending emails. You are communicating. Perhaps you're not doing any of those things as well. You're in a state of freeze and you have just shut down because you don't know what to do. And so therefore, running or physical activity is necessary. Any type of physical activity is necessary in order for you to complete the stress cycle response. And so another way of completing the stress cycle, right? According to Emily and Amelia Nagoski who have actually researched this concept of completing the stress cycle is a 20-second hug. And that is something that potentially all of us can do. You can hug a friend. You can hug a parent. You can hug a loved one. You can hug a spouse or a child. And if it's 20 seconds, then I really hope it's somebody that you like because that's a very awkwardly long time to be hugging anyone that you don't like. And so it actually has to be someone that you feel a sense of psychological safety with. Someone that you actually like in order for it to signal to your brain that, hey, I'm no longer in a state of danger. I'm no longer exposed to a threat. It is safe now. You can calm down, right? You can restore yourself back to a state of balance and peace. Also, the third thing that is definitely not necessarily the third in its order is getting a good night's sleep. And when people tell you to sleep on things and you'll feel better in the morning, that could not be more true because the more that you understand sleep and the benefits, and there are way too many benefits for us to even address, but sleep is related to a lack of sleep or sleep deprivation is related to cancer, autoimmune diseases, right? Prolonged stress in the body that is actually not alleviated or mitigated in any way. And so you will continue to feel stressed out because you're sleeping late. The liver is not properly detoxing from the cortisol, which is related, which is the stress hormone. And so therefore you wake up and you still have cortisol running your bloodstream and you still don't feel much better. You don't feel rested. You don't feel relaxed or balanced in any way or grounded. And so getting a good night's sleep, preferably, maintaining the same time in which you sleep every day is critical. Also sleeping by 11 or before 11 p.m. is also critical for many reasons. And sleeping for approximately seven to eight hours is also very important. Now, some individuals say, well, the Prophet Ali s.a.w. actually did not sleep very often, but we also know that the Prophet Ali s.a.w. mirrored the cycles of nature in the sense of that they slept. The Prophet Ali s.a.w. slept after Asha prayer. So Asha prayer comes in fairly early. And so when you sleep right after Asha and you wake up in the last third of the night, that's a significant portion of sleep right there that can actually help you maintain balance and well-being in your body. Now, when we talk about also self-care, self-care is not just one type of self-care. And so when you think about self-care, this concept, you think about painted nails and massages and relaxation. And of course, relaxation and all of these things are critical. However, it's not just those things because we are much more than just a body which has emotions and physical, biological needs and psychological needs as well, but we also have a Rooh or a soul that actually has many needs as well. And this is something that is greatly overlooked because you will meet many individuals who are in a state of agitation, who are in a state of anxiety, who are in a state of internal stress, but they actually do not recognize that this stress and this anxiety and this depressive states at times, there's definitely a biological component, but at times is not related to anything biological. And this is the thing because individuals will oftentimes go to the physician, they will go to the doctor, they will investigate and explore every avenue to figure out what is it that is actually wrong with me? I can't figure out what is wrong. Now, sometimes there is actually something biological but the doctors are not really doing their part to figure out what is wrong. They're not administering the right tests to be able to decipher, is there actually a condition here or is actually constructed in the mind, which is very possible because we know that somatic pain is a very real thing. So what I mean by somatic pain as well as anything felt in the body in the form of pain. So individuals, for example, who experience fiber, myalgia, fibromyalgia is a heightened sensation of pain in the body. And sometimes you feel like that pain is traveling to different parts of the body. So one day you'll feel like it's your appendix and another day you'll feel like it's your liver and another day it will be in your back. And you're gonna be very confused because you're like, am I dying? What is actually wrong with me? Why do I have pain in all these different parts of my body? So this is usually an indication that it could be something psychological but it could also be something biological and you need to visit a practitioner or medical practitioner in order for you to be able to run all of the appropriate tests as a form of self-care to be able to distinguish is this something biological? Is this something psychological? Is this something emotional or also is this something physical? And once you've done all of that, there are some individuals, there's a category of individuals who do not find anything. And so they are met with one, one no after the other after the other and it's like, you don't have this, you don't have this, you don't have that. So by process of elimination, you've actually ruled out many conditions. And so the big things are, you don't have anything worrisome in that sense, anything biological. Now there is a type of spiritual agitation that the soul experiences as a result of being disconnected from Allah's panohatana. And this must be also addressed and thought out and really reflected upon because we have to assess what is my relationship like first and foremost with my creator? How am I applying self-care practices in this area? Because there's a great disconnect today in as a result of modernity, as a result of our lifestyles as a result of being extremely distracted and on the go all the time. And I think one thing that heightened issues for everyone to a degree is the pause that came with the pandemic. So the pandemic came along, but then also our lives greatly slowed down. And for many people that's problematic because they were on the go every single day for a reason. And that reason perhaps is they don't want to face something, they don't want to think about something, their thoughts haunt them and they greatly perturb them. And so they don't want to think about their past. They don't want to think about where they're headed. They don't want to think about all the problems that they have at home or with their loved ones or within their own selves. And so they tend to just distract themselves and busy themselves. And we know that we have a disease of being busy with modernity. And it doesn't really allow room for us to face ourselves in a very real and authentic and genuine way. We don't really want to look at the person within because that will require making certain realizations. That will require having to face things head on. And that will require a lot of heart work, a lot of inner work. And that is the hardest form of work that you will ever have to do in your life. And you will know this because children, if you have children, children will also be the biggest trigger for that. And I use the word trigger intentionally because there will be friction in a sense that will bring to the surface a lot of your own childhood wounds and in issues and unresolved emotions and unresolved needs, really. That's really what it comes down to is your inner child had a lot of needs that were perhaps unmet. And so you may be an adult, but you still have a child. It's still a child within that adult body. And this is what we must understand is what are the needs of that child that were unmet? Because this could be the greatest act of compassion that you can do for yourself. And also for your soul, for your emotions, for your biological well-being as well. Now, spiritual self-care. Ignore the right-hand side image. And I'm sorry, it's quite blurry. I tried to fix that. It didn't really fix itself. But when we talk about spiritual self-care, it's really contemplation to dabbur. It's this concept of, and Allah tells us, اَفَلَا يَتَدَبُّرُونَ الْقُرْأَنْ Do they not reflect and contemplate on the meanings within the Quran because that is a form of spiritual self-care? I can draw many nutrients from that which I'm reading, from the gems within the Quran that it can actually enrich me and broaden my perspectives and do a lot of cognitive restructuring because this is really what the Quran does. Because what we believe is not based on what we see. What we see is actually based on what we believe. And this is why we have the Quran because the Quran teaches us how to see the world. So when we invest in spending time with Allah Subh'anaHu Wa Ta'ala, dedicating time to the Quran, dedicating time to being able to understand what is obligated from us. What are we supposed to do and why? Why are these things necessary? So understanding that is critical. So that is Tadabbur. Tadabbur allows for you, it's a vehicle that allows for you to attain this type of understanding. Now, muhaasabah is also critical in the sense of holding ourselves to account before we are held to account. And that is really, what kind of person am I? You know, what type of impact do I have on people around me? Perhaps I'm narcissistic. Perhaps I am too intense. Perhaps I'm too demanding. Perhaps I'm very neglectful. Perhaps I am very too optimistic that I actually dismiss and invalidate the emotions of other people. And if I don't take time to hold myself accountable and also do muraqabah, incorporate muraqabah, which is self-observation, being able to zoom out of myself and view myself from a bird's eye view and take notes, take actual notes about what you realize from things that are said by your loved ones, you know, remarks that they make, whether harshly or gently, that's not the matter. That's not the issue here. The issue here is what is the content of what is being said? And that is critical for us to take into account before Allah's panawatana takes us into account. Because I think the more, the lighter one is when we take ourselves into account because then we can actually rectify, enhance, polish, repair, and make right. And if we don't incorporate muraqabah and muraqabah, we're in big trouble because we're just on the go, we're cruising and we think that everything is okay, but everything can really not be okay, but we would have no idea because we're not holding ourselves accountable. Now I alluded earlier to this concept in Saleh and its connection to self-control. Research findings point to the fact that Saleh is not coincidental, is not haphazard, it's not just these motions that we go through. They're similar to moves in yoga in a lot of ways, but also, of course, they also touch upon certain acupressure points, which is found in Chinese medicine, but also in addition to that is this concept of self-regulation. We as human beings can become very dysregulated. A lot of the issues, a lot of the wounds inflicted upon children in their childhood are as a result of dysregulated adults in their lives. Adults that did not know how to regulate their emotions, they were never taught it's not their fault, but this is a really big concept and Saleh helps us to regulate ourselves in a sense that in the morning, when you wake up, you have the highest amount of self-control, right? And as the day goes on, your self-control, ability to self-regulate your emotions and states or emotional states decreases. It greatly diminishes because you're more tired. And so if you think about it, in the morning we have Salat al-Fajr, right? Which starts off our day. This is a keystone habit. When we talk about habits and then science of habits. And I highly recommend everybody to read. Sorry, I forget the name, but it's by James Clear. And he talked the atomic habits, right? And it's really downsizing our habits to a very small size in order for us to be able to incorporate them into our daily routine. And then you can build upon them. And we talk about keystone habits. They're really a type of habits that you can actually build other habits upon them. And so for example, making your bed could be a keystone habit because when you make your bed in the morning, you can actually do other things because I was able to make my bed. So I can go and make my coffee. I can make breakfast. I can do all these other things. For us, it's Salat al-Fajr. And for every act, we also have a dua that mentally prepares us to engage in that act. So we don't jump into anything if you really think about it, if it's done right. But do we maximize upon the potential and power that our faith actually gives us? Do we actually know these things? And do we implement them? So there's a dua upon waking up, right? There's also a certain area that the Prophet Isaal said we used to make. And then there's a dua, right? When you get up and you make wudu. And then after wudu, right? Then you enter into the kingdom of your Lord. You are now ready to enter into the kingdom of speaking to Allah Subh'anaHu Wa Ta'ala and communicating with Allah Subh'anaHu Wa Ta'ala. And so this is a form of mental preparation, which is what dua does. But then physically, I can then engage in the act. So we have Salat al-Fajr, which is a keystone habit upon which after I pray Fajr, I can technically do everything else. I can start working. I can go downstairs. I can make coffee. I can make breakfast. I can clean. I can organize. I can do that, which I am responsible to do as part of my different responsibilities and duties for the day. But there's a big gap if you think about it between Fajr and Doha prayer. Now why is that? This really relates to this concept of self-regulation and self-control because you don't need as much adjustment or attunement or tuning, sorry, you don't really need to tune up. You don't need to tune up your self-control and self-regulation because you already have high amounts of it in the morning. Now then you have Doha, and then you have a gap, and then you also have Asr and Maghrib, which tend to be in close proximity, and then you have Aishat. So you have several Salat in the evening that you actually have to partake in. And that is because, again, our self-control diminishes as the day goes on. We are more and more tired, so we need more check-ins. With Allah SWT, we need more tune-ups. We need to fine tune so that we can up our self-control, not fall into sinning because there are also studies that show that crimes and technically sins are committed more in the evenings. And that relates to self-control and self-regulation, your ability to do those things. Now Tahajjud as well leads, if you really want to increase your capacity to be able to handle stressors and things that happen to you, it's engaging in Tahajjud, which is waking up, even if it means 10 minutes before Fajr comes in, Fajr then comes in, you can actually just wake up 10 minutes and pray two rakahs, four rakahs, your Shafa and Wittra, and then you have sealed your prayers for the evening, and then you're ready to engage in the next state and what you will find is that your capacity to be able to handle stressors greatly increases. And that is because you're tapping into the reservoir of your spiritual capacity directly from Allah SWT and anything directly from Allah SWT, equips you with the ability to be able to handle much more than you think you can handle. So whenever you're in a state of worry or anxiety about not being able to handle that which is coming your way or you know that you have a sick loved one and the inevitable is happening, especially due to COVID or other sicknesses and ailments, this is one great way of maximizing your capacity to be able to handle the emotional stressors that are coming your way, as well as tapping into professional help and support. Now this image is from a group of clinicians that have institutionalized different strategies and techniques in mental health. And so they have come up with this infographic which talks about four strategies for managing stress and anxiety but they also are very applicable to self-care. Now you can do meditation, you can do deep breathing and I really encourage diaphragmatic breathing, really learning how to breathe properly which is actually part of it to benevolently the medicine of the prophet. It is discussed how you need to utilize the lungs capacity for breathing because many people just breathe in a very shallow way. And when you learn how to tap into diaphragmatic breathing, diaphragmatic breathing triggers your rest and digest and takes you slowly into a state of safety in which you're now in the green zone. You're taken out of the red zone and into the green zone but you still need that physical activity or that sense of activation of safety in some way. You can also do visualization, visualization is extremely powerful in the sense of visualizing yourself in a place of safety because you may not be in a physical place of safety. You may not live in a household in which you actually feel safe. So Allah SWT out of His infinite mercy has given us the ability to imagine things and you can actually imagine yourself being in a safer place in a place that is more serene, that is perhaps more calm. Maybe you live with many children and you aren't really able to escape very often. So you actually can imagine yourself being by a beach or in a very serene place in nature somewhere. And that gives you a sense of peace and safety. Also, you have expressive and creative strategies in order to arrive at a place of balance. And that is gardening, art and physical movement. And we talked a little bit about physical movement especially hiking and research studies that point to the fact that hiking can actually help in rewiring the brain. So hiking is very healthy for you, especially during this time in which people are homebound. You can actually go out in nature and hike and make sure that it's not a crowded location. And being around nature that glorifies Allah SWT can only bring you peace and serenity. Now the third is reflection and exploration strategies. And this is derived from our own practices of muraqaba and muhassaba and mujahedah and all these different concepts of really observing myself and journaling and making observations about myself and how I impact other people. And what is my presence like? What does it feel like to be in my presence and being in touch with that? So self-monitoring communication is key as well. Learning how to communicate is the biggest skill that you can learn in your life because upon that every single relationship will rely. Number four, we can't neglect this of course as part of not spiritual healthcare but physical self-care, sorry. Is learning how to eat well and not just learning how to eat well but where do I purchase my food? Is it ethically sourced? Is it organic? Is it nutritious as much as I can? And of course I understand individuals who say, well that is a very expensive lifestyle. However, your sickness is much more expensive. It's much more expensive to cater to and maintain and paying all of those bills is much worse than investing in healthy food that is actually nutritious for your body that can actually sustain your body and keep you going. And this is part of our wedged. This is part of our responsibility in front of Allah SWT is being able to learn this because it is a science in and of itself. I'm blessed to have my sister who's a holistic nutritionist and she really guides a lot of my information regarding this and enables me to be able to help clients as well in this area through connecting with her. But I highly recommend that every single individual creates some type of awareness around this topic as it's very critical for our wellbeing. And there is a gut and brain connection through the vagus nerve. So I'm not going to feel well if I don't eat right. And if I'm consuming carbs and sugars and toxins, there is no way that I will mentally feel well because my gut is signaling to my brain through the vagus nerve, the largest nerve in the body that I'm actually, the fuel that you are receiving is not top notch fuel. And so you actually need better fuel sources in order to feel better. And of course, relationships, connection, it's huge. I kind of mentioned that earlier and exercise. And then last but not least, understanding, and I hope through this presentation that we have all collectively come to understand that without self-care, there is no health and wellbeing. And this is actually a necessity. This is not a luxury. It's not about painted nails and massage parlors and going to just get a treat for myself. That can be part of it, but it's much greater than that. It's actually much bigger than that. And so self-care is a necessity. It's not a choice in order to fulfill the rights of the amenity that we were given.  It is only good stewardship of the only gift I have. The gift I was put on earth to offer others through the different types of contributions and services that we are each mukellef with, that we are each responsible to fulfill for others through us. We are just the vehicle. I think everyone for listening and if anybody has any questions, I would be happy to respond to them at this time, inshallah. Peace be upon you. Peace be upon you. Peace be upon you. Peace be upon you. Peace be upon you. Peace be upon you. I have doubt about, you talked about three things that make us feel that we are having self-care. That was safety. Fulfillment, fulfillment and satisfaction and connection. Yeah. What if we don't have it? How do we build it? Yeah, so I'm guessing you have one or two of them but you don't have all of them. Yeah. And if you have one or two of them, human beings are very resilient in the sense that you don't necessarily have to have every single one of those in order to thrive. But for example, if I live by myself and I don't really have many connections with other people, then I can maximize on my relationship with my creator in order to overcompensate for the physical relationships that I actually don't have with other people around me, for example. And I can ensure that I'm eating well and I can ensure that I'm exercising, taking care of myself. But also, I think sometimes individuals don't want to put themselves out there to be able to create a sense of community for themselves, which is really important in the sense of finding platforms and especially now with us being online, there are many different support groups, many different platforms in which we can come to know about and then we can, even if it's a Quran halafa that you are a part of and the women in this Quran circle all check in on one another, that is a sense of connection. And I get a sense of safety that I am cared about. And of course, primarily we get a sense that we are loved and cared for by our creator because we were created. We would never have been created if we're not loved and cared for and nurtured by our creator. And so that is the first sense that we can connect to. And then other than our creator, we do our part in a sense of trying to create ways in which we can be connected to other people in order to maximize on the benefits of connection in our body and in our mental states and mental wellbeing. And then also spending time in nature is very healing, much more than I can cover today, but just being in nature, being in the sunshine, getting a good night's sleep. And even if it's really the perceived support that you have, it's not about having six to 10 people who you are close to in your life. It's really about my sense, do I feel like I have support? That's really all that it comes down to. So even if you only have two people, then that's all that you really need. You don't need anything beyond that because I feel like I'm loved and cared for by those two people. So I don't need a whole tribe. I don't need a whole community. It's really perceived support that I have. And if I perceive that I have support, then that's good enough. I hope the answer is your question. Okay, yeah. Jazakallah al-Akhir. Wa'iyakum, wa'iyakum. Jazakallah al-Akhir, Heba, for a beautiful talk, my Shalom. Nissa is very, very grateful. It's been recorded at Hamd-e-Rila, so I'm hoping more, in Shalom, will benefit from listening to what you've shared with us today. And I'm hoping we will collaborate and partner with you again in the future, inshallah. Thank you so much for your time. Jazakallah al-Akhir. And thank you for everybody who joined in today. Jazakallah al-Akhir, my dear. As-salamu alaikum. Wa'iyakum As-salam. Thank you so much. Wa'iyakum As-salam. You're welcome. Wa'iyakum As-salam. I take everyone.


The paper deals with a new rail cut test stand building reasons explanation. A project features definition is described. There is possible to perform the railway wheel tread profiles where research under the rail vehicle in operation condition simulation. This simulation is possible to execute on the test bench. An important feature of the research is the equivalent conicity change analysis. The paper outlines the stand operation principles of main structure components design and components parameter specification, the test control, data acquisition and data assessment. This article was authored by Uri Jurlisai, Tomas Lak, and Yosef Horosinek.