Bike-in-a-Kit Concept

Question: Has anyone in the group has tried building a "Bike-in-a-Kit"- a sort of DIY bicycle, which can be entirely assembled and disassembled by the user and can be conveniently carried in a bag ?
I face such problem when I've to take my kid for cycling and have to carry his entire bike in my car. Its tedious and cumbersome and I'm not very fond of those bicycle stands/racks that can be put on cars.
Suggestions/Answers are welcome.
Comment: Any modern bike can be disassembled / reassembled by a competent person. The folding bike was invented for your use case scenario where you wish to transport a bike inside a car. Look at Brompton bikes as an example of what can be done.
Answer: Yes they have travel bicycles that can be broken down

They typically use S&S couplers
But compared to the time to break and assemble a rack is less tedious.
You also have folding bicycles
But the don't perform as well a regular bicycle
A break down bicycle is going to have better performance but takes longer for break down and assemble
Break down and folding bicycles are more expensive
On a regular frame you are not going to get much benefit from a full disassemble compared to just removing the wheels.  Beyond that lower the seat and maybe spin the bars 90 degrees or remove it.  A full disassemble and  assemble is hours of work and something I would want to do in a shop with a full set of tools.
Comment: thank you..its a useful suggestion. I'll try using couplers !
Comment: Can you please tell me more about the bike in the photograph above ( the one in suitcase) ? What make is it ?
Answer: Everything has good points and bad points.
Car racks have an moderate expense, initial setup time, and then are very easy to use with virtually whatever bike you purchase (small time investment when needed).
Folding bikes require the purchase of a moderately expensive bike, no initial time investment, but then a time investment EVERYTIME you want to use/transport the bike.  They will also generally have less performance and be slightly more fragile than a regular bike.  The time investment may be moot if you force your child to do the dissembly/reassembly.
Coupler bikes are similar to folding bikes, but are generally sturdier than a folding bike, have better performance and a higher initial cost.
The drawbacks to couplers and folders also being that you have a limited selection of bikes.
Comment: Actually, you can often have "couplers" installed on "standard" bikes, as an after-market option.  ("Standard" here means round tubes and reasonably conventional construction.  Probably not carbon frames.)
Comment: Given the traffic and road conditions in some places, I'd not want to use the racks, even though as you said, they are less tedious to work with. But appreciate your reply !
Comment: I am not sure how traffic and road conditions apply.  I have used racks to transport downhill bikes to trail heads off-road in a truck.  Part of the "road" was a non maintained rock garden.  If you buy a quality rack, and learn how to use it, it will hold onto your bike just fine.
Comment: The world record for unfolding a Brompton from its stored configuration is 5.6 seconds. I can unfold mine in about 20 seconds.
Answer: You could look online (YouTube) and watch a tutorial on how to disassemble the bike. I'm not sure disassembling the ENTIRE bike would be necessary, though. I would try taking off both of the wheels and then leaning all three pieces against a seat, or if you fold a seat down, the seat and the wall of the car.
I would try this first. Although still a little cumbersome, it would be the quickest and easiest way.

Bike-in-a-Kit Concept


Does determinacy in $L(\mathbb{R})$ implies projective determinacy (in $V$)?

Question: Does $AD^{L(\mathbb{R})}$ directly implies projective determinacy? At least it certainely implies $PD$'s consistency.
Comment: Yes, of course it does. All projective sets are obviously in $L (\mathbb R) $ so they have winning strategies (in $L (\mathbb R) $ and therefore in $V $; note that any possible set of moves for either player is coded by a real).
Comment: let A be projective, f be I's winning strategy of A in L(R). assume there is a play according to f and II wins, assume the result is a sequence of integer s. now consider this strategy for II: if II is facing an initial segment of s, choose the next term of s, else choose 0. this strategy beats f and it is in L(R), contradicts the assumption that f is a winning strategy.
Answer: Suppose $M$ is an inner model (of $\mathsf{ZF}$) with the same reals as $V$, and let $A\subseteq \mathbb R$ be a set of reals in $M$. Suppose further that $A$ is determined in $M$. Under these assumptions, $A$ is also determined in $V$. The point is that since winning strategies are coded by reals, and any possible run of the game for $A$ is coded by a real, then any run of the game in $V$ is already in $M$.
Similarly, since $M$ and $V$ share the same reals, they agree on what sets are first-order definable over the reals, that is, they agree on what sets of reals are projective. It follows that if projective determinacy holds in $M$ then it holds in $V$. In fact, much more is true in the sense that $M$ and $V$ agree on many more definitions over the reals than just first-order (for instance, $L(\mathbb R)^M=L(\mathbb R)$).
It follows immediately from these two observations (taking $M=L(\mathbb R)$) that if determinacy holds in $L(\mathbb R)$, then in $V$ all sets of reals in $L(\mathbb R)$ are determined. :-) That is, $\mathsf{AD}^{L(\mathbb R)}$ implies $L(\mathbb R)$-determinacy. In particular, projective determinacy holds in $V$.
Naturally, $V$ may have more sets of reals than $M$, some of which may not be determined. Also, in general, there may be notions of definability that do not coincide in $M$ and $V$ (for instance, by forcing we may easily change what sets of reals are in $\mathsf{HOD}$). It may be that some definition $\phi$ gives in $M$ a set $A$ that is determined in $M$. As long as we do not change the reals, that set $A$ will be determined in $V$, but running the same definition $\phi$ in $V$ may result in a different set $\hat A$ that may very well fail to be determined.


Workouts don't become easier for me

Question: I do an 8 minute workout every day with an application. My workout is a mix of different excercises (hindu push-ups, abdominal etc, 30 seconds each). before this I used to do easier work-outs. I've been doing this workout for more than a month regularly, but it doesn't become easier. I am stuck at "comfortable" level and my heart rate after workout is 110-130 bpm. What am I doing wrong?
Comment: As a general rule, the title of your question should be a question.
Answer: Progress is easy, given  you  train regularly  and  have sufficient nutrition and rest.
For a beginner.
When you become advanced  and your achievements much  better  then  those of untrained people ,  you  need to  plan  cycles ,  as progress is possible only in specific part of the body or one skill at a time.
When you   become elite, ie world class sportsmen say   olimpics,  world championships,  national  level ....
At this stage your life is organized around one specific event (or say season).
Hardly  you are an  elite as in this case you  would have a coach/trainer.
So i  assume you  are  a novice.
In this case you  could try  to  change one of  3 variables:
You train too hard too often.
You do not  get  enough food to recover.
You do not  have enough sleep/rest to recover.
And there  is a possibility that your training  is not  intencive enough to shift  the homeostasis.  8 minutes  look  too short to  me ,  however   if you  do  Tabata protocol ,  for example  it is even  too much  ,  especially  every day.
Try  to think of it  and change one thing  at  a time ,  observe the  results  over 2 weeks  period  and then decide .
Comment: +1. You don't get better when you exercise, you get better when you are resting between exercises.
Answer:
Insanity is doing the same thing over and over again but expecting different results
-Albert Einstein

When you do the same workout every day without changing your intensity, the reps, the sets, or overall time worked out, then you are going to plateau and that workout will no longer be enough to grow your muscles.
Increase your workout's intensity gradually over time (extra reps, add weight). Your body will adapt to the extra load by building more muscle. This muscle then helps support an even larger load: rinse and repeat.
As an aside, there are two problems with your workout that also contribute to poor muscle growth.

Daily workouts constantly stress your muscles but never gives them time to recover and grow bigger. Reduce to 3-4 days a week so they can properly recover and grow.
Eight minute workouts are not very intense, so you aren't able to do enough to really grow muscles in that time. Increase to 30 - 60 minutes so you can properly stress your muscles enough.

Workouts don't become easier for me


Is Invitation needed for Schengen visas?

Question: Do I also need to have a Visit Invitation for Any of the schengen territories to apply for a Visa? Kindly let me know this, or I could just apply for a Vacation and I am good?
Comment: You've asked several questions about how to apply for a visa. Does this answer your question? [Schengen Visa Application: what are some helpful tips for preparing?](https://travel.stackexchange.com/questions/51048/schengen-visa-application-what-are-some-helpful-tips-for-preparing)
Answer: What you need is an explanation of why you travel, and documents supporting that explanation.

If you are a tourist and pay for the trip yourself, you need no invitation.
If you are visiting friends who provide housing and food, they should confirm that.
If you are visiting a company or a scientific conference, you should have documents for that.

When you come for a vacation, you have to document that the money is yours to spend, that the amount appears reasonable for your financial circumstances, and that you have ties (best a well-paid job) to return to.
They will want to see your finances in any case, to judge your ties to your homeland.
Comment: @Kunie No. You state the purpose of your visit (eg tourism) in the application, and provide documents such as your hotel reservation to show where you plan to spend your time during the visit.
Comment: Meaning, I would need something like a letter to document my reason for visit in any case, since I do not have who is inviting me, I have hotel reservations tho.. Pls wat u advise?
Comment: @Kunle, you need a cover letter to explain your trip. This would mention the purpose (tourism) and dates and destinations (here your reservations can help). You also need evidence of legal residence for the place you're applying from if you live abroad, bank statements, payslips or tax forms, a confirmation of the vacation period from your employer, and proof of health insurance.
Comment: "You also need evidence of legal residence for the place you're applying from if you live abroad": also if you live in (and are a national of) a country with multiple consular districts, in which case you need to show that you live in the district of the consulate to which you are submitting the application.


Group and count query in HQL

Question: I have HQL query that is giving me a headache and am hoping a friendly HQL wizard is out there who can help.
I think I'm trying to do something really simple but can't fathom it all.
I want to group and count some data to present it in a table and think I need a nested query of some sort but can't figure out the way to do it.
Basically I have a table (clients) which has relations to other tables that are used as lookups (clienttype) and (clientsex). The relationships is 1-m.  I want to group the clients by type and then have a column counting males, and another counting females. e.g
Type    | males | females

