Why do Vlans need routers to communicate?

Question: Why do devices on two separate VLANs (Virtual LANs) implemented on the same switch require a router to communicate?
Comment: Homework? Off-topic.
Comment: Why do you need a phone to communicate?
Comment: Hi m.Robot, welcome to NESE. At this point, I'm unsure if your question is homework or a legitimate query, so to assist in both cases I would like to share with you this resource from my blog:  [Routing Between VLANs](https://www.practicalnetworking.net/stand-alone/routing-between-vlans/). It is an article which explains why you need to Route between VLANs, and presents the different options that exist to accommodate.
Comment: https://networkengineering.stackexchange.com/questions/58364/why-cant-devices-on-different-vlans-but-on-the-same-subnet-communicate/58370#58370 -- this answer is relevant to your question.
Comment: Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
Answer:
Why Vlans need routers to communicate?

Brief answer, they don't. A VLAN is a virtual LAN. It is a means of logically dividing one physical switch into multiple virtual switches.
If you have two different physical switches (no VLANs configured) can the devices connected to each switch communicate? No, not unless there is something that facilitates or allows the communication between the separate switches.
Simplest solution is then providing a physical connection between the two switches (i.e. connect a network cable between the two). This now allows devices on one switch to communicate devices on the second switch...at least at L2. This also works with VLANs. If you simply want L2 communication between two different VLANs, all you need to do is provide a connection between the two.
A router is necessary for L3 communication to take place. Say you have multiple devices all connected to one switch with no VLANs (or all to a single VLAN) with half of the devices using a 192.168.10.0/24 subnet and the other half using 10.168.10.0/24. Can any two devices on different subnets communicate with each other? The answer is yes and no.
Yes, they can when you are talking about L2 communications. But if you want to connect to them using L3 (i.e. IP), then no. To allow devices on two different L3 subnets to communicate, the traffic must be routed across the L3 boundary. This is where the router comes into the picture.
The likely source of your question is the common perception that a single VLAN is associated to a single IP subnet. While this is often the case, it is not always so. You can use multiple different IP subnets on a single VLAN, and you can use a single subnet on multiple VLANs. Both are possible, although you really should understand how this works and more importantly why you would want to do so before you do.
Comment: do i understand correctly that vlan is for subnetting within a one switch? purpose is to save switches and networks(networks because we can isolate devices in one subnet through vlans)
Answer: VLANs don't need routers to communicate.
Well, they usually do, but not necessarily. They just need some "external help". Which sometimes comes internally.
Confusing? Yes. Read on.
Configuring VLANs on a switch effectively makes the switch (internally) split itself into multiple switches. Imagine having multiple logical backplanes, one for each VLAN you define.
The you go ahead an define each switchport's behaviour w/regards to the VLANs available on the switch.

some switchports will be mapped to a single VLAN, and will not have VLAN tags on the ethernet frames they send or receive (switchport mode access and switchport access vlan XXX in Cisco speak).
some switchports will send and receive ethernet frames for all VLANs available on the switch (switchport mode trunk)
some switchports will send and receive ethernet frames for a (sub)set of VLANs available on that switch (switchport mode trunk & switchport trunk allowed vlan [add|remove] XX1,XX2,XX5)
and then there's some advanced settings and modes for untagged vlans on tagged trunk ports etc.

VLANs are (bar the shared hardware ressources) completely isolated from each other, as if they were each a seperate switch, for most aspects of "switching". There's even each a MAC address table for each VLAN, and sometimes even a separate instance of spanning-tree for each VLAN (at least on Cisco switches with (Rapid-)PVST+).
There is no way to get data to flow from one (layer-2) VLAN to another without some external help.
This external help may come in different forms (be aware that some of these are pretty "stupid ideas" for a novice and cause great havoc unless you know exactly what you are doing and take some countermeasures; they're just shown here for illustration):

a cable connecting one switchport access vlan XX1 port to one switchport access vlan XX2, sometimes called "loop" or "ear cable" [yes, thats a bad idea]
another switch or bridge (single VLAN or not VLAN aware) connecting one switchport access vlan XX1 and one switchport access vlan XX2 [yes, another bad idea]
an external router or firewall with multiple ports (standard routed interfaces, not ports of an integrated switch), each connected to one switchport access vlan XXn on the given switch [good setup]
an external router or firewall with a single interface, configured with a set of VLAN-tagged subinterfaces, connected to a switchport mode trunk, with a matching set of switchport trunk allowed vlan XX1,XX3,XX7. That is sometimes called the router on a stick scenario. [good setup]

And then, this external help might also come internally and now we're entering the domain of layer-3 switching, and the lines between layer-2 VLANs and layer-3 things get blurred a bit.

internal routing engine of the same switch. The switch may not only have a set of VLANs (as simple layer-2 VLANs, see above) , but also a set of SVIs (SwitchVirtualInterfaces, interface vlanXXxin cisco speak).  Not all layer-2 VLANs need an SVI, but all SVIs must have an underlying layer-2 VLAN.
The SVI can be configured with IPv4/IPv6 address&mask and some further layer-3 properties usually found on routers. These SVIs then appear as hosts in the given VLAN.
Enabling ip[v6] forwarding or ip[v6] routing (sometimes on by default, consult your documentation) then enables the switch - more precisely: its internal routing engine - to forward or "route" packets from one VLAN to another. That of course is only possible if IP(v6) addressing for each participating VLAN-with-SVI is non-overlapping, else "routing is not possible" [1].
At first, ip forwarding from one SVI to the other is only possible
between directly attached networks of that routing engine, but there's possibilities for adding static routes, and a default route (to some firewall, possibly) or integrating the switch's routing engine into some dynamic routing setup possibly already in place. Essentially, for the relevant VLANs-with-SVIs, the switch is now a router and should be treated as such.

[1] not so for pure isolated Layer2-VLANs which have no SVIs; they're unaware of each other, and therefore they do not actually require non-overlapping IP addressing. It's entirely up to the network and systems admins how to define overlapping or unique IP subnets for Layer2-VLANs. It all depends on the given addressing plan.
Answer: I think You have good Understanding about Subnet Masking. Subnet is a separate network. Generally No network talk to any other network without having routing configurations. Device is Same but Vlans define separate networks inside same switch.
Separate Network means, each network has own broadcast domain. Therefore devices which in same broadcast domain can communicate in their broadcast domain.
you don't need router when switch is not able to provide routing function. If you have L3 Switch, you can configure routing in same device. you don't need separate router.
Note
As per my knowledge, 2 VLANs cannot have same IP address range. It is possible in VRF.
Answer: By using VLANs you can split a switch into independent networks. This separation is achieved by limiting what goes into the MAC-address-table of each VLAN.
MAC-addresses are used to identify a host at the Layer2 (Data Link) at which the switch operates. When sending a frame, a source host will put its own MAC address in the source field and the destination MAC address in the destination field (Not to be confused with the IP address which operate at Layer3 and are added as source/destination of the Layer3 packets that are encapsulated in Layer2 frames).
A MAC-address-table in a switch shows for each port the associated VLAN and the list of MAC addresses (hosts) that can be reached on that port.
When a frame enters the switch on a port assigned to a VLAN, the switch will lookup the MAC-destination-address of the frame in the MAC-address-table for th VLAN of the incoming port. One of the two will happen:

If there is a match, the frame will be sent out on that port and it
is expected that the destination will be reached because we had it in
the table.
If there is no match, the frame will be sent out on ALL ports that are assigned to the VLAN of the incoming port (and nowhere else!) hoping that the frame will reach it's destination. This is also why the VLAN is known as a broadcast domain.

In this process the switch also looks at the source MAC address and adds it to the MAC-address table associated with the incoming port and its VLAN. This is how the MAC-address-table gets populated.
Now if you want to communcate between hosts that are on different VLANs, this can't be done with a Layer2 switch only because, per the above explanation, even though the MAC destination (aka MAC address of the host in the other VLAN) will be unknown, the frame will not be sent out ports in other VLANs.
What you need here is a Layer3 device (like a Router or a Layer3 switch - could be the same switch we're already connected to if it has the capability) that will provide its own MAC address when asked what's the Layer2 (MAC) Address of a particular Layer3 (IP) address. This mechanism is called Proxy ARP and will help frames destined to hosts outside source's VLAN to reach a gateway that knows how to forward the packet further. Notice the use of packet here which implies the Layer 2 headers will be rebuilt once the gateway sends the packet further on the next network segment.
PS - In this explanation I assumed the destination MAC address is known just to prove how the system works.In reality without a gateway to answer on behalf of the destination outside the VLAN, the source won't even be able to craft and send a data frame. The standard ARP mechanism used to find the Layer2 (MAC) address associated with Layer3 (IP) address of a field only works within a VLAN (braodcast domain)
Answer: General different VLANs won't communicate to each other. To ensure communication between different Vlans routing is required  . .
By configuring  Inter-vlan routing among different VLANs in layer3 device . Different Vlans can communicate among them .
When there is traffic between same Vlan host traffic will be forwarded on basis of destination mac address for this it will refer mac -address table in layer2 switch packet won't reach to layer3 device ..
When there is tràffic between. Different Vlan . Traffic is destined to gateway of  source host which is configured on layer3 device  . From layer3 devices packet will destined to destination with reference route entry if it network is connected on different devices or checks ARP table if destination network is directly connected network .


When and How Strategy pattern can be applied instead of decorator pattern?

Question: I am learning design patterns and trying to follow Go4 book. On page:179, in the decorator pattern chapter, there is a line which says

"..by extending the number of strategies from just one to an
  open-ended list, we achieve the same effect as nesting decorators
  recursively."

I didn't quite get this statement.
Strategies focus on having independent algorithms, which can be set dynamically and don't know much about the client they are set in.
Whereas decorators are not quite independent of the clients they decorate. In fact, they are of same supertype as the object they decorate.
Am I missing a point here?
Answer: I'll quote a little more of the context that I think is needed for this to make sense.

Strategies are a better choice in situations where the Component class is intrinsically heavyweight, thereby making the Decorator pattern too costly to apply. In the Strategy pattern, the component forwards some of its behavior to a separate strategy object. The Strategy pattern lets us alter or extend the component's functionality by replacing the strategy object.
For example, we can support different border styles by having the component defer border-drawing to a separate Border object. The Border object is a Strategy object that encapsulates a border-drawing strategy. By extending the number of strategies from just one to an open-ended list, we achieve the same effect as nesting decorators recursively.

All this is saying is that both patterns can be used to add behavior to your base component, and that with Decorator, to add multiple behaviors, you can nest the decorators, while with Strategy, you need to use multiple strategies.
You're right that strategies are generally more independent of the main component than decorators, but it is possible for them to be aware of the component.  And to use the Strategy pattern, the main component is aware of the existence of strategies, where that's not needed with Decorator.
Answer: To use their example, you might have a window class which can be scrolled and/or have its border painted in various ways (or not at all). If you were to use inheritance to cover all these features, you'd need one subclass for every feasible combination of features (no border no scrolling, border without scrolling, scrolling without border, border and scrolling etc.). This is an inflexible maintenance nightmare as you add more features because there's an explosion in the number of classes.
The main point they're making here is that you can use either the strategy pattern or the decorator pattern to better solve this problem. You could have a Window class which encapsulates a scrolling strategy object and a border strategy object. Or you could take your Window object, wrap it inside a border decorator and wrap that inside a scrolling decorator.
But you're completely right in your understanding; these are two different design patterns with different characteristics which lead to different applications. With Decorator, the Component has no knowledge of the agent which is adding functionality... and so you tend to end up building around an existing component class. With Strategy, it's the other way around since the Component is employing (and hence knows about) agents to perform various tasks - these agents generally don't know about their governing Components.
Answer: when you want to use a multiple approaches to something, use a strategy pattern. When you want to create something where certain things may or may not be used to alter an object/component/whatever, then you should be using a decorator. in other words can also say a decorator is likely to add functionality (decorate) an object and a strategy is likely to swap functionality.
Answer: The distinction is that in Strategy pattern, one Strategy object can be used to provide information to the Context at one time. With Decorator, you can stack Strategies on top of each other, and thus have what they refer to as "open-ended" numbers.
Answer: Strategy pattern can be applied when the identity of the Object is important to you. Object identity remains regardless of how many strategies are applied but for the Decorator pattern
Objects are encapsulated inside each other the original identity will be lost in the transformation

Decorator pattern changes the skin of an object
Strategy pattern changes the guts of an object.


How to make UITableView looks like this

Question: is it possible to make a distance between cells like that in standard UITableView? There is no options to make separator bigger. Also this distance from right and left.
Comment: you need a custom separator view. try a search .
Answer: you can do this by set your cell background to whatever background you want (let's say gray in this case) and in the cell, add a white uiview with left, right, and bottom margin like this:

Then go to your table view, set the separator as none

and one last step, set the background of your table view to the same gray background as your cell.

Then you don't have to do anything particularly in your code besides simply initial your table cell based on the custom nib file (i assume you want to do this anyway).
If you prefer to construct your cell in codes, you can use the same logic.
Answer: in method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

     ...

  cell.backgroundColor = [UIColor whiteColor];

  // This will create a line of 3 pixels that will be separating the cells
  UIView *separator = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,3)];
  separator.backgroundColor = [UIColor darkGrayColor];
  [cell.contentView addSubview: separator];

  // and if you want the border do left and right add:
  UIView *separatorRx = [[UIView alloc] initWithFrame:CGRectMake(318,0,2,cell.frame.size.height)];
  separatorRx.backgroundColor = [UIColor darkGrayColor];
  [cell.contentView addSubview: separatorRx];

  UIView *separatorSx = [[UIView alloc] initWithFrame:CGRectMake(0,0,2,cell.frame.size.height)];
  separatorSx.backgroundColor = [UIColor darkGrayColor];
  [cell.contentView addSubview: separatorSx];

  return cell;

}

