text:
Q: Devise custom routing links not working I am running Rails 3.2.12 and Devise 3.1 and I have in the routes.rb this:
devise_for :users do
  get '/login'    => 'devise/sessions#new', as: :login
  get '/logout'   => 'devise/sessions#destroy', as: :logout
end

However, when I hit
127.0.0.1:3000/login

I get
No route matches [GET] "/login"

What works is
127.0.0.1:3000/users/login

Is there anything else I have to do so that I can skip typing /users/ part?
Thank you!

A: devise_for :users, :path => '', :path_names => { :sign_in => 'login'}

Good info about customizing Devise paths on this StackOverflow post :)

Here's some live code which works for one of our live apps:
  #User Management (Devise)
  devise_for :users, :path => '', :controllers => {:sessions => 'sessions', :registrations => 'registrations'}, :path_names => { :sign_in => 'login', :password => 'forgot', :confirmation => 'confirm', :unlock => 'unblock', :registration => 'register', :sign_up => 'new', :sign_out => 'logout'}
  as :user do
    get 'register', :to => 'devise/registrations#new'
    delete 'logout', :to => 'sessions#destroy'
  end

A: devise_scope :user do
  get "/login" => "devise/sessions#new"
end

See this for more details


text:
Interceptors are not the answer, Stardock/Ironclad must tweak the funtionality of SC and Carriers
TheRezonator
March 6, 2009 9:20:07 AM from Stardock Forums
I agree, that simply adding a new type of strikecraft is not the answer... if at all, the answer is to be found in how strikecraft behave. lets look at today's carrier battle groups... why dont they sit in the middle of the ocean and launch attacks from a nice safe distance (more or less)?
because the strikecraft on these carriers only have so much range and weapons capacity. this is why carrier battle groups must get as close to the battlefield as possible/safe.
my idea, is that instead of adding the new interceptor (sorry, CreditSuisse, it was a good idea) we alter the behaviour of strikecraft.
that is, bombers must return to their carrier after their payload is depleted (perhaps an opportunity for a new research item?), when they run out of fuel (perhaps 60 seconds flight time? depending on the speed of the game) or when they get damaged (damage reduces speed, combat effectiveness and longevity). fighters must return for the same reasons, whichever comes first. the fighters themselves must be made faster and more manouverable, able to take on bombers and other fighters more effectively, however, their effectiveness against any sort of frigate, cruiser, capital ship or structure (barring mabye trade, refinery and construction ships) must be negligible. as for the Advent in particular, with their energy weapons, lets say that due to their small size, SC generators cannot sustain the power needed for weapons indefinitly, and need to be boosted by a a carriers reactor (something like that) and i think the Vasari use phase missiles.. which are still missiles and so have to be replaced.
SC should not be able to remain launched at all times. they should remain on their respective carriers at all times until you encounter enemy forces, at which time all SC should launch automatically... but slowly, as though the SC are actually launching and not all 56 SC in your fleet can launch at the same instant, although maybe Caps can launch faster... being Caps. on that same note, SC should not be able to be built instantly. they should be built very slowly and one by one, or even not at all until the battle is over. i mean, on an aircraft carrier today, once you lose a plane, you've probably lost it for days if not weeks...
one other large change to be made should be SC range, both between each craft in a squadron, and each squadron from its host. you shouldnt be able to jump in a carrier fleet at the edge of a GW, and send the bombers out to wreak havoc on the other side of the GW. just like a modern day carrier, strikecraft must be able to return to base to re-arm and re-fuel and get back into the fight quickly.
this would also enable the devs to scrap the flak frigate and merge its functionality with the carrier (i.e. put flak weapons on the carrier cruiser) the carrier has to be in range of the fight anyway, and this way we save fleet supply and make use of the tactic the flak frigate was supposed to provide, as, after all, its easier to destroy the carrier than the SC.
one more thing... im thinking about planetary hangar defenses... perhaps these hangars would have specialised SC's with a larger capacity for fuel and weapons, giving them greater range. the storyline back up could be that due to the mobile nature of carriers, they cannot sustain SC's at the ranges and timespans of planetary based squadrons, since these squadrons have the supplies of the planet (and the empire) at their disposal. to balance however, lets say carrier SC do more damage and are harder to kill (being more veteran pilots etc)
so, to sum up. No, i dont think the interceptor is a good idea... well, it is, but not for Sins, not when we have what we have now.
however, i think current strikcraft behaviour should be altered, so that fighters and bombers must return to the carrier on a regular basis to re-arm, re-fuel and repair. perhaps a technique could be implemented to give you the choice to have all SC fighting at once, or have half fighting and half waiting for the first half to return, so that you always have SC in the battle at some point.
i also think that SC sould only be able to operate in a limited range around its respective carrier, and also merging the flak frigate weapons with the carrier cruiser to increase its combat usefulness and also saving fleet supply.
fighters should be more manouverable and faster, more capable to engage bombers and other fighters, but effectively useless vs. frigates and larger.
SC should launch at a realistic pace (perhaps 2 craft (not squadrons) every second or two? based on game speed, and even then, they wont enter combat until the entire squadron has launched and assembled) so that you dont instantly have a huge cloud of whirling, missile spitting death.
lastly i think that planetary hanger defenses should have special SC with larger capacity for fuel and weapons, giving them a longer range and operating time, but making them less lethal than their mobile cousins.
i think that was all.... not to ring my own bell, but it seems like a good idea to me, this way everyone is happy and SC dont get too nerfed.
[EDIT] ive had another idea, that would cancel alot of problems out, if standard light carriers did not give you the option of choosing what to build, i.e. all came with one fighter squadron and one bomber squadron, it could solve alot of issues with superior numbers in one or the other... i have to say im not a great fan of this idea, i like the control of being able to choose... but if its seen that having all too many bombers or fighters is going to cause inbalance issues, then maybe its a course the devs will have to take...
3 Pages1 2 3 Next
mbar8
Reply #1 March 6, 2009 12:53:35 PM
Going at it from a modding perspective it might be possible to reduce the strikecraft range by changing defaultAutoAttackRange "GravityWell" in the referencedata to what ever is lower. I'm not sure what that would be. Then if possible put in a natural decay rate for launched strikecraft. Once they launch they would die (slower of course) like they do once their mothership is destroyed. It would give some use to the launch/recall button. I think these ideas might simulate what you're looking for.
I think the carrier having flak is an interesting idea and would be closer to real life carriers
I don't think I would want to add to the CPU time needed to track each and every strikecraft for fuel and ordinance.
ImpurityXIII
Reply #2 March 6, 2009 1:29:11 PM
I think with the changes you suggest, Strike Craft would be useless.
If you cannot rebuild SC infight and they launch one after another, no one would build carriers. If the enemy builds some flak, the carriers firepower would be 0 after 60 second s in a battle.
But I have to agree with some things. Fighters should stay docked and only launch when enemies are near, but they should launch fast. It just looks better this way.
Also I'd give carriers some kind of (weak) weapon or a researchable ability (active or passive buff) that makes them more usefull when they are closer to the fleet.
DauntlessAnsible
or not change anything and build fighters and flak to defend your fleet.
besides stardock doesnt need to be messing with Ironclad's baby.
Reply #4 March 19, 2009 4:02:15 AM
Quoting ImpurityXIII,
i dont see how implementing these changes would make SC useless, you can still spam plenty of SC, and regardless of these changes, their sheer numbers would still overwhelm most if not all kinds of ships/structures. yes, their effectiveness would be greatly nerfed, due to the proposed reduced amount of range and longevity. but thats the point! we want to reduce carrier spam... and if not that, then at least it will reduce combat effectiveness of tens upon tens of SC
on reflection, we could scrap that SC rebuild thing, but i think the other ideas, needing to be re-fueled etc, and more relistic squadron movements and realistic launch times are not bad ideas... to be honest i think SC launch one by one already, but go off on their willy nilly way as soon as they launch and not as a squadron
in anycase, its kinda hard to make a debate if all you say is my changes would make SC useless, without giving reasons...
but i do agree that carriers should get... something, a weapon or ability... then again, as has been said in other threads, the carriers 'ability' IS to field SC, so... and again, not to ring my own bell, but with these proposed changes, the SC becomes NEEDED, rather than just something that is around so you can have your super unlimited SC that dont need repairing, refueling or re-arming
Congratulations to the OP.
You have justified why SC must be changed based on atmospheric flight mechanics being applied to space and then say it should be so as it is realistic.
The way planes work in an atmosphere with gravity revolves around needing to keep up a sufficent speed to avoid falling out of the sky(damn that air friction etc... slowing me down, and gravity pulling me down...).
The thing is, this really cleaver guy got hit in the head with an apple and came up with some laws. One of which is that without any force to oppose it, an object in motion will stay in motion forever. As such, the concept of range does not exist in space as there is no continued fuel burn. A ship just accelerates a bit and keeps moving to the other side of the system without needing to expend fuel....
I guess you could argue range is dependent on how long someone can live on a ships life support systems, but we put people on the ISS for months at a time, so I'm sure they have it fixed. TEC had 1000 years to work on this since they were at peace.
Deceiver_0
None of the other vessels use fuel, and all three races have been spacefaring for long, long periods of time. Trade ships don't use fuel. Refinery vessels don't use fuel. Perhaps each race has found an efficient energy source small enough to fit in a fighter sized ship, eh? We stuff nuclear power into missiles, is it really that far fetched?
he only problem I have with the SC mechanics in SINS is they act too much like Aircraft in their movement. Aircraft are limited in their maneuvarability, as Hack pointed out, by the fact that they must always move forward to stay in the air. Strikecraft in space have no maneuverability restriction except for what the pilot can handle in terms of g-force. I'd like to see the SC use all three axes, especially fighters. I want to see them flip, twist, rotate, slide, corkscrew etc. Anyone watched the new BSG? I think they do strikecraft battles pretty well. I wanna see SC move like that.
Otherwise I think the balance is fine. You don't absolutely have to have carriers to win, but its a real good idea to have'em in the fleet. The person with the most carriers in a battle isn't always the winner, so there is balance. When carriers are involved, it's generally the person with the best micromanagement skills ending up on top. I can't figure out why people don't realize this.
I've lost battles before where I had more carriers in my fleet then the other guy. The issue was he had air supremacy so was killing my SC as they got built. When I tried to dock them to rebuild them, he got free runs on my other ships. That is NOT good with bombers hitting my caps etc!!!
Bobucles
One word: Antimatter. If squadrons require antimatter from the carrier in order to function, then it accomplishes everything you want to set up.
or when they get damaged (damage reduces speed, combat effectiveness and longevity)
Antimatter. Ships die, carrier spends antimatter to build more.
when they run out of fuel (perhaps 60 seconds flight time? depending on the speed of the game)
Antimatter. Carrier runs out of antimatter, ships have to be recalled.
that is, bombers must return to their carrier after their payload is depleted (perhaps an opportunity for a new research item?),
Antimatter.Ships have to be recalled, no chance to shoot.
this would also enable the devs to scrap the flak frigate and merge its functionality with the carrier (i.e. put flak weapons on the carrier cruiser)
Carriers countering carriers? Okay, but what if you want to kill them with something that's NOT a carrier? There's no point to making a unit MORE capable of killing only itself. Every unit will counter itself 100% of the time, guaranteed.
VarekRaith
Reply #10 March 19, 2009 10:24:02 AM
The problem with all of these strikecraft/carrier threads, is that the alternatives offered would make them nearly useless, or so tedious to use no one builds them. The solution is not to beat it to death with a nerf bat, but to come up with viable, balanced alternatives.
astrath
I'm in a pedantic mood today - Ironclad not Stardock in the thread title.
sawakaki
I can agree with some of what you are saying, The_Rezonator_1. However, the whole game is based on infinite ammo and fuel. No ship ever has to refuel and rearm, and they repai themselves automatically, too. I don't think it makes sense to change strike craft and not any other ship. As for launching Strike craft one at a time, this is space, there doesn't have to be just one "runway" on a carrier like there is today. You could, theoretically, simply push a fighter off of the carrier and it would float away from the ship. The launch mechanizim doesn't have to be big, so the strike craft could launch out the sides of the carrier quite easily, making it possible to launch several if not dozens at once.
xploseve_12b
Reply #13 March 19, 2009 12:09:11 PM
Heres my take on the SC/Carrier issue:
First off, with the Cap carriers, I always thought that they should have a lot more firepower countering fighters, lots of flak wepons that out range anything else out there for flak, but on the other side, the fact that carriers are not ships of the line, but they should stay with the main fleet, because it would give lots of anti-SC coverage (or whatever group you want with the most cover, like your long range ships). Also, Cap carriers should have more (than they do now) SC avalible to them at first. I would think that starting out at 4 squadrons then getting one more at ever 2 levels (maxing out at 9 total) would be very balancable. now for the carrier crusiers, the amout of SC they hold is fine, but they should have something for thier own defense, like one or two short range flak guns. Now you all say, well that makes the Flak frigete obsoleat, not true, because the carrier crusiers are: A cost 14 fleet points, and B still would not be as effecteve aginst fighers as the flak frigete. With the flak frigete costing less resorses and only 4 on you fleet points, is still a very cheap but effective counter SC ship. I just think that the Carrier crusiers shold have somthing on it (who the hell builds a warship with out weapons?)
Strike Craft. I think they are just fine. How effective and long lived your SC are depends on 2 things. one, being the ratio that you build Fighers/Bombers, and two, how many you have in your fleet. I posted somewhere (cant remember what thread it was) that i like to go with a 2 to 1 ratio figher heavy in my fleets, because fighters are faster and live longer than bombers, and i like to have lots of them to counter enemy bombers, and I like to have something left in my SC inventory late into a major battle. The point is, however you play, try to change up your ratio every now and then and see how it works for you. And about refueling SC, come on, its a space fighter, it probaly has a reactor that provides infinite amounts of energy, no need to re-fuel.
Whoa you guys are stillc rying about carriers? Dear god someone forgot to buy Entrenchment I guess. I have won probably 30 games of Entrenchment without making a single carrier thus far.
For the record, I have Entrenchment, love it, recommend it all the time. Yes we are still talking about strike craft and carriers. There are enough threads on this topic still going it is obiously important to a large number of gamers out there. Maybe you don't use them, but that doesn't mean lots of other players find them important to their style of play. That's the beauty of this game, there is no one right way to play and win.
Reply #16 March 19, 2009 2:29:40 PM
Quoting Astax,
Never get in the way of a good horse beating. They'll eventually tire themselves out.
Quoting sawakaki,
Just because a lot of people believe something is imbalanced, doesn't make it so.
Longasc
I guess Ironclad could make Strikecraft and Carriers even better, and people would STILL refuse to build something else than Missile Frigates and never ever Flak Frigates.
True. I don't think the game is imbalanced, or even this aspect of it. I'm just throwing my opinion out there with all the other opions.
Flipkik
Since entrencement I have too be honest... I find carriers a big joke ROFL. Poor beggars went from my fleet backbone too baned from my research. I can't believe people want them more nerfed. Eh maybe we should buff flak... A bit more... (ps: being sarcastic bout the flak before you guys start taking that serious and start flak buff threads)
Someone please burry the nerf carrier threads. It's old...
Grtz,
[_]-Flipkik
WitchFire
One could consider a buff for strikecraft too--onboard ordanance, such as missiles or disposable beam packs. Code it in such a way as the strikecraft to have massive DPS in the first pass then drop down to 'normal' levels afterwards. Once the squadron redocks, the ammunition (or equivalent) is replaced. Heck, in order to add to the realism, this could also be the only way for additional strikecraft to join a squadron, as well.
Reply #21 March 20, 2009 4:03:39 AM
okay, i can see no one cares about these changes, so ill let the topic die
however, i would like to clarify some things
so, first off, i dont really care about the SC balance, im quite happy with it, im absolutely fine to just build a number of carriers full of bombers and let them run free
i mean with enough SC + recearch, micro managing them becomes a moot point because they become so effective
now, the reason i wrote this thread was because i like solving problems, and SC balance whatever was a problem, and i noticed in my own style of play, unless the other player had anti-bomber support to match or surpass mine (probs surpass it) he would lose, always so, i decided to come up with some ideas to try and fix this problem.
now, Hack congratulated me on applying aerospace flight laws to spaceflight laws, well, id like to say something in return... yes, once you have inertia, you continue moving in that direction... however, that same man with the apple said for every action there is an equal and opposite reaction... so, that means you cant just burst fire ur engines for a second and instantly be going at full speed. initial velocity requires sustained burn, then, sure, if you are travelling in a straight line, you can shut down your engines... and yeah, you can make some direction changes with thrusters... (which still need fuel) but for major direction changes, jinks, tricks and evasive manouvers, you need a constant application of forward force to keep up momentum. AND we havent even spoken about firing... a small ship like a fighter or bomber (maybe not bomber) would have significant backwards force applied to it every time it fired, more reason to keep the engines firing.
now, lets say ships in sins use plasma ejection drives, that is, a small nuclear reaction generates plasma which is then funnelled through a nozzle and ejected as exhaust to propel the ship, then yes, larger ships would not need refueling very often... but on smaller craft like SC, plasma ejection drives may not even fit, and if they do, they would be too volatile or any of a multitude of other problems (based on the theory that is, and yes, im making alot of this up, but we are talking sci fi... i prefer mysci-fi to be realistic, not just magical) that would prevent it being used on strikecraft
that said, unlimited fuel or fuel-less engines do not account for an endless supply of ammunition!
one other guy said that all the proposed changes make SC useless... granted, in smaller numbers... but who uses SC in small numbers? and if you only use Cap ship based SC fine, but i said that, being bigger, Caps can surpass the restrictions given to light carriers... AND, honestly, just saying it makes SC useless without giving reasons why, well... THAT is whats useless my friend.
so, look, im quite happy to leave SC as they are, as it is i hardly ever need to micro manage, however, i was thinking that with these changes, SC can keep their damage effectiveness, while not being so overpowering and uncounterable.... as i stands it seems that any attempt to make them more suceptible to existing weapons makes them too weak, and adding new units to counter them also makes them useless... my recommendation was to change their behaviour to make them more like real fighters, because in real life, SC are not as effective as in Sins
so like i started out, obviously everyone is fine with carriers/SC as they are, as am I. i tried to fix a percieved problem... no one is interested
but seriosuly, everyone, thanks for your input and debate
I kinda new to the game, only been on the forums for a few weeks. But it seems to me that strike craft are a bit of a touchy subject. I had a thread talking about them too, and pretty much the same thing happened. Anyway, I thought you had some good points and certainly put some thought and common sense on to your ideas. Personally, I like to see well thought out ideas simply because it means someone is thinking about the game instead of just suggesting another super unit.
BTW, have some Karma!
yay! thankyou
How come his Karma is still 0???
huh... i see +2

