小编Coo*_*eze的帖子

在Linux中运行.pkg文件

是否可以.pkg在Ubuntu或Fedora中运行文件.如果是这样,我该如何开始呢?

什么是.pkg文件?它是Mac系统中使用的文件格式(Apple Inc.)

有没有可以.pkg在Linux发行版中运行文件的替代方案?(特别是Ubuntu或Fedora,我在两个发行版中都使用了最新版本).

linux ubuntu fedora

12
推荐指数
1
解决办法
5万
查看次数

PHP中的防病毒集成

我想在我的代码中集成防病毒插件(在用户上传或下载时检查文件,如雅虎邮件).我们如何在PHP中集成防病毒组件?任何想法或帮助将不胜感激.谢谢一堆.

php integration antivirus

9
推荐指数
1
解决办法
4646
查看次数

在FPDF中显示值

这是我在php中使用FPDF生成pdf的代码.我想在PDF文件中显示学期,账单月和billyear.我不想在表格中显示值.
我想在页面顶部显示.我怎样才能做到这一点?有什么建议吗?提前致谢.干杯.

<?php

    session_start();
    require('fpdf/fpdf.php');

    //Connect to your database

    $r1=$_SESSION['sem1'];

    $con=mysql_connect('localhost','root','');

    if(!$con)
    {
    die('Unable to connect'.mysql_error());
    }
    mysql_select_db('hostel',$con);

    $result=mysql_query("SELECT r.hosteladmissionno,
           r.student_name,
           r.semester,
           r.blockname
           r.branch,
           m.billmonth,m.billyear ,
           (s.days_mess*perdayrate) AS mess_charges,
           m.perdayrate,
           s.days_mess,s.nv_tokens
           FROM registration r,student_month s,messexp m
           WHERE  s.hosteladmissionno = r.hosteladmissionno 
           AND r.mess_type=m.messtype
           AND m.billmonth = 'March' AND m.billyear= '2014'");
         $number_of_products = mysql_numrows($result);

    while($row = mysql_fetch_array($result))
    {
        $hostad = $row['hosteladmissionno'];
        $name = $row['student_name'];
        $block=$row['blockname'];
        $branch=$row['branch'];
        $perday=$row['perdayrate'];
        $days=$row['days_mess'];
        $messch= $row['mess_charges'];
        $nv=$row['nv_tokens'];




        $column_no = $column_no.$hostad."\n";
        $column_name = $column_name.$name."\n";
        $sem_details= $sem_details.$block."\n";
        $comm_details= $comm_details.$branch."\n";
        $course_details= …
Run Code Online (Sandbox Code Playgroud)

php mysql pdf-generation fpdf

7
推荐指数
1
解决办法
4277
查看次数

SQL注入攻击

如何保护我的网站免受SQL注入攻击?我使用PHP和MySQL.我必须改变我的mysql查询吗?

例如,我有一个这样的查询:

<?php
$q=$_GET["q"];// im getting the Q value from the other form,from drop down box[displaying data using Ajax
$a1=$_POST['hosteladmissionno'];
$a2=$_POST['student_name'];
$a3=$_POST['semester'];
$con = mysql_connect('localhost', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("hostel", $con);

$a1="SELECT  hosteladmissionno,student_name,semester FROM registration 
WHERE mess_type ".$q."' AND  status_flag=1";

$result = mysql_query($a1);

if ($result === false) {

    die(mysql_error());
}
echo "<table border='1' width=80%>
<tr>
 <th width=5%> S.No</th>
<th width=10%>H.Admin No</th>
<th width=10%>Student Name</th>
<th width=5%>No of Days</th>
</tr>";
 $i=0;
while($row = …
Run Code Online (Sandbox Code Playgroud)

php mysql sql sql-injection

5
推荐指数
1
解决办法
1486
查看次数

如何使ng e2e在可用端口上运行?

升级到Angular 6后,ng e2e无法在可用端口上运行。例如,如果您使用的是以前版本的Angular(我们以前使用的是4),则您的应用程序服务将在端口号4200中,而当我们同时运行时ng e2e,它会选择一个空闲端口(例如49152)来运行测试。

Angular 6升级后,当我尝试在类似情况下运行测试时,它失败,并显示错误消息“端口4200已在使用中”。

我不想--port {port number}出于CI的目的手动传递给命令,因为硬编码端口号将在CI中并行执行时遇到问题。升级到Angular 6时出现问题,我应该更改配置吗?

typescript protractor e2e-testing angular

4
推荐指数
1
解决办法
784
查看次数

Mysql乘法运算

如何在Mysql查询中执行乘法运算?

如果我的查询是这样的:

"SELECT registration.hosteladmissionno,
   registration.student_name,
   registration.semester,
   student_month.hosteladmissionno,
   student_month.student_name,
   student_month.semester,
   messexp.billmonth,messexp.billyear ,messexp.perdayrate,student_month.days_mess
   FROM registration,
    student_month ,messexp,blockexp
   WHERE  student_month.hosteladmissionno = registration.hosteladmissionno
    ";
Run Code Online (Sandbox Code Playgroud)

如何在此查询中执行乘法运算?说..乘法运算btw days_mess和

php mysql sql

3
推荐指数
1
解决办法
1万
查看次数

httpd.conf和ssl.conf之间的区别

httpd.conf(/etc/httpd/conf/httpd.conf)ssl.conf(/etc/httpd/conf.d/ssl.conf)文件有什么区别?

我正在尝试在我的网站上设置ssl,发现这些文件有类似的令牌.

任何帮助,将不胜感激.

apache ssl httpd.conf

3
推荐指数
1
解决办法
4603
查看次数

如何在SVN存储库中列出大于1 GB的文件

我需要一个命令来列出SVN存储库中大于1GB的文件.我如何实现这一点,如果有人可以帮助我完成命令,那就太好了.

我正在使用命令行客户端来实现这一目标.

谢谢你的帮助.

编辑内容:

我试过这个命令:

svn list --verbose --recursive file://path/to/repo | du -sh * | grep G 
Run Code Online (Sandbox Code Playgroud)

这个命令是安全的,可以返回大于1 gig的文件,还是有任何备用命令可以运行?

linux svn

3
推荐指数
1
解决办法
876
查看次数

允许 JSON 中存在多个 K8s 资源

我有一个 YAML 文件,其中包含多个资源部署和服务。

apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: petclinic
  name: petclinic
spec:
  replicas: 1
  selector:
    matchLabels:
      app: petclinic
  strategy: {}
  template:
    metadata:
      labels:
        app: petclinic
    spec:
      containers:
        - image: arey/springboot-petclinic
          name: springboot-petclinic
          resources: {}
          ports:
            - containerPort: 8080
status: {}
---
apiVersion: v1
kind: Service
metadata:
  name: petclinic
spec:
  type: LoadBalancer
  selector:
    app: petclinic
  ports:
    - port: 8080
      targetPort: 8080
      protocol: TCP
      name: http
Run Code Online (Sandbox Code Playgroud)

我正在用 JSON 创建一个类似的文件。我能够使用 JSON 创建部署资源并成功部署,但是当我尝试包含服务资源时,它失败了。任何有关我出错的地方的帮助将不胜感激。下面是 JSON 的片段。

{
   "apiVersion": "apps/v1",
   "kind": "Deployment", …
Run Code Online (Sandbox Code Playgroud)

json yaml kubernetes

1
推荐指数
1
解决办法
1207
查看次数