Answer: One way would be to set the backgroundView of the UITableViewCell to an UIImageView containing this white box on that gray background
Answer: You have to make a subclass of UITableViewCell. In your own subclass you may make everything you dream about! So, you need to add UIView with whiteColor background and margins as subview on your custom UITableViewCell.
Answer: There is not padding option in UITableView. You can either add a UIView in your UITableViewCell which will contains all the cell subviews, and change it's frame to create a padding right in the cell.
I suggest you to use UICollectionView instead, you can easily set the space between cells using a layout. If the cell is smaller than the actual collection View, then it's automatically centered.

How to make UITableView looks like this


hadith on disturbing someone who is asleep

Question: assalamualaikum, can anyone please answer whether there is any hadith on disturbing someone who is asleep
The Prophet (صلى الله عليه وسلم) also said:
"Whoever is deprived of gentleness is deprived of all sorts of goodness"
(Bukhari) is this isthe hadith . please reply
Answer: Islamic books on manners refer to the following hadith as guidance on not disturbing the sleeping person (small portion of a longer hadith):

...Allah's Apostle (ﷺ) said: Milk these for us. So we milked them and every person amongst us drank his share and we set aside the share of Allah's Apostle (ﷺ). (It was his habit) to come during the night and greet (the people present there) in a manner that would not wake up one in sleep but make one who was awake hear it... (Sahih Muslim 2055).

That's the general kindness and consideration for sleeping people.
A specific exception is waking the sleeping person for prayer [which is a good deed].