redpajama_set_name: RedPajamaCommonCrawl


furnishing support or assistance; "a supportive family network"; "his family was supportive of his attempts to be a writer"
Used specially in teams. Be a good member of the team, help each other and always looking for ways to help other members of the team to succeed.
when nursing intervention cannot alter the course of the adaptation and can only maintain the status quo or fail to halt a downward course.
kamma: upatthambhaka kamma; s. kamma.


text:
Home›A & C›Comic books aren't out of style yet, people!
Comic books aren't out of style yet, people!
Storytelling + superheroes (or not superheroes) = comics
Nightmares. I will have nightmares. / DC Comics
Author: Ethan Butterfield
What's not to love about comic books? They tell stories, bring heroes closer to our hearts, and make us laugh on occasion. From Garfield to Preacher, comic books are a part of literature that covers a large spectrum. I myself am keeping up with The New 52 Batman series. There's just so much to offer people, and media doesn't shy away from them either. I mean, think about it, without comics we wouldn't have this giant craze in superhero movies…so take that for what you will.
In my humble opinion, whenever the discussion of best comic book comes up, I have to go with a tried and true classic: Batman: The Killing Joke, written by Alan Moore. What can I say that hasn't already been said? The story is set in the Batman universe and takes place in Gotham City; it depicts The Joker as a failed standup comedian who turns to a life of crime and eventually goes further and further down the rabbit hole. I'm not jok…kidding when I say he goes nuts. There's an entire monologue about him having 'one bad day' and that everyone is just as messed up as he is. It's oddly understandable though, as if you can feel his sorrow drift through his dialogue.
Here's an example: "I've demonstrated there's no difference between me and everyone else! All it takes is one bad day to reduce the sanest man alive to lunacy. That's how far the world is from where I am. Just one bad day. You had a bad day once, am I right? I know I am. I can tell. You had a bad day and everything changed. Why else would you dress up as a flying rat? You had a bad day, and it drove you as crazy as everybody else… Only you won't admit it! You have to keep pretending that life makes sense, that there's some point to all this struggling! God you make me want to puke."
I got in touch with a fellow comic book fan and good friend of mine, Avery Lockert. I asked him a series of questions relating to what comics are like today. He had this to share:
So, Avery, first and foremost, do you feel superhero comics are innovative, or are they putting a stranglehold on the industry?
Avery Lockert: Superhero comics have definitely added a lot. When people think of comics, it's usually superheroes that pop into their mind. They just offer a large array of material in general.
Now, do you think comics are being developed for a more mature audience nowadays?
AL: Largely, yes, comics have definitely taken on a more mature or dark tone from the initial fun and lightheartedness that they had before hand.
How do you feel about the quality of comic books in this day in age?
AL: Well it hasn't necessarily improved, but it has changed by targeting the more mature audience, as I said before.
What's the definite thing you like most about comics?
AL: Personally, the fantasy, exploring a different universe and the development of characters within. [And] getting to watch them as they grow and becoming emotionally invested with them.
So given those thoughts, are comic books as good now as they were then? I could safely say yes. Although it appears that a darker shift has taken place since the days of Archie and the aforementioned Garfield, one cannot deny that comics in general are a great storytelling experience.
TagsAlan MooreArchieArts & CultureAvery LockertBatmanBatman: The Killing JokeComic BooksComicsDC ComicsDestiny KausEthan ButterfieldGarfieldPreachersuperhero comicsThe CarillonThe New 52University of Regina
Five days of camping
Overcrowded Saskatchewan penitentiaries
The University of Regina's thriving community fuels our content at the Carillon! If you've got a story worth sharing or are interested in contributing please let us know! Send an email to editor@carillonregina.com and subscribe to our pitch list!
Losing time and finding space
From A – Z


