text:
Q: How do I make money efficiently? In Oblivion, I had two favorite money-makers:

*

*Dump all my stuff except some basic armor and potions, and raid an oblivion tower. The armor and weapons was worth lots, and selling it in Anvil made a lot of cash fast.

*Harvest an entire farm's worth of crops, create 'restore fatigue' potions and sell them.

Skyrim seems to spoil this:

*

*Merchants have a max-amount per day/QOD/... instead of per item

*You can't carry as much (or maybe I have yet to discover the strength/feather spells)

*Alchemy is a lot harder (most common items go into food recipes now, which don't sell for those prices)

*On top of that, once a dungeon is cleared, it doesn't respawn - so no 'farming' familiar dungeons?

What are some easy/repeatable money making methods in Skyrim? Which are most efficient effortwise/real-life-time wise?

A: For easy speech go talk to Unguien in Riften, usually at Helga's Bunkhouse (he might also be found at the Black-Briar Meadery behind the desk). Talk to him about Maven Black Briar and Persuade. Repeat until you reach the desired level, then sell any loot or crafted items for around 200% of normal sale prices.  Adding perks to speech makes this much more efficient.

A: I've found the best way to make money is pick up ingredients in the wild, make potions and sell them.
Easy to find
Wild ingredients are easy to find. Or you can buy ingredients from many vendors. Avoid buying expensive ingredients like void salts, fire salts, daedra hearts etc. The return isn't worth the cost.
They're light
Most ingredients weigh little. If you make a lot of potions and can't sell them all, the potions also don't weigh a lot - 100 potions weigh about the same as 1 piece of heavy armor. Their value/weight ratio is high.
They sell for a lot
I regularly sell a 0.1 weight potion for $200. There are other items with higher value/weight ratios, but I can quickly make 10 of these with ingredients that aren't hard to find. This works best for invisibility, because you can sell it for squillions. I've made around 20k mostly from potions.
I have seen potions with values in the thousands!
It's good for your alchemy skill
It'll also help your alchemy skill, and as your alchemy skill gets higher, you'll make more valuable potions.
You'll always have potions
There's nothing worse than getting into a battle without the right potions. Having a few spare potions for health and magika on hand will help you a lot!
Win win win!

A: Method 1:
Transmute spell + iron ore + smithing = profit.
Find the Transmute spell (at the Halted Stream Camp north of Whiterun or at the Ansilvund Burial Chambers, northeast of Shor's Stone). I've found it there on 2 characters, so I assume it is static (found on a table/desk, not chest).
Steps to success:

*

*Go get tons of iron ore. Easy from several dungeons/mines/etc.

*Cast transmute, it will create a piece of silver ore.

*Drop silver ore if you have a lot of lower quality gems(likely from mining all that iron), as you can make silver jewelry that will sell for more than standard gold jewelry.

*Cast transmute again, rinse repeat until you have enough silver ore to make all the 'gem' silver jewelry with smithing.

*After that, cast transmute all day and night to create gold ore. Do not drop silver ore, as it will all get converted to gold.

*Go to a furnace (ex: Whiterun blacksmith), and turn your ore into bars.

*Go to Forge and create all the jewelry.

*Move to the 'final' method below.

Note: This is an Alteration spell, so consider wearing some items with Alteration bonuses and mana regen to help counter the cost.
Method 2:
Make iron daggers

*

*Buy iron ore/bars from anywhere you can, also go mine it if you are a real cheapskate. (the ore is ~5g), also get plenty of leather strips by either buying or tanning.

*Create iron daggers at an anvil (1 iron bar, 1 leather strip).

*Rinse, repeat until you have as many daggers as you do filled petty/common soul gems.

*Move on to the final 'method' below.

Both Methods finale:
Enchant the jewelry/daggers with an expensive enchant. Daggers are the better choice.

*

*Get a bunch of Petty (common is better for weapons) soul gems. Buy them from merchants, as each item will sell for over 900g even with low speechcraft. So a 300g soul gem is still a huge profit.

*This works by either getting the conjuration perk to add soul trap to bound weapons (and using the bound bow imo), or adding a short duration soul trap to a weapon.

*Then just use an altar to enchant each jewelry/dagger piece with you most valuable known enchantment using the filled soul gems. I highly recommend the BANISH enchant(I first found it around level 25, it is the one that banishes summoned Daedra back to oblivion), as it makes nearly anything worth over 1000g, even mining picks.

*Now run around and sell your items! Most vendors will only have enough for 1 dagger at a time. So I use this as a way to clean out vendors of ore/items I may want. But out their inventory, sell 3 daggers and still make a profit.

A: There is a great way of not having to wait 2 in-game days for merchants to restock on money/items by exploiting a glitch.
Save your game in front of the merchant that you want to use the glitch on.  After you have saved, kill the merchant. (Warning!  Do not save after killing him/her!). Then, simply reload the game you saved before the brutal slaying.  Afterward, the merchant will have restocked everything.

A: Get a spouse! They open a store to keep them busy... you can ask once a day how their store is doing and they hand you 100g. This accumulates, so if you ask 5 days later, they give you 500g. I stay at home and sleep 24 hours 10 times - hubby gives me 1000g. It only takes a little over 4 minutes for every 1000g.

A: I have found that the easiest way for me to make money is to kill dragons, either by storyline or by returning to dragon locations, and making dragon armor from their bones and scales.
Obtain the effects from The Steed Stone so that you can carry more items at a time. You can make up to 4,000 gold from killing one dragon if you're lucky. This is also a good way to increase your other skills, such as restoration, one-handed, and heavy armor.

A: Smithing and Enchanting
First, some facts:

*

*The amount of value added by enchanting is not based upon the value of the weapon

*Weapon enchantments generally add higher value than armor enchantments

*The pricing for weapon effects is based on base cost for a single use, so when you select an effect keep the slider on the far right. The most valuable effects are Banish, Paralyze, Absorb Health, Turn Undead and Damage Stamina in that order. Banish and Paralyze are purely random loot and merchant items, although I've had great luck finding them at Fletcher in Solitude. Absorb Health is easy to pick up in Labyrinthian (Drainblood Battleaxe).

*Enchanting generally adds more than smithing (in fact, smithing struggles to break even). That means we should smith the weapons requiring the cheapest, fewest and most abundant components. That almost always works out to Iron Daggers (Iron Ingot + Leather Strips) and Leather Bracers (Leather + 2 Leather Strips).

Bottom line: Smith Iron Daggers and add the most valuable enchantment you can.
Passive method

*

*Items: Grab all the daggers you can in dungeons and store them in your house. Iron Daggers are the lightest, but even Daedric Daggers weigh less than any other weapon type aside from a Long Bow. Whenever you kill an animal, take its hide to skin later for leather.

*Enchantments: Disenchant any non-unique weapons or armor with enchantments. Not only will it level up Enchanting, but the odds that even if it's valuable you'll be able to make something equivalent shortly.

*Soul gems: Make a weapon with 1-second Soul Trap early on. It should only periodically require recharging (which improves your Enchanting skill anyway). Grab all the soul gems you see lying around.

Active method

*

*Items: Go to blacksmiths and buy out their stores of Iron Ore, Iron Ingots, Leather and Leather Strips. After buying everything out you can sell your enchanted weapons and get your money back plus whatever additional gold the merchant has on hand.

*Enchantments: For some reason Fletcher in Solitude (mentioned above) has Banish- and Paralyze-enchanted bows in stock quite often

*Soul gems: Raid Dwemer ruins and Blackreach for soul gems. In the former, most automatons are powered by soul gems. Empty soul gems can be filled by soul-trapping the inevitable Falmer that inhabit the ruin. Blackreach has around two dozen geode veins that can be mined for all kinds of soul gems.

Alchemy

*

*Enchant alchemy gear: Although you can get a modest bonus (up to +32%) to Enchanting above by brewing Fortify Enchanting potions, you can get a huge bonus (up to +145%) to Alchemy by enchanting Fortify Alchemy armor. You can add the effect to a ring, a necklace, gloves and a helmet (or, even better, a Falmer Helmet and a circlet). A maxed-out alchemy will often make it difficult to sell some potions because they're so valuable.

*Don't overpay: There are only a few ingredients that are so expensive they're worth avoiding entirely: Daedra Hearts, Frost Salts and the almost worthless Void Salts. But in general there's no relationship between how expensive an ingredient and how valuable its effects are.

Here are best alchemical items in my opinion (italics = relatively cheap and easy to find at merchants):

*

*Paralysis: Canis Root, Swamp Fungal Pod, Briar Heart, Human Flesh, Imp Stool

*Damage Magicka Regen: Blue Butterfly Wing, Blue Mountain Flower, Chicken's Egg, Hanging Moss, Spider Egg, Bear Claws, Glow Dust, Human Heart, Nightshade, Spriggan Sap

*Invisibility: Chaurus Eggs, Luna Moth Wing, Crimson Nirnroot, Ice Wraith Teeth, Nirnroot, Vampire Dust

*Slow: River Betty *, Salt Pile, Deathbell, Large Antlers

*Fortify Carry Weight: Creep Cluster, Scaly Pholiota, Giant's Toe *, Hawk Beak, River Betty, Wisp Wrappings

*Regenerate Stamina: Bee, Fly Amanita, Mora Tapinella, Scaly Pholiota

*Regenerate Health: Garlic, Juniper Berries, Luna Moth Wing, Namira's Rot, Nordic Barnacle, Vampire Dust

*Regenerate Magicka: Garlic, Salt Pile, Dwarven Oil, Fire Salts, Jazbay Grapes, Moon Sugar, Taproot

*Damage Stamina Regen: Creep Cluster, Frost Mirriam, Histcarp, Juniper Berries, Skeever Tail, Wheat, Daedra Heart, Giant's Toe, Large Antlers, Silverside Perch

The ingredients with asterisks are great because they have additionally fortified effects. River Betty has a bonus to Damage Health and combined with a Deathbell makes a quite valuable potion. The Fortify Health on Giant's Toe is extremely valuable and easily combined with Wheat.

Increasing the Selling Price
Like above, you can enchant several pieces of armor with Like below, the Speech tree is full of perks that will enhance your selling price.

*

*Blessing of Dibella: The shrines of Dibella grant +10 to Speech. The easiest locations of her shrines are Haelga's Bunkhouse in Riften (so you can use it before selling things off in the Thieves Guild) and the Temple of Dibella in Markarth.

*Hoods and masks: The Thieves Guild will immediately give you a hood granting +10 to Barter. The Guild Master's Hood, Volsung and the Masque of Clavicus Vile will all give you +20.

*Potions of Fortify Barter: Butterfly Wing, Dragon's Tongue and Tundra Cotton are all easy to find.

Finding Buyers
The biggest constraint here is merchant gold, generally around 500 for alchemists and 750 for most others. In any case, it's not a lot.
To solve it, obviously you can just take perks in the Speech skill tree. But since you'll probably wind up with more gold in Skyrim than you know what to do with, that's not something I'd personally recommend.
My personal favorite place to sell things is in the Thieves Guild in Riften. If you've completed all of the Thieves Guild special quests, you'll have four merchants set up in the Ragged Flagon, all of which have their own gold stores, plus Tonilia should have at least 4000 gold to trade with.

Others

*

*Marriage gives you 100 gold per day

*You get 20,000 gold for completing the Dark Brotherhood missions

*Although it's a long quest, finding all the Stones of Barenziah lets you find stupid amounts of gems in loot

*For something to put you over the hump, especially when you're looking for an extra several hundred gold in the early game, just kill a dragon. They'll often drop 3 each of Dragon Bones and Dragon Scales, which has a base price of 2250 gold (725-1125 gold depending on your Speech level, assuming no perks). They can be sold at alchemists and general stores. Plus, dragons will usually have some combination of gold, gems and enchanted/unenchanted equipment.

Exploits
You can decide how game-breaking these are, but they all at least work within the actual game mechanics.

*

*Pickpocketing trainers: You can steal any money you pay to a trainer. While this won't earn you gold, it will a) prevent you from losing gold on very costly services, b) level up money-making skills faster and c) level you up faster, enabling more valuable weapons to spawn. Some trainers can even join you, such as Faendal and Aela, and after training the gold will just appear in their inventory, ready for taking back.

*Loot merchant chests: Ahkari, a Khajiit near the entrance of Dawnstar has an invisible chest between two rocks to the left of Iron Breaker Mine. Eorlund Gray-Mane has one underneath the Skyforge in Whiterun, which requires a bit more finagling. There's another in Dushnikh Yal near the bar by the forge, although the items are all marked with "Steal."

*Selling books that respawn immediately and infinitely: Grab a whole bunch of copies of The Doors of Oblivion from a skeleton near the Sightless Pit

A: I got annoyed at the feeling that I was wasting my hard earned alchemy ingredients on low-profit potions, so I wrote a web-app that could tell me for sure if I was.
http://www.endoftheweb.se/skyrim
When you search and combine different ingredients in potions, it will indicate in green if this use is the most profitable for this particular ingredient, or if you are better off saving it to some other potion. Now Im instead having problems selling all the potions before the vendors run out of gold...
I read a tip yesterday though, that there is a 25.5 hour diff between Riften and Markarth, so if you jump between them the stores are always restocked. Gonna try that tonight.

A: Warning: This post could contain spoilers. Read with caution...
I've found that buying potions from stores is just as more profitable if not more so when you factor in time. You can literally hunt out the front of the white run store running between the bits and pieces store and the alchemy store selling your potions.
Some potions I like to make:

*

*Slow

*Paralysis

*Damage stamina regeneration

*Damage health regeneration

*Invisibility

*Fortify carry weight

Buying the ingredients for these potions will guarantee you make a profit even when you buy everything the vendor has to offer. I'm currently camping in white run just waiting 48 hours at a time selling potions and buying ingredients but not making any. I'm going to wait 10 times at white run go to Solitude and then the DB sanctuary and do the same. Why you ask? Not every store has the same ingredients it is better to get a variety of ingredients not to mention the DB sanctuary girl sells Daedra hearts (all the time) which i need for weapons and armor.
Effort wise this is very low, profit wise very high, time wise demanding, I've found that unlike smithing, Alchemy is very demanding. In contrast to dungeons which for me who has 100 in OH, HA and Block raiding dungeons is just a hassle I get very little gain from it and if I go magic then more often than not I'll die if I play Rambo style I'm used to with my sword and shield. On top of the 90% of the time the items you want are too heavy or you don't have enough room. Therefore by utilizing a variety of ingredients from several or more locations repeatedly you'll not only increase your alchemy levels but also your overall level quick enough to please you however not as quick as you'd like and on top of the your coin purse will overflow with gold! I'm literally struggling to sell all my potions and I'm still making crazy returns just by buying more ingredients and more ingredients. I have well over 40k in potions still needing to be sold!
Now this is for alchemy which I think sort of stands on it's own however smithing and enchanting can go hand in hand. An effective, time efficient way for smithing is as you probably know already smithing iron daggers however most people sell them off, store them for later! Fast travel from one town to the other (I go between Riverwood, Solitude and Whiterun) buying iron ingots and making iron daggers. Once you have enough simply enchant them with petty and common soul gems you'll make a slight profit which steadily increases, play around with different enchantments I've found that frost and fire damage gives me about 130 plus gold back for a nice 60 gold profit on each dagger. It's not a lot but it adds up! Especially when you've made 200+ daggers. This is where you weigh experience against making gold by grinding effectively the way I see it loosing money is what you should expect if you make any profit and still maintain a decent leveling speed all the better!
Another bonus to this is using gold to make jewellery which you also enchant and maybe add a gem to it later when your enchantments are more powerful to maximize profit. Ultimately this method is effective because you A) make a profit and B) level quickly however the downfall of enchanting is time you need to either buy the soul gems or fill them yourself which is a pain. I suggests using Azura's star or Black Star for expensive jewellery once you start leveling up seriously. This will ultimately increase your profit and also allow you to make top tier jewellery without having to worry about finding grand soul gems.
Buying the material needed to make Daedra armor is the most effective and efficient way to make money if you could only find somewhere to actually sell the armor.
I hope some of this helped, I know I really didn't state anything new but I hope I just clarified a few things that others have said.

