轮廓§

文章 评论 浏览 29

轮廓§ 2025-02-06 10:41:32

尝试

Get-AzureADServicePrincipal -All:$true | ? {$_.Tags -eq "WindowsAzureActiveDirectoryIntegratedApp"}

如果您在门户网站上查看,则会看到“企业应用程序”的计数,如果您分配了该过滤器(默认为默认分配)。

通过运行上述内容,如果您这样做:

$noofentapps = Get-AzureADServicePrincipal -All:$true | ? {$_.Tags -eq "WindowsAzureActiveDirectoryIntegratedApp"} 

然后您进行了$ noofentApps.counts.count,您会看到数字应该匹配。

Try

Get-AzureADServicePrincipal -All:$true | ? {$_.Tags -eq "WindowsAzureActiveDirectoryIntegratedApp"}

If you look in the portal, you will see the count of 'Enterprise Applications' if you have that filter assigned (it is assigned by default).

By running the above, if you did:

$noofentapps = Get-AzureADServicePrincipal -All:$true | ? {$_.Tags -eq "WindowsAzureActiveDirectoryIntegratedApp"} 

and then you did $noofentapps.count, you would see that the numbers should match.

仅通过Azure PowerShell获取企业应用程序

轮廓§ 2025-02-06 02:12:15

就我而言,我这样解决了。由于我在本地进行测试时,它是本地主机,因为生产消除了本地主机。

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;

@Configurable
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

    private String url = "http://localhost:4200";

    @Override
    public void registerStompEndpoints(StompEndpointRegistry registry) {
        registry.addEndpoint("/chat-websocket")
        .setAllowedOrigins(url)
        .withSockJS();

    }

    @Override
    public void configureMessageBroker(MessageBrokerRegistry registry) {
        registry.enableSimpleBroker("/chat/");
        registry.setApplicationDestinationPrefixes("/app");
    }

    @Bean
    WebMvcConfigurer corsConfig() {
        return new WebMvcConfigurer() {

            @Override
            public void addCorsMappings(CorsRegistry registry) {
                registry.addMapping("/ws/**")
                .allowedMethods("GET", "POST", "PUT", "DELETE")
                .allowedHeaders("*")
                .allowedOrigins(url);
            }
        };
    }

}

In my case I solved it like this. As I am testing it locally for that reason it is the localhost, for production remove the localhost.

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;

@Configurable
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

    private String url = "http://localhost:4200";

    @Override
    public void registerStompEndpoints(StompEndpointRegistry registry) {
        registry.addEndpoint("/chat-websocket")
        .setAllowedOrigins(url)
        .withSockJS();

    }

    @Override
    public void configureMessageBroker(MessageBrokerRegistry registry) {
        registry.enableSimpleBroker("/chat/");
        registry.setApplicationDestinationPrefixes("/app");
    }

    @Bean
    WebMvcConfigurer corsConfig() {
        return new WebMvcConfigurer() {

            @Override
            public void addCorsMappings(CorsRegistry registry) {
                registry.addMapping("/ws/**")
                .allowedMethods("GET", "POST", "PUT", "DELETE")
                .allowedHeaders("*")
                .allowedOrigins(url);
            }
        };
    }

}

如何修复CORS'访问控制 - 允许 - 孔子'在Spring Boot Websocket应用程序中?

轮廓§ 2025-02-06 00:44:30

不要设置内容类型,读取文档并使用addstringbody

request.AddStringBody(xmlString, "application/xml");
var response = await client.PostAsync(request);    

Don't set the content type, read the docs, and use AddStringBody

request.AddStringBody(xmlString, "application/xml");
var response = await client.PostAsync(request);    

使用RESTCLIENT发布使用RAW XML的文件

轮廓§ 2025-02-05 05:22:54

这可以通过使用新标志来实现。

.html

<div *ngIf="showTextForNodeId != node.key || !showText"
  (dblclick)="showTextbox(node.key)">
    <b>{{ node.label }}</b>
</div>
<div *ngIf="showTextForNodeId == node.key && showText">
  <input type="text"
    [value]="node.label"
    (blur)="updateNode($event.target.value, node.key)"
  />
</div>

.ts

showTextForNodeId = undefined;
showText = false;

showTextbox(key) {
  this.showTextForNodeId = key;
  this.showText = true;
}