text:
Q: Inverse of a Matrix in Python While trying to compute inverse of a matrix in python using numpy.linalg.inv(matrix), I get singular matrix error. Why does it happen? Has it anything to do with the smallness of the values in the matrix. The numbers in my matrix are probabilities and add up to 1.

A: It may very well have to do with the smallness of the values in the matrix.
Some matrices that are not, in fact, mathematically singular (with a zero determinant) are totally singular from a practical point of view, in that the math library one is using cannot process them properly.
Numerical analysis is tricky, as you know, and how well it deals with such situations is a measure of the quality of a matrix library.

redpajama_set_name: RedPajamaStackExchange


AADHAAR card form is absolutely free. There are no charges for the AADHAAR card form. You can get the AADHAAR card form at the center itself, or you may download the AADHAAR card form online. You may download the AADHAAR card form by clicking on the link below.
Although you can get the AADHAAR card form at the center as well, you may download and fill the AADHAAR card form beforehand to save time at the center.
To download AADHAAR card form online, click here. If you want AADHAAR card form in your local language, select appropriate option from the top menu under "Form".
AADHAAR card enrollment is free and voluntary for the residents of India. Correction within 96 hours of enrollment is also free.
At some selected AADHAAR card Enrollment Centers, online appointment is now available. To check if a center near you has online appointment facility click here: Apply for AADHAAR Card Appointment Online. If an AADHAAR card center near your location DOES NOT have online appointment registration facility, you can walkin to any nearby AADHAAR card center, without prior appointment.
To know about the documents required to apply for AADHAAR card click here: AADHAAR Card Documents Required.
Copyright 2010- 2020 @ www.grahaksuraksha.com. All rights reserved.


