Visual Studio 2003下C++编写的GDI演示程序

版权申诉
0 下载量 128 浏览量 更新于2024-10-28 收藏 38KB RAR 举报
资源摘要信息:"D3d.rar_d3d" 知识点详细说明: 1. D3D概念 D3D通常指的是Direct3D,它是微软公司的一个应用程序接口(API)的组成部分,允许软件在Microsoft Windows以及Microsoft Xbox等平台上运行时,使用3D图形硬件。Direct3D是DirectX多媒体编程接口的一个组件,负责与硬件厂商提供的驱动程序打交道,使程序员能够通过高级的编程语言命令硬件执行图形渲染。 2. GDI概念 GDI代表图形设备接口(Graphics Device Interface),是Windows操作系统中用于呈现图形的编程接口。GDI提供了绘制线条、形状、图像和文字的函数,并且负责将这些图形元素输出到显示设备或打印机等。GDI使得应用程序能够与显示系统进行通信并输出图形。 3. C++编程语言 C++是一种通用的编程语言,支持多种编程范式,如过程化、面向对象和泛型编程。它是一种静态类型、编译式语言,能够直接操作内存,因此在性能要求较高的场合非常受欢迎。由于其强大的功能和灵活性,C++广泛用于开发操作系统、游戏引擎、高性能服务器和客户端应用等。 4. Visual Studio 2003 Visual Studio 2003是微软公司发布的一个集成开发环境(IDE),用于C++、C#、Visual Basic等语言的开发。该版本支持Windows应用程序、Web应用程序以及Web服务等多种开发类型,是早期较为流行的开发工具之一。 5. 文件名称列表解析 - ImagePrint: 可能是一个模块或类的名称,专注于图像打印。这个组件可能包含有关如何在打印输出中处理和呈现图像的代码逻辑。 - Printer: 这个文件名很可能包含有关打印机管理的功能,比如初始化打印机、发送打印任务到打印机以及打印机配置等。 - PrinterDevice: 这部分可能指的是与打印机设备相关的类或模块,涉及打印机设备的特定属性和方法,如打印分辨率、颜色管理等。 - CodePrint: 这个组件似乎负责将代码打印出来,可能包括语法高亮、代码格式化等功能,适合于开发者将编程代码输出到纸张。 6. 开发演示程序的意义 演示程序通常用于展示特定技术或概念的实际应用,帮助开发者或学习者理解如何将理论知识转化为实践操作。在本案例中,演示程序可能用C++编写的GDI程序,展示了如何在Windows平台上使用Direct3D进行图形渲染或如何通过GDI技术打印图像和文档。通过Visual Studio 2003的开发环境,可以更直观地了解和学习相关技术。 总结: D3d.rar_d3d文件提供了一个关于Direct3D和GDI的演示程序,通过Visual Studio 2003使用C++语言编写。其中包含了与图像打印、打印机设备管理以及代码打印相关的代码逻辑,允许用户通过GDI技术将图形内容输出到显示或打印设备。通过分析和研究这些文件,开发者可以获得关于图形编程和设备输出方面的深入理解。
2023-05-31 上传

请详细的解释一下这个oracle的sql语句 select distinct comp.f_voucher_number as voucherNumber,task.f_dept_id as deptId,d.fdeptname as dept,d.FDEPTLEVEL as deptLevel, decode(d.FDEPTLEVEL,9,d6.fdeptname,8,d5.fdeptname,7,d4.fdeptname,6,d3.fdeptname,5,d2.fdeptname,4,d.fdeptname,'-') as divDepart, decode(d.FDEPTLEVEL,9,d6.fprincipal,8,d5.fprincipal,7,d4.fprincipal,6,d3.fprincipal,5,d2.fprincipal,4,d.fprincipal,'-') as divSender, decode(d.FDEPTLEVEL,9,d5.fdeptname,8,d4.fdeptname,7,d3.fdeptname,6,d2.fdeptname,5,d.fdeptname,'-') as bigDepart, decode(d.FDEPTLEVEL,9,d5.fprincipal,8,d4.fprincipal,7,d3.fprincipal,6,d2.fprincipal,5,d.fprincipal,'-') as bigSender, decode(d.FDEPTLEVEL,9,d4.fdeptname,8,d3.fdeptname,7,d2.fdeptname,6,d.fdeptname,'-') as smallDepart, decode(d.FDEPTLEVEL,9,d4.fprincipal,8,d3.fprincipal,7,d2.fprincipal,6,d.fprincipal,'-') as smallSender, decode(d.FDEPTLEVEL,9,d3.fdeptname,8,d2.fdeptname,7,d.fdeptname,'-') as saleDepart, decode(d.FDEPTLEVEL,9,d3.fprincipal,8,d2.fprincipal,7,d.fprincipal,'-') as saleSender from dpcrm.T_COMP_COMPLAINT comp left join dpcrm.T_COMP_TASKDEPT task on comp.f_id = task.f_comp_id left join dpcrm.t_org_department d on d.fid = task.f_dept_id left join dpcrm.t_org_department d2 on d2.fid = d.fparentid left join dpcrm.t_org_department d3 on d3.fid = d2.fparentid left join dpcrm.t_org_department d4 on d4.fid = d3.fparentid left join dpcrm.t_org_department d5 on d5.fid = d4.fparentid left join dpcrm.t_org_department d6 on d6.fid = d5.fparentid where comp.f_time_report >= sysdate - 1 and task.f_directory_two = '催派送'

