Distinguishing between Laptop Specifications - ruby

If I have thousands of string like
Toshiba - Satellite C855D-S5100 Laptop, AMD E-Series Processor (1.3 GHZ), 4GB DDR3, 320GB HDD, 15.6" Display, AMD Radeon HD 6310, Double-layer DVD±RW/CD-RW, 802.11 b/g/n, Windows 8 » for $279.99 at Best Buy
and have a Laptop object with different properties like:
Processor
RAM
Hard Drive
Operating System
etc
I want to create a laptop object for every string and set the attributes with the formatted data from the string.
I am wondering if there is an easy way to go about doing this rather than splitting the string into an array by doing s.split(","), looping through it and comparing it to keywords:
i.e. If the string contains "DDR3", set that string as the RAM property

Can you tell if for the thousands of strings you have some semblance of regularity, structure. The difficulty of what you ask is dependant of the variability between 2 different entries.
Toshiba - Satellite C855D-S5100 Laptop, AMD E-Series Processor (1.3
GHZ), 4GB DDR3, 320GB HDD, 15.6" Display, AMD Radeon HD 6310,
Double-layer DVD±RW/CD-RW, 802.11 b/g/n, Windows 8 » for $279.99 at
Best Buy
Is pretty disimilar from
Apple MacBook Pro - Core i5 2.5 GHz - 500 GB HDD / 5400 rpm - 13.3″
1280 x 800 - 4 GB RAM - English
In one you have RAM in the other DDR3. In one you have 4GB with no space and in the other there is a space. But it's not hopeless if your list contains strings which are all very similar in structure. Then I'd say figure out a regex for what you want to extract.

Related

Can I ask this here (if not I am sorry!)? Laptop for coding

I am currently looking for a laptop to use for university next year. I will be studying Computer Sciences and I am still debating which laptop I should get.
These where the laptops I had in mind:
Dell XPS 15 9570 (€ 1.829,00)
i7-8750H processor (4,1 GHz; 6-cores)
16 GB DDR4, 2.666 MHz
512 GB M.2 2280 PCIe
NVIDIA® GeForce® GTX 1050Ti 4 GB GDDR5
1920 x 1080 15'' display.
Up to 11h of battery life (97-Wh)
Asus ZenBook Pro UX550VD (€1.599)
i7-7700HQ processor (3,8 GHz; 4-cores)
16 GB SO-DIMM DDR4
512 GB M.2 PCIe
NVIDIA® GeForce® GTX 1050 4 GB GDDR5
1920 x 1080 15'' display.
Up to 8h of battery life
The XPS has better battery life and has a better screen.
The ZenBook is cheaper, has more ports but has an older processor and CPU.
Maby their is another PC that is better. I would love to see different suggestions. Please note that since I am living in Belgium not every laptop is available here.
I hope I can post this type of question on this website. I don't really know where else to post. If you are not allowed to post this on here, I am terribly sorry in advance!
Thank you for helping!
If you want to use for studies only then you could go for Asus. It is good anyway. If you want to have laptop for your job then go with Dell

Memory management by OS

I am trying to understand memory management by the OS .
What I understand till now is that in a 32 bit system ,each process is allocated a space of 4gb [2gb user + 2gb kernel] ,in the virtual address space.
What confuses me is that is this 4gb space unique for every process . if I have say 3 processes p1 ,p2 ,p3 running would I need 12 gb of space on the hard disk ?
Also if say I have 2gb ram on a 32 bit system ,how will it manage to handle a process which needs 4gb ?[through the paging file ] ?
[2gb user + 2gb kernel]
That is a constraint by the OS. On an x86 32-bit system without PAE enabled, the virtual address space is 4 GiB (note that GB usually denotes 1000 MB while GiB stands for 1024 MiB).
What confuses me is that is this 4gb space unique for every process .
Yes, every process has its own 4 GiB virtual address space.
if I have say 3 processes p1 ,p2 ,p3 running would I need 12 gb of
space on the hard disk ?
No. With three processes, they can occupy a maximum of 12 GiB of storage. Whether that's primary or secondary storage is left to the kernel (primary is preferred, of course). So, you'd need your primary memory size + some secondary storage space to be at least 12 GiB to contain all three processes if all those processes really occupied the full range of 4 GiB, which is pretty unlikely to happen.
Also if say I have 2gb ram on a 32 bit system ,how will it manage to
handle a process which needs 4gb ?[through the paging file ] ?
Yes, in a way. You mean the right thing, but the "paging file" is just an implementation detail. It is used by Windows, but Linux, for example, uses a seperate swap partition instead. So, to be technically correct, "secondary storage (a HDD, for example) is needed to store the remaining 2 GiB of the process" would be right.

to write 10,000 x 5,000 term document matrix using 'Write Excel' operator

I am using rapid miner studio 6.0.007 with 8 GB ram trial license on windows 7 sp1. I have Core i7 with 8 GB RAM and 256GB SSD 840 PRO. I want to write term document matrix 5,000 columns and 10,000 rows. But I am unable to write because when using write excel operator memory utilization becomes maximum i.e. 98% of my 8 GB ram and after many hours I got the error message related with less available memory. Is there some optimal setting required in Rapid miner?
The trial license is limited to a small amount of memory; 1Gb I believe. You can write the output as a CSV file which might require less memory.
Alternatively, you can use the last 5.n community version which is not memory limited.

Will windows XP 32-Bit OS read 8GB of RAM?

Am using Windows XP 32-Bit Operating System with Intel Xeon processor. My current RAM memory is 4GB and 320GB of hard disk. And I feel that my computer is very slow. So if I upgrade the RAM memory to 8GB, will my computer handle the upgrade?
I probably do not think so. 32 bit OS can only support 4 GB of memory.
Calculation example:
2 ^ 32 bytes = 4 GB.
If you want more than 4 gb to use, then use a 64 bit OS
No,friend your computer will not use 8GB ram. At first you will have to know what is ram,
ram is a device that store information for temporarily, and share that data with very speedy and less consuming time.In 32 bit OS ram can hold data of 2 ^ 32 bytes = 4 GB if u have 8 gb ram, you 32 bit system can not use it,
Think about a car garage which is constructed for 4 cars, if you have 10 car you can't put all of your in the garage, so your 32 bit OS can not hold information more than 4gb ram, like car garage.Hope it will help you to get your answer
Theoretically it could: http://en.wikipedia.org/wiki/Physical_Address_Extension, but in XP there is no support for this.
Upgrade your os to 64 bit to use 8gb ram.
Just wondering, why did you put windows xp 32 bit on your computer? it could be x64 edition. Intel xeon processors are 64 BIT, not 32 bit.

How to bind an specific processor core to specific RAM DIMM

I would like to bind a specific processor core to a specific RAM DIMM.
Example:
CPU-> Intel i7 2600K (Quadcore) where each core is listed as 0,1,2,3
RAM-> 2 * 2GB DDR3 (Specifics not necessary) listed as 0,1
I would like to execute a program that runs on CPU core 2, and use only RAM DIMM 0.
The closest tool to use would be numactl, but numactl (as far as I have read) controls the memory of a node as a whole not per DIMM.
Your help would be much appreciated...

Resources