updateNode(newName, key) {
  this.findAndUpdateNode(this.nodes, newName, key);

  this.showTextForNodeId = undefined;
  this.showText = false;
}

findAndUpdateNode(nodes, newName, key) {
  for (let i = 0; i < nodes.length; i++) {
    if (nodes[i].key == key) {
      nodes[i].label = newName;
    } else if (nodes[i].children) {
      this.findAndUpdateNode(nodes[i].children, newName, key);
    }
  }
}

PS:如果存在,请检查边缘案例。

This can be achieved by using new flags.

.html

<div *ngIf="showTextForNodeId != node.key || !showText"
  (dblclick)="showTextbox(node.key)">
    <b>{{ node.label }}</b>
</div>
<div *ngIf="showTextForNodeId == node.key && showText">
  <input type="text"
    [value]="node.label"
    (blur)="updateNode($event.target.value, node.key)"
  />
</div>

.ts

showTextForNodeId = undefined;
showText = false;

showTextbox(key) {
  this.showTextForNodeId = key;
  this.showText = true;
}

updateNode(newName, key) {
  this.findAndUpdateNode(this.nodes, newName, key);

  this.showTextForNodeId = undefined;
  this.showText = false;
}

findAndUpdateNode(nodes, newName, key) {
  for (let i = 0; i < nodes.length; i++) {
    if (nodes[i].key == key) {
      nodes[i].label = newName;
    } else if (nodes[i].children) {
      this.findAndUpdateNode(nodes[i].children, newName, key);
    }
  }
}

P.S.: Please check for the edge cases, if they exist.

需要在双击特定的Primeng树节点上显示文本框

轮廓§ 2025-02-04 01:12:33

我认为应该这样做,

let a = ['a','b','c','d'];
let b = [1,2,3,4];
let tempArray = [];
for(let i = 0;i<a.length;i++){
    
    let tempAttribute = {
        'name' : b[i],
        'value' : a[i]
    }
    tempArray.push(tempAttribute)
}
console.log(tempArray);

因为数据的下标是固定的,我们可以使用其下标做某事,您也可以使用其他循环方法。

I think it should be possible to do so

let a = ['a','b','c','d'];
let b = [1,2,3,4];
let tempArray = [];
for(let i = 0;i<a.length;i++){
    
    let tempAttribute = {
        'name' : b[i],
        'value' : a[i]
    }
    tempArray.push(tempAttribute)
}
console.log(tempArray);

Because the subscript of the data is fixed, we can use its subscript to do something, you can also use other looping methods.

如何在钥匙值对对象中添加文本

轮廓§ 2025-02-03 17:27:40

好的,我发现解决方案

打开了您的Admanager脚本,并在“启动”功能上编写此代码;

mobileads.setiosapppauseonbackground(true);

Ok, I find the solution

Open your AdManager Script and write this code at Start function;

MobileAds.SetiOSAppPauseOnBackground(true);

Unity iOS游戏不会停止在间隙广告上

轮廓§ 2025-02-03 14:48:48

https://pypi.org/project/project/project/flask-sessise-captcha/

也有同样的问题,然后我使用此选项更好地用于验证验证验证实际上

首先安装软件包,然后导入到您的代码
需要将其添加到app.py文件中

# import the package
from flask_session_captcha import FlaskSessionCaptcha

#config with your flask app
app.config["CAPTCHA_ENABLE"] = True
app.config["CAPTCHA_LENGTH"] = 5
app.config["CAPTCHA_WIDTH"] = 160
app.config["CAPTCHA_HEIGHT"] = 60
app.config["CAPTCHA_SESSION_KEY"] = 'captcha_image'
app.config['SESSION_TYPE'] = conn

captcha = FlaskSessionCaptcha(app)

#add this line to your main
if __name__ == "__main__":
    logging.getLogger().setLevel("DEBUG")
    app.run(host="0.0.0.0", port=5050, debug=True)

<form action="login" method="post">
<br>
<input type="text" class="form-control" name="username" placeholder="username" style="width:400px;" required>
<br>
<input type="password" class="form-control" name="password" placeholder="password" style="width:400px;" required>
<br>
<input type="text" class="form-control" name="captcha" style="width: 400px;">
<br>
   {{ captcha(css_class="captcha") }}
