<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: raghuncs</title>
    <description>The latest articles on DEV Community by raghuncs (@raghuncs).</description>
    <link>https://dev.to/raghuncs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F348904%2Fb30334d3-6221-4242-b87f-835c9ce5238a.png</url>
      <title>DEV Community: raghuncs</title>
      <link>https://dev.to/raghuncs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raghuncs"/>
    <language>en</language>
    <item>
      <title>Matching every instance of a pattern in UNIX</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Mon, 16 Mar 2020 00:03:22 +0000</pubDate>
      <link>https://dev.to/raghuncs/matching-every-instance-of-a-pattern-in-unix-bkl</link>
      <guid>https://dev.to/raghuncs/matching-every-instance-of-a-pattern-in-unix-bkl</guid>
      <description>&lt;p&gt;For example I have a string "raghuraghuraghuhello" and I want to display the number of times 'raghu' has occurred in the string. &lt;/p&gt;

&lt;p&gt;We can use the below variant of grep&lt;/p&gt;

&lt;p&gt;echo raghuraghuraghuhello|grep -o raghu|wc -l&lt;/p&gt;

&lt;p&gt;hadoop@ubuntu:~$ echo raghuraghuraghuhello|grep -o raghu&lt;br&gt;
raghu&lt;br&gt;
raghu&lt;br&gt;
raghu&lt;br&gt;
hadoop@ubuntu:~$ echo raghuraghuraghuhello|grep -o raghu|wc -l&lt;br&gt;
3&lt;/p&gt;

&lt;p&gt;Note: When in the first command it just printed out the instances of the pattern, hence we piped it to wc -l&lt;/p&gt;

</description>
      <category>unix</category>
    </item>
    <item>
      <title>Learning Node and Express JS</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Sun, 15 Mar 2020 23:49:41 +0000</pubDate>
      <link>https://dev.to/raghuncs/learning-node-and-express-js-25i2</link>
      <guid>https://dev.to/raghuncs/learning-node-and-express-js-25i2</guid>
      <description>&lt;p&gt;Hope to create a mini project sometime in Node JS.&lt;/p&gt;

</description>
      <category>node</category>
      <category>express</category>
    </item>
    <item>
      <title>Process creation in UNIX : Simplified</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Sun, 15 Mar 2020 23:40:07 +0000</pubDate>
      <link>https://dev.to/raghuncs/process-creation-in-unix-simplified-1abi</link>
      <guid>https://dev.to/raghuncs/process-creation-in-unix-simplified-1abi</guid>
      <description>&lt;p&gt;Process is an instance of a program in execution. Its also called task or job. For example the command who would display all the users currently logged into Unix. Here the execution of the program who is a process. The actual program resides on the secondary memory (such as hard disk) while the process will be executed in the RAM. (In some cases memory may be allocated from secondary memory as well which is known as virtual memory).&lt;/p&gt;

&lt;p&gt;Some key aspects of processes:&lt;/p&gt;

&lt;p&gt;Process is “born” when it starts execution and is said to “die” when it completes execution&lt;br&gt;
Kernel takes care of process management&lt;br&gt;
Process communicates with other process through system calls&lt;br&gt;
Process is created by the “fork” system call.&lt;/p&gt;

&lt;p&gt;There must be some process which starts ‘fork’ as well. This is called parent process and the new process created is called child process. Each process is associated with “process_id”.  The First Process which gets created is Process 0 (called Parent process as told before), when the system boots up. After this process is ‘Forked’ for a child process, process 0 becomes ‘swapper’ process. This process is part of the kernel and will be used for scheduling other processes.&lt;/p&gt;

&lt;p&gt;The child process is called ‘Process 1’ which is considered as ancestor of every process in UNIX and is called the ‘init’ process.&lt;/p&gt;

&lt;p&gt;After the system gets logged in, the Kernel creates the SHELL process. Hence Shell is also a process and is associated with PID. To know PID type the below command:&lt;/p&gt;

&lt;p&gt;echo $$&lt;/p&gt;

&lt;p&gt;For example, in the below command:&lt;/p&gt;

&lt;p&gt;ls –l | more&lt;/p&gt;

