Server Bug Fix: Pirates of Barracuda Bay 21322 – Is there a way to get the ship pirating-worthy?

Original Source Link

From what I have read, when you convert the island to a seaworthy ship, you are still left with the inn part, and no cannons on the ship. All the portholes are gone or converted to windows.

Is there a way to get the cannons back on the ship? Preferably using only pieces from the set? If pieces needs to be added, what is the simplest way to make that conversion?

The review over at Brickset mentions this exact modification:

enter image description here

Pearl gold windows are fixed inside each gunport, preventing the deployment of cannons. While this seems slightly odd, the lattices can be removed and replaced with cannons, as demonstrated here. I appreciate these options but some furniture must be removed from inside to create enough space for the weapons, corresponding with the officers’ quarters on historic ships where cannons could replace tables and chairs during battle.

(Emphasis by me)

Tagged : / / /

Linux HowTo: Why did this route work? Using another player’s station, in Ticket to Ride Online?

Original Source Link

We had this situation recently in the online Ticket to Ride. Why did Yellow’s route from London to Berlin work? Is Yellow really allowed to use Purple’s station on Essen?

enter image description here

It’s hard to tell with the big green destination marker, but it looks like there is a yellow train station in Berlin, which would allow Yellow to use the track from Essen to complete the ticket.

cropped screenshot showing the hidden station

As far as I can tell that should not have worked at all. It seems like the T2R online simulation has a route calculation bug. I suggest reporting this to them.

Players can only use their own train stations. From Ticket to Ride Europe’s rules (page 6):

A Train Station allows its owner to use one, and only one, of the routes belonging to another player, into (or out of) that city to help him connect the cities on his Destination Tickets.

There is no allowance for players other than the owner to make use of a train station, or for the owner to share it, or anything like that. The owner gets the route and that’s that.

Tagged : /

Ubuntu HowTo: How to install IKE software on Ubuntu 20.04

Original Source Link

Is there a easy way to install this VPN client IKE software over Ubuntu 20.04?

After reading some forum, I decide to recompile sources under Ubuntu 20.04 because this packet is out of maintenance until some years. The dependencies, packets and libraries was no longer installable in 20.04 LTS. I’ve fix issue to old library and create a patch to apply at the last version of source file (shrew soft iked and ikec). This procedure you will find here below and the patch file is in my blog.

…get the sources…

wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2

sudo tar jxpvf ike-2.2.1-release.tbz2

cd ike

…copy in this directory ike.patch file …

patch -p1 < ike.patch

sudo apt-get install build-essential libssl-dev libaudio-dev libcups2-dev cmake libedit-dev g++

…now recompile with NO-GUI directive…

cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=NO -DETCDIR=/etc -DNATT=YES

make

sudo make install

sudo iked

…check if yourServer.vpn file is present under your “~/.ike/sites/” directory. If no copy it without .vpn extension (like this: ~/.ike/sites/yourServer)

ikec -r yourServer -a

…If all goes well, you should see at the end…..

“ii : tunnel enabled”

I hope that can help someone.

Tagged : / /

Math Genius: If the magnitude of the resultant of two equal vectors is equal to that of either vector, find the angle between them.

Original Source Link

If the magnitude of the resultant of two equal vectors is equal to that of either vector, find the angle between them.

My Attempt:
Let $vec {a}$ and $vec {b}$ be two vectors such that $|vec {a}|=|vec {b}|$

Magnitude of Resultant:
$$=sqrt {a^2+b^2+2abcos theta}$$
$$=sqrt {2a^2+2abcos theta}$$

How do I proceed further?

From $|a+b|^2=|a|^2$ and $|a|=|b|$ we have
$$|a|^2=|a+b|^2=|a|^2+|b|^2+2langle a,brangle=2|a|^2+2langle a,brangle,$$
so $langle a,brangle=-|a|^2/2$. Hence the cosine of the angle between $a$ and $b$ using $|a|=|b|$ again is
$$frac{langle a,brangle}{|a||b|}=frac{-1}{2}.$$

The resultant vector $mathbf{OC}$ is the diagonal of the rhombus whose adjacent sides are $mathbf{OA}, mathbf{OB}$. Since its length is equal to either, we have an equilateral triangle $mathbf{OBC}$. Thus the angle between the vectors is $120^circ$

Let,$R$ be the resultant of the sum of the two vectors $vec A$ and $vec B$ such that $|vec A|=|vec B|$.So,$$R=sqrt{|vec A|^2+|vec B|^2+2|vec A||vec B|costheta}$$