type A  | x     | x

type B  | x     | x

I can do the query just to get males or females but can't figure out how to get a second column.
Hope this makes sense, is possible and that someone is able to help.
Many thanks,
Craig

Query to get just males is:
SELECT a.clientStatus, COUNT(c.sex)

FROM

Tblclientstatus AS a RIGHT OUTER JOIN a.tblclients AS b
LEFT OUTER JOIN b.tblsex AS c

WHERE c.sex = 'male'

GROUP BY a.clientStatus

Answer: You can have a case when to add up "1" for each sex.
Something like this :
SELECT a.clientStatus,
COUNT(
case when c.sex = 'male' then 1
        else 0 end
) as males,
COUNT(
case when c.sex = 'female' then 1
        else 0 end
) as females,
FROM
Tblclientstatus AS a RIGHT OUTER JOIN a.tblclients AS b
LEFT OUTER JOIN b.tblsex AS c
GROUP BY a.clientStatus

Group and count query in HQL


How are cabin pressure and oxygen level maintained inside the airplane?

Question: How are cabin pressure and oxygen level maintained inside the airplane?
Comment: This is a pretty broad question with lots of information available here and elsewhere.  (I'm not going to research for you and post links...)  Have you already looked?  Is there something specific you don't understand?  (Short answer:  compressor stage bleed air, valves, and pressure regulators.  Oxygen ratio is same as ambient.)
Answer: Some of the air flowing through the aircraft's engine(s) is diverted into the cabin (its cooled and humidified first). As the air enters the fuselage (cabin, cockpit, etc.) It builds up pressure (like filling up a balloon) until the the resulting compressed air in the aircraft contains enough oxygen molecules (for a given volume of air) to be breathable.
To keep the aircraft from being over-pressurized (once the appropriate pressure level is reached) an outflow valve on the fuselage opens and allows pressure/air to be released to the outside. This outflow valve continually opens and closes (modulates) as necessary to keep the air pressure in the aircraft at a level equivalent to about a 7000 - 8000 foot altitude (for an air carrier/jet type aircraft) while cruising at a normal enroute altitude (e.g., 30,000 to 39,000 feet cruise)
The above is an extremely simplified explanation hopefully giving you a basic understanding in response to your question.
I'm confident that more detailed explanations and nuanced analysis of my response will be available in subsequent comments or answers by others.
Here is a good website that will aid in your understanding of airplane pressurization:
How aircraft pressurization works
Answer: If the pressure in the cabin of a pressurised transport aeroplane is maintained to under 10000 ft, the partial pressure of Oxygen is enough not to cause any significant
adverse physiological effects to humans. To achieve that, hot compressed air is taken from the engines and is passed in the cabin. There are also valves on the fuselage, which control the pressure and introduce fresh air into the cabin if needed.
In contrast most military fighter jets use a dedicated system to provide the pilot directly with oxygen. The two main types are OBOGS (onboard oxygen generating system) and pure oxygen supply through LOX bottles. They are usually supplied using ambient pressure, so above 40000 ft you need a oxygen supply under pressure, because the ambient pressure is not enough to sustain the diffusion of gases in the lung.
Some general aviation aircraft also possess a dedicated oxygen supply using LOX bottles for short flights above 10000 ft.


wordpress help needed. How to display both home.php and index.php?

Question: Hey guys i recently created a theme. I want to show home.php when a visitor visit home page but all my blog posts are listed in index.php file. Can someone suggest me how to display index.php i tried http://www.mysiteurl.com/index.php but it redirecting me to http://www.mysiteurl.com/home.php Please advise me. Thanks
Comment: if you have home.php as your home page, you can't have index.php as sub page. However, you can have index.php has your home page and blog.php as blog page
Comment: There's no reason you can't use the code from `index.php` in `home.php`.
Comment: Well i'm not trying to use same code. If i rename the home.php file to xxx.php then it calls index.php file. But i need both pages. I mean home.php as index page. I created a nav menu and placed link called blog. When the user click blog link then i wanna show index.php there. This is what i need. By the way thanks for your comment
Answer: You're misunderstanding the purpose of home.php, which is not necessarily to output the Site Front Page, but rather to output the Blog Posts Index.
In WordPress, the index.php is simply the default fallback template file, that is used when no other, more-specific template file is available.


What are alchemy ingredients used for beyond the initial creation of a potion?

Question: In the Witcher 3, there are alchemy ingredients littered all over the map. From the in game tutorials though, it states you only need to create a potion once, and then after that, when you meditate, alcohol will refill your potions automatically. So what am I supposed to do with all the extra alchemy ingredients?
Comment: You could always sell them for extra cash
Comment: I hope there is a real purpose for those. I really don't like the fact that I only need to brew a potion once.
Answer: From here

If you meditate with hard alcohol, then any potion, oil, or bomb
  (basically most quick-action consumables) you've previously crafted
  will refill. This doesn't work obviously for mutagens and components
  Just be sure to meditate in a safe spot. Wine doesn't work, it has to
  be hard liquor.
If you craft a mutagen potion, it will forever refill in this way.
  This is a direct response to Dragon Age: Inquisitions need to have you
  gather herbs endlessly to keep making health potions. You only have to
  craft a potion once.

Well there are tons and tons of diagrams for new potions so all those ingredients can go for those new potions. And now you need a lot more ingredients to make a potion so it isn't bad gathering ingredients.
If you don't need them go ahead and sell them for some extra orens.
Comment: I think in the previous game you only really had to find herbs that matched one of 6 or so colors to use in potions, whereas in this game, ingredients are much more specific to craft. Anyways, good to know.
Comment: In my opinion this makes alchemy too easy. When I want to go into battle I don't have to "prepare" e.g prepare potions any more. I just have to sit down for one our and I have all my potions ready. For me personally this takes a lot of fun from alchemy. Do you know if this is different in higher difficulties? Only played difficulty 2 so far.
Comment: in the guides there is no mention of difficulty. But basically you need alcohol and the potions will refill.


Windows XP: Hard drive is called letter "H:" instead of "C:"

Question: I recently installed Windows XP Pro SP3 on an old PC. Everything seemed fine except for the fact that the 1 TB hard drive that I installed it to is called "H:" instead of "C:," like it usually is on Windows systems. The letter "C:" is instead assigned to a "Removable Disk Drive" (I believe one of the card readers that came with the desktop). Will re-installing XP with the card readers disconnected end up naming the HDD to "C:"? Also, will keeping "H:" as the main hard drive name present any possible problems with installing software (in other words, if I can fix it, is it really worth doing so)? Thanks.
Comment: Change the drive letter of the removable drive, then change the drive letter of the system drive, both can be done by drive management
Comment: "if I can fix it, is it really worth it?" - No; Your system works, the drive letter assigned to the system drive, doesn't change the functionality of anything
Comment: You won't be having any specific problems generally speaking when installing software. Drive letter H isn't a problem by itself. You can go ahead and use your current windows installation without any problems. So, it does not worth the effort to change that drive letter to "C:".
Answer: Reinstalling may not fix the issue.
If the programs you use are written by competent programmers (which is mostly the case) drive letter of OS drive should not be a problem.
Here's a link that might you in renaming drive letter- https://www.computerhope.com/issues/ch000038.htm
Comment: I thought XP wouldn't let you change the name of the drive that Windows is installed to otherwise it will fail to boot. At least that's what I read when I initially looked this problem up.
Comment: I'd suggest you to move on with your current installation, given that xp ain't no longer secure/supported and that most programs that run on xp are mature. You shouldn't run into any applications related issue anytime soon.
Comment: Yeah, I'm just gonna leave it as drive H:. It won't let me change the boot/system volume. Thanks, though!
Comment: I just reinstalled XP with the card readers unplugged. My drive is now recognized as C:!


How to say "same as" in one word?

Question: Yesterday the "DAMN." album came out and people have been asking me about my thoughts on it. Because I want to sound high-brow I'd like to say that my reaction is same as the album's name? My reaction ... to the album's name
Answer: There is a word "echo"that may express your idea.
Echo: [VN] to repeat an idea or opinion because you agree with it. (From Oxford Dictionary )
So you may put it like this:
My reaction echoes the album's name.
Answer: Ditto
1
:  a thing mentioned previously or above —used to avoid repeating a word —often symbolized by inverted commas or apostrophes
2
:  a ditto mark

How to say "same as" in one word?


I need to fill in the handle holes on a dresser and redrill them.

Question: The original holes are too close together, so I will need to fill the holes with either wood filler or glue and dowel.
Which filler I should use would depend on which would hold up being drilled to reposition the handle holes.
Can anyone give me some advice, or what they would do?
Comment: Will the handle still completely cover the old holes or will you need to match the finish on any exposed portion?  How much father apart will the new holes be (how much will it overlap the old hole)?  Is what you're drilling through solid wood or composite with a wood veneer?
Answer:
either wood filler or glue and dowel

That's what I would do. I would choose a wood filler that says on the tin that it can be redrilled. You might be able to use a repair-washer on the back to spread the load if you are worried.
Otherwise I'd drill the hole out to the next largest dowel size, glue in a dowel and use a flush-cut saw.
If necessary, you can improvise a dowel by drilling a hole in any convenient bit of steel and using that as a "dowel plate" through which to hammer some slightly oversized wood rod. Chucking the wood in a hand-held drill can work to speed up the production of the dowel.


need references regarding the elementary theory of free semigroup and free abelian groups

Question: Recently, I read that two free abelian groups $S$ and $T$ have the same elementary theory if and only if rank$S$=rank$T$.  Does anyone have a reference with a proof of this?  Also, what is known about the elementary theory of non-abelian free semigroups?  I know that non-abelian free groups of finite rank have the same elementary theory; does this imply the analogous statement for free semigroups?  Thanks!
Comment: It's already answered, but to emphasize: it's unrelated. For free semigroups (or free monoids, or free abelian semigroups/monoids, or free magmas, and many others), it's quite trivial as one can characterize generators as non-products (or non-products-except-using-the-unit). For abelian groups, it's an easy trick, but definitely a trick (counting the maximal number of elements whose pairwise differences are non-squares).
Answer: Two finitely generated free semigroups of different ranks have different elementary theories. Indeed, the set of elements $x$ such that $\forall z,t \neg(x=zt)$ is exactly the set of generators of the free semigroup. So the rank of a finitely generated free semigroup is elementary definable.
For the free Abelian group of rank $n$ the formula distinguishing it from any free Abelian group of rank $\gt n$ is this:
$$\exists x_1,...,x_{2^n} \forall y \exists z: yx_1=z^2 \vee yx_2=z^2 \vee ... \vee yx_{2^n}=z^2$$
(we enumerate the subsets of the set of generators and for the subset number $i$ we denote the product of generators from that subset by $x_i$). It is easy to see that this formula holds in every free Abelian group of rank $\le n$ and does not hold if the rank is $\gt n$. For $n=1$ this is the same formula as in the answer of Henry Wilton.
The standard reference for elementary classification of Abelian groups is Szmielew, W.
Elementary properties of Abelian groups. Fund. Math. 41 (1955), 203–271. A shorter proof can be found in Kargapolov, M. I. On the elementary theory of Abelian groups.
Algebra i Logika Sem. 1 1962/1963 no. 6, 26–36 and Eklof, Paul C.; Fischer, Edward R.
The elementary theory of abelian groups. Ann. Math. Logic 4 (1972), 115–171 and Zakon, Elias
Model-completeness and elementary properties of torsion free abelian groups.
Canad. J. Math. 26 (1974), 829–840 (for torsion-free groups).
Answer: It is easy to prove that non-isomorphic free abelian groups (of finite rank) have distinct elementary theories, by exhibiting specific sentences that hold in one but not the other.  For instance, $\mathbb{Z}$ is distinguished by the property that for some element $y$ (eg $y=1$), either $x$ or $x+y$ is even.  In  other words, the sentence
$\exists y~\forall x~\exists z~(x=2z) \vee (x+y=2z) $
holds in $\mathbb{Z}$ but not in $\mathbb{Z}^n$ for any $n>1$. The same idea can be used to distinguish $\mathbb{Z}^m$ and $\mathbb{Z}^n$ for any $m\neq n$.


NSUserDefaults physically data

Question: I'm wondering if there's anywhere i can see what data is in my NSUserDefaults? Like, how does it works? Is there a file that stores in my iphone that contains all the data in the NSUserDefaults or is the file stores in different apps? If i have set [NSUserDefaults standardUserDefaults] setObject:someString forKey:@"someString"]; in app A, can i use NSString *listData = [[NSUserDefaults standardUserDefaults] stringForKey:@"someString"] to get the string in another app B? Is there somewhere the NSUserDefaults is physically stored?
Answer: The preferences of your app are stored in a .plist file (in binary format) in [APP_BASE_DIR]/Library/Preferences/.
See ~/Library/Application Support/iPhone Simulator/4.1/Applications to see the app base dirs in the iPhone Simulator.
Answer: The NSUserDefaults is stored in a plist file; on the iPhone and iPad, you cannot simply open these files.
However, you can have your app print out the contents to the debugger.
Answer: I believe sandboxing will prevent accessing another application's user defaults under iOS. Under Mac OS X, you can work with another application's user defaults by dropping down to the CFPreferences API:
/* ownership follows the Create/Copy rule, so must release when done -
 * here, I just autorelease */
