小编Git*_*itz的帖子

在Justified Gallery中悬停图标

我正在创建图像网格,我正在使用以下库Justified Gallery.悬停效果适用于该img-alt属性.但我想在悬停上显示一些带链接的图标.如下图所示

在此输入图像描述

看看下面的小提琴

https://jsfiddle.net/zvj2o7fy/1/embedded/result/

<div id="justifiedGallery">
  <a href="#" title="What's your destination?">
    <img alt="What's your destination?" src="http://lorempixel.com/340/227/?1" />
  </a>
  <a href="#" title="Just in a dream Place">
    <img alt="Just in a dream Place" src="http://lorempixel.com/340/227/?1" />
  </a>
  <a href="#" title="Il Capo at Palermo">
    <img alt="Il Capo at Palermo" src="http://lorempixel.com/300/226/?1" />
  </a>
  <a href="#" title="Erice">
    <img alt="Erice" src="http://lorempixel.com/340/227/?1" />
  </a>
  <a href="#" title="Truthful Innocence">
    <img alt="Truthful Innocence" src="http://lorempixel.com/240/227/?1" />
  </a>
  <a href="#" title="Truthful Innocence">
    <img alt="Truthful Innocence" src="http://lorempixel.com/127/300/?1" />
  </a> …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

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

树形视图的已检查更改事件不起作用

我正在使用Treeview控件,并且正在使用以下代码

  <asp:TreeView ID="tvCategories" ShowCheckBox="False" Style="font-family: Trebuchet MS;
                                    margin-top: 5px; margin-bottom: 5px; margin-left: 20px; color: Black; font-size: 12px"
                                    runat="server" ShowLines="true" NodeIndent="5" OnTreeNodeCheckChanged="tvCategories_TreeNodeCheckChanged"
                                    OnSelectedNodeChanged="tvCategories_SelectedNodeChanged">
                                    <LeafNodeStyle ForeColor="#555555" />
                                    <ParentNodeStyle ForeColor="Black" />
                                    <RootNodeStyle ForeColor="Black" />
                                </asp:TreeView>
Run Code Online (Sandbox Code Playgroud)

无论是OnTreeNodeCheckChangedOnSelectedNodeChanged没有工作和AutoPostBack财产不可用于Treeview

请帮我解决这个问题。谢谢

c# asp.net treeview

5
推荐指数
2
解决办法
2545
查看次数

如何快速按月份对日期数组进行分组?

我正在开发一个日程安排应用程序。我想要给定月份的所有日期我无法按月份对日期进行分组,这是我尝试过的,但我想要不同的预期结果

\n\n
extension Date {\n    static func dates(from fromDate: Date, to toDate: Date) -> [Date] {\n        var dates: [Date] = []\n        var date = fromDate\n\n        while date <= toDate {\n            dates.append(date)\n            guard let newDate = Calendar.current.date(byAdding: .day, value: 1, to: date) else { break }\n            date = newDate\n        }\n        return dates\n    }\n    var month: Int {\n        return Calendar.current.component(.month, from: self)\n    }\n}\n\nlet fromDate = Calendar.current.date(byAdding: .day, value: 30, to: Date())\nlet datesBetweenArray = Date.dates(from: Date(), to: fromDate!)\nvar sortedDatesByMonth: [[Date]] = []\nlet filterDatesByMonth …
Run Code Online (Sandbox Code Playgroud)

ios swift

5
推荐指数
2
解决办法
4010
查看次数

使用NEWID()从表中检索随机行

我有一个SQL查询,我正在使用distinct语句

   CREATE proc SProc_SelectPhotographersByLocation         
@locationID varchar(500)          
as            
begin          


DECLARE @TEST varchar(1000)          
DECLARE @SQLQuery AS NVARCHAR(1000)          

SET @TEST = @locationID          

SET @SQLQuery = 'select distinct ContributerSubCategoryMapping.ContributorID,  PhotographerContributors_tbl.*  from ContributerSubCategoryMapping               
  left outer join PhotographerContributors_tbl on PhotographerContributors_tbl.ContributorId=ContributerSubCategoryMapping.ContributorID              
  left outer join tbl_City on tbl_City.CityID=PhotographerContributors_tbl.Location              
  where         
  PhotographerContributors_tbl.Location IN('+ @locationID +') and PhotographerContributors_tbl.IsActive=''1'' order by Newid()'          
EXECUTE(@SQLQuery)          

end
Run Code Online (Sandbox Code Playgroud)

当我NEWID()在该查询上使用时,我收到查询错误.错误是

如果指定了SELECT DISTINCT,则ORDER BY项必须出现在选择列表中.

请帮我解决这个问题

sql sql-server

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

在asp.net中每10分钟打开一次弹出窗口?

我试图在每10分钟的时间间隔打开弹出窗口并在15秒内自动关闭.

以下代码用于弹出窗口,打开进入点击事件但我想自动打开10分钟的时间间隔.

<script type="text/javascript">
    $("[id*=btnPopup]").live("click", function () {
        $("#dialog").dialog({
            title: "jQuery Dialog Popup",
            buttons: {
                Close: function () {
                    $(this).dialog('close');
                }
            }
        });
        return false;
    });
</script>

<div id="dialog" style="display: none">
    This is a simple popup
</div>
Run Code Online (Sandbox Code Playgroud)

请帮忙 :(

asp.net jquery

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

如何在Amazon S3存储桶中创建子目录

我正在使用Amazon S3 Web服务,但无法在我的存储桶上创建子目录。

我想要这样的东西

用户上载文件时,会在S3 Bucket上创建一个名为user id的子目录,并将文件存储在该子目录中。

我正在使用以下代码

 AmazonS3Client s3Client = new AmazonS3Client("AWSAccessKey", "AWSSecretKey", Amazon.RegionEndpoint.APSoutheast1);  

    protected void btnUpload_Click(object sender, EventArgs e)
    {

        if (!string.IsNullOrEmpty(fileUpload.FileName))
        {
            //Saving File to local disk folder.
            string filePath = Server.MapPath("aa") + "\\" + fileUpload.FileName;
            string fileExtension = fileUpload.FileName.Substring(fileUpload.FileName.LastIndexOf(".") + 1);
            fileUpload.SaveAs(filePath);
            string contentType = GetContentType(fileExtension);    

            //Push the given object into S3 Bucket
            PutObjectRequest objReq = new PutObjectRequest
            {
                Key = fileUpload.FileName,
                FilePath =  filePath,
                ContentType = contentType,
                BucketName = "datastore.MyData",
                CannedACL = S3CannedACL.Private,               

            };

            PutObjectResponse …
Run Code Online (Sandbox Code Playgroud)

c# amazon-s3 amazon-web-services

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

如何在c#中返回数据表和整数

我正在创建一个返回值datatable 和一个int值的方法.我创建了一个只返回的方法datatable.请查看代码

    public static  DataTable ShutterstockSearchResults(string url)
    { 

       int TotalCont=0;

        DataTable dt = new DataTable();
        try
        {
            //intigration using Basic Aouth with authrization headers

            var request = (HttpWebRequest)WebRequest.Create(url);
            var username = "SC";
            var password = "SK";
            string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password));
            request.Headers[HttpRequestHeader.Authorization] = string.Format("Basic {0}", credentials);
            request.UserAgent = "MyApp 1.0";
            var response = (HttpWebResponse)request.GetResponse();
            using (var stream = response.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                JavaScriptSerializer js = new JavaScriptSerializer();
                var …
Run Code Online (Sandbox Code Playgroud)

c# datatable

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