text:
Mike Boone
5.7 35 0 2 22
Melvin Gordon doubtful for Week 13
Ryan O'Halloran via Twitter
Broncos RB Melvin Gordon (hip) is listed as doubtful for Week 13's game against the Kansas City Chiefs.
Related Players: Javonte Williams, Mike Boone
A tough loss for the Broncos, but bigger news for Williams. Look for the rookie to lead the Broncos backfield comfortably.
by Richard Mejia
· Jan 01, 2021 · 3:32 PM EST
MIN RB Mike Boone - Week 17 Fantasy Football Outlook
Week 17 at Detroit
With Dalvin Cook expected to miss this week's game, Boone should expect more work as part of an RBBC with Alexander Mattison and Ameer Abdullah. Boone hasn't done much this season, which is to be expected with Cook handling almost all the backfield touches. However, Boone did score a touchdown in last week's contest against the Saints, so his productivity will be linked to how often he succeeds in the red zone. Keep Boone tapped as a touchdown-dependent RB3 in this one.
NYJ 6
WAS 4
@DAL 1
@LAC 8
Switch Year 2021202020192018
1 @NYG - - - - - - - - - - - - - -
2 @JAX - - - - - - - - - - - - - -
3 NYJ - - - - - - - - - - - - - -
4 BAL - - - - - - - - - - - - - -
5 @PIT - - - - - - - - - - - - - -
6 LV 0 0 0 0 0.00 1 3 0 1 3.00 0.3 1.3 6/81 7.4%
7 @CLE - - - - - - - - - - - - - -
8 WAS 0 0 0 0 0.00 0 0 0 0 0.00 0.0 0.0 1/53 1.9%
9 @DAL 0 0 0 0 0.00 0 0 0 0 0.00 0.0 0.0 0/78 0.0%
10 PHI - - - - - - - - - - - - - -
11 BYE - - - - - - - - - - - - - -
12 LAC 0 0 0 0 0.00 0 0 0 0 0.00 0.0 0.0 0/62 0.0%
13 @KC 4 35 0 0 8.75 1 19 0 1 19.00 5.4 6.4 17/77 22.1%
14 DET - - - - - - - - - - - - - -
15 CIN - - - - - - - - - - - - - -
16 @LV 0 0 0 0 0.00 0 0 0 0 0.00 0.0 0.0 0/42 0.0%
17 @LAC 0 0 0 0 0.00 0 0 0 0 0.00 0.0 0.0 1/60 1.7%
18 KC 0 0 0 0 0.00 0 0 0 0 0.00 0.0 0.0 0/54 0.0%
Per game 1.00 8.75 0 0 8.75 0.50 5.50 0 0.50 11.00 1.43 1.93 6.25/67.75 8.26%
Totals 4 35 0 0 8.75 2 22 0 2 11.00 5.7 7.7 25/507 8.26%