NSString *
value = [(id)CFPreferencesCopyAppValue(CFSTR("key"), CFSTR("com.foo.otherapp"))
         autorelease];
if ([value isKindOfClass:[NSString class]]) {
    /* use the string */
}

NSUserDefaults physically data


Transfer_hook in spl-2022: Only deduct tax from swap transaction

Question: Is there a way to modify the transfer_hook in order to deduct tax fee in $SOL from swap transaction only?
I know there is transfer-hook supported that, but dont know how I check program address of pair mint address when transfer to ensure that it's a swap transaction
Answer: This is up to your own design in the end, but if you want to detect that a particular transfer is being called from a swap program, there's a few options:

include the "instructions" sysvar in your transfer hook so that you can inspect who might have called into your transfer hook program. This is a bit brittle though, since someone might have a program that calls into a swap program, and you might not be able to detect it
add a list of "known swap addresses", PDAs that own token accounts for swap programs. You can check to see if either of the owners is one of those PDAs, and charge your fee if the address is found in that list
Comment: Thanks for your answer


Windows 7 OK button on Copy To dialog doesn't copy profile

Question: So I am attempting to copy a User Profile to the default profile. I am using WinSpy++ to enable the disabled "Copy To" button - this process works on a stock laptop I have here.
However, this does not work in a customised image I have with a fair amount of registry settings changed and policies applied. Additionally, I should be able to copy the default profile over another profile regardless, but I cannot.
The Application Event log lists this:
<code>Error Instrument: ProcessName: systempropertiesadvanced.exe
WindowTitle: Copy To  MsgCaption: Confirm Copy  MsgText:
C:\Users\username\Desktop\test already exists. The current contents of this
directory or this file will be deleted during this operation.  Are you
sure you want to continue?
CallerModuleName: unknown
BaseAddr: 0XFFFFFFFF        ImageSize: 0XFFFFFFFF         ReturnAddr: 0X00000001
</code>
It is the contents of the popup that should show up when I click OK on the copy to dialog... before the profile copy is actually performed.
I intend to diff the registry settings between a known working system and this system... but it is a lot to wade through.
Additionally... The image it does not work on is a Windows Standard Embedded 7 install and after testing it doesn't work even with a mostly clean install so it could be something missing from the installation. I also noticed there are other pop up type messages not displaying (I noticed them in the event logs)
The Event ID is 1072
Answer: EnableDefaultReply for MessageBoxes was set in the registry.
Details here (Just search for EnableDefaultReply if the link goes dead):
http://msdn.microsoft.com/en-us/library/ms940850(v=WinEmbedded.5).aspx

In the HKLM\System\CurrentControlSet\Control registry key, create a new key named Error Message Instrument.
Under the Error Message Instrument key, add the values of type REG_DWORD from the following table.

EnableDefaultReply 0x00000001 Enables the Enable Default Reply
  feature.

This cuases windows to auto reply to messageboxes... and meaning it was auto canceling my profile copy.
Comment: To accomplish this from a command line you can use this:

    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Error Message Instrument" /v EnableDefaultReply /t REG_DWORD /d 0 /f
Comment: Sure but anyone that should be mucking about the registry would already know that...


what to do for VOLTE in India's jio network?

Question: Actually my friend bought me a mobile from UK , its SAMSUNG J3(2016). But now i now need to use VOLTE in India in Jio 4g network, which is not available in the foreign made by default. Which firmware i need to use? Also please tell me how to do this?
Answer: If you want to flash a new ROM then you should collect essential information from XDA forums about your device. Flashing a new ROM is a risky task so you must create a backup or something to fix your handset.
If you don't want to risk anything then use Jio4GVoice https://play.google.com/store/apps/details?id=com.jio.join&hl=en . You can Call, SMS, etc without a VoLTE enabled handset.
Answer: There are multiple variants of J3 (2016) on the market - the one designated for India is SM-J320F, so if that's the model you have on hand right now, flashing an Indian stock firmware from the linked page should make the phone behave exactly like it's purchased from India directly.
Do note that the one on sale officially in UK is SM-J320FN (mainly sold in Europe) which, despite the similarities, won't allow you to flash a J320F stock firmware on it directly.


phone wants to install something

