当前位置: 首页 > 编程日记 > 正文

(C#加密)幻术-大踲无形

首先:我看下面的代码只是知道大概的原理核心算法还是不太清楚~~有清楚的麻烦回复下谢谢咯咯
--这也是看Msdn就是把在一个图片上隐藏数据

None.gifusing System;
None.gif
using System.Drawing;
None.gif
using System.Collections;
None.gif
using System.ComponentModel;
None.gif
using System.Windows.Forms;
None.gif
using System.Data;
None.gif
None.gif
using System.Text; 
None.gif
None.gif
namespace Steganography
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// Summary description for SteganographyForm.
ExpandedSubBlockEnd.gif    
/// </summary>

InBlock.gif    public class SteganographyForm : System.Windows.Forms.Form
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
private System.Windows.Forms.Button buttonHideMessage;
InBlock.gif        
private System.Windows.Forms.Panel panelOriginalImage;
InBlock.gif        
private System.Windows.Forms.TextBox textBoxOriginalMessage;
InBlock.gif        
private System.Windows.Forms.Panel panelModifiedImage;
InBlock.gif        
private System.Windows.Forms.GroupBox groupBox1;
InBlock.gif        
private System.Windows.Forms.GroupBox groupBox3;
InBlock.gif        
private System.Windows.Forms.GroupBox groupBox4;
InBlock.gif        
private System.Windows.Forms.Button buttonExtractMessage;
InBlock.gif        
private System.Windows.Forms.TextBox textBoxExtractedlMessage;
InBlock.gif        
private System.Windows.Forms.GroupBox groupBox2;
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// Required designer variable.
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        private System.ComponentModel.Container components = null;
InBlock.gif
InBlock.gif        
public SteganographyForm()
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
//
InBlock.gif            
// Required for Windows Form Designer support
InBlock.gif            
//
InBlock.gif
            InitializeComponent();
InBlock.gif
InBlock.gif            
//
InBlock.gif            
// TODO: Add any constructor code after InitializeComponent call
InBlock.gif            
//
InBlock.gif
            try
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//load original bitmap from a file
InBlock.gif
                bitmapOriginal = (Bitmap)Bitmap.FromFile(
InBlock.gif                    
@"..\..\katie_plaintext.jpg");
InBlock.gif
InBlock.gif                
//center to screen
InBlock.gif
                this.CenterToScreen( );
ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                MessageBox.Show(
InBlock.gif                    
"Error loading image. " + 
InBlock.gif                    ex.Message );
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// Clean up any resources being used.
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        protected override void Dispose( bool disposing )
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
if( disposing )
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
if (components != null
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    components.Dispose();
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            
base.Dispose( disposing );
ExpandedSubBlockEnd.gif        }

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
Windows Form Designer generated code#region Windows Form Designer generated code
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// Required method for Designer support - do not modify
InBlock.gif        
/// the contents of this method with the code editor.
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        private void InitializeComponent()
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this.buttonHideMessage = new System.Windows.Forms.Button();
InBlock.gif            
this.panelOriginalImage = new System.Windows.Forms.Panel();
InBlock.gif            
this.textBoxOriginalMessage = new System.Windows.Forms.TextBox();
InBlock.gif            
this.panelModifiedImage = new System.Windows.Forms.Panel();
InBlock.gif            
this.groupBox1 = new System.Windows.Forms.GroupBox();
InBlock.gif            
this.groupBox3 = new System.Windows.Forms.GroupBox();
InBlock.gif            
this.groupBox4 = new System.Windows.Forms.GroupBox();
InBlock.gif            
this.buttonExtractMessage = new System.Windows.Forms.Button();
InBlock.gif            
this.textBoxExtractedlMessage = new System.Windows.Forms.TextBox();
InBlock.gif            
this.groupBox2 = new System.Windows.Forms.GroupBox();
InBlock.gif            
this.SuspendLayout();
InBlock.gif            
// 
InBlock.gif            
// buttonHideMessage
InBlock.gif            
// 
InBlock.gif
            this.buttonHideMessage.Location = new System.Drawing.Point(10594);
InBlock.gif            
this.buttonHideMessage.Name = "buttonHideMessage";
InBlock.gif            
this.buttonHideMessage.Size = new System.Drawing.Size(14425);
InBlock.gif            
this.buttonHideMessage.TabIndex = 0;
InBlock.gif            
this.buttonHideMessage.Text = "Hide Message";
InBlock.gif            
this.buttonHideMessage.Click += new System.EventHandler(this.buttonHideMessage_Click);
InBlock.gif            
// 
InBlock.gif            
// panelOriginalImage
InBlock.gif            
// 
InBlock.gif
            this.panelOriginalImage.Location = new System.Drawing.Point(1926);
InBlock.gif            
this.panelOriginalImage.Name = "panelOriginalImage";
InBlock.gif            
this.panelOriginalImage.Size = new System.Drawing.Size(412521);
InBlock.gif            
this.panelOriginalImage.TabIndex = 0;
InBlock.gif            
// 
InBlock.gif            
// textBoxOriginalMessage
InBlock.gif            
// 
InBlock.gif
            this.textBoxOriginalMessage.Location = new System.Drawing.Point(182594);
InBlock.gif            
this.textBoxOriginalMessage.Name = "textBoxOriginalMessage";
InBlock.gif            
this.textBoxOriginalMessage.Size = new System.Drawing.Size(24021);
InBlock.gif            
this.textBoxOriginalMessage.TabIndex = 1;
InBlock.gif            
// 
InBlock.gif            
// panelModifiedImage
InBlock.gif            
// 
InBlock.gif
            this.panelModifiedImage.Location = new System.Drawing.Point(46126);
InBlock.gif            
this.panelModifiedImage.Name = "panelModifiedImage";
InBlock.gif            
this.panelModifiedImage.Size = new System.Drawing.Size(411521);
InBlock.gif            
this.panelModifiedImage.TabIndex = 0;
InBlock.gif            
// 
InBlock.gif            
// groupBox1
InBlock.gif            
// 
InBlock.gif
            this.groupBox1.Location = new System.Drawing.Point(163569);
InBlock.gif            
this.groupBox1.Name = "groupBox1";
InBlock.gif            
this.groupBox1.Size = new System.Drawing.Size(27960);
InBlock.gif            
this.groupBox1.TabIndex = 3;
InBlock.gif            
this.groupBox1.TabStop = false;
InBlock.gif            
this.groupBox1.Text = "Original Message";
InBlock.gif            
// 
InBlock.gif            
// groupBox3
InBlock.gif            
// 
InBlock.gif
            this.groupBox3.Location = new System.Drawing.Point(109);
InBlock.gif            
this.groupBox3.Name = "groupBox3";
InBlock.gif            
this.groupBox3.Size = new System.Drawing.Size(432551);
InBlock.gif            
this.groupBox3.TabIndex = 3;
InBlock.gif            
this.groupBox3.TabStop = false;
InBlock.gif            
this.groupBox3.Text = "Original Image";
InBlock.gif            
// 
InBlock.gif            
// groupBox4
InBlock.gif            
// 
InBlock.gif
            this.groupBox4.Location = new System.Drawing.Point(4519);
InBlock.gif            
this.groupBox4.Name = "groupBox4";
InBlock.gif            
this.groupBox4.Size = new System.Drawing.Size(432551);
InBlock.gif            
this.groupBox4.TabIndex = 3;
InBlock.gif            
this.groupBox4.TabStop = false;
InBlock.gif            
this.groupBox4.Text = "Modified Image";
InBlock.gif            
// 
InBlock.gif            
// buttonExtractMessage
InBlock.gif            
// 
InBlock.gif
            this.buttonExtractMessage.Location = new System.Drawing.Point(451594);
InBlock.gif            
this.buttonExtractMessage.Name = "buttonExtractMessage";
InBlock.gif            
this.buttonExtractMessage.Size = new System.Drawing.Size(14425);
InBlock.gif            
this.buttonExtractMessage.TabIndex = 2;
InBlock.gif            
this.buttonExtractMessage.Text = "Extract Message";
InBlock.gif            
this.buttonExtractMessage.Click += new System.EventHandler(this.buttonExtractMessage_Click);
InBlock.gif            
// 
InBlock.gif            
// textBoxExtractedlMessage
InBlock.gif            
// 
InBlock.gif
            this.textBoxExtractedlMessage.Location = new System.Drawing.Point(624594);
InBlock.gif            
this.textBoxExtractedlMessage.Name = "textBoxExtractedlMessage";
InBlock.gif            
this.textBoxExtractedlMessage.ReadOnly = true;
InBlock.gif            
this.textBoxExtractedlMessage.Size = new System.Drawing.Size(24021);
InBlock.gif            
this.textBoxExtractedlMessage.TabIndex = 3;
InBlock.gif            
// 
InBlock.gif            
// groupBox2
InBlock.gif            
// 
InBlock.gif
            this.groupBox2.Location = new System.Drawing.Point(605569);
InBlock.gif            
this.groupBox2.Name = "groupBox2";
InBlock.gif            
this.groupBox2.Size = new System.Drawing.Size(27860);
InBlock.gif            
this.groupBox2.TabIndex = 3;
InBlock.gif            
this.groupBox2.TabStop = false;
InBlock.gif            
this.groupBox2.Text = "Extractedl Message";
InBlock.gif            
// 
InBlock.gif            
// SteganographyForm
InBlock.gif            
// 
InBlock.gif
            this.AutoScaleBaseSize = new System.Drawing.Size(614);
InBlock.gif            
this.ClientSize = new System.Drawing.Size(930672);
InBlock.gif            
this.Controls.Add(this.textBoxOriginalMessage);
InBlock.gif            
this.Controls.Add(this.buttonHideMessage);
InBlock.gif            
this.Controls.Add(this.panelModifiedImage);
InBlock.gif            
this.Controls.Add(this.groupBox1);
InBlock.gif            
this.Controls.Add(this.panelOriginalImage);
InBlock.gif            
this.Controls.Add(this.groupBox3);
InBlock.gif            
this.Controls.Add(this.groupBox4);
InBlock.gif            
this.Controls.Add(this.buttonExtractMessage);
InBlock.gif            
this.Controls.Add(this.textBoxExtractedlMessage);
InBlock.gif            
this.Controls.Add(this.groupBox2);
InBlock.gif            
this.Name = "SteganographyForm";
InBlock.gif            
this.Text = "Steganography";
InBlock.gif            
this.Paint += new System.Windows.Forms.PaintEventHandler(this.SteganographyForm_Paint);
InBlock.gif            
this.ResumeLayout(false);
InBlock.gif            
this.PerformLayout();
InBlock.gif
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif        
#endregion

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// The main entry point for the application.
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        [STAThread]
InBlock.gif        
static void Main() 
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            Application.Run(
new SteganographyForm());
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        
private void SteganographyForm_Paint(
InBlock.gif            
object sender, 
InBlock.gif            System.Windows.Forms.PaintEventArgs e)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
try
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//get Graphics object for painting original
InBlock.gif
                Graphics gPanelOriginal = 
InBlock.gif                    Graphics.FromHwnd(
InBlock.gif                        panelOriginalImage.Handle);
InBlock.gif
InBlock.gif                
//draw original bitmap into panel
InBlock.gif
                gPanelOriginal.DrawImage(
InBlock.gif                    bitmapOriginal, 
new Point(0 ,0));
InBlock.gif
InBlock.gif                
//return if there is no modified image yet
InBlock.gif
                if (bitmapModified==null)
InBlock.gif                    
return;
InBlock.gif
InBlock.gif                
//get Graphics object for painting modified
InBlock.gif
                Graphics gPanelModified = 
InBlock.gif                    Graphics.FromHwnd(
InBlock.gif                        panelModifiedImage.Handle);
InBlock.gif
InBlock.gif                
//draw modified bitmap into panel
InBlock.gif
                gPanelModified.DrawImage(
InBlock.gif                    bitmapModified, 
new Point(0 ,0));
ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                MessageBox.Show(
InBlock.gif                    
"Error drawing image." +
InBlock.gif                    ex.Message);
InBlock.gif                
this.Close( );
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        
private void buttonHideMessage_Click(
InBlock.gif            
object sender, System.EventArgs e)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
try
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//show wait cursor
InBlock.gif
                this.Cursor = Cursors.WaitCursor;
InBlock.gif
InBlock.gif                
//start off with copy of original image
InBlock.gif
                bitmapModified = new Bitmap(
InBlock.gif                    bitmapOriginal, 
InBlock.gif                    bitmapOriginal.Width, 
InBlock.gif                    bitmapOriginal.Height);
InBlock.gif
InBlock.gif                
//get original message to be hidden
InBlock.gif
                int numberbytes = 
InBlock.gif                    (
byte)textBoxOriginalMessage.Text.Length;
InBlock.gif                
byte[] bytesOriginal = new byte[numberbytes+1];
InBlock.gif                bytesOriginal[
0= (byte)numberbytes;
InBlock.gif                Encoding.UTF8.GetBytes(
InBlock.gif                    textBoxOriginalMessage.Text,
InBlock.gif                    
0,
InBlock.gif                    textBoxOriginalMessage.Text.Length,
InBlock.gif                    bytesOriginal,
InBlock.gif                    
1);
InBlock.gif
InBlock.gif                
//set bits 1, 2, 3 of byte into LSB red
InBlock.gif                
//set bits 4, 5, 6 of byte into LSB green
InBlock.gif                
//set bits 7 and 8 of byte into LSB blue
InBlock.gif
                int byteCount = 0;//----一列一列搞定
InBlock.gif
                for (int i=0; i<bitmapOriginal.Width; i++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
for (int j=0; j<bitmapOriginal.Height; j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
if (bytesOriginal.Length==byteCount)
InBlock.gif                            
return;
InBlock.gif                        
//---返回当前循环的坐标点的颜色数据
InBlock.gif
                        Color clrPixelOriginal = 
InBlock.gif                            bitmapOriginal.GetPixel(i, j);
InBlock.gif                        
//为基元整型类型、枚举类型和 boolean 类型预定义了二元 | 运算符。对于基元整型类型和枚举类型,| 计算操作数的按位“或”。
InBlock.gif                        
//--注意这里是对~~血迹之术-的实际应用中的变种
InBlock.gif                        
//--这里的算法还是不太清楚估计是-防止三元素重合成1点后产生的错位--如果大大们知道麻烦告诉我下
InBlock.gif
                        byte r = 
InBlock.gif                            (
byte)((clrPixelOriginal.R & ~0x7|
InBlock.gif                            (bytesOriginal[byteCount]
>>0)&0x7);
InBlock.gif                        
byte g = 
InBlock.gif                            (
byte)((clrPixelOriginal.G & ~0x7|
InBlock.gif                            (bytesOriginal[byteCount]
>>3)&0x7);
InBlock.gif                        
byte b = 
InBlock.gif                            (
byte)((clrPixelOriginal.B & ~0x3|
InBlock.gif                            (bytesOriginal[byteCount]
>>6)&0x3);
InBlock.gif                        byteCount
++;
InBlock.gif
InBlock.gif                        
//set pixel to modified color
InBlock.gif
                        bitmapModified.SetPixel(
InBlock.gif                            i, j, Color.FromArgb(r, g, b));
ExpandedSubBlockEnd.gif                    }

InBlock.gif
InBlock.gif                   
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                MessageBox.Show(
InBlock.gif                    
"Error hiding message." +
InBlock.gif                    ex.Message);
ExpandedSubBlockEnd.gif            }

InBlock.gif            
finally
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//show normal cursor
InBlock.gif
                this.Cursor = Cursors.Arrow;
InBlock.gif
InBlock.gif                
//repaint
InBlock.gif
                Invalidate();
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        
private void buttonExtractMessage_Click(
InBlock.gif            
object sender, System.EventArgs e)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
//get bytes of message from modified image
InBlock.gif
            byte[] bytesExtracted = new byte [256+1];
InBlock.gif            
try
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//show wait cursor, can be time-consuming
InBlock.gif
                this.Cursor = Cursors.WaitCursor;
InBlock.gif                
InBlock.gif                
//get bits 1, 2, 3 of byte from LSB red
InBlock.gif                
//get bits 4, 5, 6 of byte from LSB green
InBlock.gif                
//get bits 7 and 8 of byte from LSB blue
InBlock.gif
                int byteCount = 0;
InBlock.gif                
for (int i=0; i<bitmapModified.Width; i++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
for (int j=0; j<bitmapModified.Height; j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
if (bytesExtracted.Length==byteCount)
InBlock.gif                            
return;
InBlock.gif
InBlock.gif                        Color clrPixelModified 
= 
InBlock.gif                            bitmapModified.GetPixel(i, j);
InBlock.gif                        
byte bits123 = 
InBlock.gif                            (
byte)((clrPixelModified.R&0x7)<<0);
InBlock.gif                        
byte bits456 = (
InBlock.gif                            
byte)((clrPixelModified.G&0x7)<<3);
InBlock.gif                        
byte bits78  = (
InBlock.gif                            
byte)((clrPixelModified.B&0x3)<<6);
InBlock.gif                    
InBlock.gif                        bytesExtracted[byteCount] 
= 
InBlock.gif                            (
byte)(bits78 |bits456 | bits123);
InBlock.gif                        byteCount
++;
ExpandedSubBlockEnd.gif                    }

InBlock.gif
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                MessageBox.Show(
InBlock.gif                    
"Error extracting message." +
InBlock.gif                    ex.Message);
ExpandedSubBlockEnd.gif            }

InBlock.gif            
finally
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//show normal cursor
InBlock.gif
                this.Cursor = Cursors.Arrow;
InBlock.gif
InBlock.gif                
//get number of bytes from start of array
InBlock.gif
                int numberbytes = bytesExtracted[0];
InBlock.gif
InBlock.gif                
//get remaining bytes in array into string
InBlock.gif
                textBoxExtractedlMessage.Text =  
InBlock.gif                    Encoding.UTF8.GetString(
InBlock.gif                    bytesExtracted,
InBlock.gif                    
1,
InBlock.gif                    numberbytes);
ExpandedSubBlockEnd.gif            }
        
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        
//shared private fields
InBlock.gif
        private Bitmap bitmapOriginal;
InBlock.gif        
private Bitmap bitmapModified;
ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}

None.gif

转载于:https://www.cnblogs.com/ajaxren/archive/2007/04/23/724489.html

相关文章:

01 python爬虫

--- 转载于:https://www.cnblogs.com/haima/p/10107708.html

【BZOJ3963】[WF2011]MachineWorks cdq分治+斜率优化

【BZOJ3963】[WF2011]MachineWorks Description 你是任意性复杂机器公司(Arbitrarily Complex Machines, ACM)的经理&#xff0c;公司使用更加先进的机械设备生产先进的机器。原来的那一台生产机器已经坏了&#xff0c;所以你要去为公司买一台新的生产机器。你的任务是在转型期…

金山发布《2006年度信息安全报告》

2006年度&#xff0c;国内的互联网环境因接踵而至的信息安全事件一再掀起了波澜。作为国内领先的信息安全厂商&#xff0c;金山毒霸同数千万国内用户一起见证了对病毒、对流氓软件发出的各种绝技杀手锏。 2007年2月8日&#xff0c;金山软件正式发布了《中国互联网2006年度信息安…

Nginx+Apache Yii2.0 配置方案

最近用Yii2.0框架做了个小项目&#xff0c;虽然项目本身业务逻辑不复杂&#xff0c;但是由于本身业务逻辑的特殊性&#xff0c;在上午9点到12点之间系统访问量会突然上升&#xff08;浏览量和用户上传文件量&#xff09;。导致系统单纯的部署在Apache下&#xff0c;支撑不了这么…

RobotFramework下的http接口自动化Set Request Body 关键字的使用

Set Request Body关键字用来设置http 请求时的body 信息&#xff0c;尤其是在post 请求时&#xff0c;经常需要用到这个关键字。 该关键字接收一个参数&#xff0c;[ body ] 示例1&#xff1a;登录博客园&#xff08;http://www.cnblogs.com/&#xff09;时&#xff0c;设置登录…

JDK11使用IDEA,配置JavaFX

JDK11使用IDEA&#xff0c;配置JavaFX1.下载javaFX相关的包2.在实际Demo中试验哪里少了添加哪里导入lib文件夹&#xff0c;之后点击OK配置VMoption配置成功3.运行&#xff0c;大功告成1.下载javaFX相关的包 需要下载对应的包&#xff0c;进入openjfx.cn网站下载 https://gluon…

写了一个PPT,用于公司内部培训

匆忙写成&#xff0c;以后会慢慢补充请用力一击中等规模的并发程序设计http://files.cnblogs.com/jobs/2007-5-9-concurrent-ppt.rar2007-5-10修改版&#xff08;带参考文档&#xff09;http://files.cnblogs.com/jobs/2007-5-10-concurrent-ppt.rar转载于:https://www.cnblogs…

终端bash美化(FC)

终端bash美化(FC) 用Linux也已经一年多了&#xff0c;感觉几乎还是什么都不会。大概是一直再做一些没多大意义的事的缘故吧&#xff0c;就像今天些的内容一样。以前搞了一段时间的GENTOO&#xff0c;发现里面的bash提示&#xff08;也就是&#xff3b;userhostname directory]$…

List and ArrayList

List<> and ArrayList Class DiagramsUsing the Bit Complement of the BinarySearch() Result代码1using System; 2using System.Collections.Generic; 3class Program 4{ 5 static void Main() 6 { 7 List<string> list new List<string>();…

spring boot jpa 整合

1&#xff0c;Eclipse JPA Tool配置 https://www.cnblogs.com/wgslucky/p/10109300.html 2&#xff0c;项目地址 https://gitee.com/wgslucky/springboot-jpa 转载于:https://www.cnblogs.com/wgslucky/p/10109869.html

安装JDK1.8+环境配置

安装JDK1.8环境配置1.下载JDK2.安装JDK3.环境配置3.1 新建系统变量3.2 添加Path路径3.3 使用cmd命令行验证是否环境配置成功1.下载JDK 直接官网下载&#xff1a;http://www.oracle.com 下载链接https://www.oracle.com/java/technologies/javase-downloads.html#JDK8 选择自己…

Nodejs.热部署方法

在开发中我们修改了一点代码后要去重启服务器才能看到结果&#xff0c;为了省去这个过程我们以往经常使用热部署代码的方法 下面是使用“supervisor”来达到热部署能力的方法: sudo npm install -g supervisor #安装 supervisor app.js #启动 如果碰到如下提示, 则表示路径没…

SortedList 泛型类

SortedList 泛型类 请参见 示例 成员 全部折叠 全部展开 语言筛选器&#xff1a; 全部 语言筛选器&#xff1a; 多个 语言筛选器&#xff1a; Visual Basic 语言筛选器&#xff1a; C# 语言筛选器&#xff1a; C语言筛选器&#xff1a; J# 语言筛选器&#xff1a; JScri…

中国现代化进程专题讲座——有感

最近有上段治文老师的中国现代化进程这门课&#xff0c;感觉受益颇多。 从国外到国内&#xff0c;从古代到如今&#xff0c;讲论点、论据&#xff0c;评论历史人物、历史事件&#xff0c;讲的很宏大&#xff0c;很深刻。我并没有特意捧他&#xff0c;而是深深被其思想的深刻、言…

java运行出现JNI错误,JDK8和JDK11都安装了

java运行出现JNI错误&#xff0c;JDK8和JDK11都安装了1. 问题描述2. 尝试办法3. 解决办法3.1 解决方法&#xff1a;3.2 测试结果成功1. 问题描述 因为编程的需要&#xff0c;所以我安装了JDK8和JDK11&#xff0c;在安装好了之后配置好了环境变量&#xff0c;之后打开Eclipse的…

爱不释手(Typingfaster)1.78beta,重大升级,欢迎试用,期待反馈。

爱不释手1.78测试版主要有以下改进&#xff1a;1、改进内核&#xff0c;大幅度提高了屏显速度&#xff1b;2、增加文章分段显示功能&#xff1b;3、增加每秒按键次数统计&#xff1b;4、测试结果中划分了实际速度与名义速度&#xff0c;即实际速度&#xff1d;名义速度准确率&a…

php 网站内容采集器 Snoopy

Snoopy转载于:https://www.cnblogs.com/buxiangxin/p/7245580.html

[转]笑话: 耐力惊人的三只乌龟

某日&#xff0c;龟爸、龟妈、龟儿子三只乌龟&#xff0c;决议去郊游。带了一个山东大饼&#xff0c;和两罐海底鸡出发到XX山去。 苦爬十年&#xff0c;终於到了。席地而坐&#xff0c;卸下装备&#xff0c;准备进食。****~~~该死&#xff01;&#xff01;没带开罐器&#xff0…

如何解决代码中if…else 过多的问题

前言 if...else 是所有高级编程语言都有的必备功能。但现实中的代码往往存在着过多的 if...else。虽然 if...else 是必须的&#xff0c;但滥用 if...else 会对代码的可读性、可维护性造成很大伤害&#xff0c;进而危害到整个软件系统。现在软件开发领域出现了很多新技术、新概念…

Facial keypoints detection Kaggle 竞赛系列

3.2# Facial keypoints detection 作者&#xff1a;Stu. RuiQQ: 1026163725原文链接&#xff1a;http://blog.csdn.net/i_love_home/article/details/51051888该题主要任务是检測面部关键点位置 Detect the location of keypoints on face images 问题表述 在本问题中。要求计算…

Error:java: 无效的源发行版: 11

Error:java: 无效的源发行版: 111.问题描述2.原因查找3.解决办法3.1 打开IDEA的File—Project Structure设置3.2 修改Project SDK为自己想要切换的版本3.3 修改project languang level1.问题描述 在我的电脑中同时安装了JDK8和JDK11&#xff0c;之前本来调试好了的&#xff0c…

今天看论坛,有这样一句话,深有同感,还是家里好

就像孟宣后来对这个城市的评价&#xff1a;“这里的人活的才像人……就像那么发达国家的小城市&#xff0c;不用背负那么大的生存压力。在北京&#xff0c;如果你每天生活要30个馒头&#xff0c;那么你要挣到200到300个。而在这里&#xff0c;只需要30个馒头就可以了……”转载…

面对别人强行关机你怎么办与 定时关机

面对这个图你的第一感觉是什么?肯定是有人.....那你怎么办呢?让它继续下去!不能绝对不能!以前比较幸运的打开了几个记事本没有保存逃过了一关,可是屡试不爽呐!直到我同学出现这种情况时,幸亏我眼快,呵呵 所以问他一下!知道了这个玩意出来的命令是在运行里敲入shutdown -s如果…

iOS开发实战-基于SpriteKit的FlappyBird小游戏

写在前面 最近一直在忙自己的维P恩的事情 公司项目也是一团乱 于是...随手找了个游戏项目改了改就上线了,就当充数了. SpriteKit简介 SpriteKit是iOS 7之后苹果推出的2D游戏框架。它支持2D游戏中各种功能&#xff0c;如物理引擎&#xff0c;地图编辑&#xff0c;粒子&#xff0…

2018年12月14日 函数 总结

map() 处理序列中每个元素&#xff0c;得到迭代器&#xff0c;该迭代器 元素个数和位置与原来一致 filter() 遍历序列中的每个元素&#xff0c;判断每个元素得到布尔值&#xff0c;如果是true则留下来 people[{name:"abc","age":100},{"name":&…

UML类图新手入门级介绍

UML类图新手入门级介绍 看了大话设计模式&#xff0c;觉得很生动形象&#xff0c;比较适合于我这种初学者理解面向对象&#xff0c;所以就记录了一下。 举一个简单的例子&#xff0c;来看这样一副图&#xff0c;其中就包括了UML类图中的基本图示法。 首先&#xff0c;看动物矩形…

SQL中获取刚插入记录时对应的自增列的值

--创建数据库和表create database MyDataBaseuse MyDataBasecreate table mytable(id int identity(1,1),name varchar(20))--执行这个SQL,就能查出来刚插入记录对应的自增列的值insert into mytable values(李四)select identity转载于:https://www.cnblogs.com/bnjbl/archive…

SQL Server开发人员应聘常被问的问题妙解汇总

目前在职场中很难找到非常合格的数据库开发人员。我的一个同事曾经说过:“SQL开发是一门语言&#xff0c;它很容易学&#xff0c;但是很难掌握。” 在面试应聘的SQL Server数据库开发人员时&#xff0c;我运用了一套标准的基准技术问题。下面这些问题是我觉得能够真正有助于淘汰…

little w and Soda(思维题)

链接&#xff1a;https://ac.nowcoder.com/acm/contest/297/A 来源&#xff1a;牛客网 时间限制&#xff1a;C/C 1秒&#xff0c;其他语言2秒 空间限制&#xff1a;C/C 262144K&#xff0c;其他语言524288K 64bit IO Format: %lld 题目描述 不知道你听没听说过这样一个脑筋急…

[导入]实时数据库的经典书

有个朋友给我来了一封邮件&#xff0c;在邮件中&#xff0c;他这样写到&#xff1a;“国外的实时数据库来势汹汹&#xff0c;价格一路上扬&#xff1b;想当初eDNA 2003年刚到中国时也就是二、三十万左右&#xff0c;现在报价已经百万以前了。心里也总个一个结&#xff0c;难道这…