<br>
<input type="submit" class="btn btn-primary" value="LOGIN">

此代码您

https://pypi.org/project/flask-session-captcha/

i had also same problem then i use this option its better for captcha validation actually

first install the package and then import to your code
this codes you need to add it in your app.py file

# import the package
from flask_session_captcha import FlaskSessionCaptcha

#config with your flask app
app.config["CAPTCHA_ENABLE"] = True
app.config["CAPTCHA_LENGTH"] = 5
app.config["CAPTCHA_WIDTH"] = 160
app.config["CAPTCHA_HEIGHT"] = 60
app.config["CAPTCHA_SESSION_KEY"] = 'captcha_image'
app.config['SESSION_TYPE'] = conn

captcha = FlaskSessionCaptcha(app)

#add this line to your main
if __name__ == "__main__":
    logging.getLogger().setLevel("DEBUG")
    app.run(host="0.0.0.0", port=5050, debug=True)

Here's the front code code from login.html

<form action="login" method="post">
<br>
<input type="text" class="form-control" name="username" placeholder="username" style="width:400px;" required>
<br>
<input type="password" class="form-control" name="password" placeholder="password" style="width:400px;" required>
<br>
<input type="text" class="form-control" name="captcha" style="width: 400px;">
<br>
   {{ captcha(css_class="captcha") }}
<br>
<input type="submit" class="btn btn-primary" value="LOGIN">

it will definitely sort out your problem you dont need validate youreself this package will help you

我想在烧瓶中发送带有验证验证的帖子,但是在发送时,验证码将重新加载,不匹配以表格输入

轮廓§ 2025-02-03 09:03:09

这是对我有用的,

apiVersion: v1
kind: Pod
metadata:
  name: mc1
spec:
  volumes:
  - name: html
    emptyDir: {}
  containers:
  - name: 1st
    image: nginx
    command: ["/bin/sh", "-c"]
    args:
      - while true; do
          touch /usr/share/nginx/html/test.txt;
          ls /usr/share/nginx/html/;
          echo "file created cotnainer 1";
          sleep infinity;
        done
    volumeMounts:
    - name: html
      mountPath: /usr/share/nginx/html
  - name: 2nd
    image: debian
    volumeMounts:
    - name: html
      mountPath: /html
    command: ["/bin/sh", "-c"]
    args:
      - while true; do
          ls /html;
          rm /html/test.txt;
          echo "container 2 - file removed";
          ls /html;
          sleep 7200;
        done

我正在从容器1中创建一个文件,然后通过容器2删除您的文件?

This is what works for me

apiVersion: v1
kind: Pod
metadata:
  name: mc1
spec:
  volumes:
  - name: html
    emptyDir: {}
  containers:
  - name: 1st
    image: nginx
    command: ["/bin/sh", "-c"]
    args:
      - while true; do
          touch /usr/share/nginx/html/test.txt;
          ls /usr/share/nginx/html/;
          echo "file created cotnainer 1";
          sleep infinity;
        done
    volumeMounts:
    - name: html
      mountPath: /usr/share/nginx/html
  - name: 2nd
    image: debian
    volumeMounts:
    - name: html
      mountPath: /html
    command: ["/bin/sh", "-c"]
    args:
      - while true; do
          ls /html;
          rm /html/test.txt;
          echo "container 2 - file removed";
          ls /html;
          sleep 7200;
        done

i am creating a file from container 1 and getting removed by container 2 what error are you getting?

从一个容器中删除PRIOD的POD中的文件

轮廓§ 2025-02-03 05:07:22

我建议您使用官方的Flowbite React库:Flowbite-react将内置在组件中的更无缝集成和反应性系统。

根据您要使用的开发环境(例如:vite,next.js,remix等),随时可以阅读我们刚刚启动的新集成文档:

https://www.flowbite-react.com/docs/guides/guides/next-js

I suggest u to use the official Flowbite React library: flowbite-react to have a more seamless integration and reactivity system built into the components.

Depending on what development environment u want to use (eg: Vite, Next.js, Remix, etc), feel free to go read the new integration docs that we just launched:

https://www.flowbite-react.com/docs/guides/next-js

如何在我的React项目中导入FlowBite?

轮廓§ 2025-02-03 01:59:03