Question: A friend of mine has a mpie m8. I think it had a virus so i factory reset it. Now my phone wants desperately to install com.google.system.s. i installed it without knowing what it is. I downloaded 360 antivirus and it said that it is malware. I uninstalled it (i sweated to do this). And now every 5 seconds it tries to install it again. I cancel it every time. What should i do? Whatis com.google.system.s?
Comment: Related: [Device wants desperately to install a package (com.google.system.s) on its own](http://android.stackexchange.com/questions/128862/)
Answer: Go to application manager in setting and search for an app that you feel strange. Then uninstall it. This is you who can also force stop it.

phone wants to install something


Remove out of stock product from home Page in Magento 2

Question: I am using aloquick theme in Magento2. Some out of stock products are showing in Featured Products tab of Home Page. I would like to remove those out of stock product from Home Page.  My admin panel settings is like below
Answer: By making the setting stores>configuration>catalog>inventory> Display Out of Stock Products to 'No' out of products will not visible at frontend. But it seems that in your featured block you have get the collection of product using incorrect code. Use below code which returns only In Stock products collection-

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollectionFactory =
$objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$productCollection = $productCollectionFactory->create()
->addAttributeToSelect('*') ->addAttributeToSort('created_at', 'DESC') ->joinField('stock_item', 'cataloginventory_stock_item', 'qty', 'product_id=entity_id', 'is_in_stock=1') ->setPageSize(8)->load();


UICollectionView and UINavigationController not cooperating — cells occluded by nav controller on setting prompt

Question: In my UIViewContoller's subclass, ViewWillAppear asks whether or not there's any data to present, and if there is, changes the UINavigationController's prompt accordingly. This triggers an animation as the prompt pops into view, causing the UINavigationBar to grow in size. When this happens it partially occludes the cells in the top row of the UICollectionView.
I have a vertical Auto Layout constraint of 0, seemingly pinning the UICollectionView to its nearest neighbor, which should be its superview, but the navbar still blocks the top halves of the cells. I've tried everything — telling the CollectionView to layout its subviews, reloading data, etc., but nothing seems to work. Any idea what's going wrong?
- (void)viewWillAppear:(BOOL)animated{
if(self.orderedURLSet.count == 0){
    self.navigationItem.prompt = nil;
    [self.collectionView setNeedsDisplay];
} else {
    self.navigationItem.prompt = @"Tap photos to edit";
}
    [self.collectionView reloadData];
    [self.collectionView layoutSubviews];
}

Edit: What makes this even stranger is that when I rotate orientation the collectionViewCells aren't occluded, and the full cells remain visible when I rotate back to portrait orientation. Is there some way I can "trick" my app into thinking its layout has changed and it needs to reposition the cells? LayoutSubviews isn't doing the trick.
Edit: After digging a little more into the UIView documentation, it looks like setNeedsLayout and layoutIfNeeded are really the methods I should be using, and not layoutSubviews. I've tried calling both of them, on navigationController:didShowViewController:animated:, viewWillAppear, viewDidAppear, and viewDidLayoutSubviews to no avail.
Answer: Have you tried??

- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
{
    return YES;
}


Error automating Word on Test Server

Question: I am trying to open a Word document from a .Net web application. The code (in brief) contains ...
using Word = Microsoft.Office.Interop.Word;
using System.Reflection;

and, the code that actually creates the document includes:
object oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; // \endofdoc is a predefined bookmark
object oTemplate = WebConfigurationManager.AppSettings["GuidelineRepsTemplate"]; //this points to a .doc I am using as a template

//Start Word and create a new document.
    Word._Application oWord;
    Word._Document oDoc;
    oWord = new Word.Application();
    oWord.Visible = true;
    oDoc = oWord.Documents.Add(ref oTemplate, ref oMissing, ref oMissing, ref oMissing);

    object oBookMark = "Representative";
    oDoc.Bookmarks.get_Item(ref oBookMark).Range.Text = lblRecipient.Text;

    object oBookMark1 = "Guidelines";
    oDoc.Bookmarks.get_Item(ref oBookMark1).Range.Text = Guidelines.ToString();

object fileName = WebConfigurationManager.AppSettings["GuidelineRepsPath"] + ContactID.ToString() + "\\" + fileString2 + ".doc";
        object FileFormat = Word.WdSaveFormat.wdFormatDocument;
        oDoc.SaveAs(ref fileName, ref FileFormat, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);

The Word document I use as a template has two bookmarks in it and I populate these bookmarks within the code above.
On my development box it all works fine. The document opens in Word, users can make changes if they wish and it saves in the directory I have created for it (directory code not shown above).
When I publish to a test server - every time I run it I get this error:
The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

The stack trace can't make it's mind up what is wrong - one example is:
[COMException (0x8001010a): The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))]
Microsoft.Office.Interop.Word.DocumentClass.get_Bookmarks() +0
SendConfirmEmailReps.CreateDocs(Int32 ContactID, Int32 OrganisationID) +942
SendConfirmEmailReps.Page_Load(Object sender, EventArgs e) +317
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

which suggests something wrong with the bookmarks. So I took references to the bookmarks out and started using a file called Hello.doc as my template. No bookmarks - just the word 'hello' in it.
This fell over too - but the StackTrace indicated it was when SaveAs was called.
So, the question is ... why does it work on my development box but not on the server. The server has Word installed on it.
Comment: Can be it because of anti-virus or window DEP?
Answer: I think this is the stability problem inherent in server-side unattended usage of Microsoft Office automation.  It's described in more detail here.

Error automating Word on Test Server


About an interpretation of implication

Question: Could the ' If P then Q ' be interpreted as 'If  P is assumed to be true then Q is true '?  This could explain why a false proposition implies any proposition , according to Raymond Smullyan. If P is a false proposition and  P is assumed to be true ( when it is actually false) this introduces a paradox from which any proposition can be implied.
Comment: Nothing is 'proven'. Consider this: if x>5, then x>3. Suppose we're given that x<5. Is x>3?
Answer: There are two notions to be distinguished here: logical consequence (⊢) vs material implication (→), each of which, in classical logic, has the unusual property of explosion, which we can summarize as:

⊢–Explosion. {S,¬S} ⊢ Q, for any Q.
→–Explosion. Under assignment v(S) = ⊥: S → Q, for any Q.

1 The →–Explosion follows simply from the definition of → in terms of disjunction and negation:

(φ → ψ) =df (¬φ ∨ ψ),

because whenever the truth-assignment v is such that v(φ) = ⊥, then φ ∨ ψ follows, for any ψ. Proof theoretically, whenever ¬φ is proved, you can ∨-introduce ¬φ ∨ ψ where ψ can be any sentence whatsoever. The reason why the classical consequence explodes is a little more interesting.
2 According to the usual Tarskian interpretation of logical consequence:

Logical Consequence. Γ ⊢ φ is true iff it is impossible to make all ψ ∈ Γ true and φ false.

Whenever you have a sentence S ∈ Γ s.t. ¬S is also in Γ, you have the sentence (S ∧ ¬S) ∈ Γ. Consider an arbitrary sentence Q; is Q a logical consequence of Γ, given that Γ contains such an inconsistent conjunction? Let's appeal to the definition above:

{S, ¬S,...,Sn} ⊢ Q is true iff it is impossible to make all of S, ¬S,...,Sn true and Q false.

Since S and ¬S are inconsistent they cannot both be made true, therefore, whatever else may be contained in Γ and whatever Q may be, it follows that {S, ¬S,...,Sn} ⊢ Q. It is an immediate byproduct of the classical definition of consequence.
There are, of course, many non-explosive logics, such as Belnap and Anderson's relevance logic where from a contradiction an arbitrary Q isn't allowed to follow because implication has to meet special 'relevance' requirements. Look at that last SEP article for the details on how exactly that works. Most relevantly, there are many paraconsistent logics specifically created to handle this so-called 'paradox' of material implication. Worth checking out.
Comment: @MauroALLEGRANZA You're too kind. Thanks for your comments. In the second one, is there a typo in the very last sequent (the one you called 'mp')?
Comment: One of the "basic" rules of inference is modus ponens and it exploit the truth-functional characteristics of (→) to licence us to infer ψ from φ and (φ→ψ). In other way, mp says that : (φ→ψ), φ ⊢ ψ .
Comment: @user128932 - Pefect answer ! I like to add only one comment. The two notion are **very** different (as explained by Hunan) : The conditional (or material implication (→)) is a *connective* "inside" the language, logical consequence (⊢) is a relation between sentences of the language (thus, defined "outside" it). Their "independence" can be simply "viewed" in this way: we can have e.g.propositional languages without the → connective and the definition of consequence is the same. **But** there is a strong link between the two. 1/2

About an interpretation of implication


Is the use of "9-sibling" and "13-year" in the sentence below correct?

Question:
...has been a realtor for 13-year and decided, at a young age, that he wanted to make selling real estate a career. Being raised in a large family of 9-siblings
Comment: The hyphens aside, the number of years is greater than one: it should be 13 year**s**, as in a plural
Answer: You should not use hyphens in these instances.
We do not hyphenate such noun phrases when they are used in ordinary nominal contexts such as object of a preposition or argument (subject, object, complement) of a verb:

He has been a realtor for thirteen years.
  Thirteen years have passed since he entered the real estate business.
  He has spent thirteen years in the real estate business.
  It has been thirteen years since he entered the real estate business.

We only employ the hyphen when the noun phrase is employed as an attributive:

... his thirteen-year career as a realtor ...

The hyphen is a courtesy to reader, making clear that the year is not the noun which ends the noun phrase launched with his but part of a subordinate constituent along the way.
Note that when we marry quantified noun phrases as attributives like this the noun loses its ordinary plurality: a thirteen-year career, a nine-sibling family.
Note, too, that when the quantified noun phrase is employed as a genitive it retains its plurality and is not hyphenated: his thirteen years' experience.
Answer: No.
Firstly: neither phrase needs a hyphen. The use of hyphens can be tricky, but here the relevant rule is that they are used to make compound modifiers. Use a hyphen to link a modifier to another word, when the two together then modify something else.

He is well liked. ("Well" modifies "like".)
He is a well-liked person. ("Well" modifies "like", and together they modify "person".)

Both of your cases are more similar to the first example above. You would only use a hyphen if it was instead written like so:

...has had a 13-year career as a realtor. Being raised in a 9-sibling family...

Secondly: in your sentence, "13-year" (or, as it should be, "13 year") is incorrect because "year" should be plural, "years".
(Note that the example I just put above is correct as "13-year", however, because nouns like "year" stay singular when used as modifiers to other nouns.)
Fully corrected:

...has been a realtor for 13 years and decided, at a young age, that he wanted to make selling real estate a career. Being raised in a large family of 9 siblings...
Comment: Is the hyphen in the second sentence's "well-liked" necessary? As an adverb, "well" cannot modify "person", so it should be a given that it modifies the following adjective.
Comment: @chepner "well" can also be an adjective meaning "not ill".
Comment: I think I was assuming you would use a comma in that case. ("He is a well, liked person.", which is already a bit stilted anyway.)
Comment: A career of 13 years is a 13-year career, not a 13-years career. See answer of @StoneyB
Comment: @Lenne: Quite right. After reading StoneyB's answer, I realised that my answer seemed to be saying that *my own* example should've been "13-years". I didn't edit it right away because I wanted to see if a correction was needed... maybe nobody would think that's what I meant? But you did, and so I've edited it. :-)


out of diskspace because of sparsebundle