A: Enchanting, for sure.
Keep an eye out for any weapon with Banish on it (insta-kills Daedra's).  Make sure when you do the enchant you choose the highest level with the least charges, it sells for the most.
With my enchanting at around 65 I can quite literally spend 20g on an Iron Dagger, 100g on a filled Petty Soul Gem, and combine the two to make an enchanted dagger with a value of 2400g.
Personally I kept all the Iron Daggers I made while leveling smithing, and put Soul Trapping on my weapon(s).  I just buy any Petty and Lesser gems I see (filled or not) and when I get a bunch of filled gems stocked up in my inventory I enchant them all and throw them in my house.
The most annoying part about making money is finding people to buy all my stuff.  I've easily got a couple hundred thousand gold worth of daggers sitting in my house.

A: Here are some hints for Solitude:
To be able to buy the house in Solitude you need to do two quests, the Steward's quest and the Jarl's quest. The Steward is the red beard guy named Falk Firebeard and
both can be found in the blue palace. Upon completing these two quests you can buy the house in solitude for 25k. It takes you another 10k to fully furnish your house, which I recommend.
You can get the house for free if you save your game just before trying to buy. Look to your Northeast when facing the Jarl, see that cupboard? Right after you click to buy the house then confirm it you will have 6 second window to dash to the cupboard, open it and deposit all your gold, then exit the cupboard. The game continues and you will get the key to your new house without having to have paid any gold.
Then just go to the cupboard again and retrieve your gold. This is not considered theft. This trick works with any house. The Whirlwind Sprint "Shout" is sometimes needed to make it in time.
Solitude is the best place in my opinion to fast level your smithing-speech and making money fast. In your basement you get two mannequins, so you keep duplicating good armor which includes shields. Here's how you do it:

*

*Open the mannequin, choose apparel items you have that you want duped and place the items you want to dupe on the mannequin.

*Don't close the mannequin menu, right above there is the mannequin's apparel menu, open it and take all the items you just placed on it and then close the mannequin.

*Run out of the house and the items should be there when you reenter the house. This works 100%. Once you have reentered the house and you see the armor on the mannequins you just take it all off in the first screen you see when you activate the mannequins, then run out then in rinse and repeat.
Note: Although enchanted apparel keeps all enchantments, improved armor like, say, Legendary reverts back to normal base values. For example, if you can place, say, a Legendary Bone armor to dupe then take it back, when you reenter the house you will find unimproved base value Bone armor.
This is the fastest way to make money, by selling duped armor to the smith and fletcher
when you have invested in both.
For the smithing and speech aspect of this, from your house exiting from basement
go right, up the hill then diagonally left, the smith is on the left, the fletchers is on your right. The smith is in at around 10am while the fletcher is tricky, he shows up at around 11am or so, so hit up the smith then hit up the fletcher.
Buy all the iron ingots and all leather and strips the smith has each time you visit after the 2 day rest/wait. For the speech aspect buy them each separately instead of bulk. Make iron daggers and hide bracers.
DAGGERS = 1 iron ingot and 1 leather strip.
HIDE BRACERS = 2 leather strips and 1 leather.
Sell all bracers you make back to the smith but save all the iron daggers and drop them off at your enchanting table for later.
The fletcher usually has around $750 and the smith has around $1200. Rest/wait 2 days rinse and repeat. These amounts can be raised if you invest in them.
There is also a wood pile nook against the wall at the smiths. I use it for dumping a crap load of duped armor. Just make sure those roving kids don't see you dump any or they will ask or might take a piece, otherwise I've never had anything go missing ever, just try to pile it in the nook.
In the house you get your very own enchanting table in the basement, so remember all those iron daggers you made I told you to save. To easily train your enchant skill, simply enchant the daggers with whatever floats your boat because the credits the same for all. When it comes to upping your enchanting skill, I personally use fire damage.
By now you should know of a good place to hunt easy pray. If you would like an idea, this is where I used.
There is an abandoned shack which you find in the Dark Brotherhood storyline called "Abandoned Shack", just east and a little south of Solitude, open your map, and you should you see those little islands to the right/east of Solitude, just south of the open water. The shack can be found at the southernmost island. There are plenty of low level stuff, animals, fish, crabs, baddies and such. This is important because you fast travel from it to the blue palace to get back to your basement fast.
The blue palace is where the Jarl is, where you bought your house, or from your basement door run left. Anyway, bouncing here is fast when filling soul gems. If you run past where the smith and fletcher are and jump down the wall/steps the gem dealer is on your right.

A: Just steal jewellery, gold, gems and anything enchanted.  Work your way through a town house by house, if you fail to steal something and get caught, reload from the last autosave when you entered and retry.
Thievery is so much fun too, IMO far more fun than making potions, I've even stolen the magic robes one of the mages was wearing, and weapons people have been holding, more for fun than the amount I'd get for selling them.
Join the thieves in Riften, do a quest or two for them, every time you get back check with the vendor that accepts stolen goods, sell, 1000g every time and you're actually questing :)
Remember to train, train one level at a time, save (very important) pick pocket your gold back, reload if you fail.  Training several levels at once means you potentially have to steal back thousands at once, and that doesn't really happen...

A: I just loot anything and everything, selling it anywhere I can.  Making armor and then selling it is effective as well, as long as your not buying the ore or ingots and you get your own leather.

A:
What are some easy/repeatable money making methods in Skyrim? Which
  are most efficient effortwise/real-life-time wise?

This is probably the console command player.additem f x (change x to a number, like 99999). This adds x gold (f is gold's item ID) to the player character.
e.g. player.additem f 99999 will add 99999 gold to the player character.
This is easy (probably the easiest), repeatable and the most efficient effortwise/real-life-time-wise method of gaining gold (if playing on the PC).
(Just putting this here as no one mentioned it yet.)

A: Here is the best no-risk, battle-free, get rich quick scheme in Skyrim.
Collect ingredients. Buy out the cheap stock of an alchemy merchant. It doesn't matter what you start with, as long as there's sufficient variety for the first "round."
At an alchemy lab, go to your full ingredient list and, beginning at the top, systematically "learn" their uses without wasting a single ingredient by using the following method:
Put your laptop next to you and find your first ingredient on this online ingredient's list and right-click on it. Open in new tab. This page shows all four potions that  particular ingredient makes, along with each potion's full ingredient list.
Look for those ingredients with asterisks (*) on the web page, and if you have an ingredient marked as such, add it immediately in your game screen. You now have a potion with 2 effects, and have learned at least 3 uses for the ingredients. Add a third ingredient, ideally from another potion list, and now you've learned even more ingredient effects for one or more of each ingredient.
Go down your ingredient list from top to bottom until all 4 effects of each ingredient are learned. Only use ingredients until you see all four effects are learned, then leave the remainder of that ingredient in your inventory. Go down your list until you can't learn any new effects. Remember, the best potion to make is one in which you learn the maximum ammount of new effects per ingredient used.
Now, sell off your potions and move to the next alchemy merchant. Stay on the main roads and grab every ingredient you see along the way. Don't bother antagonizing large animals, just get to the next town, buy out the alchemy merchant's ingredient stock, and repeat the effect-learning process with everything in your inventory for which you still need to learn effects. One "round" down your ingredient list per town, then move on.
Don't worry about what potions you make, or how counter-intuitive the effects may seem. Even a potion with seemingly opposite effects will net you good money. The point for now is to systematically learn every effect and thus, every recipe. Using the web page to do this will be time consuming at first, but the learning curve rises exponentially due to the cross-referencing of effects. This rapidly leads to a state in which all potion recipes and ingredient effects are saved in your alchemy screen for future use, and you can quickly and easily create the most expensive (or useful) potions with no fuss or experimentation.
Circle Skyrim from town to town buying out each alchemy merchant's stock, creating potions in the store, and selling them back. After a few potion-making rounds, there will be no need to search the game world for specific ingredients; you'll be able to make almost anything with the standard stocks available in towns.
Along the way, your alchemy and speech will quickly increase to the point where you can obtain great alchemy perks and the all-important speech perk allowing you to sell anything to any merchant. Once you have this, you'll never lack willing buyers with money to burn.
Obviously, any enchanted item that increases alchemy or speech is a must-buy.
This is the best method I've found so far to A. make fast cash, B. level up the two most universally useful skills, and C. avoid insane levelling with multiple skills that cause your character to become an "all talk, no fight" character, incapable of defending himself against similarly levelled enemies. As others have aptly noted, this is the main problem with the "clear caves, mine ore, smith weapons, enchant the weapons, and sell them" money-making technique; you simply do to much and level up too many non-combat skills. And in terms of time expended, there is simply no comparison. Stay out of the mines.
Hint: since you will inevitably gain character levels due to your alchemy / speech increases, make sure you train the maximum 5 times per level in a combat or magic skill. It helps to have Faendel along for this purpose with his free archery training, but other combat trainers are available in the towns, and with all your money you'll have no problem paying them.
Of course, for sneaky, archery-sniper characters, there is no better way to start the game. By getting Faendel right off the bat and beginning this process immediately at the beginning of the game, it is possible to have a 50 archery skill (his max training level), speech and alchemy in the 30's or 40's, tens of thousands of gold in your purse, and a near-endless supply of powerful poisons for your arrows (paralyze, slow) and potions (invisibility, health regen) before you even set foot in a cave. Best of all, your character level will still only be in the 20's. Even playing on "Master" difficulty, you'll easily out-match your prey.
Last important tip: Perverse as this may sound, you'll want to avoid The Lover's Stone or anything else that enhances your levelling speed until you bank sufficient funds to really start the game right. How many round-the-board tours you complete before you actually set off for adventure is up to you, but remember, the important thing is to make some money and have a comfortable cushion. There's nothing more frustrating that finding something in a shop that would be perfect for your character at just the right time, and not having the jack to cover it.
Perhaps the best thing about this technique is its honesty; aside from relying on the web ingredient research, you aren't employing any cheats or glitches. Frankly, considering that alchemy is supposed to be an academic art, and you are putting in genuine time painstakingly going through each ingredient on your laptop, I find it a perfectly honorable way to go about learning the effects and recipes. No real alchemist would run around eating leaves and making random potions in order to learn their effects. He would research all available sources first, going about his work in a scientific manner.
As for Faendel's free training, my feeling is this: There are only 3 followers in the game that can train you, and the other 2 aside from Faendel are absurdly hard to obtain. The fact that followers give you free training is logical and was obviously an intended part of the game, not an exploitable glitch. Would a friend who fights at your side in real life charge you money to teach you a skill? I doubt it.
Some may disagree, but in my view, in RPG's (as in life) there is nothing better than having lots and lots of 'effin money. Sleep in the park if you want; I'd rather occupy an OFFICE on Wall Street.

A: Enchanting is yet another option.

*

*Empty petty soul gems can be bought for around 25-30 gold depending on your speech skill perks and can be found in low level dungeons.

*Buying/enchanting your own low level soul stealing weapon can be done early in the game, allowing you to fill the petty soul stones by killing the various animals found on your adventures.

*Pick up / craft Iron daggers. These can be found on most low level bandits. (other weapons / armor are effective as well, these just weigh less)

*Enchant the daggers and sell them.

They sell for around 250 or so, depending on the enchantment. (the game will show you the price of the item before you create it so just pick the enchantment that will sell for the most since the cost to you is still only one soul stone).
This method has a few benefits. You level your enchanting as you make money and you can do it along the way so you dont have to spend hours grinding gold. Most of the things you will be doing are things you already do anyway.
I am not saying this is better/faster then Alchemy as I have not compared them in game, but it works for me.

A: For me, the best source of income is completing the generated missions from Dark Brotherhood and Thieves Guild, after I've completed their main quest lines. They tend to be quite easy and pay well (usually 1000gp for murder contract, for example).

A: I'd suggest going spelunking in caves and dungeons. I did this for a couple weeks in real life and finally noticed I had lots of jewelry. When I sold it all, it put me up to 84423 gold coins.
So go explore dungeons and caves!

A: Make 100K coin in just a few minutes.
I have a way to get rich very quickly.
It involves a few perks and a glitch though.
First, you need:

*

*The heavy armor perk to make all armor weigh nothing.

*The speech perk to invest in a shop

*Able to blacksmith daedra armor

Steps:

*

*Craft yourself and wear full daedric armor.

*Buy the house in Solitude and decorate it with either an enchanter
or alchemy station (I forget which one) to get a mannequin in your
house.

*Use the duplicate armor glitch to make several duplicates of
the deadric armor (if you are wearing full deadric and have the
weightless perk you should be able to carry an infinite amount)

*Go to the Riften trader and invest in the shop. (He will now have
10K coin that refreshes every 48 hours)

*Sell him deadric armor until he is out of money, use the wait button
to wait 24 hours twice, then sale him more. Repeat until you are as
rich as you want.

Once I had the prerequisites I was able to reach 100K coin in a matter of minutes. It takes a while to setup but once you have everything you can earn an unlimited amount of coin very quickly.

A: my method which makes about 10k gold an hour at a lazy pace is through alchemy.
I go around the vendors:

*

*Arcadia in whiterun

*General goods vendor right by Arcadia (doesnt sell ingredients but buys potions)

*solitude for aromatics store

*general goods accross the street from aromatics (doesnt always have ingredients but buys potions)

*White phial in Windhelm

at these stores i make the roud by buying everything under 50-60 gold (ingredients only ofc) then i sell my potions from previous times (always have more potions than they can afford hence the general goods added for selling them to help), I do this through every store on the list in succesion, then at the last one i save, and log out to desktop (works on all platforms) as this resets the stock they have in and their gold limit.
Rinse and repeat.
Usually I do this until either I run out of potions, I get the follower to carry half of them as I make about 500 at a time, once out of potions i make another batch with the ingredients bought, make about 10k per round and it takes anywhere between 30 mins to an hour, I'm doing this myself purely to level alchemy but the gold option is clearly a big bonus.
Should be noted when I make the potions, I do damage Regeneration ones first as they are like hundreds and hundreds each, then fortify potions, never health as they sell for nothing, and thirdly resist potions, then quick look at all others for 100-200 minimum selling and then start over selling and buying.
Quick note on mechanics of alchemy, Alchemy grows in level via how much the potion you create is worth so creating potions worth more makes you level faster, it's win win :).
-XaineK

A: My main method is stealing gold from store lockboxes and doing Thieves Guild sub-missions.
Also,

 you get 20k gold on the last Dark Brotherhood mission. The game hints that it's to improve sanctuary but you can keep it for yourself.

A: Already been posted, but a little more specific for beginners:
Buy Iron ingots/ore from the two traders at War Maidens in Whiterun (first building on the right when you enter the gate), buy leather/leather strips as well, make Iron daggers and enchant them at Dragon's Reach, the Jarl's palace, also in Whiterun.
I've found the Absorb Health enchant makes the daggers the most valuable, so be on the lookout for an item with this enchantment.
Buy soul gems from either Farangar's Secret-Fire at the enchanter in Dragon's Reach, or the General goods store in Whiterun, and Farangar also sells the Soul Trap spell to fill them.
The profit out-weighs the cost of the supplies easily. Be sure to cast Soul Trap on creatures, not humans, unless you have a black soul gem, otherwise its a wasted cast.

A: Once you become thane of Whiterun, you can take virtually anything in the palace for free, and then sell it to merchants for 1000+ cash.

A: Smithing is the way to go. First, one gets to level 100 smithing by making daggers. Then, you get your speech level to 100 by persuading the guy in Riften to tell the truth repeatedly.  After that, you wear as much enchanted armor and jewelry in your possession to further increase your Speech skill.  Then, you buy as many ebony bars as you can; make sure all your armor is changed to Smithing-skill enhancing and then proceed to make as many ebony bows as you can.  After you do that, upgrade the bows to Legendary, and then switch back to Speech-Enhancing armor and sell all the bows you just made.  In each case, you profit 1500 coins for each bow you make, plus, it only takes about 2 minutes to make one bow, so within a half hour, you have already made 50K.  I've used this method to make millions; in my opinion, it is the easiest and fastest way to make money, and better yet, you can do it from the start of the game!

A: Go Dungeon Diving but there is a disadvantage to that and it is you have to look EVERYWHERE for Urns and Burial Urns and Chests to find Gold and stuff to sell. Also go to forts, small dungeons, caves, and camps and sell everything you get unless you want it or think it would be useful. And I think if you have REALLY good Barter skills you might be able to buy stuff and sell them for more than you bought it for. Steal things and sell them to the Theives Guild. The Dark Brotherhood might also buy stolen goods. Mostly just sell everything you don't want. That is very effective (that is how i get over 20,000 gold every 2 or 3 in-game days).

A: Chop Lots o Wood. 2 wood is 10 gold and it takes 6 seconds to get 6 wood 30 gold 60 seconds in a minute 30*10=300 gold in one minute. AND If you get a mod called for infinite chopping you don't need to keep using the block again after the character is done chopping.

A: Making money in skyrim is quite simple compared to the other elder scrolls games. Now, this will all depend on your character type. (Although it is helpful to balance all the stats) The first and most fun way to make money in my opinion is to do the dark brotherhood quest line. At the end of this relatively short quest line, you recieve 10,000 gold. In my experience, after doing this, I chose to spend that gold on leveling my smithing to 100. To do this, you must buy as many leather strips and iron ingots as possible and forge iron daggers. As your skill is increasing, sell the daggers back to the blacksmith. This will cause you to lose very little profit.
Another way to make gold (specific to game version) is to find the book called doors of oblivion. This book is worth 50 and you can continuously pick it up and sell to anyone. The book is located in the siteless pit in Winterhold. How many times you can pick it up and even if it exists depends on the version of your game.
Another way to make gold, is to make as many potions as you desire and sell them to fellow alchemists or mages as they will offer u the best prices.
I have listed a few ways to make gold. Here is a link that will show you how to make gold and really succeed at the game:) hope this helped!!
http://acunandez.weebly.com/skyrim.html


text:
Q: Pergunte ao usuário qual elemento ele quer remover do Array JavaScript Estou tentando criar um programa no qual um elemento possa ser adicionado ou removido do Array, de acordo com o que o usuário coloque no comando prompt. Estou tendo dificuldades em remover elementos do Array. Segue o meu programa:
    var regiaoAmazonica = ["Boca da Amazonia", "Vulcao", " Iracema", " Renato", "Macaco", " Santo Rafael", " Monte Mismi", " Mamiraua", " Tefe", " Alter Do Chao", " Manaus", " Rurrenabaque", " Rio Tabajós"];
    var nomeDoGuia = [" João Figueiredo", " Emílio Médici", " Luiz Inácio Lula da Silva", " Dilma Rousseff", " Michel Temer", " Alejandro Toledo", " Alan García Pérez", " Pedro Pablo Kuczynski", " Maria Sanchez", " Ranieri Mazzilli", " Martín Vizcarra", " Elías Rodríguez", " Margaret Thatcher"];
    var visitante = [" 4 estrelas", " 2 estrelas", " 2 estrelas", " 4 estrelas", " 0 estrelas", " 4 estrelas", " 2 estrelas", " 3 estrelas", " 0 estrelas", " 1 estrelas", " 3 estrelas", " 4 estrelas", " 2 estrelas"];

Adicionar nova regiões. Esse código não precisa de correção:
    var novaRegiaoAmazonica = prompt("Adicione uma nova regiao");
    var novoNomeDoGuia = prompt("Entre o nome de um novo guia");
    var novoVisitante = prompt("Entre sua nota para a regiao e o guia");

    regiaoAmazonica.push(novaRegiaoAmazonica);
    nomeDoGuia.push(novoNomeDoGuia);
    visitante.push(novoVisitante);

    var i = 0;
    while(i < regiaoAmazonica.length){
    document.write(regiaoAmazonica[i] + ", " + nomeDoGuia[i] + ", " + visitante[i] + '
');i++;
    }

Este é o codigo que não está funcionando. O usuário pode digitar o nome da região que quer deletar (e consequentemente as outras informações relacionadas à região). Caso o nome da região não exista, o usuário deve receber uma mensagem de erro.
    var deleteRegiaoAmazonica = prompt("Aqui esta a lista de regioes " + '\n' + amazonRegion + "Por favor digite a regiao que voce precisa remover da lista")

    var deleteRegiaoAmazonica = function() {
    var index = regiaoAmazonica.indexOf(deleteRegiaoAmazonica);
    if (deleteRegiaoAmazonica === RegiaoAmazonica[i] && index>-1) {
    RegiaoAmazonica.splice(index, 1);
    nomeDoGuia.splice(index, 1);
    visitante.splice(index, 1);
    document.write(RegiaoAmazonica);
    } else {
    alert("Erro");
    }
    }

A: Seu código possui vários erros. Você está chamando a variável regiaoAmazonica errada em 3 lugares, não respeitando o case sensitive inerente ao JavaScript. Também não precisa desse function(), já que seu código é executado de forma estruturada (linha por linha):
Eis o código corrigido:
var deleteRegiaoAmazonica = prompt("Aqui esta a lista de regioes " + '\n' + regiaoAmazonica + "Por favor digite a regiao que voce precisa remover da lista") // aqui estava em inglês

for(i=0,index=-1;i < regiaoAmazonica.length;i++){
    if(regiaoAmazonica[i].trim() == deleteRegiaoAmazonica || regiaoAmazonica[i] == deleteRegiaoAmazonica){
        index = i;
        break;
    }
}

if (index > -1) {
    regiaoAmazonica.splice(index, 1); // aqui o primeiro "r" estava maiúsculo
    nomeDoGuia.splice(index, 1);
    visitante.splice(index, 1);
    document.write(regiaoAmazonica);  // aqui o primeiro "r" estava maiúsculo
} else {
    alert("Erro");
}

var regiaoAmazonica = ["Boca da Amazonia", "Vulcao", " Iracema", " Renato", "Macaco", " Santo Rafael", " Monte Mismi", " Mamiraua", " Tefe", " Alter Do Chao", " Manaus", " Rurrenabaque", " Rio Tabajós"];
var nomeDoGuia = [" João Figueiredo", " Emílio Médici", " Luiz Inácio Lula da Silva", " Dilma Rousseff", " Michel Temer", " Alejandro Toledo", " Alan García Pérez", " Pedro Pablo Kuczynski", " Maria Sanchez", " Ranieri Mazzilli", " Martín Vizcarra", " Elías Rodríguez", " Margaret Thatcher"];
var visitante = [" 4 estrelas", " 2 estrelas", " 2 estrelas", " 4 estrelas", " 0 estrelas", " 4 estrelas", " 2 estrelas", " 3 estrelas", " 0 estrelas", " 1 estrelas", " 3 estrelas", " 4 estrelas", " 2 estrelas"];

var novaRegiaoAmazonica = prompt("Adicione uma nova regiao");
    var novoNomeDoGuia = prompt("Entre o nome de um novo guia");
    var novoVisitante = prompt("Entre sua nota para a regiao e o guia");

    regiaoAmazonica.push(novaRegiaoAmazonica);
    nomeDoGuia.push(novoNomeDoGuia);
    visitante.push(novoVisitante);

    var i = 0;
    while(i < regiaoAmazonica.length){
    document.write(regiaoAmazonica[i] + ", " + nomeDoGuia[i] + ", " + visitante[i] + '
');
 i++;
    }

 var deleteRegiaoAmazonica = prompt("Aqui esta a lista de regioes " + '\n' + regiaoAmazonica + "Por favor digite a regiao que voce precisa remover da lista")

    for(i=0,index=-1;i < regiaoAmazonica.length;i++){
  if(regiaoAmazonica[i].trim() == deleteRegiaoAmazonica || regiaoAmazonica[i] == deleteRegiaoAmazonica){
   index = i;
   break;
  }
    }

    if (index > -1) {
     regiaoAmazonica.splice(index, 1);
     nomeDoGuia.splice(index, 1);
     visitante.splice(index, 1);
     document.write(regiaoAmazonica);
    } else {
     alert("Erro");
    }

redpajama_set_name: RedPajamaStackExchange


text:
Q: I cant access to the android xml file in eclipse I built a android XML file but I cant access it in my code section

please help me
thank you

A: remove import android.R; and import your R class like this:
import your.package.R;
Added later:
try: Project - Clean Project


text:
Q: How do you find new speed of a object knowing the momentum and impulse? I know that both momentum and impulse (change in momentum) are measured in kg m/s and the formula for momentum is mass x velocity and the formula for impulse is force x time. However I have a question regarding both of them in one question.
The question is this:
A force of 8.6N acted for 2.5s on an object of mass 1.8kg initially moving at 50m/s. Calculate the objects new speed.
Is there a formula for this type of question?
Also here is what I have worked out so far.
Impulse = 8.6N x 2.5s = 21.5 Ns or kgm/s
Initial momentum = 1.8 x 50 = 90 kgm/s
I am not sure where to go from here. Do I add the impulse and initial momentum (111.5) and divide by the mass to find the new speed? Is that how it works?
Thanks for all the help.

A: Impulse = Change in momentum ,
hence : $F \cdot t = m \cdot \Delta v$
where $\Delta v = v_2-v_1$
And therefore $F \cdot t = m \cdot (v_2-v_1) $
So You have one equation with one unknown $(v_2)$ .
Can You proceed from here ?

A: When force is integrated,
$$ F \Delta t = m \Delta v,$$
$$ 8.6  \cdot 2.5 = 1.8 ( v_{new}-50).  $$
from which $v_{new} $ can be found. It is assumed the mass of the object (unlike a rocket burning fuel) does not change.


text:
Q: How to create an Excel file in VB I need to write a VB class that will create an Excel file and pass into this file a list of variables.
Afterwards I need to be able to convert the program to a .dll so that it can be called by a program.
Its been a while since I have written any code so thought that VB would be a good refresher but all the example I can find all start from within Excel. I need the call to create the file to be from outside of Excel.

A: I would recommend you look at the OpenXML SDK For Microsoft Office. Unlike many of the examples you'll find that use Microsoft.Office.Interop, this approach does not require Microsoft Office to be installed.

*

*OpenXML SDK 2.0 for Microsoft Office

*OpenXML SDK 2.5 for Microsoft Office
There is a complete how-to on MSDN for generating Excel workbooks.


text:
Q: Python: How to scramble/unscramble a string to use as data in a URL I want to send a string of text that can contain special chars via a URL. (The string might contain chars that are not suitable to send as a URL.)
To do this do i want to scramble the string to something that is safe to send.
Then on the receiving end i intend to unscramble the string and get back the original string
Example:

*

*string = "this is a complicated string  åäö 123435 !"##¤%¤&%/ /// &&&<>  ## www.aftonbladet.com \ ? i wonder if this will work... and so on..."

*Using some form of function to scramble it to: laskjdkjlasdklajsdfkjsald (example)

*Then, send it via a URL to a service
the_url = http://www.myurl.com/awesome?laskjdkjlasdklajsdfkjsald
response = requests.get(the_url)

*In the service will i unscramble the payload back to the original
I do NOT want to import special libraries for this that is not already included in python3 standard libs.
This is not to make it secure and uncrackable, it is just to make it easily transmittable.
I do NOT know exactly what special chars that can exist in the string from the beginning.
I can not be the first one having this problem, who will be first at linking this question to a existing answer ? :D
Any suggestions?


text:
Q: How to take screenshots in python? I've an idea and want to implement it.
But I'm not sure if it's gonna work. So, wanted to get your inputs.
 I would like to take screenshots of a url.

Say, when I open a web-site www.espncricinfo.com , I would like to take screenshot of that page and save locally. This saved image can be converted to GIF later on.
   Can this be achieved through python ?  Any suggestions/inputs to make it ?
Updated
And also is it possible to capture screenshot in headless-browser ?
Any possibilities to launch the browser in headless mode (non-GUI) and then take the screenshot of particular area of web-page ?

A: To take a screenshot using python:
import pyscreenshot as ImageGrab

im = ImageGrab.grab()

im.save('path/to/image/folder/image_name.png')

im.show()

A: Yes and no, if you send a request with urllib you will get the HTML in return, which is step one to displaying a webpage. But you have to build that webpage from that with a browser engine, otherwise all you will see is a bunch of text.
There are some python libraries that can do this, such as pywebkitgtk, but those are probably not going to give you the best experience and support.
Another thing you could try is to use crod and firefox/chrome/whatever and then use python to automate the process.
Oh, and by the way, I strongly recommend upgrading to python3

A: I know it is a bit to late now, but just saw this question and in case anyone else is looking for a mighty tool, to do screenshots and also use headless browsers with python... I just want to recommend to look more deeply into https://www.seleniumhq.org/. There are many tutorials on youtube available. However, this is IMHO the most accurate framework to execute your task, IMHO. To make screenshots, you can then define the screen resolution etc.


text:
Q: LiveData observer vs onPrepareOptionsMenu race I'm working on a project which lets users in either as guests or registerd users.
There is an application scope user object with LiveData of the current user type
private val _isGuest = MutableLiveData<Boolean>()
val isGuest: LiveData<Boolean>
    get() = _isGuest

There is HomeFragment which needs to show logout menu item for registered users.
The fragment has a ViewModel bound to the global property
val isGuest: LiveData<Boolean> = MainApplication.user.isGuest

and the fragment observes the data
var menu: Menu? = null

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    ...
    viewModel.isGuest.observe(viewLifecycleOwner, Observer {
        menu?.findItem(R.id.action_logout)?.isVisible = !it
    })
}

override fun onPrepareOptionsMenu(menu: Menu) {
    this.menu = menu
    menu.findItem(R.id.action_logout)?.isVisible = !isGuest
    super.onPrepareOptionsMenu(menu)
}

I need to toggle the menu item in the observer because registered users can logout at runtime and the current screen will need to be updated respectively.
The problem is that I also have to duplicate the code in onPrepareOptionsMenu because the observer may get notified before menu is initilized at startup.
Definitely I can move that line of code into a separate function and call it from the two points but aren't there a better solution?

A: Use invalidateOptionsMenu() to trigger onPrepareOptionMenu()
var menu: Menu? = null

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
...
viewModel.isGuest.observe(viewLifecycleOwner, Observer {
            activity?.invalidateOptionsMenu()//This will trigger onPrepareOptionsMenu
})
}

override fun onPrepareOptionsMenu(menu: Menu) {
this.menu = menu
menu.findItem(R.id.action_logout)?.isVisible = !isGuest
super.onPrepareOptionsMenu(menu)
}


text:
Q: how to set language of fullCalendar dynamically I want to use a full calendar with different languages, I get the selected language from a dropdown and I keep the value in a factory, to update this value I'm using a watch.
$scope.$watch(function() {
        return langFctr.selectedLang;
    },
    function(newValue, oldValue) {
        if (oldValue != newValue) {
            $scope.selectedLang = newValue;
            if (newValue) {
                $('#calendar').fullCalendar('option', 'lang', $scope.selectedLang);
            }
            console.log($('#calendar').fullCalendar('option', 'lang', $scope.selectedLang));
            console.log($scope.selectedLang);
        }
    }
);

In the watch (after the value of the selected language change) I try to change the language of the calendar but It doesn't work


text:
Q: Commutative rings and ideals, showing a map is well defined Let $R$ be a commutative ring with an ideal $I$. The additive group $R/I$ is the set of cosets of $I$ with respect to addition in $R$.
Let
$\cdot : R/I \times R/I \to R/I$ be defined by
$$(x+I)\cdot (y+I) = xy + I$$
I want to show that $\cdot$ is well defined, i.e. if $x + I = x' + I$ and $y + I = y' + I$ then $xy + I = x'y' + I$
my progress:
$x+I = x' + I \iff x-x' \in I$
$y + I = y' + I \iff y - y' \in I$
write $xy - x'y' = (x-x')y + x'(y-y')$ then using the fact that $y - y' \in I$ and $x-x' \in I$ I could use this to show that$xy - x'y'\in I$ and be done however I have one problem.
How do I know that $(x-x')y \in I $ and $x'(y-y') \in I$? We have that $(x-x') \in I$ but $ y \in R$ so not necessarily that $(x-x')y \in I $. Could somoene explain how I can show $(x-x')y \in I $?

A: You know this because $I$ is an ideal. By definition $I$ being an ideal of $R$ means that $RI \subseteq I$. So $(x - x') \in I$ and $y\in R$ implies $y(x-x') \in I$.


text:
Q: Does KI have to be a salt of stable I-127 isotope? I was recently watching a TV show where some people exposed to radiation were asked to take KI. I googled for the information and discovered this and also the Wikipedia article.
From what I read, I understand that KI is a salt of stable Iodine. Why does this have to be so? Can there be KI with I-131 isotope? Or is the therapeutic KI salt used to treat radiation poisoning specifically enriched to have I-127 isotope?

A: Sure you can do chemistry with unstable isotopes. But in the case of I-131, the halflife of only 8 days implies that if you have stored the salts for length of time the remaining activity will be very small.
Nor do you find any radioactive iodine in environmental iodine except in the neighborhood of recent radioactive events of various kinds.


text:
Q: Copy constructor isn't working iv'e just started learning about copy constructors in java (OOP).
but for some reason it doesn't work for me. this is what I did :
class Date:
public class Date {
private int day;
private int month;
private int year;
//regular build function
public Date(int day,int month, int year)
{
  this.day=day;
  this.month=month;
  this.year=year;
}
//copy constructor
public Date (Date date){
    this.day = date.day;
    this.year = date.year;
    this.month = date.month;
}
public String toString()
{
  return this.day+"/"+this.month+"/"+this.year;
}
}

the class Passport :
 public class Passport {
private String name; //the name property
private int number; //the number property
private Date expiryDate; //the expiryDate property
//a regular building constructor
public Passport(String name,int number, Date expiryDate)
{
  this.name=name;
  this.number=number;
  Date copyExpiryDate = new Date(this.expiryDate);
  this.expiryDate = copyExpiryDate;
}
//a copy constructor
public Passport(Passport passport)
{
  this.name = passport.name;
  this.number = passport.number;
  this.expiryDate = passport.expiryDate;
}

the main method is :
 import java.util.*;
 public class Check {
static Scanner reader=new Scanner(System.in);
//checking if the classes are working properly
public static void main(String[] args){
    int numtraveler,passNum,passDay,passMonth,passYear,pay,planDay,planMonth,planYear;
    String name;
    boolean isPay=false;
    System.out.println("how many travelers are you?");
    numtraveler=reader.nextInt();
    for(int i=0 ; i<numtraveler ; i++){
        System.out.println("enter your passport : ");
        System.out.println("enter name : ");
        name=reader.next();
        System.out.println("enter passport number : ");
        passNum=reader.nextInt();
        System.out.println("enter your passport's expiry date : (day then month then year) ");
        passDay=reader.nextInt();
        passMonth=reader.nextInt();
        passYear=reader.nextInt();
        Date d1=new Date(passDay,passMonth,passYear);
        System.out.println(d1);
        Passport p1=new Passport(name,passNum,d1);
        System.out.println(p1);
        Traveler t1=new Traveler(p1,isPay);
        System.out.println("do you want to pay? :(enter o if yes and 1 if not) ");
        pay=reader.nextInt();
        if(pay==0){
            t1.pay();
        }
        System.out.println("when are you planning to travel?(enter day then month then year)");
        planDay=reader.nextInt();
        planMonth=reader.nextInt();
        planYear=reader.nextInt();
        Date dPlan=new Date(planDay,planMonth,planYear);
        if(t1.checkTravel(dPlan)){
            System.out.println("The travel is possible");
        }
        else
            System.out.println("The travel isn't possible");
    }
}
}

I have omitted some unimportant information from the class- the get and set from date, some other functions they both had and another class called Traveler because They aren't that relevant to the problem. The Traveler class uses the Passport copy constructor but it has the same problem there.
When I run the main method it gets to the date,creates the object d1 and displays the date but when it gets to creating the object p1 from the Passport class it run an error : "Exception in thread "main" java.lang.NullPointerException".
However, when I change in the Passport class to :
 Date copyExpiryDate = new Date(expiryDate.getDay(),
        expiryDate.getMonth(), expiryDate.getYear());

it workes. anyone knows what I'm doing wrong with the copy constructor?
I'll be very thankful for any one who helps!

A: In the Passport copy constructor you are not creating a copy of the expiration date.
Change
public Passport(Passport passport)
{
  this.name = passport.name;
  this.number = passport.number;
  this.expiryDate = passport.expiryDate;
}

to
public Passport(Passport passport)
{
  this.name = passport.name;
  this.number = passport.number;
  this.expiryDate = new Date(passport.expiryDate);
}

The other constructor also has an issue.
public Passport(String name,int number, Date expiryDate)
{
  this.name=name;
  this.number=number;
  Date copyExpiryDate = new Date(this.expiryDate);
  this.expiryDate = copyExpiryDate;
}

should be
public Passport(String name,int number, Date expiryDate)
{
  this.name=name;
  this.number=number;
  this.expiryDate = new Date(expiryDate);
}

i.e. you should create a copy of the passed expiryDate, not a copy of this.expiryDate.

A: That happens due to
private Date expiryDate;

expiryDate instance variable it's assigned null and after it passes to
Date copyExpiryDate = new Date(this.expiryDate);

Its something like new Date(null);
That is why it throws NullPointerException.

A: I don't think the problem here is with the copy constructor.I cant understand the reason you use the variable copyExpiryDate. I am pretty sure this is the line that causes your problem:

Date copyExpiryDate = new Date(this.expiryDate);

Your code should look like this:
public class Passport {
private String name; //the name property
private int number; //the number property
private Date expiryDate; //the expiryDate property

//a regular building constructor
public Passport(String name,int number, Date expiryDate)
{
  this.name=name;
  this.number=number;
  this.expiryDate = expiryDate;
}
//a copy constructor
public Passport(Passport passport)
{
  this.name = passport.name;
  this.number = passport.number;
  this.expiryDate = passport.expiryDate;
}

anyway if you are planning on using a copy constructor for some reason, the line should look like this:

Date copyExpiryDate = new Date(expiryDate);

as this.expiry.date would return null.


text:
Q: is there any way to show wommerce variation like mix and match products? I want to show my woocommerce website's variable product front end should show like this (kindly check image). Is there any way to do? enter image description here
I tried this function but it's not working
`add_filter( 'woocommerce_variation_option_name', 'display_variation_title_image');
function display_variation_title_image( $term_name ) {
global $wp_query;
$variation_id = $wp_query->post->ID;
$variation = new WC_Product_Variation( $variation_id );
$attachment_id = $variation->get_image_id();
$image_src = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );

if ( $image_src ) {
    $term_name .= '<img src="' . $image_src[0] . '" alt="' . $term_name . '" />';
}

return $term_name;

}
`


text:
Q: Android app publishing checklist The android app publishing checklist says that I need to delete all Log statements from my code. Does that mean I need to delete them or would just commenting them out do? I would need those Log statements for updation and maintenance purpose later on so i don't want to delete them.Publishing checklist

A: You don't have to remove your logs from code, just disable them in RELEASE mode. The easiest way to achieve that, check mode before log something
 if (BuildConfig.DEBUG) {
    Log.i("TAG", "Log");
 }

But it will be painful if you have a lot of logs in your code, so good idea is to write your custom wrapper above the Android Log class, with ability to turn on/off logging in one place, for example in Application class.
Or you can use some smart loggers like Timber
EDIT
About log wrapper, to be honest I've never created such wrapper, I prefer to use Timber, but the simplest version may look like this
public class Logger {

    public static void e(String tag, String body) {
        if (BuildConfig.DEBUG) {
            Log.e(tag, body);
        }
    }

    public static void v(String tag, String body) {
        if (BuildConfig.DEBUG) {
            Log.v(tag, body);
        }

    }

    ...
}

and instead of using
Log.e("Tag", "Body");

use
Logger.e("Tag", "Body");

A: The publishing check list just don't want you to include log statements when your app is published because it may contain some sensitive information and that sort of stuff. So you just need to make sure that it is not executed.
As long as the log statement is not executed, it's fine.
You can do the following:

*

*Delete the statement

*comment the statement

*add an impossible if statement:

    if (0 != 0) {
       //log
    }

P.S. The second solution the the most recommended.


text:
Q: ActionScript - Forced Garbage Collection Not Working In ADL? when launching the following code in ADL, why does the square continue to rotate?
var square:Sprite = new Sprite();
square.graphics.beginFill(0xFF0000);
square.graphics.drawRect(-25, -25, 50, 50);
square.x = square.y = 100;
addChild(square);

addEventListener(Event.ENTER_FRAME, rotateSquare, false, 0, true);

function rotateSquare(evt:Event):void
    {
    square.rotation += 2;
    }

System.gc();

Update
the following display object has a weak referenced ENTER_FRAME event listener.  however, calling:
removeChild(testInstance);
testInstance = null;

doesn't stop the ENTER_FRAME event:
package
{
import flash.display.Sprite;
import flash.events.Event;

public class Test extends Sprite
    {
    private var square:Sprite;

    public function Test()
        {
        addEventListener(Event.ADDED_TO_STAGE, init);
        }

    private function init(evt:Event):void
        {
        removeEventListener(Event.ADDED_TO_STAGE, init);

        square = new Sprite();
        square.graphics.beginFill(0xFF0000);
        square.graphics.drawRect(-25, -25, 50, 50);
        square.x = square.y = 100;
        addChild(square);

        addEventListener(Event.ENTER_FRAME, rotateSquare, false, 0, true);

//      //Current Solution - only works on display objects
//      addEventListener(Event.REMOVED_FROM_STAGE, removeHandler);
        }

    private function rotateSquare(evt:Event):void
        {
        trace("square is rotating");
        square.rotation += 2;
        }

//  private function removeHandler(evt:Event):void
//      {
//      removeEventListener(Event.REMOVED_FROM_STAGE, removeHandler);
//      removeEventListener(Event.ENTER_FRAME, rotateSquare);
//      }
    }
}

i have added a REMOVED_FROM_STAGE event listener, but this will only work on display objects.
is this problem specific to ENTER_FRAME event?

A: Regarding your update, I think you are misunderstanding how GC works. The basic idea is rather simple.
When you create an object, flash allocates some memory in a storage called the heap. A reference to this object is returned. This reference is what you store in a variable. What is a reference? A means to access this object. Think of it as link to the object.
var foo:Bar = new Bar();

Now, in some languages, at some point you have to release the memory allocated for this object when you're done with it, or you have a memory leak.
In a GC environment, this is done automatically. Of course, you need some rules. This rules vary depending on the concrete GC, but in general terms, you could say the GC determines that an object is collectable if it's no longer reachable. This makes sense, because if you can't reach an object, you can't use it. You've lost your link to it. So, it's considered garbage and will be eventually collected.
The specifics on how reachability is determined vary, but in flash it's a mix of reference counting and a mark and sweep algorithm.
(The following is just a high level overview, the details might not be exact)
One method is reference counting: it's easy and fast but it doesn't work in all situations. Basically, each object has a reference count. Each time you assign this object to a variable (i.e. you store a reference to the object), the reference count is incremented. Each time you lost this reference (for instance, you null out your var), this count is decremented. If the count reaches 0, it means the object is unreachable and so it's collectable.
This works fine in some cases, but no others. Specially when there are crossed references.
var foo1:Bar = new Bar();   //  let's call this object Bar_1
var foo2:Bar = new Bar();   //  let's call this one Bar_2
//  at this point, Bar_1 has reference count of 1 (foo1) and Bar_2 has a reference of 1 (foo2)
foo1.theOtherFoo = foo2;
//  now Bar_2 has a RC of 2: foo2 and foo1.theOtherFoo
foo2.theOtherFoo = foo1;
//  now Bar_1 has a RC of 2: foo1 and foo2.theOtherFoo
foo1 = null;
//  foo1 no longer references Bar_1, so its RC is decremented.
foo2 = null;
//  foo2 no longer references Bar_2, so its RC is decremented.
//  but still both Bar_1 and Bar_2 have a RC of 1.

As you can see, both Bar_1 and Bar_2 have a RC of 1, but are unreachable. This is one of the cases where reference counting doesn't work. Because for all intents and purposes, both objects are unreachable and yet won't be collected.
That's why there's a mark/sweep algorithm. From a high level point of view, what it does is traversing your objects graph, starting from some root objects and analize its relationships to determine whether an object is reachable or not. This algorithm will determine that even though Bar_1 and Bar_2 have a RC of 1, they're not reachable and thus should be considered garbage and be collected at some point.
Events, listeners and dispatchers work the same way. They're not a special case. When you do:
function test():void {
    foo1.addEventListener("someEvent",someHandler);
}

function someHandler(e:Event):void {
}

It's the same as doing:
function test():void {
    foo1.someProperty = this;
}

The effect is that foo1 now has a reference to this. You'd normally call removeEventListener when you're done for 2 reasons:
1) You no longer want foo1 to have a reference to this.
2) You no longer want to listener for "someEvent" events.
Lots of people insist on using weak references, because they think that then you can pretend you don't have to call removeEventListener (which is apparently too hard...). This is wrong. removeEventListener does two things and both are important. If you want to stop receiving notifications for some event, you have to tell the dispatcher. It's really that simple. In my opinion, weak references are innecesary in most cases. Some advocate to use them by default; but in my experience, in practice this is a bad service to them, as it confuses people further, encourages them to write sloppy code and gives them the impression that you can ignore how this very basic feature of the language (which is not that hard to graps) works.
Now, after this rather long (but hopefuly constructive) rant, let's look at your code:
Your sprite is not going to be collected, because it has 2 references:
1) the square variable
2) the stage.
The first follows the rules outline above. The second too, but it might not be so obvious at first sight. But it makes sense if you think about it for a second. When you did this:
addChild(square);

square got added to the Test instance, which is in turn added to the stage. The stage is always alive, so if something can be reached from the stage, it's reachable. As long as square remains added to the stage, you can be sure it won't be collected.
So, if you at some point do what Sean Thayne suggested:
removeChild(square)
square = null;

your Sprite will be collectable. That doesn't affect the fact that you told your Test object that you wanted to be called whenever a frame is entered. And that's exactly what's happening. Until you don't tell it you don't want to receive this event anymore (calling removeEventListener), it will call you back.

A: Flash's garbage collection only clears out elements/objects/variables that have either a zero reference count or have only weak references.
This means you would need to do this. For it to truly be gc'd.
removeChild(square)
square = null;
System.gc()


text:
Q: Ajax delay simulation I have a small ajax jquery script which returns some XML for me. Whilst it is working and communicating with the server I am displaying a loader animation.
The problem is I don't see the animation. Either I have done something wrong or the network conection is really quick.
Does anyone know how I can introduce a delay to my ajax code to slow the process down and I can test the animation feature?
Thank you.
ps: ajax code is below, just incase
function fetchData($nodeid, $area){
    if( $nodeid != $currentRoomId ){
        popupBox($area);//$area, $roomInfo);
    }

        var $nid, $title, $classroom, $boardroom, $cabaret;
        $.ajax({

            url: "/room/" + $nodeid + "/rss.xml",
            dataType: "xml",
            success: function($xml){

                $returnXML  =   $xml;
                $($xml).find('node > *').each(
                    function(){

                        switch( $(this).attr('name') ){
                            case 'Nid':
                                $nid    =   $(this).text();
                            break;
                            case 'Title':
                                $title  =   $(this).text();
                            break;
                            case 'Classroom':
                                $classroom  =   $(this).text();
                            break;
                            case 'Boardroom':
                                $boardroom  =   $(this).text();
                            break;
                            case 'Cabaret':
                                $cabaret    =   $(this).text();
                            break;
                            case 'Theatre':
                                $theatre    =   $(this).text();
                            break;
                            case 'Notes':
                                $notes  =   $(this).text();
                            break;
                            default:
                            break;
                        }//close switch statement
                    }
                );
                $roomInfo   =   new Array();
                $roomInfo.push('Title', $title);
                $roomInfo.push('Classroom', $classroom);
                $roomInfo.push('Boardroom', $boardroom);
                $roomInfo.push('Cabaret', $cabaret);
                $roomInfo.push('Theatre', $theatre);
                $roomInfo.push('Notes', $notes);
                highlightRow($nid);
                popupBox($area, $roomInfo);
            },
            statusCode: {
                200: function(){
                    //alert('responding just fine!');
                }
            },
            error: function(){
                //alert('Ajax not responding!');
            },
            complete: function(){
                //alert('completed!');
            }
        });
    }

A: You can use the setTimeout to introduce a delay.

A: If you have control of your server code, you could make the server delay the AJAX response by adding a delay in your server code, rather than causing a delay in the client.

A: Quick solution is to move your ajax call inside the if block. On success/error - hide the animation. That won't simulate a delay, but it'll ensure that your animation gets displayed (even if for ms).


text:
Q: How to set Hikvision camera parameters using PHP curl I am attempting to automate Hikvision camera configuration using the Hikvision IPMD XML API. I am able to retrieve camera data using any of the documented services, but my attempts to change field values are failing. Here's the code I'm using the deviceInfo to change the System Device Name.
define('_EOL', "\n");

// Set device name
$url='http://192.168.6.12/System/deviceInfo';
$creds='admin:password';
$body='<?xml version="1.0" encoding="UTF-8"?>'.
    '<DeviceInfo xmlns="http://www.hikvision.com/ver10/XMLSchema" version="1.0">'.
    '<deviceName>Cam 7 AAAA</deviceName>'.
    '<deviceID>88</deviceID>'.
    '</DeviceInfo> ';
$tmpFile='temp.txt';
file_put_contents($tmpFile, $body);
$bytes=filesize($tmpFile);
$stream=fopen($tmpFile, 'r');
echo('Bytes='.$bytes.', handle='.$stream._EOL);

$session=curl_init(); // initialize a curl session
curl_setopt($session,CURLOPT_URL, $url);
curl_setopt($session,CURLOPT_USERPWD, $creds);
curl_setopt($session,CURLOPT_HEADER,TRUE);
curl_setopt($session,CURLOPT_RETURNTRANSFER, TRUE);
//curl_setopt($session,CURLOPT_PUT, TRUE);
curl_setopt($session,CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($session,CURLOPT_CUSTOMREQUEST, 'Content-Type: application/xml; charset="UTF-8"');
curl_setopt($session,CURLOPT_INFILE, $stream);  // XML block
curl_setopt($session,CURLOPT_INFILESIZE, $bytes); // size in bytes

$page=curl_exec($session);
$info=curl_getinfo($session);
$err='curl error: '.curl_errno($session).' '.curl_error($session);

curl_close($session);

print_r($info);
echo($err._EOL);
echo($page._EOL);

And here's the curl info on the request. It seems the camera is not responding to the request.
Bytes=185, handle=Resource id #6
Array
(
    [url] => http://192.168.6.12/System/deviceInfo
    [content_type] =>
    [http_code] => 0
    [header_size] => 0
    [request_size] => 197
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.016
    [namelookup_time] => 0
    [connect_time] => 0.016
    [pretransfer_time] => 0.016
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => 185
    [starttransfer_time] => 0.016
    [redirect_time] => 0
    [certinfo] => Array
        (
        )

    [primary_ip] => 192.168.6.12
    [primary_port] => 80
    [local_ip] => 192.168.6.99
    [local_port] => 2903
    [redirect_url] =>
)
curl error: 52 Empty reply from server

By the way, this is the camera response to GET /System/deviceInfo:
<?xml version="1.0" encoding="UTF-8"?>
<DeviceInfo version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<deviceName>Cam 2 DEMO</deviceName>
<deviceID>88</deviceID>
<deviceDescription>IPCamera</deviceDescription>
<deviceLocation>hangzhou</deviceLocation>
<systemContact>Hikvision.China</systemContact>
<model>DS-2CD2042WD-I</model>
<serialNumber>DS-2CD2042WD-I20170519BBWR764768522</serialNumber>
<macAddress>18:68:cb:76:48:ce</macAddress>
<firmwareVersion>V5.4.5</firmwareVersion>
<firmwareReleasedDate>build 170124</firmwareReleasedDate>
<bootVersion>V1.3.4</bootVersion>
<bootReleasedDate>100316</bootReleasedDate>
<hardwareVersion>0x0</hardwareVersion>
</DeviceInfo>

Previously I tried using all three EOL types (Mac, linux, DOS) before I removed them all, as in the code above. I know the authentication works because I can read anything from the camera. I can also successfully send PUT commands that have no data or XML block requirements, such as a reboot. So I suspect some issue with how I am sending the XML via curl. Also, I can change the device name via web browser while logged in. Then when I read the device information, the changes show up in the XML response. Any ideas where I've gone wrong? Thanks.
UPDATE 8/30/2018
I gave up on using the camera API for configuration. I only found a few commands that actually worked (like reboot and some read-only requests). Instead, I used Watir and Ruby to access the camera through its web interface. That has proven to be a very reliable way to automate camera configuration.

A: Almost two and a half years later, the Hikvision camera model I was using is now obsolete and the API has changed again. Because I bought the cameras from Amazon, Hikvision would not provide any support, not even to point me to a valid document on the API. So I turned to a different solution.
I switched to using Ruby and Watir to work with the camera through the web interface. Not surprisingly, this proved difficult because the HTML on each configuration page lacked unique information to select form elements. Still, with enough work, I was able to write a script that fully automated camera configuration. Here are a few key snippets from that script.
require 'watir-webdriver'
require "watir-webdriver/extensions/alerts"

  @browser = Watir::Browser.new :chrome # chrome @browser window

  # Select Time Zone, index 1
  @browser.select_list(:index, 1).select_value('CST+0:00:00')

The first two load Watir Webdriver, the core software that interacts with a browser. The middle line opens a chrome browser. The last two show an example of how to select a field and set the value when the field has no unique identifying labels, like an id.
Go to the Watir website at Watir to get details.


text:
Q: Native Page Transitions + phonegap + cordova i am doing simple html and javascript with the native page transition..
i already add the plugin :cordova plugin add https://github.com/Telerik-Verified-Plugins/NativePageTransitions ..
i follow all the step inside the blog..but my transition page not working..this is my code..sorry i am still newbie..
my code :
<html>
<head>
    <title>2PAGE</title>
    <script type="text/javascript">
        function slide(href) {
    window.plugins.nativepagetransitions.slide({
        "href" : "3page.html"
    });
    }
    </script>
</head>
<body>
<button onclick="slide('right', '#3page')">Press Me</button>
</body>
</html>

Is this code correct ? please help me..i follow instruction from : http://www.telerik.com/blogs/native-performance-in-a-hybrid-app-with-native-page-transitions

A: As per the code file there isn't default cordova.js setup, i think because of it this plugin is not working for you.
it's working fine with mine demo project.
So please add
 <script src="cordova.js"></script>

and let me know if it is working or not.


text:
Q: Salesforce ContentDocumentLink public guest user I have a few documents uploaded to salesforce files and i have a force.com site with the public guest user profile. When i enter my force.com domain my visualforce page queries for ContentDocumentLinks, however when the guest user queries them only one of the three files shows up. The content document link have the same permissions, the content documents as well. I there any permission in any related object that i am missing?

A: I believe I found a workaround for this issue. Creating a before insert trigger on ContentVersion that sets the Origin field to C, along with a before insert trigger on ContentDocumentLink that sets Visibility to AllUsers, allowed the public force.com site guest user to access the Salesforce File which was uploaded by the out of the box UI. So records started being returned when querying ContentDocumentLink and ContentVersion as the site user after uploading with those trigger changes in place.


text:
Q: membership test in pandas data frame column I have a pandas data frame that one of its columns is a list. Please see below:
>>> a.head
    C1  C2
0   23  [2,4,5,8,1]
1   24  [1,2]
2   15  [-2]
3   19  [1,3,4,5,6,7,8,9,0]

I would like to find a row that contains 6 in the C2 and return the value in C1. I thought for something like
b = a["C1"][(6 in a["C2"])]
return(int(b))

but it is not working.
Thanks.

A: I think you need apply and in for test value in list for creating boolean mask:
print (a.C2.apply(lambda x: 6 in x))
0    False
1    False
2    False
3     True
Name: C2, dtype: bool

Then use loc with boolean indexing for select by mask:
b = a.loc[a.C2.apply(lambda x: 6 in x), 'C1']
print (b)
3    19
Name: C1, dtype: int64

Last if need scalar output convert to numpy array and select first value by []:
print (b.values)
[19]

print (b.values[0])
19

Or use iat or iloc:
print (b.iat[0])
19

print (b.iloc[0])
19

A: For a built-in Pandas method try isin.
Pandas columns, Series objects, have a method called isin that is purposed for this sort of thing. It returns a positional boolean Series (mask). It will find values in your column that are in a given list.
s = pd.Series(['lama', 'cow', 'lama', 'beetle', 'lama',
               'hippo'], name='animal')
s.isin(['cow', 'lama'])
0     True
1     True
2     True
3    False
4     True
5    False


text:
Q: Unity3D angle between vectors/directions on specific axis I have two directions and i am trying to calculate the angle on a specific axis. The object from which the directions are derived is not a static object so i'm struggling to get my head round the maths to work out what i need to do.
FYI, I have the start and end points that i have used to calculate the directions if they are needed.
Here's a diagram to show what i am looking for:

The above image is from a top-down view in unity and it shows the angle i want.

The problem can be seen from the above image, which is that the directions are not on the same height so i can't use the vector3.angle function as it won't give me the correct angle value.
In essence i want to know how much would i have to rotate the red line to the left (top view) so that it would line up with the blue (top-view).
The reason i need this is as i am trying to find a way of getting the side-to-side angles of fingers from my leap motion sensor.
This a generic version of my other question:
Leap Motion - Angle of proximal bone to metacarpal (side to side movement)
It will provide more specific information as to the problem if you need it and it has more specific screenshots.
**UPDATE:
After re-reading my question i can see it wasn't particularly clear so here i will hopefully make it clearer. I am trying to calculate the angle of a finger from the leap motion tracking data. Specifically the angle of the finger relative to the metacarpal bone (bone is back of hand). An easy way to demonstrate what i mean would be for you to move your index finger side-to-side (i.e. towards your thumb and then far away from your thumb).
I have put two diagrams below to hopefully illustrate this.

The blue line follows the metacarpal bone which your finger would line up with in a resting position. What i want to calculate is the angle between the blue and red lines (marked with a green line). I am unable to use Vector3.Angle as this value also takes into account the bending of the finger. I need someway of 'flattening' the finger direction out, thus essentially ignoring the bending and just looking at the side to side angle. The second diagram will hopefully show what i mean.

In this diagram:
The blue line represents the actual direction of the finger (taken from the proximal bone - knuckle to first joint)
The green line represents the metacarpal bone direction (the direction to compare to)
The red line represents what i would like to 'convert' the blue line to, whilst keeping it's side to side angle (as seen in the first hand diagram).
It is also worth mentioning that i can't just always look at the x and z axis as this hand will be moving at rotating.
I hope this helps clear things up and truly appreciate the help received thus far.

A: If I understand your problem correctly, you need to project your two vectors onto a plane.  The vectors might not be in that plane currently (your "bent finger" problem) and thus you need to "project" them onto the plane (think of a tree casting a shadow onto the ground; the tree is the vector and the shadow is the projection onto the "plane" of the ground).
Luckily Unity3D provides a method for projection (though the math is not that hard).  Vector3.ProjectOnPlane https://docs.unity3d.com/ScriptReference/Vector3.ProjectOnPlane.html
Vector3 a = ...;
Vector3 b = ...;
Vector3 planeNormal = ...;
Vector3 projectionA = Vector3.ProjectOnPlane(a, planeNormal);
Vector3 projectionB = Vector3.ProjectOnPlane(b, planeNormal);
float angle = Vector3.Angle(projectionA, projectionB);

What is unclear in your problem description is what plane you need to project onto?  The horizontal plane? If so planeNormal is simply the vertical.  But if it is in reference to some other transform, you will need to define that first.


text:
Q: HTML/CSS: How do I make an input field with 2 vertically positioned buttons next to it? This is what I want: http://imgur.com/Ur0PJfe
Unfortunately I can't give you the code I've tried because nothing gets even close. It's probably a low hanging fruit question yet I can't find anything that works for some reason :p
If you could give me just some guidelines I'd be much obliged.
Edit, some code, not working:

    <input class="qtyfield"></input>

        <input class="plusbtn" type='button' value='+'/>

        <input class="minusbtn" type='button' value='-'/>

As you can see it would be in a table row.
And the related CSS:
#buttons {
}
.qtyfield {
  width: 30px;
}
.plusbtn {
}
.minusbtn {
}

I'm not using bootstrap

A: If you'd like to use a table layout to achieve your buttons, you should use some more proper table syntax!
Try something similar to this for example: https://jsfiddle.net/1wzqLzsc/

    <input class="qtyfield"></input>

        <input class="plusbtn" type='button' value='+'/>

        <input class="minusbtn" type='button' value='-'/>

More on tables: http://www.w3schools.com/css/css_table.asp
Otherwise you could try using a flexbox.

A: Give the .qtyfield a float : left and the buttons will stand next to it also adjust some heights. This should work:

    <input class="qtyfield"></input>

        <input class="plusbtn" type='button' value='+'/>

        input class="minusbtn" type='button' value='-'/>

css:
#buttons {
}
.qtyfield {
  height: 34px;
  width: 30px;
  float: left;
}
.plusbtn {
  height: 20px;
  width: 24px;
}
.minusbtn {
  height: 20px;
  width: 24px;
}

A: You can easily achieve this wrapping the elements in div's.
So the basic idea is there is an outer container for both which is your first div

Now the next step is to put the elements in their own seperate div's. So your input text will be in one div and your buttons in the other. Once you have the two divs you orient them by making one float to left and one float to right. And you have to also define how much width each one should take.

    Name:
    <input type="text" name="test"/>

   <input type="button" value="+"/>

  <input type="button" value="-"/>


text:
Q: Architecture Issue for handling large data from MySql Server I have 5 tables with millions of rows. Question is I need to create a menu and even extend more maybe in the future. The select Queries to this tables is the heart of my Website. Any one visiting my site would amount to a dozen of select queries to the server. What would be the best architecture design that could be implemented in this case?

*

*Using indexing and caching.

*Generating an XML or JSON which can be used by all the users without the need to query the db each time. [XML or JSON could be generated via a cron job, My rows wont change in every 5 minutes].

Or is there any other good solution to this? Even critiquing my ways i mentioned above is a valid answer.
PS: I would be happy not to invest in more server power if the solution could lie in a better Software Architecture.

A: I would suggest using the APC user cache to store frequently used data but if your queries are customized per user, that might not be the way to go.

A: The first thing you have to do is indexing your tables correctly, use fields of type int to join your tables, set query_cache_size to 512 MB (maybe more but this will be enough), use APC user cache. If you process quite big data with for loop instead of
for ($i = 0; $i < count($arr); $i++)

do something like:
$count = count($arr);

for ($i = 0; $i < $count; $i++)

This is not a complete guide, but it's basics.


text:
Q: How to determine which server IP address the client connected to I'm binding with IPAddress.Any.  My server has multiple IP addresses.  In my case all on the same NIC but I don't think that matters -- it could be just as easily multiple NIC.
I need to know which IP address the client has connected to.  Is this possible, or should I create different sockets for each of my Ipaddresses and bind to each one?
Update:
Creating a TcpListener for each of the IP Addresses as proven to be the easiest solution, although I remain open to other suggestions related to IPAddress.Any (0.0.0.0)

A: TcpClient.Client.LocalEndPoint should contain the correct IP Address.


text:
Q: The pythonic way: replacing interfaces with ducktyping vs inheritence tldr: I have consumer-like classes that require a number of pieces of information to do their job.  It's an "all or nothing" kind of thing: the "producers" providing them with data need to provide all necessary pieces of information or there will be a problem.  I want to provide some assertions to make sure everything is present.  I know that python is normally a fan of duck-typing, but because I need to have all data present in all cases, I feel it would be easier to make a base class that the producers have to implement, and then assert via instanceof.  Is this a reasonable choice or is the preference still for duck-typing?
Background
I figure some background is good to make sure I'm not falling victim to the XY problem.  I'm working on a system to manage database structure via version control (a database migration system).  I have some classes that compare table definitions to see if anything has changed.  The table definitions themselves can come from a variety of locations: it can come from the definitions stored in text files, it can come from reading the actual database, etc...  So I have some classes responsible for loading up the database structure from various sources (producers), and then other classes who take those definitions and look for differences (consumers).
I briefly considered having a third entity involved to store the actual table definition, and which would be built by the producers and passed to the consumers.  However, I don't think there would actually need to be any behavior associated with such a class: it would just operate as a dumb data carrier between the two which would just have a few properties on it.  As a result, I think I would rather skip it, since it has no real responsibilities.
Instead (in the lingo of other programming languages), my thought was to have a simple interface that defines that table definition.  The producer classes would implement the interface, read their respective sources, and populate the data accordingly.  The consumers would then simply accept any object that implements the table definition interface.  Obviously though, this is not the python way.
Having done some reading on the topic, it seems like duck typing is the preferred go-to solution for this problem.  In my case though, I feel like it may not be the best fit.  The biggest reason is because I don't foresee any need for flexibility in the required data parameters.  If I always need the same half-dozen or so properties, I feel like it would violate DRY to check that all parameters are present everytime I need them.
Rather, my thought is to let the table definition be a base class which the producers then add to their inheritance chain, and which defines the properties which must be provided.  The consumers will then just do a simple instanceof assertion before doing their thing.
Is that a reasonable approach to this problem in python, or are there preferred ways?

A: Your logic seems reasonable. This of it this way: as a user, I don't want to have to read through your entire code to figure out what interface you are expecting. It's better to just provide a base class or Abstract Base Class that I can inherit from and fill in the blanks (plus, you can communicate the semantics of the interface from the base class definition).
This seems like a simpler way to communicate requirements. I don't know if duck-typing is still so popular now that we have Python 3 (it even introduced types!) so don't let language conventions/philosophy drive you too much.
In a language like Java, I'd just say something like
void function(Somethingable x){
   do something that requries x to be Somethingable
}

It's really the same idea. I'd look up "somethingable" in the Javadocs and implement/subclass accordingly.


text:
Q: yii2 checkbox field dont'save data in db i have a problem with the checkbox field that does not save me the data in the database . In the database I have the ' conditions ' field ( chekbox field ) as boolean . when sending the form I do not save as checked ( 1 ) .
my model
Rules

return[
 'condizioniRequired' => ['conditions','required'],
            'condizioniType' => ['conditions','boolean'],];

My view

<?= $form->field($model, 'conditions')->checkbox(array('label'=>'Offerted')); ?>

all other fields are saved.

A: You have to do like this :
<?= $form->field($model, 'conditions')->checkBox(['uncheck' => '0', 'checked' => '1'])->label('label'=>'Offerted') ?>

I hope this will help!!.