首先,这取决于Google所谓的材料设计。它具有某些必须遵循的准则,以实现最大的幻影主题优势。

Q1:DART通常是硬型语言。用例与另一个相似之处不同。例如,按钮样式的悬停颜色或飞溅颜色具有。虽然文字不需要此属性。但是他们俩都有前景的颜色。

Q2:正如我之前提到的,材料设计对于扑朔迷离提供的小部件至关重要。您可以使您的自定义小部件可以直接采用颜色,但我不建议这种方法。

Q3:在材料设计概念中,有两种主要的颜色类型,主要和强调颜色,这使得与色板的扑朔迷离。对于您的示例,首先创建红色色板并将其属性复制,并将辅助颜色更改为紫色。

  • 有关材料设计的更多信息,请阅读此信息
    link
  • 如何在扑朔迷离中实现它/Flutter-Material-Design/“ RER =” Nofollow Noreferrer”>本文

First of all It's all depending on what is called Material Design by Google. It has certain guidelines that must be followed to achieve maximum Flutter theming advantage.

Q1: Dart is hard-type language in general. And the use cases is different form widget to another, with some similarities. for example Button style has on hover color or splash color. while Text doesn't need this property. But both of them has foreground color.

Q2: As I mentioned before, Material Design is essential for the Widget that flutter provide. you can make your custom widget the can take Colors directly but I would not recommend this approach.

Q3:In Material Design concept, There is two main type of colors, Primary and accent colors, That's makes Flutter deal with Color Swatch. For your example First create red color swatch and copy it's property with changing the secondary color to purple.

  • For more information with Material Design in general read this
    link
  • How to implement it in flutter read this article

了解一些扑动设计决策

轮廓§ 2025-02-02 18:56:21

虽然我确定时区的历史变化是一个因素,但将PYTZ时区的对象传递给了DateTime构造器,即使是自成立以来就没有经历过变化的时区,也会导致奇怪的行为。

import datetime
import pytz 

dt = datetime.datetime(2020, 7, 15, 0, 0, tzinfo= pytz.timezone('US/Eastern'))

产生

2020-07-15 00:00:00-04:56

创建DateTime对象,然后将其本地化定位产生的预期结果

import datetime
import pytz 

dt = datetime.datetime(2020, 7, 15, 0, 0)
dt_local = timezone('US/Eastern').localize(dt)

会产生

2020-07-15 00:00:00-04:00

While I'm sure historic changes in timezones are a factor, passing pytz timezone object to the DateTime constructor results in odd behavior even for timezones that have experienced no changes since their inception.

import datetime
import pytz 

dt = datetime.datetime(2020, 7, 15, 0, 0, tzinfo= pytz.timezone('US/Eastern'))

produces

2020-07-15 00:00:00-04:56

Creating the datetime object then localizing it produced expected results

import datetime
import pytz 

dt = datetime.datetime(2020, 7, 15, 0, 0)
dt_local = timezone('US/Eastern').localize(dt)

produces

2020-07-15 00:00:00-04:00

pytz的怪异时区问题

轮廓§ 2025-02-02 18:06:19
const arr = [{
    object1: {
      childObj1: ['grandChild1', 'grandChild2'],
      childObj3: 't',
      childObj2: 'r'
    }
  },
  {
    object2: {
      childObj1: ['grandChild1', 'grandChild2'],
      childObj3: 't',
      childObj2: 'r'
    }
  },
  {
    object3: {
      childObj1: ['grandChild1', 'grandChild2'],
      childObj3: 't',
      childObj2: 'r'
    }
  },

];

console.log(arr.map(el => {
  const child = el[Object.keys(el)[0]];
  const firstProperty = {
    [Object.keys(child)[0]]: child[Object.keys(child)[0]]
  };
  return {
    [Object.keys(el)[0]]: firstProperty
  }
}));

希望这就是您想要的。

const arr = [{
    object1: {
      childObj1: ['grandChild1', 'grandChild2'],
      childObj3: 't',
      childObj2: 'r'
    }
  },
  {
    object2: {
      childObj1: ['grandChild1', 'grandChild2'],
      childObj3: 't',
      childObj2: 'r'
    }
  },
  {
    object3: {
      childObj1: ['grandChild1', 'grandChild2'],
      childObj3: 't',
      childObj2: 'r'
    }
  },

];