text:
Q: How to Update Multiple Fields Inside an Array in Mongodb, Express, NodeJs? How to Update Multiple Objects by Its ID inside an array? I wanted to Update the experience by its ID by the User,
Below i have attached my mongodb json object screenshot:

I can already Create an Experience by the User:
router.put('/experience',
    [
        auth,
        [
            check('title', 'Title is required').not().isEmpty(),
            check('company', 'Company is required').not().isEmpty(),
            check('from', 'From date is required').not().isEmpty(),
        ],
    ],
    async (req, res) => {
        const errors = validationResult(req);
        if (!errors.isEmpty()) {
            return res.status(400).json({ errors: errors.array() });
        }

        const {
            title,
            company,
            location,
            from,
            to,
            current,
            description,
        } = req.body;

        const newExp = {
            title,
            company,
            location,
            from,
            to,
            current,
            description,
        };

        try {
            const profile = await Profile.findOne({ user: req.user.id });
            // unshift is same with push it pushes it in the beginner rather than the end
            profile.experience.unshift(newExp);

            await profile.save();

            res.json(profile);
            console.log(req.body);
        } catch (err) {
            console.error(err.message);
            res.status(500).send('Send Error');
        }
    }
);

and Here is my non working code about the Update strong text
router.patch('/experience/:exp_id', auth, async (req, res) => {
    let id = req.params.exp_id;
    let expId = req.body;
    try {
        const profile = await Profile.findOne({ user: req.user.id });

        profile.experience.findOneAndUpdate(
            { id },
            { $set: { expId } },
            { new: true }
        );
        res.json(profile);
    } catch (err) {
        console.error(err.message);
        res.status(500).send(err.message);
    }
});