where $theta$ is the angle between $vec A$ and $vec B$.So,

$$R=sqrt{2|vec A|^2+2|vec A|^2costheta}$$.

Now magnitude of resultant $R$ is equal to either of the vectors $vec A$ and $vec B$.So,

$$|A|=sqrt{2|vec A|^2+2|vec A|^2costheta}$$
$$implies|vec A|^2=2|vec A|^2+2|vec A|^2costheta$$
$$impliesfrac{-|vec A|^2}{2|vec A|^2}=cos theta$$
$$impliestheta=cos^{-1}-frac{1}{2}$$.

Hope this helps!!

Tagged :

Code Bug Fix: I am new to IBM API Connect. We have a requirement where we need to test the webhooks connect availability and response

Original Source Link

We would like to to used IBM API Connect Test & Monitor on cloud service.

We have a requirement where we need to test the webhooks connect availability and response.

How can you advice to create a API test ?

https://ibm-apiconnect.github.io/test-and-monitor/

Tagged : / / / /

Server Bug Fix: How fast can you typically hike through untracked forest?

Original Source Link

Average hiking speed over level ground is often reckoned around twenty miles per day, assuming hikers in good shape who know what they are doing and where they’re going. (As a rough approximation, which is fine, I’m just looking for rough approximations here.)

But I think that assumes either fairly open ground, or a trail through forest. What would a corresponding figure be in the absence of a trail? To be specific, say primeval deciduous forest, as would’ve been found in northern Europe or parts of North America before the arrival of humans? Assuming the hikers know what they are doing, how to handle the terrain, it will still be at least somewhat slower, right?

As a CDT through hiker, off-trail ultramarathon runner, and general fan of cross-country travel, I feel somewhat qualified to speak to this question.

Moving off trail tends to be slower than moving on trail. Exactly how much slower depends on many factors.

  • I generally walk 3 mph (~5 km/h) on a well maintained trail with reasonable (less than 1000 ft/mile or 200 m/km) elevation change
  • I generally walk 2-3 mph (~3-5 km/h) off trail in the absence of thick brush, with reasonable elevation change, and easy navigation (obvious landmarks to follow).
  • I generally walk 1 mph (~1.6 km/h) or slower off trail in moderate brush, with extreme elevation change, and difficult navigation.
  • I have moved as slowly as 0.2 mph (~0.3 km/h) in extreme conditions.

Your mileage may vary!

While I love @Lucas Wojciechowski’s answer, I’d also like to answer this from a different direction, as OP is asking about the distance covered in a single day.

I think here the estimate of roughly 20-30 km per day (13-20 miles) is a reasonable base-line assumption given:

  • you know you’ll be on decent trails without excessive elevation
  • you won’t waste time on navigation (because of obvious landmarks or good trail signage)
  • your goal is to cover ground (i.e. no hours spent fishing, landscape painting, sightseeing, etc…)

This will be sustainable for longer multi-day treks even with reasonable pack weight (15-25kg) and with mediocre stamina & training. Also this assumes that you need to spend time to break camp in the morning, setup camp at night, spend time cooking, collecting/purifying water, getting stuff out of and into your backpacks – in short on an 8-10 hour day you’ll hardly do 8-10 hours of actual walking.

–> But, all of this considered, in my experience (of many months and hundreds of kilometers of treks) the 20-30 km/day can be a reasonable assumption to base any route planning on if you want to plan a trek on a well-mainained long-distance hiking trail (e.g. Kungsleden, Appalachian, CDT, Camino de Santiago, …).[1]

If you ever go off-trail, then all bets are off: as Lucas outlined in his answer, depending on various factors your speed can slow to a crawl. In such situations you either need good beta on the planned route (e.g. from locals, a good guide book, etc.) or you need to plan with very conservative speeds, to ensure they will be sustainable for you and your group.


[1] This is especially true because over multi-day hikes any daily deviations tend to even out over multiple days.

Tagged :

Making Game: Outlook 2013 IMAP synchronizing every second + error 800CCC0F-0-0-560

Original Source Link

I’ve configured an IMAP account in Outlook 2013 which, at first, behaves just fine. It syncs the inbox and fetches about 2mb of messages. New messages arrive promptly in the inbox, all seems well.

But after, say, 10 minutes, the synchronization goes crazy. Outlook pegs one CPU core at 100% and the “Sync Issues” folder starts filling with synchronization messages, a new one every second (right on the second) like thus:

