text:
Q: Must declare the scalar variable error This is in connection with my last question. I have this code:
DECLARE @PatientId UNIQUEIDENTIFIER
DECLARE @FormId NCHAR(16)
DECLARE @columns VARCHAR(8000)
DECLARE @query VARCHAR(8000)

SET @PatientId = '3387F956-EA0A-4660-8647-1096E25A3C6F'
SET @FormId = 'form111'

SELECT @columns = COALESCE(
        @columns + ',[' + RTRIM(AttributeGroup) + '_' + RTRIM(AttributeId) + ']',
        '[' + RTRIM(AttributeGroup) + '_' + RTRIM(AttributeId) + ']'
    )
FROM DVItems
WHERE PatientId = @PatientId AND FormId = @FormId
GROUP BY AttributeGroup, AttributeId

SET @query = '
SELECT *
FROM(
    SELECT
        PatientId,
        RTRIM(AttributeGroup) + ''_'' + RTRIM(AttributeId) AS ColName,
        FormId,
        Description
    FROM DVItems
    WHERE PatientId = @PatientId AND FormId = @FormId
) p
PIVOT
(
    MAX(Description)
    FOR [ColName]
    IN (' + @columns + ')
) AS p'

EXECUTE (@query)

When I execute this. It says "Must declare the scalar variable "@PatientId"." But when I commented out the lines where I SET value for @PatientId and @FormId and execute it, it says "Command(s) completed successfully." Any help? Thank you. Try this fiddle.

A: Try change this statement -
SELECT @query = '
SELECT *
FROM(
    SELECT
        PatientId,
        RTRIM(AttributeGroup) + ''_'' + RTRIM(AttributeId) AS ColName,
        FormId,
        Description
    FROM dbo.DVItems
    WHERE PatientId = ''' + CAST(@PatientId AS VARCHAR(36)) + '''
        AND FormId = ''' + @FormId + '''
) p
PIVOT
(
    MAX(Description)
    FOR [ColName] IN (' + @columns + ')
) AS p'

Full example -
DECLARE
      @PatientId UNIQUEIDENTIFIER
    , @FormId NCHAR(16)
    , @columns VARCHAR(MAX)
    , @query NVARCHAR(MAX)

SELECT
      @PatientId = '3387F956-EA0A-4660-8647-1096E25A3C6F'
    , @FormId = 'form111'

SELECT @columns = STUFF((
    SELECT DISTINCT ', [' + RTRIM(AttributeGroup) + '_' + RTRIM(AttributeId) + ']'
    FROM dbo.DVItems
    WHERE PatientId = @PatientId
        AND FormId = @FormId
    FOR XML PATH(''), TYPE).value('.', 'VARCHAR(MAX)'), 1, 2, '')

SELECT @query = '
SELECT *
FROM(
    SELECT
        PatientId,
        RTRIM(AttributeGroup) + ''_'' + RTRIM(AttributeId) AS ColName,
        FormId,
        Description
    FROM dbo.DVItems
    WHERE PatientId = ''' + CAST(@PatientId AS VARCHAR(36)) + '''
        AND FormId = ''' + @FormId + '''
) p
PIVOT
(
    MAX(Description)
    FOR [ColName] IN (' + @columns + ')
) AS p'

EXEC sys.sp_executesql @query

Output -
PatientId                            FormId           test_01       test_02      test_03
------------------------------------ ---------------- ------------- ------------ ------------
3387F956-EA0A-4660-8647-1096E25A3C6F form111          Test only     Test only    Test only

A: Like this
SqlCommand comb = new SqlCommand("INSERT INTO [Bolum] ([Id],[BolumId],[FakulteId], [Ad]) VALUES ('"+id+"','"+bolumid+"','"+fakulteid+"','"+txbAd.Text+"')", conb);


text:
Q: Getting a Bad request on passport on Node I'm trying to run some basic tests with passport on Node, and when I try to access the route localhost:3000/login I get a Bad request 400. Here is the code:
var express = require('express');
var app = express();
var jwt = require('jsonwebtoken');
var passport = require('passport');

var LocalStrategy = require('passport-local').Strategy;

passport.use(new LocalStrategy(
    function(username, password, done) {
        var user = {
            username: "name",
            password: "password123"
        }

    return done(null, user);
    }
));

app.post('/login',
  passport.authenticate('local', {session: false}),
  function(req, res) {
    req.user.name = "Giuan";
    res.send(req.user.name);
    //res.redirect('/users/' + req.user.username);
  });

app.listen(3000, ()=>{
    console.log('Running on port 3000');
})

A: Try this:
var express = require('express');
var app = express();
var jwt = require('jsonwebtoken');
var passport = require('passport');
var bodyParser = require('body-parser');

//if you are getting the info (username and password) through the body
//of the http request you need to use body-parser
app.use(bodyParser());