Question: My disk is out of space all of a sudden and I found out that a directory in /Users/.harith/harith.sparsebundle is using 178 gigs of space. What is this directory? How/Why is my mac using it. Is it safe if I remove the directory?
Comment: Are you using FileVault (1) on that user?
Comment: Have you verified that the trash has been emptied? If you add up the sizes of the folders in your home folder (Desktop, Documents, Downloads, etc.), do they add up to ~178 GB?
Comment: What version of the OS are you running?
Comment: Using FileVault - Yes. OS is Snow Leopard.
Answer: /Users/.harith/harith.sparsebundle is the encrypted contents of your home directory. When you are logged in (as user harith), then the unecrypted contents of that same directory are visible under /Users/harith, that is, your home directory.
So what you're seeing is, your hard disk is full. And your home directory is taking up 178 GiB of space.
IT IS NOT SAFE TO DELETE /Users/.harith/harith.sparsebundle!!!!! This is your home directory's files, and deleting this will delete or corrupt your home directory!!!
What you will want to do is look for large files within your home directory, and move those to an external drive. As @lemonginger mentioned, movies and music are good places to look, but not so they're not being decrypted as he said, that's irrelevant. And don't just move them anywhere, you need to move them to a different hard drive otherwise you won't solve the problem.
If you don't have a second hard drive, consider moving files to a cloud-based storage system, such as Apple's iCloud service or Amazon's Cloud Drive. This can be either a permanent solution, or a temporary storage space until you can expand your local disk storage. Amazon may be a good choice because they offer 5 GB at no cost, and I believe you can get up to 20GB free if you purchase any MP3 from them.
In order to reduce the size of your home directory's encrypted sparsebundle, you need to log out. After you log out, if you have deleted files from within your FileVault home directory, you will see a dialog appear with a progress indicator which states "Reclaiming unused space in  home directory". What this is actually doing is removing the parts of /Users/.harith/harith.sparsebundle which are no longer in use (because you have deleted files).
A side note: /Users/.harith/harith.sparsebundle is only when you are logged in. When you log out, /Users/.harith/harith.sparsebundle is moved to /Users/harith/harith.sparsebundle, and it's moved back when you next log in.
Comment: I currently don't have an external hard drive. Will it work if I move the movies to /tmp or somewhere else for the time being?
Comment: @harithski: No. You will make the problem *worse* if you move the files to another location on your hard disk, because you'll actually be copying them, using *more* space... until you log out, when the space will be reclaimed. But in the end you'll be right where you started. Your best bet is to go buy a hard drive, or burn them to DVD.
Comment: `/tmp` is still space on your boot volume...
Comment: What you could do is place the content in [Apple's iCloud](http://www.apple.com/icloud/) or any other "cloud" based storage system (including [Amazon.com's cloud drive](https://www.amazon.com/clouddrive/learnmore) which has 5GB at no cost), at least temporarily. This would free up space.
Answer: It sounds like you are running File Vault and that is your Home directory. A useful tip if you are using older versions of File Vault is to store a lot of your music and movies outside of your home folder, so that they aren't being encrypted and decrypted all the time. Or upgrade to lion, which handles encryption completely differently (and much better IMHO)
Comment: You are right. I have 90 gigs of music and movies. I'll try moving those outside the home directory.
Comment: @harithski: This won't save any disk space... it will just waste time, and in fact, will use *more* disk space until your home directory is compressed.


How to tell which products are not catgorized via phpmyadmin

Question: I'm trying to pull a list of all products that are not in categories via php-myadmin, is this possible? What is the best way to go about doing this?
Answer: This SQL query will give you a list of all "uncategorized" skus:
select sku
from catalog_product_entity as e
left join catalog_category_product as cat
    on e.entity_id = cat.product_id where  category_id is null

EDIT: If you want to fetch more data, you need to pick it up from proper EAV tables, here is a basic sample demonstrating the principle:
set @name_attribute_id =  (SELECT attribute_id FROM  `eav_attribute` INNER JOIN `eav_entity_type` ON entity_type_code = 'catalog_product' AND  eav_entity_type.entity_type_id = `eav_attribute`.entity_type_id where attribute_code in ('name'));

select sku, created_at, updated_at, name_table.value as product_name
from catalog_product_entity as e
left join catalog_category_product as cat
    on e.entity_id = cat.product_id
left join catalog_product_entity_varchar as name_table
    on e.entity_id = name_table.entity_id and name_table.attribute_id = @name_attribute_id
where category_id is null

Comment: thanks so much! This indeed worked great! If I also wanted to pull up the products name, date created, and date of last updated what would I have to add?
Comment: Check out my updated answer. This is real magento-sql-geek stuff :P
Comment: you are amazing! Thank you! Excuse my "n00bness" but when I entered in your entire snippet nothing was happening. When I entered in the code starting at "select sku" (from the second code snippet you pasted) it brought up a list of everything correctly except for the product names come up "NULL". Am I doing something wrong?
Comment: Looks like your phpMyAdmin configuration doesn't allow multiple queries per request so we can't make use of variable \@name_attribute_id. A workaround is: 1) run first query without "set \@name_attribute_id =", just select 2) figure what your "name" attribute id 3) run your second query with substituting @name_attribute_id by the real attribute_id
Comment: Thanks so if my name attribute was 71 I would run something like:

set 71 =  (SELECT attribute_id FROM  `eav_attribute` INNER JOIN `eav_entity_type` ON entity_type_code = 'catalog_product' AND  eav_entity_type.entity_type_id = `eav_attribute`.entity_type_id where attribute_code in ('name'));
Comment: I got it! Sorry for the confusion. So I did what you said and to get the name I ran:

select sku, created_at, updated_at, name_table.value as product_name
from catalog_product_entity as e
left join catalog_category_product as cat
    on e.entity_id = cat.product_id
left join catalog_product_entity_varchar as name_table
    on e.entity_id = name_table.entity_id and name_table.attribute_id = 71
where category_id is null

Thank you so much!!!


Drop/Create MongoDB TTL index vs. collMod in production

Question: I'm working with a MongoDB collection containing over 250 million documents that has an existing TTL index and is written to with a pretty high frequency. I'd like to reduce the TTL value for the index from 60 days to 30 days, while minimizing production impact. It seems that I have two options: dropping and recreating the index in the background or running the collMod command to modify the index. The simplicity of the collMod command is appealing, but I'm concerned about the impact it might have, especially since there appears to be no way to run it in the background. Would dropping/recreating the index lead to less lock contention and have less of an impact?
Comment: I ended up going the route of dropping and recreating the index, since I knew that it would be run in the background. It took ~4 hours, but seemed to work fine. I was a bit unhappy to see the level of load introduced by the reaper process that cleans up the documents older than the TTL, but it doesn't seem to be preventing other operations.
Answer: The first you need to do is calculate how many documents the index will delete if you change the 60 days into 30. That is a simple count with {TTL_FIELD: $gt:30days}.
If the number of documents is big (how "big" depends from the server specs and the workload) I recommend to run an incremental Colmod like (pseudocode):
While achieve 30 days {
NUM = 60 days;
NUM = NUM - threshold;
db.runCommand( {"collMod" : "COLLLECTION" , "index" : { "keyPattern" : {TTL_FIELD : 1} , "expireAfterSeconds" : NUM } } )
wait 2 minutes;}
If the number of deleted document is small just do the collMod at once or on 2-3 steps manually.
Your approach to drop and recreate the index takes more time and if you have lot of documents for deletion you will get performance degradation when the index completes.
Hope that helps
Comment: Yes this is exactly how the collMod works and its easy to re-produce it on a test mongo instance. The change is fast but when the TTL deletion thread executes (once per minute) it will delete all matching documents. The question to you have to answer in these cases is: Can my app handle the deletion of all documents at once? If yes fine change the  expireAfterSeconds if not use the script to run the deletion in steps.
Comment: Is it your impression that the collMod just updates the expireAfterSeconds value and then lets the TTL (reaper) thread discover that it might have more documents to delete? If so, the change to the index itself would be very fast. In my case, each expired day has about ~4m documents and (probably because the collection is being actively written to at the same time) takes about 2 hrs to remove. So, 30 days worth of docs translates to 60 hours. Ouch...


Is there any difference between first user account and after then the account created?