&lt;p&gt;The parent process is the shell. ls-l is executed first and the output is fed to more which displays output one page at a time. Hence ls-l and more are two child processes here.&lt;/p&gt;




&lt;p&gt;The process creation consists of three phases:&lt;/p&gt;

&lt;p&gt;Fork : When a process is said to be forked, it creates a copy of the process. The new process will have a new PID.&lt;/p&gt;

&lt;p&gt;Exec:  Just creating a new process is not sufficient to execute it. The child process will require to overwrite the code and data of the parent process. This is known as ‘exec’. Note that the no new process is created here. This is just a mechanism to execute the process.&lt;/p&gt;

&lt;p&gt;wait: The parent process would call ‘wait’ system call, which would suspend its execution and wait till the child process is complete.&lt;/p&gt;

&lt;p&gt;One of the best example of process creation is the logging process.&lt;/p&gt;

&lt;p&gt;In a multi user system, once system boots up, process 0 which is part of kernel process forks the init process and becomes the swapper process. The init process then spawns the getty process (which is get terminal- the terminal process). The getty process then execs the login program which waits till the user enters credentials which it validates. If login is successful, it execs the shell program else it exits and the init program again forks and creates the getty process. The below flow diagram would give a clear picture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev-to-uploads.s3.amazonaws.com/i/2s9ly5nxgx7eo4531tp6.png"&gt;https://dev-to-uploads.s3.amazonaws.com/i/2s9ly5nxgx7eo4531tp6.png&lt;/a&gt;&lt;/p&gt;

</description>
      <category>unix</category>
    </item>
    <item>
      <title>Jurassic Park code</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Sun, 15 Mar 2020 13:48:10 +0000</pubDate>
      <link>https://dev.to/raghuncs/jurassic-park-code-35j5</link>
      <guid>https://dev.to/raghuncs/jurassic-park-code-35j5</guid>
      <description>&lt;p&gt;&lt;em&gt;/Jurassic Park Main Modules/&lt;br&gt;