var LocalStrategy = require('passport-local').Strategy;

passport.use(new LocalStrategy(
    function(username, password, done) {
        var user = {
            username: "name",
            password: "password123"
        }

    return done(null, user);
    }
));

app.use(passport.initialize());

app.post('/login',
  passport.authenticate('local', {session: false}),
  function(req, res) {
    req.user.name = "Giuan";
    res.send(req.user.name);
    //res.redirect('/users/' + req.user.username);
  });

app.listen(3000, ()=>{
    console.log('Running on port 3000');
})

A: Use app.use(passport.initialize()); you haven't initialize passport in your code.
var express = require('express');
var app = express();
var jwt = require('jsonwebtoken');
var passport = require('passport');

var LocalStrategy = require('passport-local').Strategy;

passport.use(new LocalStrategy(
    function(username, password, done) {
        var user = {
            username: "name",
            password: "password123"
        }

    return done(null, user);
    }
));

app.use(passport.initialize());

app.post('/login',
  passport.authenticate('local', {session: false}),
  function(req, res) {
    req.user.name = "Giuan";
    res.send(req.user.name);
    //res.redirect('/users/' + req.user.username);
  });

app.listen(3000, ()=>{
    console.log('Running on port 3000');
})

A: I was also facing the same issue and just fixed it by adding usernameField and passwordField keys to the localStrategy options.
new localStrategy({
    usernameField: 'email',
    passwordField: 'password'
}, function (email, password, done) {
  // Do something here
});

redpajama_set_name: RedPajamaStackExchange


text:
<!DOCTYPE html>
<meta charset="utf-8" />

  <title>Rabble-rousing Rambling - Rabble-rousing Rambling</title>

  <meta name="description" content="Default Page Description" />

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="http://blog.shiv.me/css/latex.css" />
<link rel="stylesheet" href="http://blog.shiv.me/css/main.css" />

<meta name="generator" content="Hugo 0.75.1" />

Rabble-rousing Rambling

Shiva Velmurugan

Abstract

                  I'm a product manager by day, and programmer by night. I am intrigued by abstraction, programming languages and organizing data.

Damn I hate the traffic in Chennai

  Aug 25, 2004

Come on people! What’s up with Chennai roads these days.. yeah I can understand that since the city is growing blah, blah, blah, it is going to be congested…. but you know there is this thing called sanity that departs you when it takes you an hour and half to get from Numgambakkam to Vadapalani!!
I hate it and I hate it and I hate it!! grrrrrrrr!!!
Well, it is madness I say, what’s the point in selling bikes over 150 cc and cars the size of a Cessna if there is hardly any room for people to use their vehicles on!

        Read More

Indian scientist working on $250 PC-phone-TV

  Aug 19, 2004

Mozilla Thunderbird rocks !!

  Aug 18, 2004

The Onion : CIA Asks Bush To Discontinue Blog

  Aug 18, 2004

The Onion : CIA Asks Bush To Discontinue Blog
Come on old man! Get your grips on. You go on to tell the entire world that you have to attend a secret meeting?! Duh?! That kind of beats the purpose of a secret meeting uh?!
Well, one has to appreciate the efforts of a president, if he thinks that he wants to tell his unedited opinion about things to the people of the world.

        Read More

Getting screwed for doing the right and wrong

  Aug 16, 2004

This blogging thing is turning out to be good. It let’s you interface with people and take a sneak peek into their minds, (which btw, I think has been the most characteristic search of humankind in the last century - a peek into the evolving human mind) without tramping on their time or egos!
anyway, on my wayward browsing adventure, I happened to look at a quote posted on one of the blogs by Heather

        Read More

          ← Newer

          Older →

        Powered By Hugo / Theme HugoTeX

        Shiva Velmurugan
        ©
        2016

redpajama_set_name: RedPajamaGithub


You can expect a lot from the 2017 Volkswagen Jetta. With fewer than 15,000 miles on the odometer, this 4 door sedan prioritizes comfort, safety and convenience. It features a front-wheel-drive platform, an automatic transmission, and an efficient 4 cylinder engine. The engine breathes better thanks to a turbocharger, improving both performance and economy. Volkswagen prioritized comfort and style by including: 1-touch window functionality, an outside temperature display, front bucket seats, telescoping steering wheel, power door mirrors, power windows, and more. Enjoy your favorite music via the stereo system, which includes a CD player with MP3 capability, and 4 speakers, providing excellent sound throughout the cabin. Volkswagen ensures the safety and security of its passengers with equipment such as: dual front impact airbags, front side impact airbags, traction control, brake assist, a panic alarm, and 4 wheel disc brakes with ABS. This car was designed with safety in mind, allowing you to drive with even greater assurance. It also arrives with a Carfax history report, providing you peace of mind with detailed information. We have the vehicle you've been searching for at a price you can afford. Stop by our dealership or give us a call for more information.