Question: When i first set up my linux desktop it asked me to add a user account .
After then i was learning linux commands using this account.
I then add some more users using "useradd" command.
Now i eager to known that is there any difference between first user account and those i created using 'useradd' command   and how can i figure out those difference.
Comment: On some Unix systems (e.g. OpenBSD and macOS), the non-root account created via the initial installation may sometimes be a member of a "wheel", "staff", "admin", or similar group or login class. Depending on what Linux you use (you don't mention this), this may be true for you too. Are you having some sort of issue relating to this?
Comment: no, there isn't
Comment: I have linux mint. I cant change some  files with the second type of user account
Answer: Look into /etc/group for whether the first account is in some groups that the second is not.
Look into /etc/sudoers to see if it's individually mentioned as permitted to use sudo, and either add an entry for the second user if so, or enable a group sudo permission for a group that your new account will be in, conventionally wheel.
Also, you mentioned "you can't change some files" with it. Check the owner and group of those files (in ls -l), and if you want both users to have equal access then set permissions on this file to ones allowing group the same as owner and have the files' group set to one that both users are in.


How to remove directory from rsync share completely

Question: Is there any rsync command that can remove some remote directory from rsync share completely? I mean delete not only directory content but the directory itself. And without rsyncing the entire parent directory since it can be very large.
Comment: Exactly what are you trying to achieve? Can you show some more detail about your setup and rsync command?
Comment: Assume that we have a remote server that has one share. There are some directories in the share. Let `x` be one of them. I want a single rsync command that can delete `x` recursively and completely like `rm -rf`.
Answer: Answering my own question...
In fact it is possible to remove directory from the remote server completely (including directory itself). Check the example below:
rsync -r --delete --include 'x/***' --exclude '*' local_empty_directory/ rsync://some_server/some_share/x_parent_directory

The key is to clean the parent directory for x (x_parent_directory in example) using local empty directory local_empty_directory while excluding everything by using --exclude '*' and including only the directory we want to delete (x in example) and its content by --include 'x/***'.
Answer: Following man of rsync you can use --exclude

--exclude=PATTERN
This  option is a simplified form of the --filter option that defaults to an exclude rule and does not allow the full rule-pars-ing syntax of normal filter rules.
--exclude-from=FILE
This option is related to the --exclude option, but it specifies a FILE that contains exclude patterns (one  per  line).   Blank
                lines in the file and lines starting with ';' or '#' are ignored.  If FILE is -, the list will be read from standard input.
Comment: I do not understand your solution completely. It looks like I should run `rsync --list-only` to get a list of directories and then use exclude pattern that excludes everything except the directory I want to delete. If I am correct then this solution contains 2 subsequent rsync calls. I want to use only one rsync invocation to avoid concurrent access issues as much as possible.
Comment: Ooops, my fault, I understood remove as not using it in rsync.
Comment: Actually this is OK since my question is badly formed. In fact I tried the 2 rsync invocation solution and it works fine except concurrent access issues and it looks like there is no better approach.
Answer: You can not remove remote directories with rsync. The best you can do is to remove all files inside a remote directory, using the "--remove-source-files" option. From the man page:

This  tells  rsync  to  remove  from  the sending side the files
  (meaning non-directories) that are a part of  the  transfer  and have
  been successfully duplicated on the receiving side.

Alternatively, you could simply issue a rm command via SSH, for example:

ssh root@remote_ip -c "rm -rf /somedir"
Comment: Fair enough. :)
Comment: Looks like I did it, please review my answer.
Comment: I'm glad to see that you solved your problem. However, if you have SSH access to the remote server, why do not use the ssh -c method described above? It seems a more logical and direct solution...
Comment: Because I do not have ssh, only rsync


Is there a way to use an IOS Clash of Clans Account on my Computer?

Question: My IOS mobile Device fell and broke.
Is there any way to use my Clash of Clans account on my laptop instead of my phone.
Answer: I'll assume that you had an iPhone since you did not precised it in the question, but you used the tag iOS. Anyways, if you had an android, all you have to do is replace "iOS" by "android" and "GameCenter" by "Google+" in my answer.
If you were not logged in GameCenter, your save might be lost until you get your phone repaired. You could try to contact the CoC support, but I can't guarantee they can do anything. If you were so, your will be able to get back your progression.
First of all, you have to download an iOS emulator. You can find some by searching on google, take the one that fit for you. Here is one : http://www.xpadian.com/.
Now, you have the you have to download Clash of Clan using the AppStore.
Finally, connect your brand new fake phone into GameCenter and your account should be back !
Answer: This is only if you're a Android user
You can use an application called "Bluestacks" as this mobile gaming platform is used for playing games usually made for mobile devices and put on a PC
You can download it here and login to your Google Play account:http://www.bluestacks.com/download.html
Other wise if you are not a Android User and you are an IOS person you can still play Clash of Clans but will not be your usual village as you are not logged into your Google Play Account.
Comment: i need it to be in my pc
Comment: When you install Bluestacks and install clash of clans it will be added to your games and if you use google play then you can log into your account to use the village.
Comment: but i am not taking about android
Comment: Do you have an IOS device that was currently destroyed? If so I will try to help.
Comment: yes i have it right now
Answer: If it was google account then it could have been possible but as it is an ios account there is not way you can go to pc with that as there are no ios emulator that can do it.
I suggest as easy way out.
Just open COC on iphone and link it to a google account and then come back to pc and use any emulator that you like and enjoy the game on pc.
There are also ways to install android on pc if you want like you install windows.
Check on google "Android-x86". Hope this help.


What type of remote sensing methodology is commonly used to locate and track the movement of woodland caribou herds?

Question: I am most curious whether it is possible to use Landsat or other freely available imagery (but info on any other method would great as well) to locate and track the movement of woodland caribou herds over time.   I only have some experience doing this type of work with forest depletions and vegetation analysis but am curious whether similar techniques exist for locating and tracking animal herds.
Answer: there are a few examples of animal counting by remote sensing (whales, gnu, crocodiles, seals...), but they used higher resolution satellite images (<1m) or aerial photographs (see this paper) and there was a clear spectral difference with the background (sometimes in UV or infra-red)). As a rule of thumb, you should have around 10 pixels to detect an "object", so it is obviously not possible with Landsat (15 m).
Maybe you could detect the herd as an object, but I seriously doubt that it would work because the distance between animals of the same herd can be larger than the pixels.
Comment: Thanks! Interesting info! Kind of had an idea that Landsat is not high enough resolution but was hoping that perhaps some band combination could reveal the presence of a herd.
Answer: In my experience, satellite imagery, even high resolution, has not been too effective in tracking caribou, and the best option in applying landsat or other imagery is to use predictive habitat models derived from gps tracking, or directly utilize gps tracking. Landsat based landscape classification provides a very good basis for where to go looking for caribou, but wouldn't provide much in the way of actual caribou observations. In some cases, you could probably track major catering areas of larger herds, but unlike barren ground caribou, many woodland caribou form only small, less cohesive groups, often only during the winter.


Giving extended notice period to employer?