*/&lt;br&gt;
*/ Call Libs&lt;br&gt;
Include: biostat.sys&lt;br&gt;
Include: sysrom.vst&lt;br&gt;
Include: net.sys Include:&lt;br&gt;
pwr.mdl&lt;br&gt;
*/&lt;br&gt;
*/Initialize&lt;br&gt;
SetMain [42]2002/9A{total CoreSysop %4 [vig. 7*tty]}&lt;br&gt;
if ValidMeter(mH) (&lt;/em&gt;&lt;em&gt;mH).MeterViS return&lt;br&gt;
Term Call 909 c.lev {void MeterVis $303} Random(3#*MaxFid)&lt;br&gt;
on SetSystem(!Dn) set shp_val.obi to lim(Val{d}SumVal &lt;br&gt;
if SetMeter(mH) (&lt;/em&gt;*mH).ValdidMeter(Vdd) return&lt;br&gt;
on SetSystem(!Telcom) set mxcpl.obj to lim(Val{pdl}NextVal &lt;/p&gt;

</description>
      <category>pascal</category>
    </item>
    <item>
      <title>Bluetooth on Node JS</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Wed, 11 Mar 2020 23:29:14 +0000</pubDate>
      <link>https://dev.to/raghuncs/bluetooth-on-node-js-2g4f</link>
      <guid>https://dev.to/raghuncs/bluetooth-on-node-js-2g4f</guid>
      <description>&lt;p&gt;Can I get complete steps to install Bluetooth in Node JS. I tried to install nobel and node-bluetooth , I keep getting the below error... I even re-installed VS Code, but still the same....&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;node-gyp configure build&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;C:\Users\Dr Padma srinivas\node_modules\node-bluetooth&amp;gt;if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )&lt;br&gt;
gyp ERR! find VS &lt;br&gt;
gyp ERR! find VS msvs_version not set from command line or npm config&lt;br&gt;
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt&lt;br&gt;
gyp ERR! find VS checking VS2017 (15.9.28307.1064) found at:&lt;br&gt;
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"&lt;br&gt;
gyp ERR! find VS - found "Visual Studio C++ core features"&lt;br&gt;
gyp ERR! find VS - found VC++ toolset: v141&lt;br&gt;
gyp ERR! find VS - missing any Windows SDK&lt;br&gt;
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use&lt;br&gt;
gyp ERR! find VS looking for Visual Studio 2015&lt;br&gt;
gyp ERR! find VS - not found&lt;br&gt;
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8&lt;br&gt;
gyp ERR! find VS&lt;br&gt;
gyp ERR! find VS **************************************************************&lt;br&gt;
gyp ERR! find VS You need to install the latest version of Visual Studio&lt;br&gt;
gyp ERR! find VS including the "Desktop development with C++" workload.&lt;br&gt;
gyp ERR! find VS For more information consult the documentation at:&lt;br&gt;
gyp ERR! find VS &lt;a href="https://github.com/nodejs/node-gyp#on-windows"&gt;https://github.com/nodejs/node-gyp#on-windows&lt;/a&gt;&lt;br&gt;
gyp ERR! find VS **************************************************************&lt;br&gt;
gyp ERR! find VS&lt;br&gt;
gyp ERR! configure error&lt;br&gt;
gyp ERR! stack Error: Could not find any Visual Studio installation to use&lt;br&gt;
gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)&lt;br&gt;
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16&lt;br&gt;
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)&lt;br&gt;
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14&lt;br&gt;
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16&lt;br&gt;
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7&lt;br&gt;
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16&lt;br&gt;
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:302:5)&lt;br&gt;
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)&lt;br&gt;
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)&lt;br&gt;
gyp ERR! System Windows_NT 10.0.18362&lt;br&gt;
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "build"&lt;br&gt;
gyp ERR! cwd C:\Users\Dr Padma srinivas\node_modules\node-bluetooth&lt;br&gt;
gyp ERR! node -v v12.13.0&lt;br&gt;
gyp ERR! node-gyp -v v5.0.5&lt;br&gt;
gyp ERR! not ok &lt;br&gt;
npm WARN &lt;a href="mailto:padma@1.0.0"&gt;padma@1.0.0&lt;/a&gt; No description&lt;br&gt;
npm WARN &lt;a href="mailto:padma@1.0.0"&gt;padma@1.0.0&lt;/a&gt; No repository field.&lt;/p&gt;

&lt;p&gt;npm ERR! code ELIFECYCLE&lt;br&gt;
npm ERR! errno 1&lt;br&gt;
npm ERR! &lt;a href="mailto:node-bluetooth@1.2.6"&gt;node-bluetooth@1.2.6&lt;/a&gt; install: &lt;code&gt;node-gyp configure build&lt;/code&gt;&lt;br&gt;
npm ERR! Exit status 1&lt;br&gt;
npm ERR!&lt;br&gt;
npm ERR! Failed at the &lt;a href="mailto:node-bluetooth@1.2.6"&gt;node-bluetooth@1.2.6&lt;/a&gt; install script.&lt;br&gt;
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.&lt;/p&gt;

&lt;p&gt;npm ERR! A complete log of this run can be found in:&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Is this a case of recursion?</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Wed, 11 Mar 2020 01:49:45 +0000</pubDate>
      <link>https://dev.to/raghuncs/is-this-a-case-of-recursion-2jnb</link>
      <guid>https://dev.to/raghuncs/is-this-a-case-of-recursion-2jnb</guid>
      <description>&lt;p&gt;function a(){&lt;br&gt;
b();&lt;br&gt;
}&lt;br&gt;
function b(){&lt;br&gt;
a();&lt;br&gt;
}&lt;br&gt;
b();&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Node JS Project</title>
      <dc:creator>raghuncs</dc:creator>
      <pubDate>Wed, 11 Mar 2020 00:19:04 +0000</pubDate>
      <link>https://dev.to/raghuncs/node-js-project-oje</link>
      <guid>https://dev.to/raghuncs/node-js-project-oje</guid>
      <description>&lt;p&gt;Need an idea for simple Node JS project&lt;/p&gt;

</description>
      <category>node</category>
    </item>
  </channel>
</rss>