text:
HealthCongressEconomyImmigrationSupreme Court
Florida Senate Opens Session to Decide Fate of Broward Sheriff
October 22, 2019by Mary Ellen Klas
Broward County Sheriff Scott Israel is flanked by Florida Attorney General Pam Bondi and Gov. Rick Scott during a press conference outside Marjory Stoneman Douglass High School on Feb. 15, 2018, the day after the shooting at the school. (Lannis Waters/The Palm Beach Post/TNS)
TALLAHASSEE, Fla. — Emotions were high and security tight Monday as the Florida Senate convened a three-day special session to decide whether or not to uphold Gov. Ron DeSantis' suspension of Broward County Sheriff Scott Israel.
At an early morning press conference, the parents of the Marjory Stoneman Douglas High School shooting victims urged Israel to withdraw his petition asking the Florida Senate to reinstate him to his post.
"Mr. Israel, you have drug our families back through all of the emotions and pain of Feb. 14," said Ryan Petty, father of Alaina, 14, who was slain in the 2018 shooting. "Do the honorable thing. Withdraw your petition and resign. Don't drag the Florida Senate through this. Don't drag the state through this. Don't drag Broward County through this and leave."
The governor and several Parkland families, who blame Israel for the 17 deaths at Marjory Stoneman Douglas High School, have been working for weeks to try to persuade senators to uphold the suspension. But, to do that, the Senate must carve new precedent, enter new evidence, and contradict the recommendation of the independent arbitrator it hired to review the case, conduct a trail and make a recommendation.
Because Israel is a constitutional officer elected by voters, state law requires that the Senate approve or reject the governor's decision to remove him from office and gives Israel the opportunity to contest it.
Senate President Bill Galvano hired Naples lawyer and former Republican legislator Dudley Goodlette to serve as the "special master."
But in a non-binding report to the Senate, Goodlette rejected DeSantis' claims, said there was not enough evidence to support allegations that he was derelict in his oversight of the sheriff's office in the run-up to the shooting.
During questioning before the Senate Rules Committee on Monday, Goodlette told the Senate that his decision to reject the governor's suspension of a constitutional officer based on the evidence "offered to me" had been "a very, very close call."
In his report, however, he warned that if Israel were suspended on these grounds, it would set an "unworkable" precedent by which Florida's governor could remove just about anyone from office.
"Almost any elected official overseeing a large organization would be subject to removal at any time because even well-trained and supervised employees make grievous mistakes," Goodlette wrote the report released last month.
DeSantis, a Republican, made removing Israel from office a campaign promise. On Monday, the families of many of the victims, urged the Senate to keep his suspension intact. Two buses arrived from Broward County, many of the supporters wearing black T-shirts that read: "Why? … Neglect of duty … Failed leadership … incompetence."
Fred Guttenberg, whose daughter Jaime, 14, was killed during the shooting, said her death "is the result of the incompetence of the Broward Sheriff's Office,
"The former sheriff decided he is a victim of Feb. 14," Guttenberg said. "He is not."
The Senate has scheduled an 11-hour meeting of the Rules Committee to hear the testimony and make a recommendation to the full Senate, which will vote Wednesday. Security was unusually strict because Goodlette received a death threat after submitting his report.
Central to the debate will be the question of whether the Senate will establish a new precedent when removing a constitutional officer, especially one when it was a political promise like DeSantis' vow to the Parkland families.
Galvano, R-Bradenton, said Monday the Senate's role is not like a trial court and has allowed the governor to enter additional evidence not previously presented to Goodlette to be part of the hearing.
Senate Rules Committee Chair Lizbeth Benacquisto opened the meeting, urging colleagues to "weigh all the evidence," including anything they have obtained from their own private experience.
"The governor has not sustained the burden of proof," Goodlette told the Senate committee, adding that senators have the right to reach another conclusion. "It is conceptually impossible to address every piece of evidence that was provided."
He noted that the governor has since hired private counsel who submitted a brief before the Rules Committee hearing and "adds arguments that were not presented to me and I have not addressed those arguments."
Before the meeting, Israel's attorney, Benedict P. Kuehne, emphasized that it could be a violation of the sheriff's constitutional right to due process if the Senate were to consider evidence that he cannot challenge. Kuehne added that it is the Senate, not the governor, who has the power to remove a constitutional officer and if he is denied his due process rights, Israel can challenge it in federal court.
The Marjory Stoneman Douglas Public Safety Commission was charged with reviewing the warning signs to the shooting and assess the role of law enforcement and the school system. While it criticized the Broward County Sheriff's office, it stopped short of recommending that Israel be suspended.
Petty, the Parkland parent, who is a member of the commission, would not criticize the governor's lawyers, but he said "we looked at different sets of evidence" than Goodlette reviewed.
Goodlette told the Rules Committee that he concluded the school resource officers at the high school the day of the shooting were properly supervised and trained, but Deputy Scot Peterson, who was in charge, "had failed to execute on that." Peterson told the other deputies not to come closer to the building as shots were being fired.
"There are a lot of fingers to be pointed for this particular tragedy," Goodlette told the committee. He said did not agree with Israel, who has angered many for blaming others and reflecting responsibility.
For example, in response to questioning, Goodlette said had that had the governor's lawyers presented the responsibility for the failed radio system that delayed law enforcement's response to the shooting, as the responsibility of the sheriff, he may have come to a different conclusion.
Petty and other families have asked the Senate to now review all the MSD Commission's evidence "and make a decision based on that."
He said the commission's new draft report includes new findings about the failures and the changes by the new sheriff, Gregory Tony, "to address those failures.
When DeSantis replaced Israel three days from being inaugurated as governor, he appointed Tony, a former Coral Springs police officer who was running a security company out of state.
©2019 Miami Herald
Visit Miami Herald at www.miamiherald.com
MIT Professor Charged with Fraud in Chinese Trade Secret Theft Case
Trump to Depart Washington Wednesday, Ahead of Inauguration
Retired Army General to Lead Review of Security at the U.S. Capitol Complex
Wisconsin Reps. Urge Federal Leadership to Ensure Rural Communities Aren't Left Behind
Expanded Vaccine Rollout in US Spawns a New Set of Problems
Biden Unveils $1.9 Trillion COVID-19 Relief Plan
Former Trump Campaign Lawyer Sued by Voting Machine Company
Split-Ticket Voters Helped Biden Win Georgia. Can They Aid The GOP in The Runoffs?
Youth Voter Engagement Could Change Landscape of the Nation
by Sean Trambley
WASHINGTON — This week, U.S. Reps. Ron Kind, D-Wis., and Mike Gallagher, R-Wis., sent a bipartisan letter to Operation Warp Speed leadership urging them to consider the unique challenges of vaccine distribution to rural areas across Wisconsin and take steps to support timely and equitable vaccine... Read More
U.S. Space Command Gets New Headquarters in Alabama
by Tom Ramstack
WASHINGTON -- The Secretary of the Air Force announced Wednesday that Huntsville, Ala., will be the new headquarters of the U.S. Space Command. The announcement was welcomed in Alabama but criticized as an example of partisan politics by government officials in Colorado, where the Space Command... Read More
Telecommute Taxation: States Take Sides Over Out-of-State Income Tax Dispute
by Reece Nations
CONCORD, N.H. — A collection of 14 states have now signed amicus briefs backing New Hampshire in the state's appeal to the U.S. Supreme Court to determine whether jurisdictions may tax the income of remote workers who cannot commute to their workplaces. In October, New Hampshire... Read More
Gov. Little Announces Idaho's Fiscal 2022 State Budget, Prioritizes Tax Relief and More
by Sara Wilkerson
Earlier this week, Idaho Governor Brad Little announced his "Building Idaho's Future" plan, a comprehensive proposal that will impact the state's budget into 2022. The plan features more than $450 million in tax relief and strategic investments in critical infrastructure projects such as education, transportation, public... Read More
EXPLAINER: Why National Guard's Role Was Limited During Riot
by EXPLAINER: Why National Guard's Role Was Limited During Riot
WASHINGTON (AP) — In the aftermath of the deadly riot at the U.S. Capitol last week, questions are being raised about why the District of Columbia National Guard played such a limited role as civilian law enforcement officers were outnumbered and overrun. The questions also highlight... Read More
State Capitols Step Up Security Amid New Safety Concerns
by State Capitols Step Up Security Amid New Safety Concerns
State capitols across the nation stepped up security Monday, deploying National Guard units, SWAT teams and extra police officers while several legislatures convened amid heightened safety concerns following last week's violence at the U.S. Capitol. The protections came as the FBI issued a bulletin warning of... Read More
News From The Well
Submit Op-Ed
© 2021 The Well News™, LLC. All rights reserved.

redpajama_set_name: RedPajamaCommonCrawl


Combine all salad ingredients in bowl and mix well.
This works great with rotisserie chicken from the deli counter!
Serve on mixed greens or toasted roll.
Nutritional analysis per serving: Calories 187; Protein 15 g; Carbohydrate 13 g; Fat 9 g (44 percent calories from fat); Sat Fat 1 g (5% Calories from Saturated Fat); Cholesterol 43 mg; Sodium 401 mg; Fiber 1 g.


You need a fun way to show off your Bulldogs fanaticism when wearing your favorite tee! This Big Guy Sticky plaid tie will prove that your team spirit is always suited up and ready to go. It features a printed team mascot logo and wordmark over a team-colored plaid graphic. It will surely make you stand out as the #1 Georgia fanatic at the next game!