console.log(arr.map(el => {
  const child = el[Object.keys(el)[0]];
  const firstProperty = {
    [Object.keys(child)[0]]: child[Object.keys(child)[0]]
  };
  return {
    [Object.keys(el)[0]]: firstProperty
  }
}));

Hope this is what you wanted.

如何仅将一个对象保存在数组中的嵌套对象中

轮廓§ 2025-02-02 09:25:31

实际上,这个问题最初是由“自动” i而不是“ int” i引起的,但没有适当刷新。 Auto给了I未签名的INT类型,该类型溢出了[]运算符,或者导致无限循环从零转移到1844467444073709551615 I = 0周期完成并且执行I--被执行。

谢谢大家的有益答复!

The issue was in fact originally caused by "auto" i rather than "int" i, but not properly refreshed. Auto gave i an unsigned int type, which overflowed the [] operator, or caused infinite loop turning over from zero to 18446744073709551615 once the i = 0 cycle completes and i-- is executed.

Thank you everyone for the helpful replies!

幼稚的反向字符串迭代无限循环和/或断言失败C&#x2B;&#x2B; / Visual Studio 2022

轮廓§ 2025-02-02 06:46:57

使用RabbitMQ,对于真正的粉丝方法,对于每个消费者来说,最好将自己的队列绑定到交易所,并随着每个消费者将接收和消耗消息而不会影响其他消费者,

例如,诸如“销售代表”将订单发送给收银员,地点有多个销售代表和多个收银员。

销售代表发送

Channel.ExchangeDeclare(exchange: "cashieradd", ExchangeType.Fanout);
                var jsonResult = JsonConvert.SerializeObject(new CashierQueue()
                {
                    transactionId = transactionId
                });
                var body = Encoding.UTF8.GetBytes(jsonResult);

                Channel.BasicPublish(exchange: "cashieradd", routingKey: "", basicProperties: null, body: body);

每个收银员将订购的

        {
            var cashierAddQueue = Channel.QueueDeclare().QueueName;
            Channel.QueueBind(queue: cashierAddQueue, exchange: "cashieradd", routingKey: "");
            var consumer = new EventingBasicConsumer(Channel);
            Channel.BasicConsume(queue: cashierAddQueue, autoAck: true, consumer: consumer);
            return consumer;
        }

订单,该订单使用RabbitMQ动态队列,但是,消费者独特的任何队列都会产生相同的效果。

这里不一定需要一个路由关键

With RabbitMQ, for true FanOut method, its best for each consumer to have their own queue bind to the exchange, with this each consumer will receive and consume the message without affecting other consumers

with a scenario like, Sale Rep sends orders to Cashiers, where there are multiple sale reps and multiple cashiers.

Sale rep sends order

Channel.ExchangeDeclare(exchange: "cashieradd", ExchangeType.Fanout);
                var jsonResult = JsonConvert.SerializeObject(new CashierQueue()
                {
                    transactionId = transactionId
                });
                var body = Encoding.UTF8.GetBytes(jsonResult);

                Channel.BasicPublish(exchange: "cashieradd", routingKey: "", basicProperties: null, body: body);

Each cashier would subscribe to the exchange

        {
            var cashierAddQueue = Channel.QueueDeclare().QueueName;
            Channel.QueueBind(queue: cashierAddQueue, exchange: "cashieradd", routingKey: "");
            var consumer = new EventingBasicConsumer(Channel);
            Channel.BasicConsume(queue: cashierAddQueue, autoAck: true, consumer: consumer);
            return consumer;
        }

this uses the RabbitMQ Dynamic Queue, however, any queue unique to the consumer would have the same effect.

A routingkey here is not necessarily required

直接交换的多个消费者如何认可消息

轮廓§ 2025-02-02 04:15:44

You can use the ANSIBLE_GATHERING environment variable< /a>:

ansible_gathering =显式ansible -playbook playbook.yaml -i integrory.yaml

,除非播放明确设置gather_facts:true,否则收集事实将被禁用。

You can use the ANSIBLE_GATHERING environment variable:

ANSIBLE_GATHERING=explicit ansible-playbook playbook.yaml -i inventory.yaml

In this way, gathering facts is disabled unless the play has explicitly set gather_facts: True.

从命令行禁用Ansible Ansible收集事实

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文