Sync Issues

Every now and then it throws in an error:

Sync Error

I’d previously used POP3 for this account on Outlook 2010 without issue, but want to switch to IMAP since I’m using IMAP (without issue) for the same inbox on my iPhone.

I’ve queried my service provided if they’re aware of any compatibility issues with their IMAP service, and the response has basically been “Don’t use Outlook 2013 yet, it stinks”.

I see various other reports of the same issue dating back to pre-release days with responses like “it’s pre-release, sit tight”. Well it’s been RTM for almost a month now, does anybody know what’s going on? Is it a recognised bug? A server incompatibility? Is there any known client-side work-around? (After-all it works without issue for the first 10-20 minutes).

I have seen this before at work and the solution we found to work for us was to load Outlook in Safe Mode and the problem “went away”. The only issue is it did not address the problem.

Open the Command Prompt and type whichever command suits the version of Windows you have installed:

Windows 32-bit

"C:Program FilesMicrosoft OfficeOffice15Outlook.exe" safe:3

Windows 64-bit

"C:Program Files (x86)Microsoft OfficeOffice15Outlook.exe" safe:3

Ensure your copy and paste the entire line, including the " around the file name. You do not need to change to the directory, it will either run or it won’t.

If you are unsure of which version of Windows you have, try the second one, then the first one (most new computers are 64-bit installations of Windows).

If this works for you, then create a shortcut and put it where you want with the target as the command is copied from above.

This error is caused by a misdirected rootdirectory for the IMAP mailbox. Set the mailbox root (in outlook settings) to ‘inbox’ (in most cases, but check the real name of the inbox via the webmail service of that account) and the error is history.

Tagged : / / /

Code Bug Fix: Rolling window for 1D arrays in Numpy?

Original Source Link

Is there a way to efficiently implement a rolling window for 1D arrays in Numpy?

For example, I have this pure Python code snippet to calculate the rolling standard deviations for a 1D list, where observations is the 1D list of values, and n is the window length for the standard deviation:

stdev = []
for i, data in enumerate(observations[n-1:]):
    strip = observations[i:i+n]
    mean = sum(strip) / n
    stdev.append(sqrt(250*sum([(s-mean)**2 for s in strip])/(n-1)))

Is there a way to do this completely within Numpy, i.e., without any Python loops? The standard deviation is trivial with numpy.std, but the rolling window part completely stumps me.

I found this blog post regarding a rolling window in Numpy, but it doesn’t seem to be for 1D arrays.

Just use the blog code, but apply your function to the result.

i.e.

numpy.std(rolling_window(observations, n), 1)

where you have (from the blog):

def rolling_window(a, window):
    shape = a.shape[:-1] + (a.shape[-1] - window + 1, window)
    strides = a.strides + (a.strides[-1],)
    return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides)

def moving_avg(x,n):
    mv =  np.convolve(x,np.ones(n)/n,mode='valid')
    return np.concatenate(([np.NaN for k in range(n-1)],mv))

I tried using so12311‘s answer listed above on a 2D array with shape [samples, features] in order to get an output array with shape [samples, timesteps, features] for use with a convolution or lstm neural network, but it wasn’t working quite right. After digging into how the strides were working, I realized that it was moving the window along the last axis, so I made some adjustments so that the window is moved along the first axis instead:

def rolling_window(a, window_size):
    shape = (a.shape[0] - window_size + 1, window_size) + a.shape[1:]
    strides = (a.strides[0],) + a.strides
    return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides)

NOTE: there is no difference in the output if you are only using a 1D input array. In my search this was the first result to get close to what I wanted to do, so I am adding this to help any others searching for a similar answer. This is also my first answer post, so please let me know suggestions about better formatting and submitting answers.

With only one line of code…

import pandas as pd
pd.Series(observations).rolling(n).std()

Tagged : / /

Server Bug Fix: Why do we say ‘classical computer’ to mean ‘digital computer’?

Original Source Link

The term ‘classical computer’ is always used to mean standard digital computation (Turing model, Boolean circuits or just good old RAM). I have never seen it to mean other models of computation based on classical physics (such as analog computation). This is evident when papers talk about the classical complexity of a problem, when what is meant is the complexity defined given a digital model of computation.

Do we gain anything by ‘classical’ instead of ‘digital’, or is it just a shibboleth?

I think we do gain a little bit by saying “classical” instead of “digital”.