A: Look around this, corrected below things:

*

*from { id } to { "experience._id": id }

*{ $set: { expId } } to { $set: { fields of experience } }

*removed const profile = await Profile.findOne({ user: req.user.id });

*from profile.experience.findOneAndUpdate to Profile.findOneAndUpdate

*added data and error response function (err, data)
router.patch('/experience/:exp_id', auth, async (req, res) => {
    let id = req.params.exp_id;
    let expId = req.body;
    try {
        await Profile.findOneAndUpdate(
            {
                "experience._id": id
            },
            {
                $set: {
                    'experience.$.title': req.body.title,
                    'experience.$.company': req.body.company,
                    'experience.$.from': req.body.from,
                }
            },
            { new: true },
            (err, data) => {
                if (!err){
                    res.json(data);
                }else{
                    res.json(err);
                }
            }
        );
    } catch (err) {
        console.error(err.message);
        res.status(500).send(err.message);
    }
});

Hope this will help you.

A: https://stackoverflow.com/a/47762417/13199635 This should help you out. Also in your current code, where you are updating your profile.experience, you should probably use {_id: id} instead of just {id}. so your updated code would be like
profile.experience.findOneAndUpdate(
            { _id: id },
            { $set: { expId } },
            { new: true }
        );
        res.json(profile);