2023-05-19 上传

将下面代码使用ConvRNN2D层来替换ConvLSTM2D层,并在模块__init__.py中创建类‘convrnn’ class Model(): def __init__(self): self.img_seq_shape=(10,128,128,3) self.img_shape=(128,128,3) self.train_img=dataset # self.test_img=dataset_T patch = int(128 / 2 ** 4) self.disc_patch = (patch, patch, 1) self.optimizer=tf.keras.optimizers.Adam(learning_rate=0.001) self.build_generator=self.build_generator() self.build_discriminator=self.build_discriminator() self.build_discriminator.compile(loss='binary_crossentropy', optimizer=self.optimizer, metrics=['accuracy']) self.build_generator.compile(loss='binary_crossentropy', optimizer=self.optimizer) img_seq_A = Input(shape=(10,128,128,3)) #输入图片 img_B = Input(shape=self.img_shape) #目标图片 fake_B = self.build_generator(img_seq_A) #生成的伪目标图片 self.build_discriminator.trainable = False valid = self.build_discriminator([img_seq_A, fake_B]) self.combined = tf.keras.models.Model([img_seq_A, img_B], [valid, fake_B]) self.combined.compile(loss=['binary_crossentropy', 'mse'], loss_weights=[1, 100], optimizer=self.optimizer,metrics=['accuracy']) def build_generator(self): def res_net(inputs, filters): x = inputs net = conv2d(x, filters // 2, (1, 1), 1) net = conv2d(net, filters, (3, 3), 1) net = net + x # net=tf.keras.layers.LeakyReLU(0.2)(net) return net def conv2d(inputs, filters, kernel_size, strides): x = tf.keras.layers.Conv2D(filters, kernel_size, strides, 'same')(inputs) x = tf.keras.layers.BatchNormalization()(x) x = tf.keras.layers.LeakyReLU(alpha=0.2)(x) return x d0 = tf.keras.layers.Input(shape=(10, 128, 128, 3)) out= tf.keras.layers.ConvRNN2D(filters=32, kernel_size=3,padding='same')(d0) out=tf.keras.layers.Conv2D(3,1,1,'same')(out) return keras.Model(inputs=d0, outputs=out)

2023-05-17 上传

