Tuesday, 1 October 2013

Switching from Windows Server to NAS

Switching from Windows Server to NAS

so I recently started my new job as an IT specialist in a small media
agency (~6-8 people). We currently struggle with the server crashing
occasionally (within 4h - 48h) probably due to a hdd / hardware raid
fault. Since we have a relatively large image database (~6TB), network- as
well as data-reliability has a high priority.
I am currently thinking about switching to two NAS (w/ raid5/6) since I do
not really see the need of an actual server with Windows Server 2008
having ~12TB disk space in RAID 6. We have a Seagate Blackarmor 400 NAS
with 4x2TB in RAID 5. This NAS also has 2x1 Gbit/s network connectivity,
which would perfectly fit the requirements.
With these specs, I do not see the need of a "regular" Windows server but
I am not sure about the NAS performance or the temperature getting too
high in case of high access.
I would be glad to hear any suggestion about this.
Thanks!

Uncertain about Uniformizing Elements of Elliptic Curves.

Uncertain about Uniformizing Elements of Elliptic Curves.

pI am following a subject on Elliptic Curves and have come accross the
notion of a uniformizer. Wikipedia tells me that an element is a
uniformizer of a Discrete Valuation Ring, if it generates the (only)
maximal ideal. This seems sort of clear, but I have no idea how to apply
it to elliptic curves. Consider the following question:/p pLet $k$ a
field, $C: y^2=x$ a smooth curve in $\mathbb{A}^2$ and $P=(\alpha,\beta)$
a point in $C(k)$. Furthermore suppose that the characteristic of $k\neq
2$. Show that $x-\alpha$ is a uniformizing element of $P$ if and only if
$P\neq (0,0)$./p pNow this is not even intuitively clear to me. The ideal
we want to look at is $(y-\beta,x-\alpha)$ I suppose, since this maps
$k[x,y]/(y^2-x)$ to $0\in k$, but how do I show that
$(y-\beta,x-\alpha)=(x-\alpha)$ iff $P\neq (0,0)$?/p pI also cannot find
any information about such problems anywhere (I have the book Rational
points on elliptic curves by Silvermann, but it has nothing about
uniformizers)./p pI would appreciate some explanation (or a solution with
an explanation so I can apply this to other problems) or a reference to a
book which explains this to somebody who has not heard about Discrete
Valuation Rings or Uniformizers before./p pEDIT: This is still not clear
to me, I tried finding info in the recommended book, but it still doesn't
offer enough information. Could anybody be so helpful to explain how to
find uniformizers for such functions?/p

Monday, 30 September 2013

Stuck in grub rescue limbo- Please help

Stuck in grub rescue limbo- Please help

I installed ubuntu about a year ago and yesterday I deleted the partition
because my parents were annoyed with the startup menu. I didn't know I had
to fix the mbr.
Now every time I try to boot the computer the grub menu pops up and says
that the partition cannot be found. I made an ubuntu dvd but it doesn't
turn on automatically and I have no clue how to do it manually.
Please help me, I have no clue what to do.
Could someone atleast tell me how to retrieve data or documents.

How iPhone 5S can have such a big aperture=?iso-8859-1?Q?=3F_f/2.2=3F_=96_photo.stackexchange.com?=

How iPhone 5S can have such a big aperture? f/2.2? – photo.stackexchange.com

I thought that in order to have a big aperture such as f/2.2 a big amount
of light should be able to enter to the sensor and in order to do it, a
big lens was needed. How is it possible that in the …

Is there an awk one-liner or two-liner for doing this? [merge lines and add column values]

Is there an awk one-liner or two-liner for doing this? [merge lines and
add column values]

So I have a laaaaaaaarge file like this:
Item|Cost1|Cost2
Pizza|50|25
Sugar|100|100
Spices|100|200
Pizza|100|25
Sugar|200|100
Pizza|50|100
I want to add all Cost1s and Cost2s for a particular item and produce a
merged output.
I've written a python code to do this,
item_dict = {}
for line in file:
fields = line.split('|')
item = fields[0]
cost1 = fields[1]
cost2 = fields[2]
if item_dict.has_key(item):
item_dict[item][0] += int(cost1)
item_dict[item][1] += int(cost2)
else:
item_dict[item] = [int(cost1),int(cost2)]
for key, val in item_dict.items():
print key,"|".join(val)
Is there anyway to do this very efficiently and quickly in awk or using
any other wizardry?
Or can I make my python more elegant and faster?
Expected Output
Pizza|200|150
Sugar|300|200
Spices|100|200

mySql: getting latest transaction made for a row from another table

mySql: getting latest transaction made for a row from another table

I'm trying to query for the last transaction made for each item on
tbl_invty that doesn't have the transaction type "Idle" from table
tbl_trans. The multiplicity of transactions is confusing me on getting my
query right and all I was able to do so far was joining the two tables
below on tbl_invty.code=tbl_trans.code. How do I go about this so I could
output only rows 2 and 3 from tbl_invty joined with rows 5 and 8 from
tbl_trans based on the column code?
tbl_invty
+------+-------------+
| CODE | DESCRIPTION |
+------+-------------+
| 1 | abc |
| 2 | bbb |
| 3 | cdf |
+------+-------------+
tbl_trans
+----------+------+--------+------------+
| TRANS_ID | CODE | TYPE | TRANS_DATE |
+----------+------+--------+------------+
| 1 | 1 | NEW | 2012-09-29 |
| 2 | 1 | UPDATE | 2012-09-30 |
| 3 | 1 | IDLE | 2012-09-30 |
| 4 | 2 | NEW | 2012-09-29 |
| 5 | 2 | UPDATE | 2012-09-30 |
| 6 | 3 | NEW | 2012-09-29 |
| 7 | 3 | UPDATE | 2012-09-30 |
| 8 | 3 | UPDATE | 2012-09-30 |
+----------+------+--------+------------+

Sunday, 29 September 2013

Whats the right way to publish an Alpha / Beta Android App?

Whats the right way to publish an Alpha / Beta Android App?

I'm just getting started with writing Android apps.
I have something I want to make available to a few interested testers, but
I'm a long way from having an app. ready for the general public.
How do I make it available for testers without putting it on Play?