Hope this helps


Alternator F010LD0201 Supplied By Shiyan Wosai Auto Parts Co.,Ltd,Which Is A Rebuilt Alternators And Starters Manufacturer Exporter And Supplier,This Alternator Fit For BOSCH F010LD0201 0 986 039 931 0986039931 CASCO CAL15172 CV PSH 225.503.080 DELCO REMY DRA3385 DRI 200.130.802 EDR 933385 CITRON 9611369580 9612257180 9611366880 9607641280 FIAT 9655249280 MITSUBISHI A2T37691A A2T37691 A2TA0291C A2TA0291D A2TA0291F A2TA0291 A2TA0291B PEUGEOT 5705HT 5705M8 9611365980 5705E6 5705M9 9631318580 etc. Alternator Numbers.We Can Manufacturer Or Rebuild All Kinds Of High Amp Alternator, Low Rpm Alternator, Bigger Alternator, Auto, Cummins Engine, Water Cooled, Automotive, Car ,Heavy Duty Truck, Electric Motor Etc. World Class Alternators!


text:
Q: Replace the Quotations in Notepad++. I have a Text file.
it has "" character like this
Example:

456 canady robert forsty "
" sample sample sample
457 vasu varun vocalar"
" kiran rajesh
457 vasu varun vocalar"" kiran rajesh
457 vasu varun vocalar"" kiran rajesh