As you point out, you can certainly build classical analog computers, and in the past these were very useful. But I believe that such classical analog computer can all be efficiently simulated by digital computers – not in the sense that a digital circuit can necessarily mimic the exact physical evolution of the computer, but in the sense that they can in principle solve any given problem with a similar asymptotic runtime (possibly up to polynomial speedups or slowdowns). In other words, I think it’s generally believed that the extended Church-Turing thesis holds for all physically realizable computers whose behavior does not essentially rely on quantum mechanics. (You might argue that this claim is vague or even circular, but I think that with some work you can make it both true and noncircular. Note that this claim certainly hasn’t been rigorously proven, but I think it’s generally accepted to be true in our world.)

So I think that referring to these computers by the broad term “classical” usefully conveys the highly nontrivial insight of the extended Church-Turing thesis: that if you just care about “macro” features like the asymptotic runtime, then it doesn’t actually matter whether your computer is digital or analog – what matters is whether it can use inherently quantum phenomena like superpositions and entanglement in a controlled fashion.

Edited to add. James Wootton asks in a comment whether it’s been proven that classical analog computers can be efficiently simulated. The answer is no, but I personally think that that question is making a bit of a category error. The way I see it, the extended Church-Turing thesis is not quite a sharp enough statement to be mathematically provable or falsifiable (although restricted versions may be). It’s more like a general principle that evidence can accumulate to either suggest is useful or not useful. (More along the lines of a statement like “All physical regimes can be described by some type of action principle” than a mathematical proposition.)

By the way, I highly recommend Scott Aaronson’s paper “NP-complete problems and physical reality” (PDF), which proposes a claim somewhat similar to the extended Church-Turing thesis – that no physically realizable process at all (classical, quantum, or whatever) can act as a computer that efficiently solves NP-complete problems.

I think the reason is that ‘classical’ is more effective.

Maybe too much. Some colleagues of mine that are not working on quantum computing, do not like the expression ‘classical computing’ as they think it is used with a derogatory intent, meaning ‘old fashioned’, ‘outdated’.

Tagged :

Linux HowTo: I cannot reduce the brightness of my laptop’s screen monitor

Original Source Link

Since a while i’m not able to reduce the brightness of my screen I don’t know why!

I’ve tried using the shortcuts but it doesn’t work but the other shortcuts work like for the volume, the wifi…
I tried doing it manually through the control panel, but i cannot see the brightness setting (slider) anymore!
And my brightness is at the highest level, this is very irritating especially during the night.
I re-installed my laptop drivers and still nothing!
I have a ACER ASPIRE E1-531G

And something else i noticed is that i can reduce the brightness (using shortcut) when the computer is booting but after logging in, there is no way to do it.

what can I do to solve this ?

EDIT:
enter image description hereenter image description here

Sorry my system is in french 🙂 Affichage meand Display

From Microsoft official help document.

Adaptive brightness is a feature in Windows that uses a light sensor to automatically adjust the display brightness to match the lighting conditions in your computer’s surroundings. To use adaptive brightness, you must have light sensors installed and enabled on your computer.

To determine if your laptop or computer monitor supports adaptive brightness, look for the Enable adaptive brightness setting in Power Options (mentioned in the following procedure) or check the information that came with your computer.

To turn adaptive brightness on or off

-Open Power Options by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, and then clicking Power Options.

-Under any plan, click Change plan settings.

-Click Change advanced power settings.

-In the list, expand Display, and then expand Enable adaptive brightness.

-To turn adaptive brightness on or off when your computer is running on battery power, click On battery, and then, in the list, click On or Off.

-To turn adaptive brightness on or off when your computer is plugged into an outlet, click Plugged in, and then, in the list, click On or Off.

-Click Apply. Click OK.

Or You can use any of the software mentioned in below website.
https://www.raymond.cc/blog/software-to-adjust-monitor-brightness-and-contrast-for-dell-studio-one-desktop/

http://adjustlaptopbrightness.en.softonic.com/

  • go to the device manager
  • select the display adapter
  • right click on Intel graphics
  • chose update driver
  • select browse from my computer
  • select let me pick from the device driver on my computer
  • select Microsoft basic display adapter

After this restart the computer and check that brightness is changed or not.

If not then go to device manager-display adapter-this time again select intel hd graphics family like in the above set of steps. After this restart the computer and try to change the brightness.

It will solve problem in 90% cases.

Tagged : / / /