"The Messenger of Allah (ﷺ) said: 'May Allah (SWT) have mercy on a man who gets up at night and prays, then he wakes his wife and she prays, and if she refuses he sprinkles water in her face. And may Allah (SWT) have mercy on a woman who gets up at night and prays, then she wakes her husband and prays, and if he refuses she sprinkles water in his face.'" (Al Nasa'i & others)

وعليكم السلام ورحمة الله وبركاته


How can I increase the maximum stack size of notifications in the notification tray?

Question: So my current phone is a Samsung Galaxy S21. I receive a LOT of push notifications, by choice. The problem is, when I receive those push notifications for, say, Twitter, the number of notifications that are displayed in a single "stack" in the notification tray CANNOT exceed 24; once the stack reaches 24 notifications, I do not receive any further push notifications for that app. This is a HUGE issue when I'm trying to keep track of a big Twitter thread or watch for an important email. My previous phone, a Galaxy S8, had a maximum notification stack size of 40, after which the same issue occurred; this leads me to believe that there is some variable SOMEWHERE that can be changed to increase or decrease the stack size.
Just to clarify, since Google brought up similar questions but no relevant answers:

I am not referring to the notification badge displayed on the app icon on my home screen; I am referring to the notifications in the notification tray viewable by swiping down from the top of the screen. Image attached to show what I am talking about.

This issue is not app-specific; all apps seem to have a stack size of 24, whether it's Twitter, Gmail, YouTube, a game, or whatever. Each app DOES have its own stack, but each of those stacks can only go up to 24 notifications.

I have checked every setting I could access on my phone; none of them changed anything relevant. If there is ANY way to change the stack size, even if I have to manually dump my phone's kernel to my PC and use a hex editor to change the relevant bytes, I will do it.
Thanks in advance.
Comment: You can't unfortunately
Answer: There is no option is on any phone that allows you to do that, sorry.


Are there any limitations on a congressperson's freedom of speech in Congress?

Question: The Speech and Debate Clause of the Constitution protects senators' and representatives' right to freedom of speech when debating in Congress, separately from the First Amendment freedom of speech available to everyone. The Supreme Court has ruled that there are certain limitations to First Amendment freedom of speech. Is this also true of Speech and Debate Clause freedom of speech? Is there anything that is illegal to say in Congress?
Answer: The speech or debate clause is about immunity, not freedom of speech.
The speech or debate clause protects members of congress not only from criminal prosecution based on covered speech but even from having to testify about their speech in a trial about something else, and also from being interrogated about it by investigators.
This immunity serves the separation of powers.  For example, it prevents the president from using the threat of investigation to put pressure on members of congress to vote a certain way.  Indeed, it protects members of congress from such influence coming from anyone, because it also applies to civil suits, in contrast to the first amendment.
Much of the litigation concerning the speech or debate clause has not actually concerned speech but instead actions and documents.  An aide to senator Mike Gravel was protected from testifying before a grand jury about his involvement in the acquisition of a copy of the Pentagon Papers.  After an FBI search representative William J. Jefferson's office, the FBI was ordered to return privileged legislative documents seized in the search -- but not other documents.
But this question focuses on actual speech in congress.  I was not able to find any cases with casual research tools available on the internet where this was at issue.  Wikipedia mentions a defamation case, Wuterich v. Murtha, but that seems to have been dismissed on the basis of the Westfall act rather than of the speech or debate clause.  Perhaps someone with access to better tools will be able to find something, but for now, as far as I can see, the answer to your question

Is there anything that is illegal to say in Congress?

is no.
Comment: -1 This answer fails to discuss actual laws and predictably gets the answer wrong as a result.
Answer: They can't commit treason, a felony, or breach of the peace
The Speech and Debate clause codified and extended the Parliamentary Privilege already enjoyed by the British Parliament.
It says:

The Senators and Representatives shall in all Cases, except Treason, Felony, and Breach of the Peace, be privileged from Arrest during their attendance at the Session of their Respective Houses, and in going to and from the same; and for any Speech or Debate in either House, they shall not be questioned in any other Place.

The Courts have found that this privilege extends to all of a Congressperson's speech while acting as a legislator and also extends to acts of their aides while acting under direction. The full limits of "acting as a legislator" have not been tested but it's likely to be very broad and include everything that is not clearly and uniquely personal.
Treason requires an act, not just speech. There are some felonies that can be committed by speech alone, for example, conspiracy or incitement. Breach of the peace will be defined in local law but those cannot be Constitutionally vague and must pass strict scrutiny - speech alone is almost certainly not a breach of the peace.
Now, a Congressperson can be held to account by the rules of their house and any censure, up to and including removal, is not justiciable - that is, it is not subject to judicial oversight.
Comment: That limit is on the privilege from arrest, not the immunity for speech and debate. It's also broad enough to have swallowed the role: caselaw is that "breach of the peace" covers all crimes, and so the privilege from arrest only protects from civil arrests (which are obsolete).
Answer: The limitations are whatever Congress collectively decides they are. The Constitution doesn't say that representatives and senators can't be prosecuted for what they say in Congress, it simply specifies that any such trial must be conducted by Congress itself — in other words, an impeachment.
Comment: There's no point in impeaching a member of Congress since the constitution provides that members of either house can be expelled by the action of that house alone.  Another difference between impeachment and the speech and debate clause is that the provision for impeachment explicitly contemplates separate criminal prosecution for the same offense, which is excluded by the speech and debate clause.


Why does a small air gap under a cylinder damp oscillations of a membrane on the cylinder's opposite end?

Question: This gif shows a table tennis ball bouncing on a membrane stretched over a cylinder.

When some cards are placed under the cylinder to form a thin gap between the cylinder and table, the bouncing is dramatically damped compared to when the cylinder is placed directly on a table.
When the cylinder is lifted more than a few millimeters off the table, the ball bounces well again; only for small air gaps is there a large damping effect.
My guess is that this has to do with impedance matching. The small gap has about the same impedance as the cavity in the cylinder, so there's a large transmission coefficient and lots of energy is lost. The impedance of the table is very high and the impedance of open air is very low, leading to much lower transmission coefficients.
I tried setting the acoustic impedance of the cylinder cavity to $$Z_c = \dfrac{z}{\pi r^2},$$ with $z$ the specific impedance of air in the experiment and $r$ the radius of the cylinder. Then I set the impedance of the gap at the bottom of the cylinder to $$Z_{\rm gap} = \dfrac{6 \mu w}{\pi d^3 r},$$ with $\mu$ the viscosity of air, $w$ the width of the rim, $d$ the height of the gap. This come from treating the table and bottom rim of the cylinder as parallel plates with flow between them at low Reynolds number. Equating $Z_c$ and $Z_{\rm gap},$ I find optimal damping at
$$d = \left(\frac{6 \mu L R}{z}\right)^{1/3}$$
Estimating numbers from the video, I came up with an optimal gap of around $0.5 \;\mathrm{mm},$ a bit smaller than what people on Twitter reported in their experiments, but within a factor of 2 or 3.
Perhaps that error can be explained by entry length effects, uncertainty in measurements from the video, and the gap not being a length $2\pi r$ around as I assumed (because people put cards under the cylinder to prop it up, and the cards block a lot of the gap). But perhaps I'm missing some significant part of the physics here.
Is the impedance approach the right track? Are there other significant factors to account for?
Source (longer video with sound): https://twitter.com/DarekDewey/status/1525115833466380290
Answer: the impedance matching argument is a good one. In the absence of the gap, no energy leakage out of the oscillating system occurs, and the ball bounces back strongly. Leakage allows frictional losses (damping) which act to suppress the bouncing action.
You can also model this behavior well by using the same approach that loudspeaker designers use to break resonances in speaker/driver systems of the infinite baffle/acoustic suspension type.
A nifty experiment would be to seal up the bottom of the can and then punch a little hole of known diameter in the side of the can, and repeat the test- this time counting the number of bounces as a function of the hole diameter, using the no-hole case as a comparison standard!


How to use internet through VPN in Ubuntu 14.04?

Question: I have DSL connection. I need to know how to setup and use openVPN.
Comment: What did you try? What were the problems?
Comment: @guntbert I was looking for it but there are tutorials for outdated versions of Ubuntu with different networking menu.
Answer:
You need to install the openvpn and openvpn network manager plugin packages:

sudo apt-get install openvpn
sudo apt-get install network-manager-openvpn

Setup your openvpn session:
2.1 - In your network connections go to VPN - set up VPN, then choose add connection type VPN - OpenVPN, click on Create or import a saved ovpn configuration.

2.2 - In the editing of your VPN connection window you configure in general IP address or host name of your VPN provider

2.3 - choose the required certificates and keys / user name and password.
2.4 - In the special you set up VPN connection details such as port, LZO compression, TCP, UDP, TAP device - these are settings from your VPN provider.
2.5 - Set up the security tab according to your VPN provider. Finally click on save to save the new VPN settings.
To try the new VPN go again to your network connections - VPN and click on the newly created VPN.

Please note that even if you get a successful connection message and do not get any traffic through, then your settings are incorrect.
Good guide is on this site. Please note that there is also server and client setup as well. As a server you might want to run a device which runs 24/7, such as router or nas.
You can see this video how to setup in Ubuntu 14.04 in unity desktop.
The screenshoots have been taken from this site.
For ovpn configuration you may use the public VPN service here
Comment: I can't do what you talking about, are you sure that you talking about 14.04 ? About the guide - harder way is not the best.
Comment: The guide is for Ubuntu 14.04 with Unity desktop. With Xfce or KDE you have to look in appropriate place. The network manager is in the same place as your DSL connection. If you have unity, click on the DSL icon in the top bar and expand the menu, then you can go to the VPN....
Comment: right, you'd better use screenshots
Comment: Please check the video, that shows it better than screenshoots. https://www.youtube.com/watch?v=56O2WeMZAr0


Items to increase the number of spell slots a wizard has per day?

Question: Trying to determine if there are items aside from using the ring of spell storing, or items that simply directly increase intelligence score, that can increase a wizard's number of spell slots per day?
Comment: It's unclear to me what vanilla means. Do you mean *generalist* (ie, one who can learn & cast from any school)? Or do you mean without Alternate Class Features or Substitution Levels?
Comment: I don't want to belabor the obvious, so are there any feats or magic items that you already know of that can be eliminated, or are you at a total loss?
Comment: I know of the extra spell slot feat and I guess the ring of spell storing technically... and I have done some searching around but haven't come up with much else :/
Answer: There are, but not much.
These are the two items I could remember:

Pearls of Power (DMG): These items let you reprepare a spent slot with the magic previously spent. It doesn't add more slots, but adds versatility so you can prepare less repeated spells and use the same spells slots more than once. Best of all, doesn't occupy a magic item slot.
Ring of Wizardry (DMG): The dream of every wizard apprentice that unfortunately only some masters end up grabbing one. Each of those rings are associated to a spell level, at that level, your base slots are doubled, not extra slots from high intelligence or school specialization, just the ones from the Wizard table.

Other items may improve your spell management during the day without increasing your slots directly:

Wands: If you use a spell frequently and if caster level or save are not important for that spell (ex: Snake Swiftness, Celerity etc), using a wand extend greatly your spell management and add versatility for you as it opens slots that you would prepare with them.
Staves: Same as wands but better since they use your caster level if higher and your spell save DC. If not enough, staves can have multiple similarly thematic spells on them.

All other slot increase methods I could remember came from feats (ex: Extra Slot), class choices (ex: School Specialization), prestige classes (ex: Ultimate Magus) or atribute increase (ex: Headband of Intellect).
Answer: PEARLS OF POWER !!!
Those beauties come in all levels, and allows you to multiply what you may have... they have uses for the whole party, not just the wizard... Especially after a major fight, when you can re-stock.
They do not ADD to your number of spell slots, but they allow you to use more of what you prepared, which usually is just as good.
Answer: Besides increasing that necromancer's Intelligence score, there aren't many magic items that grant additional spell slots. The big one is…

A ring of wizardry (Dungeon Master's Guide 223) (20,000+ gp; 0 lbs.) doubles the number of arcane spells the wearer can cast per day (excluding bonus spells from, like, a high Intelligence or school specialization) of one spell level from 1st- through 4th-level, with pricier rings doubling higher-level spell slots. A ring of epic wizardry (Epic Level Handbook 136) (250,000 gp; 0 lbs.) similarly doubles spells of one spell level from 5th- through 9th-level.
This DM would not allow multiple rings that double the same spell level to combine for a cumulative effect—tripling or quadrupling spells of that level—, but he would allow a particularly wealthy arcanist to combine multiple rings of wizardry into a lone ring at the Magic Item Compendium price of an additional +50% for each less expensive item plugged into the most. (For example, a ring of wizardry I, II, and IV would have a price of 190,000 gp and double the wearer's 1st-, 2nd-, and 4th-level arcane spells per day.) Y'know, if that necromancer's ring slots were at a premium or something.

There are alternatives to the ring of wizardry, but they're… difficult.

Go on a quest for the rod of Valmaxian (Magic of Faerûn 171) (minor artifact; 4 lbs.) "gives a spellcaster an additional spell slot at each spell level she can cast," but these slots (and the spells prepared in them) vanish if the creature stops touching the rod.
Go on a quest for the helm of supreme wizardry (Dragons of Faerûn 131) (minor artifact; 3 lbs.), among other effects, "allows any wearer already able to cast wizard spells to prepare and cast two additional spells of each level from 6th through 9th (8 spells per day total)." The helm deals damage to the wearer when he casts these extra spells.
Convince the DM that a memento magica (Races of the Dragon 124) (1,500+ gp; 0 lbs.) works for prepared casters. That is, the description begins by saying, "A memento magica is a great aid to spontaneous
spellcasters such as sorcerers, bards, and favored souls…, much as a pearl of power is to casters who prepare spells." Then the description says what it actually does for the bearer:

Once per day on command, a memento magica enables its possessor to regain any one spell slot that she had previously used that day. The spell slot is available just as if a spell had not been cast.

The Player's Handbook on Spell Selection and Preparation says

When preparing spells for the day, a wizard can leave some… spell slots open. Later during that day, she can repeat the preparation process as often as she likes, time and circumstances permitting. During these extra sessions of preparation, the wizard can fill these unused spell slots. (178)

For example, a wizard takes a standard action to cast at the darkness the 1st-level spell magic missile. Realizing her error, next turn she takes a standard action to activate her memento magica (1st) to regain her 1st-level spell slot that previously contained the spell magic missile but is now open. She can take 15 min. to prepare a new spell (perhaps even magic missile again) in that open slot.
Now, a DM could reasonably rule that since the spell slot regained by the memento was not left open at the beginning of day the wizard can't prepare spells in that slot… despite the slot's existence and despite the slot being open. Seriously, this player would not, like, flip the table and storm off because of such a ruling. However, this more permissive DM thinks because the memento price is 50% more than a pearl of power of the same level that the memento's allowed to offer a prepared caster some increased versatility in exchange for speed.
Convince the DM that a strict reading of the pearl of power (DMG 263) (1,000+ gp; 0 lbs.) allows the bearer to regain the ability to cast any spell of that pearl's indicated level that the prepared caster has ever prepared then cast. This reader does not support this line of inquiry and includes it for completeness! The description of the pearl of power says, in part, that

Once per day on command, a pearl of power enables the possessor to recall any one spell that she had prepared and then cast. The spell is then prepared again, just as if it had not been cast. The spell must be of a particular level, depending on the pearl. Different pearls exist for recalling one spell per day of each level from 1st through 9th and for the recall of two spells per day (each of a different level, 6th or lower).

Unlike the memento that specifies a "spell slot that [the bearer] had previously used that day," the pearl cares only that the spell had once been prepared then cast ever. Did the level 7 necromancer last cast ray of enfeeblement when he was level 3 but needs it right now? That pearl of power (2nd) can get it!
This is, of course, abusive. This DM and player recommends using the pearls of power the way it seems they're supposed to be used: to regain expended spells that were prepared the last time a creature prepared spells. Honestly, pearls of power are already good enough. Either way, a pearl of power doesn't really get the necromancer more slots but, instead, recycles used slots. However, that makes it no less versatile.
The belt of the dread emperor (Book of Vile Darkness 114) (120,000 gp; 1 lb.) lets the wearer chain a humanoid (specifically!) to the belt then the belt "enables the wearer to recall a prepared spell, even if the spell has already been cast, as long as the spell was among those he most recently prepared" but the creature chained to the belt is dealt damage equal to the spell level of the recalled spell squared. If that damage would kill the creature, the creature dies and the spell isn't recalled. Like the pearl of power, the belt doesn't get the necromancer more slots, but it's close.

Really, this reader recommends sticking with pearls of power (used conventionally!) and rings of wizardry supplemented by—with DM approval—some mementos magica until the necromancer can discern the resting place of the the rod of Valmaxian. That is, unless the belt of the dread emperor sounds attractive—maybe that necromancer already has kender in mind…?
Answer: The Spell Storing weapon enchantment "... allows a spellcaster to store a single targeted spell of up to 3rd level in the weapon.  (The spell must have a casting time of 1 standard action."  Then, when the wielder of the weapon hits and damages a creature with the weapon, they can choose to cast the spell on that creature.  Once the spells been discharged, a new one can be stored.
Rod of Absorption absorbs single-target spells targeting the possessor of the rod or his gear.  The possessor can then later used absorbed spell levels to cast spells they have prepared without losing the prepared spell.  They just expend a number of absorbed spell levels equal to the level of the spell they wish to cast.  They must be holding the rod and the spell still uses its normal material components.  The rod is capable of absorbing and then subsequently utilizing 50 levels of spells.
One could enchant a headband capable of Rary's Mnemonic Enhancer a certain number of times per day for 11,200gp per daily charge.  Each charge would allow the user to either memorize three additional levels of spells or regain in memory a spell of third level or lower cast the previous round.  A specific DM might rule that a given magic item was only capable of doing one or the other, not both functions, and the DM would also have to decide if multiple charges would be able to allow a caster to memorize extra spells of higher than 3rd level, as the spell description doesn't specify whether multiple castings of the spell can stack.


Living in Albania for the past seven years with a driver's licence obtained in Vienna, Austria in 2009. Is that Vienna driver's licence still valid?

Question: I have never requested a driver's permit in Albania as I am under the impression that the Vienna, Austria permit is valid in Albania. Is that correct?
Answer: Yes, according to both on Europa.EU and the UK's Royal Auto Club (RAC)

Driving licences issued in EU and EEA countries are accepted. You will need an International Driving Permit, IDP 1949 to drive in Albania.
Source: All information in this document is sourced from the AIT (Alliance Internationale de Tourisme) & the FIA (Federation Internationale de l'Automobile) and, to the best of the RAC's knowledge, is correct at the time of publication (May 2016.)

As an official candidate for EU accession, Albania recognizes a driving licence issued by an EU country, but your national permit should be accompanied by an IDP, an identity document that allows you to drive in any country that recognises it, which Albania does.
The Ministry of Transport and Infrastructure General Directorate of Road Transport Services is responsible for driving permits. Within its website, it references the EU licenses and their equivalencies, valid for driving in Albania (and please forgive the Google-lost-in-translation results).
And the Europa.eu expanded information on EU driving licences:

If your driving licence is issued by an EU country, it's recognised throughout the EU.
So if you move to another EU country, you won't usually have to exchange your licence. You can drive in your new country on your current licence as long as:

it is valid
you are old enough to drive a vehicle of the equivalent category
it is not suspended or restricted and has not been revoked in the issuing country.

The categories AM, A1, A2, A, B, BE, B1, C1, C1E, C, CE, D1, D1E, D and DE are also recognised in other EU countries.
Standard format
Since 2013, all driving licences issued in the EU have a standard format – a plastic, credit card-sized photocard, with better security features.
You can still use your old-style licence, but it will be changed to the new format when you renew it (or at the latest by 2033).
There are over 110 European types of driving licence valid in the EU.
Validity in different EU countries
When your driving licence expires, you must renew it in the country where you have your usual residence.
Your new licence may have a different validity period and will be subject to any restrictions or conditions that apply in your new country.
Recognition of EU driving licences issued in exchange for a non‑EU licence
If you have an EU driving licence that was issued in exchange for a non‑EU licence, and you wish to move to another EU country with your converted licence, you should be aware that your new licence may not be recognised there. This is up to each EU country.
Comment: I am not 100% sure this fully addresses the question as the RAC website is geared towards British tourists. For example, I looked up the rules for the Netherlands and it glosses over some niceties regarding situations in which holders of some EU licenses, e.g. from France, might be required to exchange their licenses (specifically, this could happen with a license issued over 10 years ago, which is still valid in France but must be exchanged against a newer one in the Netherlands, if you have been residing there for more than two years).
Comment: @Gala I'll add the Europe.EU info, which is longer; ty.


Does the integral of $\sqrt{1-\sin{t}}$ exist?

Question: I have searched for answers everywhere, but none of them seems to be correct.
Since the area under $\sqrt{1-\sin{t}}$ is always positive, I imagine the integral to be a graph resembling an infinitely rising stairs, but the answers floating around the internet (including WolframAlpha) seem to be wrong.
Comment: [How does it give zero?](http://www.wolframalpha.com/input/?i=integral+of+sqrt%281-sin%28t%29%29+over+t+from+0+to+2*pi)
Comment: The answer $F(t)$ from WolframAlpha is a function whose derivative is $\sqrt{1-\sin t}$ for all complex numbers $t$ except perhaps a few branch points.  So, unless $F(t)$ happens to be continuous on an interval, you cannot get a definite integral by subtraction at the endpoints.  In this case, the jumps in $F$ are where $\sin t = 1$.  There is no good way to make $F$ work in the complex plane without having discontinuities at these branch points.
Answer: $1-\sin{t}$ = $(\sin{t/2} - \cos{t/2})^2$
Comment: @user803253 Why does this contradict that? This hint means you need to compute: $$\int |\sin t/2 -\cos t/2|dt$$ which is gonna be positive for $[0,2\pi]$ and bigger for $[0,4\pi]$
Comment: Definite integral from $0$ to $2\pi$ and from $0$ to $4\pi$ should not be equal.
Answer: $$\sqrt{1 - \sin{t}} = {\sqrt{1 - \sin{t}}\sqrt{1 + \sin{t}} \over \sqrt{1 + \sin{t}}}$$
$$ = {\sqrt{1 - \sin^2(t)} \over \sqrt{1 + \sin(t)}}$$
$$= {|\cos(t)| \over \sqrt{1 + \sin(t)}}$$
Doing a $u$ substitution $u = 1 + \sin(t)$ shows that an indefinite integral of this is
$2\sqrt{1 + \sin(t)}$ when $\cos(t) > 0$ and $-2\sqrt{1 + \sin(t)}$ when $\cos(t) < 0$. The
former case corresponds to $-{\pi \over 2} < t < {\pi \over 2}$ and the latter to when ${\pi \over 2} < t < {3\pi \over 2}$.
If you want these to match up to a continuous function, you can use $2\sqrt{1 + \sin(t)}$ for the  $-{\pi \over 2} < t < {\pi \over 2}$ range and $4\sqrt{2} - 2\sqrt{1 + \sin(t)}$ for the ${\pi \over 2} < t < {3\pi \over 2}$ range. If you want to keep going beyond $t = {3\pi \over 2}$ or below $t = -{\pi \over 2}$, you add further constants to make the indefinite integral you're using continuous.
Answer: You are correct.  The integral should not evaluate to 0, if we are working with real numbers.  Sometimes a CAS needs a little help.  Some creatively placed absolute value signs worked for Wolfram:
http://www.wolframalpha.com/input/?i=integral%28|sqrt%281-sin%28t%29%29|+from+0+to+2pi%29
Comment: Agreed wholeheartedly.  However, I often feel people do not understand that computers sometimes need a bit of "coaxing" to produce the correct answer.  I posted to share a tip that can help a computer produce an accurate answer.  Probably should have done so as a comment, rather than an answer...
Comment: And yet a numerical answer is hardly useful from a learning perspective. The actual answer has a closed form that WA does not give you. (Hint: divide the answer you get by $4$ and what do you get?)


Why did all ceiling fixtures (light and fans) stopped working at the same time?

Question: Why did all ceiling fixtures (light and fans) stopped working at the same time, while everything else works? Ceiling fans/lights are in different rooms. The breakers are all on.
Comment: here is a guess .... someone turned them off ..... you provided inadequate information that would allow a better guess
Comment: Are you ***sure*** the [breakers are all on](http://www.harringtonelectricinc.com/troubleshooting-tips/fuses-and-circuit-breakers/)?
Comment: This wasn't a riddle. No one turned them off. They just never worked after one of the light fixtures was removed.
Answer: I would first take a closer look at your circuit breaker panel. Often when a breaker flips, the actual handle does not physically flip to the off position.
If your breakers have view windows, be sure to look at them instead of at the latch handle to see if on of the breakers shows red or possibly white. If so, flip this breaker off and back on to reset it.
If the breakers do not have a viewing window but you know which circuit is for the ceiling fixtures, trying flipping its latch handle to off then back on. On the other hand, if you don't know which breaker supplies the ceiling fixtures then look for any handle that may not be fully seated in the on position or whose position does not match the other breakers and try flipping it off and back on.
If after your closer look at the breaker panel, everything seems correct then that leaves you with either a bad circuit breaker or a break in the circuit as described by Ed Beal and N R.
Answer: If you are sure that the lights are on an isolated circuit, then that pretty much narrows it down to a broken connection in the run of cable between the first light fixture/switch box and the breaker box.
Answer: I would try to identify the first non working lamp or switch location, I don't usually see lighting circuits fail from back stabs but it has happened especially if fed from a outlet circuit where back stabs were used. More often on light circuits I find a broken wire or loose wire nut at a pigtail , I believe this is because light switches are pulled more often than outlets ( that is my theory as they have less back stab failures than outlets). It could be a white or black wire causing the failure. Look at the last working device on the circuit or the first non working that will be the location of the failure.


Django test database not auto-flushing

Question: I have a bunch of unit test files, all of which consist of django.test.TestCase classes.
Wrote myself a little shell script to uncomment/comment test file imports in my __init__.py file, so I can run tests from certain test files, based off the command line arguments I give it. I am also able to run all the tests of all the test files in one go (for regression testing purposes).
I have this one test file that has some JSON fixtures and the first test checks that a certain model/table has 3 records in it (defined by the JSON fixture).
So here is the problem: when I run this test file on its own its tests pass with flying colours, but when I run the test with all other tests, that particular test case I mentioned, fails.
When I run all the tests, the database says there are 6 records in the table/model, but there should only be 3 (from the fixture), like when the test file is run by itself.
I also tried running the that test file with a few other test files (not all) and it passes. So the only time it doesn't, is when all the test files are run.
To me this seems like a bug in Django or PostgreSQL (DB I am using), because aren't Django TestCases supposed to auto-flush/reset the database between each test method, let alone test class?
Comment: This is unlikely to be a bug in PostgreSQL so I would suggest following up with the Django team.  From your description it sounds like a rollback you are expecting to happen is not being done.
Answer: This is likely due to the difference in how cleanup is done between TestCase and TransactionTestCase in Django. Before Django 1.5 TransactionTestCases needed to be run after TestCases (and Djangos testunner did that for you). This should be fixed in 1.5 though, so try running your tests again there...

Django test database not auto-flushing


Importing Gerber files into Fritzing

Question: Is it possible to import a gerber file into Fritzing or do I need to change the format? If I need to change the format, what do I change it too?
Comment: Then what program would you suggest? Screaming something sucks doesn't exactly help.
Comment: The caps are for emphasis, not intending to scream. In retrospect I probably should have used **bold**, not caps. Anyway, Fritzing is a toy, and it's not really even good at being that. I suggest using a real tool like Eagle or KiCAD (both of which are free, though Eagle is limited), or if this is a more serious project that warrants a paid package, try something like Altium
Comment: Thank you, I am using Altium but I am not yet familiar with it so it is very frustrating when I just want to make a simple board. I have KiCAD and Eagle downloaded to try out it was just Fritzing since it was the one I had been using the most recent in my spare time so that's what I went with for this question. I do agree that it is way to simple for real board work, but I just want something simple for now.
Comment: Altium definitely has a steep learning curve, that's for sure. Once you learn how to use it, though, board design is a breeze. Before Altium I used Eagle exclusively for my own boards, though I tried dozens of different packages. Eagle was definitely my preferred tool though.
Answer: No. Gerber is in essence a file that tells a lithography machine how to move to produce the shapes on every layer of a printed circuit board.
Fritzing, on the other hand, is a schematic capture tool of sorts. There's no way back from a pcb layout to a proper schematic, since that layout contains zero information on the components that are supposed to populate that board.
And even if there were any such information, then going back from a layout to an intelligible schematic is still an unsolved problem, and probably will be forever.
Comment: Thank you, now I just need to know how to make a plug board with contacts in Fritzing.
Comment: fritzing can autoroute schematics, not just PCBs...

Importing Gerber files into Fritzing


How can I add attributes to all characters in a folder and set them to a default value?

Question: I recently decided to consolidate my macros that refer to a character's gender by pronoun into a single one using attributes on the character sheet (ie subjective, objective, possessiveA, and possessiveP) and am looking for a way to loop through each character in a folder and add those attributes to each of them and set them to a default of {it, it, its, and its} respectively. Is there any way I can do that?
I do have api access if it's required to do it.
Answer: You can't
You can loop through every character with the API using filterObjs but [t]he API does not have access to the folder structure.
Comment: So, if I can loop through every character, can I set it to exclude certain ones? That would be sufficient if so
Comment: @Himitsu_no_Yami sure but you can only filter based on available attributes.
Answer: Not quite looping through a folder, but it does allow me to add attributes to specific characters simply by specifying a name/id or specifying that they're the currently selected token(s).
Using the ChatSetAttr API script I was able to set characters I had selected (and one I didn't have a token for but had a name for) to have the specific attributes I wanted.
For a default of {it, it, its, and its} I used the following macro to edit the ones I had selected:
<code>!setattr --sel --subjective|'it'
!setattr --sel --objective|'it'
!setattr --sel --PossessiveA|'its'
!setattr --sel --PossessiveP|'its'
</code>
For the one I didn't have a token for I used the following to specify the correct pronouns.
<code>!setattr --name Rilia --subjective|'she'
!setattr --name Rilia --objective|'her'
!setattr --name Rilia --PossessiveA|'her'
!setattr --name Rilia --PossessiveP|'hers'
</code>


How can I build a shelf to support a 15 gallon aquarium?

Question: My next project is building an in the wall 3 shelf bookcase to accommodate my printer, my modem and router, and hopefully an aquarium. I want to use 3/4" birch veneer plywood with dados for the unit including the shelves. The aquarium will weigh 175-180lbs when loaded.  The shelves will be 27.5 " wide because the unit is going in an area that was built around a stove pipe and the studs are 27.5 " apart.  Will this shelf support the weight ?  If I added a stud inside each of the existing studs to bring the width down to 24.5", would this support the weight if the 27.5" span will not work?
Comment: I do hope you are planning on putting the aquarium to the bottom, right? Keep the water below the electrical stuff and all that.
Answer: Using the Sagulator, you're borderline for a noticeable sag... It will also depend on how deep your shelves are, and how wide the aquarium is (I assumed 16 inches deep shelves). Since you're using plywood you're going to be facing the shelves with something, right? I would just double up that shelf (two layers of plywood glued together) and you should be fine.
Also, you can run a strip of the plywood along the bottom back edge of the shelf which, combined with the front facing, should support all the weight you can throw at it.
Comment: If the Sagulator says it will sag a bit then you don't put a 200 lb aquarium on it.  This is much much different than having 200 lb worth of books.
Comment: @DMoore Well, that's why I said he should double the shelf and add facing on the front and back. Thanks for the comment though.
Answer: No, it will not support the weight.  It will bend in the middle.  You need to either put some studs underneath where most of the weight will be.  Generally, studs are 16" on center.  Or, you can double up the studs which will work also.
Hope this helps.


Cut out size for 36" range

Question: My new home has a 30" cut out for a range. I'm buying a 36" range, What should the width opening be to accommodate for this larger size?
Comment: Width of the stove or by stove instructions.  A free standing oven/stove range I like about an inch or two extra.  Installation instructions override everything.
Comment: Peruse the no-doubt Fantabulous Installation Manual. Or send the range back to whichever import-drop-shipper has no manual and no NRTL listing for the appliance, either.
Comment: Most major manufacturers (GE, Whirlpool, etc.) have very detailed instructions include precise dimensions available either on their own web sites or on major retailers such as Home Depot. As a general rule, they will typically size the appliances just a drop smaller (e.g., 35-7/8") than the nominal dimension, but you really need to check the instructions.
Comment: If you specify the brand/model, someone might be generous enough to look it up for you, but...
Comment: Our profssionally cut soapstone counters have an extra 0,315 inches total (5/16") over the nominal width for the stove. We currently have a slide in range in place and it fits with room to spare. Slide in ranges are designed to work with an exact nominal width. A high end freestanding range might require a little over the exact nominal width. Note that you want to have side gaps as small as possible because free-standing rnages do not normally have an overlapping top like a slide in. One brand of high end free-standing 30" range lists the width as 29.9".
Answer: The installation instructions for your new range should specify minimum width required for installation.  Without knowing the specific make/model it's impossible to say, but a safe guess would be a minimum of 36" wide.

Cut out size for 36” range


Confusion related to significance test

Question: I am trying to read the significance tests. However, I am a bit confused what exactly is the difference between chisquared test and z test. I read that chisquared is non parametric and it doesn't make any assumption about the distribution of the population. However, z test assumes that the statistic parameter forms a normal distribution. Using central limit theorem, if the number of samples are very high we can assume that the statistic is from a normal distribution
Comment: You ought to define _what_ z test you mean. There's at least 3 well known totally different statistical tests sharing the name: z-test of means (a t-test when population variances are known); z-test of proportions (equal to chi-sq test for 2x2 table); z-test of signs.
Comment: Please define which specific z- and chi-square tests you mean, and if possible show us what was actually said about the chi-square. I believe there are generally distributional assumptions for most chi-square tests (having derived a number of them as exercises).
Answer: A starting point is that they are usually testing completely different things.
Note the various uses of words such as usually in the following, which is only a very general guide, as you haven't given us a specific example.
A Chi square test - which crops up in many situations - is usually to test in quite a general sense whether it is plausible a given set of data or the results of a model are generated from a particular distribution.  One very common application is whether the two variables in a two-way contingency table are related to each-other, or they are plausibly generated under a null hypothesis of no relation between the two variables.  The second most common application is to test whether an observed distribution, once binned (so we have counts of observations in various subsets of the value space) is close enough to what you would expect if a a distribution expected under the null hypothesis generated it.
A Z test is usually for whether there is significant evidence that the mean value from a population differs from some set value.  It is usually looking at a more precise problem than a Chi Square test - is this estimate of the mean plausible (Z test), versus is this overall distribution of values (Chi square test) plausible, under the null hypothesis.
A caveat on this is that statistics that have a Chi square distribution under a null hypothesis crop up in all sorts of situations, so generalizations are fraught with challenges.
An interesting fact for you to think through - if you explore statistical inference further - is that if you multiply a variable with a normal distribution by itself, you get a variable with a Chi square distribution.

Confusion related to significance test


PHP Timeouts and FTP function

Question: In implementing the backup script I described in this serverfault question, I ran into some timeout issues that have prompted optimizations to the code (namely, backing up one file per execution of the script and doing everything I can to minimize the number of file-hashes I am calculating over the very large data files).
So far, that seems to have solved the timeout issue, but given the size of the files, there is certainly room for the transfer to take longer than the standard 30s allotted before a script times out. If that happens, I assume the file will simply be cut off as partially transferred. Is there any way to protect against this?
Note that I am operating on a shared-hosting environment, so editing the php.ini file is not an option.
Answer: If it's enabled, you can call set_time_limit().  Alternatively, if you run php from the command line (via cron or similar), max execution time does not apply.
Comment: I am running via cron, but I was still getting "Fatal Error: Maximum execution time of 30s exceeded..." messages before my recent optimizations.
Comment: Hm... maybe your SAPI is CGI and not not CLI, because of the shared hosting environment.  You can check with php_sapi_name(): http://us2.php.net/manual/en/function.php-sapi-name.php
Answer: Can you try running the ftp job via the shell? Might work on a shared host...
<code>shell_exec('nohup ftp my-ftp-command 2> /dev/null');
</code>
Answer: According to set_time_limit(), this should never be an issue because time spent executing  activities outside the script are not included when calculating execution time of the script for timeout issues.
Comment: I'm running a battery of tests, with some files > 500MB in size, so we should see whether or not this holds in my specific situation.

PHP Timeouts and FTP function


Trailhead Challenge..Help!

Question: I am trying to pass the challenge described in this link, https://trailhead.salesforce.com/en-MX/content/learn/modules/data_security/data_security_org?trail_id=force_com_dev_beginner#, but my 2 Salesforce licenses with the System Administrator profile, they are sold out, however when I check the users, there is only one with such a license, coincidentally mine. Unfortunately I can not perform the challenge because I can not find the other user with this license to disable it. If this has happened to someone and you can help me, please, I will be very grateful
Comment: thank you very much, it worked perfect
Comment: You can just create a new Trailhead Playground, create two Users, both with your email and then proceed from there.
Answer: Rolling up from comments with more details.
While you can use your personal Developer Edition Orgs for Trailhead Challenges, but in this scenario you can always create a new Trailhead Playground and utilize it specifically here. It's also recommended that you create a new Trailhead Playground for challenges so that you don't have to worry about quite a few things that you may not have in your personal Developer Edition Org, e.g., My Domain.
In your case, you can create a new Trailhead Playground, create two Users, both assigned to your email, so that you have credentials for both users. And then you can go ahead with the challenge to activate/deactivate the other one.

Trailhead Challenge..Help!


Why do I get Lie(matrix Lie group)=$\mathfrak{gl}_n(\mathbb{R})$?

Question: There is something I don't understand about Matrix Lie groups. They are defined as closed subgroups of $GL_n(\mathbb{R})$ but we can show that a closed subgroup of a topological group is opened as well. So if $H$ is a Lie matrix group, $H$ is opened in $Gl_n(\mathbb{R})$ so the tangent space of $H$ and $GL_n(\mathbb{R})$ are isomorphic so their Lie algebra are the same (i.e. $\mathfrak{gl}_n(\mathbb{R})$. But it seems this is not true because if we take $H=SO(n)$, it's lie algebra is formed by antisymmetric matrices and not all the matrices). How to correct this reasoning?
Comment: I think you remembered the Lemma wrong; one can show that open subgroups of a topological group are always also closed, but the reverse statement doesn't hold in general, as can be seen for example with most matrix Lie groups.
Comment: Oh, yes. I thought it was equivalent because I just was thinking if $H$ is closed then $G\setminus H$ is opened so then just apply the lemma but of course $G\setminus H$ doesn't need to be a subgroup.
Answer: It is not true that every closed subgroup of $GL_n(\Bbb R)$ is also open. For instance, $\{\operatorname{Id}_n\}$ is a closed subgroup which is not open.


Should anti seize lubricant be used on the wheel lug studs when rotating tires?

Question: This my question:
Should anti seize lubricant be used on the wheel lug studs when rotating tires?
There is nothing else to add here.
Answer: In a word: no.
Tires are rotated frequently enough (in typical cases) to not have the lugnuts seize. Moreover, lugnuts give good grip to your tire iron (or socket), meaning you can always apply sufficient torque to them to loosen them off.
Anti-seize compound is meant to be used on parts that:

will be on for several years
do not provide good grip to tools for removal or loosening
Comment: .. or parts that are subject to a lot of heat, like spark plugs.
Answer: Usually there isn't a need to Anti-seize the wheel bolts/nuts.
Although sometimes it may be helpful because its a good idea to turn the bolts/nuts a good few times by hand to make sure they are not cross threaded before tightening them with a bar or gun and without lube they can be too tight to turn by hand.
It is recommend though to apply a small amount of copper grease to the face of the hub if you have Alloy wheels as aluminium corrodes quicker when touching steel and the wheels can 'stick' to the hub. Although this only usually requires hitting the tyre with a hammer this isn't an option on the side of the road with limited tools.


Revoke access with specific private key to an EC2 server

Question: I have converted my PEM file to a PPK file and I can successfully connect to the EC2 through Putty or FileZilla using the private key.
Lets say we have a scenario:
I request a new PEM and give the new PPK to somebody. Now I need to stop or refuse access to the server using that particular PPK.
How would I proceed?
(As I understood by reading the documentation, each EC2 instance gets a unique (default) key pair when you create it. The only way to change the default key pair would be by terminating the instance.)
Answer: Check all allowed public keys by
<code>cat ~/.ssh/authorized_keys
</code>
Find and remove your particular public keys to revoke access.


Password not working (it said the password I typed in was wrong)

Question: Alright, so I just got my iMac back from the store and I login to it knowing my password was correct, later I was trying to download a JDK but a window pop up asking me for the password of the admin account. I proceeded to entered my password but it won't accept it, all it does is say that it's wrong although I typed the exact same password. I tried contacting many people that I know but it still isn't working. Is there anyone who can identify this problem for me? If so then please do tell me how to fix it.
Comment: Did you ask in the store? Maybe they needed to reset the admin password to get your iMac fixed.
Answer: It has been a while since I have tried this so I assume it still works

Turn off your Mac (choose Apple > Shut Down).
Press the power button  while holding down Command-R. The Mac will boot into Recovery mode.
Select Disk Utility and press Continue.
Choose Utilities > Terminal.
Enter resetpassword (all one word, lowercase letters) and press Return.
Select the volume containing the account (normally this will be your Main hard drive).
Choose the account to change with Select the User Account.
Enter a new password and re-enter it into the password fields.
Enter a new password hint related to the password & click Save.
A warning will appear that the password has changed, but not the Keychain Password. Click OK.
Click Apple > Shut Down.
Now start up the Mac. You can login using the new password.

Or you could google "reset mac password" and follow the instructions I found and pasted in above.


File search tool

Question: I need a tool in which I can import a list of file names, from the clipboard or a text file, and then do a keyword search across a drive or a folder and its sub-folders.
I have hundreds of texture replacers, named incorrectly and placed in several folders with incorrect folder structure, so my goal is to find their duplicates (which I want to replace) in another folder with a proper folder structure and proper names, so I can rename the incorrectly named ones.
Something like this:
D:\folder 1\folder 2\1flower%%.dds
D:\folder 1\stone0000.dds
D:\folder 1\folder 2\folder 3\vindovinterior.dds
- All named incorrectly and placed in incorrect folder structure.
Search for a keyword - flower, stone and interior in C:\Program Files\Some Game and find (i.e)
C:\Program Files\Some Game\flowerkitchen.dds
C:\Program Files\Some Game\stoneHD.dds
C:\Program Files\Some Game\windowinterior.dds
Answer: This sounds like a job for some python scripting but I would strongly recommend backing up the original folder structures first.
The modules & functions to pay especial attention to are glob.glob, os.walk & shutil.
For the Beginner
If you are unfamiliar with python and possibly other scripting languages I would suggest spending a little time reading a good book on the subject. In this case I would specifically recommend Automate The Boring Stuff With Python by Al Sweigart there is even an example in Chapter 9 that shows how to do the following:
quote

Making copies of all PDF files (and only the PDF files) in every sub-folder of a folder
Removing the leading zeros in the filenames for every file in a folder of hundreds of files named spam001.txt, spam002.txt, spam003.txt, and so on
Compressing the contents of several folders into one ZIP file (which could be a simple backup system)

end quote
Where the first two are similar enough to your problem to give you a great starting point but if you have not done any programming or scripting it would be a great idea to read the first couple of chapters before going on to that one.
Note: Automate the Boring Stuff with Python is Free to read under a Creative Commons license. There are also purchasable copies of the book and a Udemy Online Video Course Hint: Read the introduction of the online book before buying anything there may be discounts available.
Disclaimer: I have no financial interest in the above book or course I just think that this is a great book to recommend for a beginner.
Warning
Python, while completely free, is highly addictive - once you start using it you may never be able to stop!
Comment: Now that book looks really interesting, I'll be sure to check it out. Once again, thanks for the useful info.
Comment: Thanks for trying to help, but unfortunately I know nothing about python or scripting in general. I'd prefer an automated solution with a gui for this type of work, but I can't find it anywhere.
Comment: @karlosmunjos - what you are trying to do is a very specialised type of operation that needs someone to step back and think about the rules for which file needs renaming, how to rename it, etc. - however it is not an uncommon need and __very__ easy to do in languages like python. This is probably why you are unlikely to find a GUI for it. Expanding the answer with a little more help.
Answer: A duplicate finder like this one  should be  able to find any duplicates. Usually it is not easy, when used the first time, but sooner or later tools like that come in handy in many situations, so it will be time well spent. You should be able to achieve results in minutes, a first time programmer on the other hand, might take weeks to get there.

File search tool


Expected uptime of a cluster with unreliable components

Question: Suppose a machine has a probability $f$ of failing in an interval of $s_1$ seconds, at which point it would take $s_2$ seconds to replace. Given $d_1$ total machines, how do I compute expected fraction of the time that at least $d_2\le d_1$ machines are available?
Comment: The information looks insufficient to develop an answer, unless you mean $f$ is a (known) *function* of time that gives the full hazard (or survival) information.  Presumably $s_2$ is constant and the machine failures are independent, right?
Comment: Everything is constant. F, s1, s2 are the only numbers provided by the vendor managing the machines, so I guess I need some extra assumptions to get an estimate
Comment: Yes.  A common one would be that failure is a homogeneous Poisson process, corresponding to exponentially distributed waiting times between failures.
Answer: The fraction of time any machine is available during any period of length $T$ lies between $1 - (N+1) s_2/T$ and $1 - (N-1) s_2/T$ where $N$ is the (random) number of failures occurring during the interval.  (The $\pm 1$ terms account for situations where the machine is under repair at the beginning of the interval or fails just before its end.)
We therefore need to re-interpret the single datum "probability $f$ of failing in an interval of $s_1$ seconds" in terms of the distribution of $N$ (given $T$).
One way to do this supposes failure is memoryless, whence the chance of failure in any interval of duration $s$ equals $1 - \exp(-\lambda s)$ for some parameter $\lambda.$  When this is the case, we can solve for the rate $\lambda$ as
$$\lambda = -\frac{\log(1 - f)}{s_1}$$
because that entails $1 - \exp(-\lambda s_1) = f.$
When the failure rate is $\lambda$ (per second), on average the machine is working for $1/\lambda$ seconds and not working for the next $s_2$ seconds, for a mean working time of
$$p(\lambda, s_2) = \frac{1/\lambda}{1/\lambda + s_2} = \frac{1}{1 + s_2\lambda}.$$
When the machines fail independently, the number working at any time will have a Binomial$(d_1, p(\lambda, s_2))$ distribution.  Of course, this number is (strongly) correlated among nearby times, so during any relatively short period you mustn't expect to observe exactly this distribution.  But over an extremely long duration, or if you select one random time, this distribution tells you what the chances are for any value of $d_2$ between $0$ and $d_1.$
Here is a figure of simulated machine availability according to this model.  For this simulation, $d_1=4$ machines, $\lambda = 1/50$ per second, and $s_2 = 100$ seconds for each repair.

The machine up times are color coded by machine.  The total numbers of machines in use are plotted below in black.  Here is a summary of the total amounts of time spent in each condition ($d_2 = 0, 1, \ldots, 4$) according to the simulation and the Binomial calculation.
<code># in use:          0   1   2  3 4
---------------- ----------------
Simulated time   199 168 167 64 7
Theoretical time 120 239 179 60 7
</code>
They differ because initially all four machines were put online simultaneously, temporarily creating an above-average count that persisted due to the temporal correlations, and this experiment was terminated only shortly after all four machines had simultaneously been down.  Over longer simulations, the results converge and agree closely.
Comment: Can I ask for the full r script? Thanks.


Migrating data from one table of one database to other table of other database

Question: I am trying to migrate data from  table A of database DB1 to table B of database DB2 using java and Oracle.
I am using java 1.8 and my source database has Oracle 11g and destination database has Oracle 12c.
I made structure (scema, tables )of destination database in source database. And migrating as by making use of  *insert into dest select * from source* query in java . but as the number of records in source table in millions so it's  consuming time.. and later on this migrated data i want to export into my actual destination so that too will going to take time.
As per my little knowledge.. i think I can't use prepared statement with 2 connection. Because my table consists of 400 to 500 columns , so binding that many columns with prepared statement is not a good idea. Also my structure of source and destination tables are different.  I made the field mapping in properties file where I mapped the old field to new field for insert into select * from tbl query. Like my source table has column as col0001 and the corresponding column in destination is ref_no. So this too will not allow me to use prepared statement. But by making use of statement in java i can migrate data in single dB only.
I tried with dblink also. But for clob datatype i am not able to migrate data.
Kindly provide the solution if anyone did something like this previously.
Answer: For a one-off copy, you can do a direct mode insert:
<code>insert /*+ APPEND */ into local_table select * from table@database_link;
</code>
Here are some other related links.
Comment: It gives error as cannot use LOB locators selected from remote tables


Different results implicit differentiation

Question: When trying to differentiate $\frac{x+y}{xy}=x$, I get different results. If I use the quotient rule:
$$
\begin{array}{rcl}
\dfrac{xy(1+y´)-(x+y)(xy´+y)}{(xy)^2} &=& 1 \\
\dfrac{xy+xyy´-x^2y´-xy-xyy´-y^2}{(xy)^2} &=& 1 \\
-x^2y´ -y^2 &=& x^2y^2 \\
y´ &=& \dfrac{-(y^2+x^2y^2)}{x^2}
\end{array}
$$
On the other hand if I do the following
$$
\begin{array}{rcl}
\dfrac{x+y}{xy} &=& x \\
x+y &=& x^2y \\
1+y´ &=& x^2y´ +2xy \\
y´ -x^2y´ &=& 2xy-1 \\
y´ &=& \dfrac{2xy-1}{1-x^2}
\end{array}
$$
I don't understand what's happening.
Comment: You have two versions of the same result, only in the former you would now seek to substitute $y$ in terms of $x$. Re-write the initial equation as $y = \ldots$  and insert to your first result.
Answer: $\frac{x+y}{xy}=x$ so that $y=\frac{x}{x^2-1}$ If we use this we can show that two terms for $y'$ are equal
Answer: If you can get y in terms of x it's better to avoid getting different versions of the same answer.
One may think of this $$ln(x+y)-ln(xy)=lnx $$
y' in terms of x,y you will get different version of the same answer than yours .
So it's better to do this :
$$ \frac{x+y}{xy}=x \Rightarrow y=\frac{x}{x^2-1}\Rightarrow y'=\frac{-(x^2-1)}{(x^2-1)^2}$$


How does Alia have the ability to communicate with male ancestors?

Question: Reverend Mothers are connected with their female ancestors.  Paul and Leto have access to both male and female ancestors.  What's the explanation for Alia's communication with Agamemnon and Vladimir Harkonnen?
Comment: Maybe in between books, someone thought about the whole "genetic memory" idea and remembered that women with two X chromosomes *also* get half their DNA from an XY parent?
Comment: I think we have to accept a homeopathic relationship between genetics and the soul in Dune.  By that I mean the smallest amount of inheritance gives full access to that ancestral memory.   Real genetics splices chromosomes so much that mapping a family tree to a specific chromosome only works with Y and mitochondria.  DNA tracing finds relationships with small sections of chromosomes. And Dune memory doesn't work in small sections. Similarly a clone can gain full memories of their original life in Dune
Answer: It seems yes, but uncontrolled.
As you note, Alia was able to communicate with male ancestors, in particular the Baron. This was always the goal of that particular branch of the Bene Gesserit breeding program - a Kwisatz Haderach who, as well as infaliable prescience, could communicate with both the male and female ancestry line.
However, Alia lacked control. This could be down to three things -

She was always the next "intended" branch in the Kwisatz Haderach program, not Paul. Had she had a child by Feyd (always the intention) then that child would be the Kwisatz Haderach. Like Paul, this meant that she had latent abilities, but not perfect control over them.
Again, like Paul, she was not expected to have these abilities nor trained formally by the Bene Gesserit in their uses. Unlike Paul however, she did exhibit them much, much earlier (what with a two-year-old having adult conversations and stabbing people.)
She was exposed and awoken to her "ancestral memories" in the womb during Jessica's taking of the water of life.

All this combines to make Alia very much a tinderbox, or a wildcard. She was essentially pretty close to being a Kwisatz Haderach in the breeding program, and everything that happened basically spun her out enough that she gained the memories of at least some of her male ancestors, but not the control, and it's doubtful that the Atreides court would have realised and made time/trusted for the Bene Gesserit to intervene (plus Jessica more or less ran back to Caladan as soon as she could.)
Comment: The BG would have killed her, not trained her, as she was abomination.
Comment: There, there, don't underestimate two-year-olds ;D
Comment: @OrangeDog What makes you think they didn't?
Comment: @livresque ... the book


Cinnamon desktop lagging, spiking CPU every other second

Question: Lately my Cinnamon desktop environment (running on Linux Mint 18.2) has been a bit... laggy. Mouse movement is 100% fine; however every scrolling, window-moving, highlighting, video playing (as it seems to me, things that update window content) causes 100% CPU spikes on one core for half a second, repeating with 1-2 sec period, freezing whatever I was doing. Disk usage stays low during it. This also causes videos to desynchronize with their sound. Needless to say, it's extremely annoying. Between the lags it works as it should.
My computer should handle Cinnamon well - Linux is installed on an SSD (though some directories, like ~HOME, are on an HDD), I have 4GB RAM and an i5 3.2gHz CPU, and running from a Raedon 5770 GPU (built-in driver). My inxi tells:
ezio@Cantabury ~/Downloads $ inxi -F
System:    Host: Cantabury Kernel: 4.10.0-32-generic x86_64 (64 bit) Desktop: Cinnamon 3.4.6
           Distro: Linux Mint 18.2 Sonya
Machine:   Mobo: ASRock model: H87M Pro4 Bios: American Megatrends v: P2.00 date: 12/06/2013
CPU:       Quad core Intel Core i5-4440 (-MCP-) cache: 6144 KB
           clock speeds: max: 3300 MHz 1: 2711 MHz 2: 2599 MHz 3: 2692 MHz 4: 2573 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Juniper XT [Radeon HD 5770]
           Display Server: X.Org 1.18.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: email@example.com
           GLX Renderer: Gallium 0.4 on AMD JUNIPER (DRM 2.49.0 / 4.10.0-32-generic, LLVM 4.0.0)
           GLX Version: 3.0 Mesa 17.0.7
Audio:     Card-1 Intel 8 Series/C220 Series High Definition Audio Controller driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] Juniper HDMI Audio [Radeon HD 5700 Series]
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.10.0-32-generic
Network:   Card: Intel Ethernet Connection I217-V driver: e1000e
           IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: bc:5f:f4:ab:e1:39
Drives:    HDD Total Size: 1901.6GB (1.6% used) ID-1: /dev/sda model: Samsung_SSD_840 size: 120.0GB
           ID-2: /dev/sdb model: WDC_WD10EZEX size: 1000.2GB
           ID-3: /dev/sdc model: SAMSUNG_HD753LJ size: 750.2GB
           ID-4: USB /dev/sdd model: Storage_Device size: 31.2GB
Partition: ID-1: / size: 20G used: 9.5G (52%) fs: ext4 dev: /dev/sda3
           ID-2: /home size: 46G used: 6.4G (15%) fs: ext4 dev: /dev/sdb3
           ID-3: swap-1 size: 4.09GB used: 0.19GB (5%) fs: swap dev: /dev/sdb5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 38.0C mobo: N/A gpu: 37.0
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 226 Uptime: 15:19 Memory: 2554.5/3866.3MB Client: Shell (bash) inxi: 2.2.35

Apparently, it's Cinnamon itself. It's a bit hard to capture the spike while also causing it, but Cinnamon's CPU usage increases to 40-60% during them, while no other process changes.
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1719 ezio      20   0 2587952 600112  50384 S  16,3 15,2 137:58.43 cinnamon
  983 root      20   0  283508   7944   5652 S   1,7  0,2  18:45.15 polkitd
19103 ezio      20   0 3388232 787320 148876 S   1,7 19,9  16:42.69 Web Content
 1259 root      20   0  477696 128816  95528 S   1,0  3,3   9:09.57 Xorg
  798 message+  20   0   44196   4416   3128 S   0,7  0,1   7:41.66 dbus-daemon
  840 root      20   0  450548  11984  10408 S   0,7  0,3   8:10.89 NetworkManager
25137 ezio      20   0  499564  40600  24392 S   0,7  1,0   0:08.13 gnome-terminal-
19052 ezio      20   0 3090968 688212 189464 S   0,3 17,4  14:53.08 firefox

What could be the solution?
Edit: In my journalct -e output, three lines caught my unprofesional eye:
Aug 30 19:17:01 Cantabury CRON[18289]: pam_unix(cron:session): session closed for user root
Aug 30 19:20:37 Cantabury cinnamon-screensaver-pam-helper[18398]: pam_ecryptfs: seteuid error
Aug 30 19:20:37 Cantabury cinnamon-screensaver-pam-helper[18398]: gkr-pam: the password for the login keyring was invalid.

Now that I see this, I recall gettingt a prompt several times complaining about the login keyring, asking for a password. I didn't know that password (it wasn't my user pw == the root pw), so just minimized/closed it.
Comment: could you please use `top` on your terminal and show us which program is making your CPU go to 100%? that would help to find the problem
Comment: @ChristopherDíazRiveros It's Cinnamon (added info)
Comment: I think this may be a bug in Cinnamon, i've been seeing the same issue on my system with Cinnamon, and I'm running a different build (and possibly a different version), though I've only seen it happen when I have a lot of windows open.
Comment: @AustinHemmelgarn It happens to me all the time. And agreed. I only hope there's a workaround somewhere out there... I can't even watch videos. I don't really fancy any alternative, KDE is full of glitches, LXDE looks bad... maybe Gnome is what I should try?...
Comment: GNOME 3 can be a pain if you're not used to their tablet focused design.  XFCE4 might be worth a look if you don't mind not having tons of eye candy (it can do transparency, but doesn't do fancy window switching effects or stuff like that), and MATE might be another option (it's essentially a continuation of GNOME 2).
Comment: Thanks @Neinstein one more thing, could you use `journalctl -e` right after the lag and search for something interesting? maybe and warning, alert, even something related to drivers is good, thanks
Comment: @ChristopherDíazRiveros hmm, three lines seem to be interesting. They're at the end in all blocks I get, the last two is red after the `:`. Everything else looks normal to me (i.e. isn't red and doesn't contain the word "error", "fault", "warning" etc :p ). I appedned the question.
Answer: I asked this question first on the Linux Mint Forum, where mr_raider provided the solution.
All credits go to him.
The problem was caused by the default AMD drivers. The solution is installing an updated version, the oibaf AMD drivers. The procedure:
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade

After this and a reboot, the lag is no more.
The forum thread is available there:
[SOLVED] Cinnamon lagging, causing CPU spikes every other second
Answer: I also had this problem after updating to Mint 18.3
I have NVidia, and tried updating my drivers, but it didn't help. For me it was the new driver (in my case 340.106) that was the problem.
Once I reverted to 340.104 everything seems to be amazing again.
I just wanted to post unless anyone else is having the same issue.
Thanks
Answer: You can also try logging out and logging in with Software Rendering disabled.
Comment: I can't try it anymore, but i think that would've just cause more lags and problems due to the vastly increased CPU usage...
Answer: What worked for me (Nvidia) was going into my misc settings and disabling Vscync. fixing the screen tearing is easy. open the nvidia control panel. Display config. Show advanced and force full rendering pipeline. do this for all your monitors. made it super smooth
Comment: i also use the Nvidia-drivers-510


If Actus Purus is true, how can God be eternally creator?

Question: If the Actus Purus of God, the complete perfection, is true, if God has no potentiality, and He was always what He is, then God was a creator from eternity. But God could not be eternally creator if he was not eternally creating. Does this mean that God's creation was eternal?
Comment: Which eternity? "Eternity, in common parlance, means infinite time that never ends... Classical philosophy, however, defines eternity as what exists outside time", [Wikipedia](https://en.wikipedia.org/wiki/Eternity). Creation is a timeless act, there is no "was creating".
Comment: If god prexisted time, doesn't it shift the meaning of eternal? Quantum-gravity theories suggest time is emergent rather than fundamental
Answer: Many Trinitarian Christians would say that God's character as a creative being is reflected in the eternally begottenness of the Son, even though that does not involve creation. Now there's lots of debate within Christianity about what that means, but it is generally accepted that the Son can be begotten of the Father without being created or made, without being subordinate or lesser than the Father, and can be begotten of the Father while having the same ever-existing singular nature as the Father. There's a sense in which the Son is from the Father which is not symmetrical; the Father is not from the Son or from the Spirit, but simply is. As the Father eternally begets the Son, so it is in character for God to create the universe. Perhaps we should think of creative acts as merely a shadow of eternally begetting, a lesser relationship which creates things which are other to yourself and which come into existence after you.
The Athanasian Creed says:

For there is one Person of the Father; another of the Son; and another of the Holy Ghost. But the Godhead of the Father, of the Son, and of the Holy Ghost, is all one; the Glory equal, the Majesty coeternal. Such as the Father is; such is the Son; and such is the Holy Ghost. The Father uncreated; the Son uncreated; and the Holy Ghost uncreated.
...
And yet they are not three eternals; but one eternal. As also there are not three uncreated; nor three infinites, but one uncreated; and one infinite.
...
The Father is made of none; neither created, nor begotten. The Son is of the Father alone; not made, nor created; but begotten. The Holy Ghost is of the Father and of the Son; neither made, nor created, nor begotten; but proceeding.
Answer: It depends on your God.
Even ignoring the issues in Aquinas' arguments, even he conceded that his arguments could only prove for a God, not the Catholic Triune God.
Generic Godlike Entity
In the generic case, maybe. Obviously we can't know for sure, but the implication of something that is both eternal/infinite and a creator is that the creation process is ongoing and infinite.
Catholic Triune God (CTG)
In the specific case of the CTG, no. We're leaving philosophy and entering, frankly, Bible study at this point, but it's pertinent as Aquinas' created his arguments for the purpose of the CTG.
According to much of Revelations, as well as the Catechisms, the end times are a literal truth; God is meant to have created time, and will call an end to time. The bell with ring and the curtain will fall, according to the Catholic church.
This is, of course, antithesis to the idea that God's creation is eternal.
Comment: Aquinas didn't "created his arguments *for the purpose of the CTG.*" In [_De æternitate mundi_](https://isidore.co/aquinas/DeEternitateMundi.htm) he argued (_pace_ some of his contemporaries) that natural reason cannot know the non-eternity of creation. [_De æternitate mundi_](https://isidore.co/aquinas/DeEternitateMundi.htm) begins: "Let us assume, in accordance with the Catholic faith, that the world had a beginning in time. The question still arises whether the world could have always existed…"
Answer: Regarding whether actuality could precede potentiality, there is this from Heidegger commenting on Aristotle

Aristotle says this in his own way in a sentence we take from the
treatise that deals explicitly with entelecheia (Meta. , 8, 1049 b
5): fanerin oti proteron energeia dynameis estis: "Manifestly
standing-in-the-work is prior to appropriateness for...." In this
sentence Aristotle's thinking and pari passu Greek thinking, reaches
its peak. But if we translate it in the usual way, it reads: "Clearly
actuality is prior to potentiality." Energeia, standing-in-the-work
in the sense of presencing into the appearance, was translated by the
Romans as actus, and so with one blow the Greek world was toppled.
From actus, agere (to effect) came actualitas, "actuality."

M. Heidegger: On The Essence and Concept of Physis in Aristotle's Physics 1998 section
It seems en-ergeia vaguely means 'in action', but this is taken as good as done (agere) in translation.  Not simple to translate these ancient meanings into modern parlance.
http://www.latin-dictionary.net/definition/2347/ago-agere-egi-actus

In Latin, the fourth principal part of the verb agere, meaning "to
do", was actus, which could best be translated as "having been done".

https://www.etymologynerd.com/blog/making-do


Cutkontur 4 contour cutting in data is applied as a surface?

Question: I have to send for printing letters which will be processed by cutter.The company send me yesterday an email saying I had open paths, I tripled checked my file in illustrator indeed was 2 paths open now all paths are closed. But I got this email saying "- Unfortunately, the Cutkontur for contour cutting in your data is applied as a surface. Please create a single continuous closed factorized contour path. " is all vectors in in my file what do they mean ? I would call them but they don't speak English and i don't speak german!
Comment: Hire a translator.
Comment: have you searched around? I never worked with cutkontur but from a quick search it seems it needs some special setup
Answer: I suspect it means the printer wants you to set up the file in some way that will allow their cutter software to recognise the path for cutting.
These settings often include specifications such as putting the cutter path on its own layer above your artwork, with a specific CMYK colour stroke applied, and the colour swatch renamed to "CutContour" or a name their cutter software will recognise.
As to the specific CMYK colour, or name of the swatch required, I think your are going to have to ask them. I'm serious and not joking - either hire a translator, or use a printer who has at least one employee who speaks English, or learn German!
I've had to hire human translators several times for print related work, it's not uncommon.
Comment: Thank you so much for the help !  they needed 1 continuous line !
Answer: "Single continuous closed factorized contour path" I guess "factorized" is a wrong translation of "vectorized".
There's a tutorial video in which you do not need to know German to understand what they ask you.
They use this as a starting design:

They make several steps to come up with a unified sticker-type design:

Get rid of inner shapes
Adding strokes to unify separated shapes (the characters)
Integrate all the objects
And make a continuous simple path of the entire design as a sticker

Making this depends on the complexity of your design. There are many nice tutorials on internet searching How to Create a Sticker Cut Line in Illustrator
Like this one https://www.youtube.com/watch?v=jaT8Dyodzg0
Comment: @BluePars If this is the answer that you needed, then you should choose it as best answer.
Comment: Thank you! they needed 1 continuous line  just like the one above !