Question: I'm moving away from the area at the end of March and I want to give my current employer 2 months notice instead of the statutory 1 month. This is due to the fact that we are already one member of staff down in our office at the moment, and I want to give my employer enough time to get a replacement for me too. I get on very well with everyone in my office as well as my area manager and I really don't want to leave them in the lurch. I know my area manager would appreciate the extra time, but could the HR Department insist I only work 1 month notice?
Comment: I'm voting to close this question as off-topic because It's unanswerable without knowing the country.
Comment: Location? (Country)
Comment: This happened to me once (in France, since laws may differ) : I intended to give a 3 months notice (local law was only forcing me to give a 6 weeks notice) but the boss was so pissed he insisted I leave as soon as possible. I didn't mind too much because I could start my new job before but this could have been a problem for me.
Answer: Write down the possible advantages for you of giving two months notice instead of one month. You will find the list of possible advantages is absolutely empty.
And if you give two months notice, your employer can decide to give you the shortest legally possible notice, and you'll be out of money for some time.
Now in practice, it's none of your HR department's business to decide how long you are working there, except to check that whatever happens is perfectly legal (and isn't against the companie's interest). It would be your manager's decision primarily to say for how long they would like you to work there. Of course if your manager wants you to leave, that's it.
Comment: FWIW, in many places if the employer chooses to shorten the notice, it change from resignation to termination, which could invoke a whole new set of laws/regulations depending on jurisdiction
Comment: Indeed, in many (all? most? I'm not sure) European countries it would be illegal for your employer to fire you in response to giving a longer notice periods and most employers would be smart enough to appreciate the additional notice.
Answer:
I know my area manager would appreciate the extra time, but could the
  HR Department insist I only work 1 month notice?

It's possible, but unlikely. HR seldom cares about such details. They will just want to know when is your last work day so that they can process all the relevant paperwork. And unless there is a corporate policy or law in play, HR will seldom go against the manager's wishes.
If you are confident that your boss will receive the news well and appreciate the extra notice, then go ahead and try for 2 months.
Comment: +1 - HR doesn't care about long notice periods as long as they know what it is.
Answer: Just give them one month's notice. The notice periods are set by the company to give them enough time to get a replacement. It's not your fault if the company don't do it in that time frame.


How to force a screen orientation in specific view controllers?

Question: My application is pretty simple: it starts up with a view controller that holds a table view (in grouped view layout) with a few options. When the user taps on one of the options, I push another view controller onto my navigation controller.
This second view controller simply displays a UIImageView, and the user can change the screen orientation on this view controller between portrait/landscape modes. This works just fine, and all is happy.
However, if the user taps on the "Back" button on my navigation bar while on the landscape mode, the first controller's layout is all messed up. See below for before/after screenshots:

(source: pessoal.org)

(source: pessoal.org)
Any clues on how to force the first view controller (second screenshot in this post) to stay within the portrait screen orientation?
Answer: There does not appear to be a way to do this using the documented methods.
I have filed a bug for this: rdar://6399924
"There is no way to always restrict a UIViewController to one orientation"
You can see it on open radar (along with a link to sample code to reproduce the problem) here: http://openradar.appspot.com/radar?id=697
Comment: This answer is from 2008. Now you have solution [here](http://blog.typpz.com/2010/02/12/iphone-programming-how-to-force-your-app-to-run-in-landscape-mode/) i used to lock orientation.
Comment: As always on Stack Overflow, if you have a better/more up-to-date solution than the accepted one, please post it appropriately so that we can update the accepted answer.
Answer: Like someone on the open radar suggested, a workaround is to disable "back" button while in non-portrait:
<code>- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
    // don't let user press "back" button in landscape - otherwise previous view and the rest of the application
    // will also be in landscape which we did not feel like testing yet
    self.navigationController.navigationBarHidden = (UIInterfaceOrientationPortrait != self.interfaceOrientation);
}
</code>
Answer: There is a solution to do that : it's to use a view controller and adding its view to the window. then in that controller you force landscape in the shouldAutorotate... methode. It works fine, but be sure it's necessary for your project to use that, because it's not very smart  to force the user to turn his iPhone. By the way, here is an example code if you need it.
http://www.geckogeek.fr/iphone-forcer-le-mode-landscape-ou-portrait-en-cours-dexecution.html
Answer: I wasn't able to get this to work the way I wanted. You ought to be able to set a particular orientation for a ViewController, but the NavigationController doesn't seem to always do the right thing.
I ennded up re-designing my screens so that they all work in either orientation. That might be extra work, but it "feels" more natural, anyway.


Imputing missing observation in multivariate time series

Question: Suppose I have a dataframe consisting of six time series. In this dataframe, some observations are missing, meaning at some timepoints all time series contain a NA-value. In R, one possible imputation package that can be used to impute time series data is Amelia. However, this package does not work for observations that are completely missing. Are there other ways to impute my data? For what it's worth, the amount of missing observations is less than 20% of all observations.
Answer: A good reference to solve your problem is the book "Time Series Analysis and Its Applications: With R Examples" by Robert H. Shumway and David S. Stoffer.
A chapter is dedicated to the imputation of missing observations in multiple time-series analysis. Applications with code in R are also provided.
Answer: There is otherwise the package mtsdi for multivariate time series, it seems to offer an EM algorithm taking into account time auto-correlation and within variables correlation.
This package seems promising, although there appear to be a few implementation problems, I ran into one and there is another one reported here:
https://stackoverflow.com/questions/29472532/arima-method-in-mtsdi
Answer: That most imputation packages don't work, has to do with their underlying algorithms. Imputation is done by employing inter-attribute correlations to estimate the missing values.
An easy understandable example:
You have attributes A,B,C,D.
In row 20 attribute D is missing. From the past data the algorithm knows, when A is value x1 and B is value x2 and C is value x3 then the value of D is most likly x4. If now all four attributes are missing, the algorithm can not work.
What algorithms being able to deal with this need to do is to consider information of other rows, to solve this problem.
The concrete problem could be fixed with one of this approaches:

Use Amelia options: lag, leads, polytime  (if you do not use these options it is doing nothing time series specific)
Impute each column seperatly with imputeTS package (that is a package explicitly for time series imputation - but does not support multivariate datasets)
Use imputeTS to impute each column, but then restore all NAs (except the rows where all values are missing), then use an imputation package like Amelia to impute the rest (better than option 2 if you think the inter-attribute correlations are stronger than the inter-time correlation)
Comment: Sorry I don't understand your third recommendation. Why would you impute and then restore all NA?
Answer: Using an state-space model is an alternative. You might want to check packages such as dlm, KFAS, or others.
Comment: Thanks for your reply. So I would use a dynamic state space model to estimate the missing observation at time point $T$ using the observations on timepoints $1, \ldots, T-1$?
Comment: Well, it depends. If you are making a retrospective study, you might prefer to impute using all available information, i.e. observations at time points $1,\ldots, T$ (smoothed values as opposed to predicted values in state-space parlance).


I think my professor misunderstood something I said and may have taken offense; what should I do?

Question: I am following a graduate mathematics course. While in class, I noticed that my classmates notes almost sliding off her inclined desk, and I whispered to her that gravity was a bitch. I think I saw the lecturer, a woman, react to this but I am not sure. I am now worried that our lecturer thinks I called her a bitch. I have the utmost respect for her and I'd hate for her to think otherwise. How can this be fixed?
Comment: Ouch! I very rarely use swearwords, for exactly that reason. Perhaps she'll overlook it if you behave polite, non-confrontatively, and neutral-nice to her, and with good and constructive participation in class so that she may understand she wasn't the target. Don't grovel. If you distinctly notice a difference in behaviour, you may come clear to her, but some things are better solved implicitly. I am not sure it is good advice, though, some misunderstandings are difficult to resolve.
Comment: Swearing is important for at least a few social and neurological reasons. It can even be used as endearment. Maybe you can explain this to her (possibly preceded by an explanation how you weren't, in fact, demeaning your colleague)?
Comment: @101010111100 Swearing is relinquishing control. Many things would be comfortable and important doing, and people nonetheless refrain doing (so I hope) in company or else the burden to bear this is on others. Unless you are in an obviously and unambiguously friendly context, swearing always puts the cost of understanding on others. I once had to do with a colleague with very outspoken opinions who also was using swearwords a lot. You never knew whether they were swearing at you, at your argument, at their own argument or just in general. Very unpleasant.
Answer: I think the best course of action is to explain what happened and apologize to the instructor. After that it is up to her if she is willing to accept your explanation and apology. Natural you should avoid repeating this attempt at joking in a classroom setting and save it for more informal environments.
Comment: For swearing in class, for speaking during the lecture, for giving her the impression that they were gossiping in class. There are many reasons to apologize in this case, but the main one is that it is a good way to humbly seek to redress any misunderstanding with someone, no matter if there was no intentional harm.
Comment: Apologize for what, exactly?
Comment: +1: People are so sensitive about stroking their own egos that they forget that other people have egos, too - frankly, I found that a swift apology to clarify a misunderstanding can go a long way to avoid rancour and ill will that otherwise will drag on for months. It's more often than not the *right* decision.
Comment: None of these warrants an apology, they are not inherently wrong. _Qui s'excuse, s'accuse_, and all that. You can show some regret if you want, but anything more would be a lie.
Answer: It's generally not wise to use the word "bitch" around women. If you're certain that she noticed and was likely offended, you should apologize for being too...colloquial. It's generally not wise to use any questionable terms in mixed groups.
Answer: I'd say, forget about it (easier said than done, I know). Most likely, this is a non-issue.
Comment: I talked to her today and she didn't give any indication of being insulted- thank goodness.


Mac Mini running Yosemite 10.10.3 Won't Recognize Mouse

Question: Neither my wireless Magic Mouse, nor my battery operated mouse will work with my Mac Mini, despite many attempts, including unplugging, etc.  The mouse curser appears on the screen but doesn't click.  The Magic Mouse isn't recognized, however they  both continue to work fine with my MacBook Air
Answer: I think you are referring to your mouse.  Your cursor is the little black arrow on the screen.  The mouse is the physical hardware that you hold in your hand.
Terminology aside, there are several points of clarification that we need from you, in order to help you better.
If you are referring to Apple's Magic Mouse, then there is nothing to "unplug" to reset. (other than the removal of the batteries.)  The first thing you should check is that Bluetooth is turned on under System Preferences.  You can search Bluetooth Preference in spotlight, and it should be the first hit.
Note that a bluetooth mouse can only be paired to one computer at a time.  If you paired it to your MacBook Air, it will no longer be associated with your Mini, until re-paired with your Mini.  At that point, it will no longer work on your MacBook Air.


Null IV for AES CBC vs GCM

Question: If we agree that using a null IV for AES in CBC and GCM mode is not a good idea, but for whatever reason one is encouraged to use a null vector for several messages using the same key, is there a "least worst" option between the two modes ?
Comment: [This answer](https://security.stackexchange.com/a/1097/12) applies.  Just replace "CTR" with "GCM" when you read it.
Comment: Use AES-GCM_SIV mode which is designed for IV reuse.
Comment: @kelalaka Not in this use-case: they are not accidental re-uses, the number of re-use is too big for AES-SIV.
Answer: You should not do this, but if you must, use CBC.
GCM is like CTR mode, but with an authentication tag built into it. Unfortunately, if the nonce (IV) is reused, an attacker can recover the key used for authentication, making the authentication tag all but useless. Now you're basically using CTR mode, and CTR mode does not deal well with nonce reuse. An attacker can recover the XOR of any plaintexts encrypted with the same nonce.
With CBC mode each plaintext block is XORed with the previous ciphertext block, but the first plaintext block is instead XORed with the IV. When an IV is reused, an attacker can tell if the plaintexts share a prefix with a length divisible by the block size (ie you can tell if there is a 16 byte, 32 byte, etc prefix).
Edit: As Xander points out, since GCM's authentication tag is broken when a nonce is reused, this answers your question.

Null IV for AES CBC vs GCM


How to create realistic rainfall animation in modern OpenGL using shaders?

Question: I see many examples of particle system in old style OpenGL with falling raindrops. Examples of rainfall that can interact with environment lighting and look realistic are hard to find. How to create realistic rainfall animation in modern OpenGL using shaders?
Comment: This: https://www.shadertoy.com/view/XdSGDc ?
Comment: @LukGus but I was referring to a standalone OpenGL and shader based examples. SharderToy is good to experiment with post-processing in fragment shader but hides a lot of details and provide only minimal user control.
Answer: No one is going to give you a detailed solution because it's too much work but I can give an overview.
You would probably want to use a geometry shader to create a sort of elongated teardrop shape. You will have to create quite a lot of them obviously for a big scene and to be realistic, and to keep them in a particle system that moves and updates them.
Here is a tutorial that goes over the basic ideas: http://mbsoftworks.sk/index.php?page=tutorials&series=1&tutorial=26
It will also be important to apply specular mapping, environmental mapping and refraction on top of that.
You can also detect collisions and then create splatter in a similar manner to how you created the original drops.
Comment: you are right, it does seem a lot of work. Thanks for the tutorial link.
Answer: There are multiple ways to go about this. At different distances you will probably want to use different solutions.
At a very close distance you might want to add an animated overlay with refraction. This simulates raindrops hitting the camera lens, so its a cinematic style effect, not fit for all games.
For the medium distance you might want particle effects, but single drop particles are really costly, so you might want to consider handling multiple droplets as a single particle.
For making things look wet you could probably apply an overlay to the surfaces themselves. First making the colors darker, increasing specular, and adding a smoother bump map, that could be animated, which would simulate water flowing over the surface.(Take a look at Dungeon Defenders dragon level as an example of this)
Finally making the lighting more smooth and darker can add a lot to the atmosphere, making it feel as if it was really raining. A good HDR cubemap can do a lot for this.


Charles du fay experiment

Question: How he get to know which one is positive and which one is negative as stated by him that there are two types of fluid?
Also tell how he thought of two fluids?
Comment: The assignment of "positive" and "negative" is purely conventional. He knew that alike "fluids" repel and opposite attract, so there had to be two.
Comment: The narrative that it was purely conventional goes very much against the spirit of scientific history. Yes, the initial choice is usually arbitrary, but once the convention is fixed, elegant instruments existed back then to ascertain the sign of the charged bodies. Among them the condensing electroscope of Volta is a masterpiece of its time.
Answer: I may add to the answer above. The electroscope was the main instrument for assessing and checking the electrical sign of charged bodies. Again the reference was amber and glass. Anything electrified like glass, was assigned the same sign as glass i.e. positive and the other one was negative.
It is said he could have chosen violet and red to differentiate charges but he chose the words resinous and vitreous to convey two different "types" of charges.
Let us read the original work: http://hipstwiki.wikifoundry.com/page/Charles+d%C3%BA+Fay+%E2%80%93+Explorative+Experiments%3A+Describing+and+Explaining+Electrical+Phenomena
Answer: He firstly rubbed a glass rod with silk and moved the glass towards the light objects (paper, foil) - they got attracted. Then he rubbed amber with silk and the same thing happened.
From these phenomena he was clear that if a body is charged then it will attract light objects but not the heavy object (meaning a body heavier than the charged body).
Then he thought: if a heavy body is charged what will happen? So he brought amber near the glass (both charged). As we know amber is little bit heavier than glass. Here he also saw attraction hence he thought if a body is heavy but charged then another charged body can show attraction.
But then he went to prove this using a different material and the next material was two charged glass objects. He brought those close to each other and he found that they repel.
He was astonished as it had been known that electricity phenomena only show attraction not repulsion.
So these experiment with various materials sometimes show attraction and sometimes repulsion. From this he was clear that there are two types of fluid, one vitreous (glass like or positive) and the other resinous (amber like or negative).
He thought: when a body is not charged there are equal amounts of fluid in both, but when a body is charged it has two kinds of charges or fluids. He concluded there are two types of fluid because of attraction (happening with unequal things) and repulsion (happening with equal things).
He defined positive meaning excess of fluid and negative meaning shortage of fluid. He took as convention that amber is negative and glass is positive.

Charles du fay experiment


Get a sparse matrix of quantum circuit

Question: Is there a way that can obtain sparse matrix of quantum circuit? I used to check my quantum circuit with quantum_info.Operator, but for large number of qubits, it is difficult because of the memory allocation limit. Is it available in qiskit? or should I build elementary gates in sparse matrix format? Thank you!
Comment: What do you mean by irrelevant?
Comment: Sorry, I misused the word. I mean the quantum circuit cannot be converted to matrix because of the large size of matrix.
Comment: As an extreme example consider $H^{\otimes n}$.
Answer: There are classes for Operators, States, Channels, Measures, Randomness, Analysis and Synthesis in Quantum Information ( qiskit.quantum_info ).
There is a specific class called SparsePauliOp. It is constructed as a Sparse N-qubit operator in a Pauli basis representation. It seems to be using SciPy internally for creating the sparse matrix. It can be used for performing operator arithmetic for hundred of qubits if the number of non-zero Pauli basis terms is sufficiently small. Please find further details here in the Qiskit Terra API specifications. Qiskit Aqua as has a class called Matrix Operator where we can pass a Sparse Matrix. Please find further details here in the Qiskit Aqua API specifications.
Comment: Thank you for your comment. Then 2-qubit gates (ex. CNOT) can be built by the classes that you recommended?
Comment: You could use qiskit.quantum_info.two_qubit_cnot_decompose. Please find the details here - https://qiskit.org/documentation/stubs/qiskit.quantum_info.two_qubit_cnot_decompose.html

Get a sparse matrix of quantum circuit


How to: Put a TabbedLayout inside a ViewPager

Question: Am trying to achieve something like the image in this url
I have implemented that behavior with this  library
And i have succedded. What i want is to add another horizontally-scrollable layer under the one shown. Imagine an app that has the days of the week as the primary scroller and some specific tv channels in the second scroller; The idea is to allow the user to pick the day and then the channel to check whats on.
This is the best approximation i can give for what i want, but i dont know how to implement the second scroller. Can i do it with tabs?
Answer: You can use this library
ViewPageIndicator


About Classification of compact 2-manifolds

Question: I have question about classification of compact 2-manifolds.
I have read in some sources that every compact 2-manifold is diffeomorphic with sphere with n-holes or sphere with m-mobius strips for some natural n or m (e. g. torus is a sphere with 1 hole and klein bottle is a sphere with 2 mobius strips).
But shouldn't there also be a possibility to be a compact 2-manifold with some non-zero number of holes and some non-zero number mobius strips? I don't see a reason why there should be allowed only holes or only mobius strips.
Answer: If $\Sigma$ is a closed connected two-dimensional manifold, then

$\Sigma$ is diffeomorphic to the connected sum of $n \geq 0$ tori if $\Sigma$ is orientable, or
$\Sigma$ is diffeomorphic to the connected sum of $m \geq 1$ real projective planes if $\Sigma$ is non-orientable.

What about surfaces which are connected sums of tori and real projective planes? The answer is that such a surface is diffeomorphic to the connected sum of real projective planes only. This follows from the fact that $T^2\#\mathbb{RP}^2$ is diffeomorphic to $\mathbb{RP}^2\#\mathbb{RP}^2\#\mathbb{RP}^2$; see here for a proof, and here for a visual illustration. So for $m > 0$, the manifold $nT^2\#m\mathbb{RP}^2$ is diffeomorphic to $(2n + m)\mathbb{RP}^2$.
Comment: @C.F.G: According to [Wikipedia](https://en.wikipedia.org/wiki/Surface_(topology)#Monoid_structure), this is due to Walther von Dyck.
Comment: Could You explain what You mean by $T^{2}$ and $#$ sign respectively - is it cartesian product? Thanks.
Comment: Ah, $T^{2}$ is a tori, sorry.
Comment: $\#$ denotes connected sum.
Comment: @MaciejFicek: Keep in mind, some phrases in your post should be formulated more rigorously in connected sum language, for example: "the sphere with $n$-holes" should be formulated as "the connected sum of $n$ copies of $T^2$".
Comment: @MichaelAlbanese: Do you know who first realized that $\mathbb{RP}^2\#\mathbb{RP}^2\#\mathbb{RP}^2\simeq T^2  \#\mathbb{RP}^2$? Or it was too obvious in the birth of topology era?


Cours of convolution product in theory of distribution

Question: i search a good and complet cours of convolution product in theory of distribution who contains definition of convolution of an function with distribution and convolution of two distributions (for example how we calculate $\delta * \delta$ with $\delta$ is Dirac distribution, or how we calculate $(H * \delta)*\delta$ where $H$ is function of Heaviside) with properties. Can you give me some one please.
Thank's in advance.
Comment: Could you provide a definition of the subject of your interest? (maybe a Wikipedia one, or on mathworld.wolfram... at least to get understood).
Comment: I edit my post, i search definition for convolution of function with distribution and convlution of two distributions, with somes properties.
Comment: Is it [this](https://en.wikipedia.org/wiki/Convolution_of_probability_distributions) what you're seeking for details on? (Or is it from [some other field](https://en.wikipedia.org/wiki/Convolution)?)
Comment: no, not probability distrubtions. I ask for the second item who purpose.
Answer: If you read French, then "Théorie des distributions" by Laurent Schwartz is the book of choice for you. Schwartz is the one who founded distribution theory, and as far as I can tell, his monograph is pretty much up to date.
By the way, $\delta$ is the identity with regard to convolution, so $\delta * T = T$ for any distribution $T$.
Comment: there is an other book in english? Please
Answer: Two good sources are Gelfand, Shilov, Generalized functions, Volume 1, which gives a rigorous treatment and also has some very lucid explanations for the concepts, and Kanwal, Generalized Functions: Theory and Applications.
You need to impose some conditions on the supports of functionals $f$ and $g$ in order for $f*g$ to be well-defined. If $g$ is an ordinary locally integrable function, you take the functional induced by $g$. The definition will be
$$(f*g, \phi) = (f, x \mapsto (g, y \mapsto \phi(x + y))),$$
from which it's easy to find $f*\delta$.


Is it possible to add some VB class in asp.net[c#] project?

Question: I am using asp.net [C#] in a project. It is a big project including of classes. I need to add some VB class to achieve some calculation. Is it possible to Call a VB class from C# code?
Comment: The only time that I know of when you can mix VB and C# code in the same project is "WEB Site" project. In the case of web site, it is asp_net compiles your classes and `*.*proj` file is not involved, and this is why it is possible
Answer: I am not denying the fact mentioned in all other answers that we can't mix languages in same project. Best approach will be to create a separate library and use that as a reference in your project. Which will be easier to implement and better approach in terms of maintainability.
But in case of an ASP.NET Website we can definitely use multiple classes from different language. To achieve this we can configure our webapplciation to create subfolders of the App_Code folders as separate compliable units and each folder can then contain source code in different programming language.
You can change your configuration file as following.

Once done add respective classes for the defined languages in the folders. C# in the CSCode folder and VB in the VBCode folder as following.

Finally you can use it in other area of your website as following.
Answer: Just add a reference of your VB project inside your C# project and use the class.
Because both VB.NET and C# compile into IL (intermediate language), you can simply create a library (a DLL file) in VB.NET, and then use that library in C#.
Answer:
Add VB.net Class library project to your C# solution.
Add all the VB.net classes to that class library
Add reference to VB.Net class library project from C# project
Answer: No - you cannot mix languages in SAME project - to answer the question in your title.
what you could do is reference the VB assembly containing that class.