下面代码在tensorflow中出现了init() missing 1 required positional argument: 'cell'报错: class Model(): def init(self): self.img_seq_shape=(10,128,128,3) self.img_shape=(128,128,3) self.train_img=dataset # self.test_img=dataset_T patch = int(128 / 2 ** 4) self.disc_patch = (patch, patch, 1) self.optimizer=tf.keras.optimizers.Adam(learning_rate=0.001) self.build_generator=self.build_generator() self.build_discriminator=self.build_discriminator() self.build_discriminator.compile(loss='binary_crossentropy', optimizer=self.optimizer, metrics=['accuracy']) self.build_generator.compile(loss='binary_crossentropy', optimizer=self.optimizer) img_seq_A = Input(shape=(10,128,128,3)) #输入图片 img_B = Input(shape=self.img_shape) #目标图片 fake_B = self.build_generator(img_seq_A) #生成的伪目标图片 self.build_discriminator.trainable = False valid = self.build_discriminator([img_seq_A, fake_B]) self.combined = tf.keras.models.Model([img_seq_A, img_B], [valid, fake_B]) self.combined.compile(loss=['binary_crossentropy', 'mse'], loss_weights=[1, 100], optimizer=self.optimizer,metrics=['accuracy']) def build_generator(self): def res_net(inputs, filters): x = inputs net = conv2d(x, filters // 2, (1, 1), 1) net = conv2d(net, filters, (3, 3), 1) net = net + x # net=tf.keras.layers.LeakyReLU(0.2)(net) return net def conv2d(inputs, filters, kernel_size, strides): x = tf.keras.layers.Conv2D(filters, kernel_size, strides, 'same')(inputs) x = tf.keras.layers.BatchNormalization()(x) x = tf.keras.layers.LeakyReLU(alpha=0.2)(x) return x d0 = tf.keras.layers.Input(shape=(10, 128, 128, 3)) out= ConvRNN2D(filters=32, kernel_size=3,padding='same')(d0) out=tf.keras.layers.Conv2D(3,1,1,'same')(out) return keras.Model(inputs=d0, outputs=out) def build_discriminator(self): def d_layer(layer_input, filters, f_size=4, bn=True): d = tf.keras.layers.Conv2D(filters, kernel_size=f_size, strides=2, padding='same')(layer_input) if bn: d = tf.keras.layers.BatchNormalization(momentum=0.8)(d) d = tf.keras.layers.LeakyReLU(alpha=0.2)(d) return d img_A = tf.keras.layers.Input(shape=(10, 128, 128, 3)) img_B = tf.keras.layers.Input(shape=(128, 128, 3)) df = 32 lstm_out = ConvRNN2D(filters=df, kernel_size=4, padding="same")(img_A) lstm_out = tf.keras.layers.LeakyReLU(alpha=0.2)(lstm_out) combined_imgs = tf.keras.layers.Concatenate(axis=-1)([lstm_out, img_B]) d1 = d_layer(combined_imgs, df)#64 d2 = d_layer(d1, df * 2)#32 d3 = d_layer(d2, df * 4)#16 d4 = d_layer(d3, df * 8)#8 validity = tf.keras.layers.Conv2D(1, kernel_size=4, strides=1, padding='same')(d4) return tf.keras.Model([img_A, img_B], validity)

2023-05-17 上传

优化代码SELECT SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND is_new_customer = 1, 1, 0)) AS new_customer_count, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND is_new_customer = 0, 1, 0)) AS old_customer_count, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND is_new_customer = 1, payment_amount, 0)) AS new_customer_payment_amount, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND is_new_customer = 0, payment_amount, 0)) AS old_customer_payment_amount, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND category = 'A', 1, 0)) AS category_A_customer_count, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND category = 'A', payment_amount, 0)) AS category_A_payment_amount, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND category = 'B', 1, 0)) AS category_B_customer_count, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND category = 'B', payment_amount, 0)) AS category_B_payment_amount, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND product_id = 'P1', 1, 0)) AS product_P1_customer_count, SUM(IF(order_date BETWEEN '2022-10-31' AND '2022-11-11' AND product_id = 'P1', payment_amount, 0)) AS product_P1_payment_amount FROM orders o LEFT JOIN (SELECT DISTINCT order_date FROM orders WHERE order_date BETWEEN '2022-10-31' AND '2022-11-11') d1 ON o.order_date = d1.order_date LEFT JOIN (SELECT DISTINCT order_date FROM orders WHERE order_date BETWEEN '2021-10-31' AND '2022-10-30' AND order_date NOT IN (SELECT order_date FROM orders WHERE order_date BETWEEN '2022-10-31' AND '2022-11-11')) d2 ON o.order_date = d2.order_date LEFT JOIN (SELECT DISTINCT order_date FROM orders WHERE order_date BETWEEN '2021-11-12' AND '2022-10-30' AND order_date IN (SELECT order_date FROM orders WHERE order_date BETWEEN '2022-10-31' AND '2022-11-11')) d3 ON o.order_date = d3.order_date WHERE d1.order_date IS NOT NULL OR d2.order_date IS NOT NULL OR d3.order_date IS NOT NULL;

2023-05-25 上传