Can I replace those two quotation marks by using "Notepad++ find and Replace" option ?
Because of this Quotation mark details going into next line...
SO i just want to replace those two quotes with some blank space they look normal.
Its an 13MB file 100389 lines...
I have seen the Find option with regular expression in Notepad++ but i am not good at Regular expression.
write a line for us.
Note : I just want to replace those Quotation marks which are coming in the shown pattern.

A: You can always escape special characters with a backslash (\) in regular expressions, so you should put a \ sign in front of the special character like: "
Removing " characters and removing line breaks are two different things.
Both can be done in Notepad++ Find&Replace.
Just check the Regular expression check box, and replace \" to nothing and press replace all. This will replace all " characters to nothing.
If you want to replace them to a space, then replace \" to SPACE
For removing line breaks, replace (\r)?\n to nothing
Hope that helps.
Cheers,
fmarton

A: Hm. In your example this is works:
Find "" Replace <empty>
Find "\r\n" Replace \r\n
Both with enabled "regex" option.

A: If you use a regular expression this should work:
Find: \"\r\n\"
Replace: ""
Would make
456 canady robert forsty "
" sample sample sample
457 vasu varun vocalar"
" kiran rajesh
457 vasu varun vocalar"" kiran rajesh
457 vasu varun vocalar"" kiran rajesh

Look like
456 canady robert forsty "" sample sample sample
457 vasu varun vocalar"" kiran rajesh
457 vasu varun vocalar"" kiran rajesh
457 vasu varun vocalar"" kiran rajesh

Ofcourse you could also replace it with an empty string which would also remove the quotation marks.
Saying

Because of this Quotation mark details going into next line..

is a bit inaccurate, its not the quotation marks that cause the new line, its the carriage return and linefeed characters (CRLF, \r\n) which is "invisible" characters between the quotation marks. You can make notepad++ show these special characters by pressing the  sign in the toolbar.

A: How about:
Find what: "\R?"
Replace with: NOTHING