首页 \ 问答 \ 为什么.NET中没有通用的同步队列?(Why is there no generic synchronized queue in .NET?)

为什么.NET中没有通用的同步队列?(Why is there no generic synchronized queue in .NET?)

我注意到你可以调用Queue.Synchronize来获得一个线程安全的队列对象,但是同样的方法在Queue <T>上不可用。 有谁知道为什么? 似乎有点奇怪。


I noticed that you can call Queue.Synchronize to get a thread-safe queue object, but the same method isn't available on Queue<T>. Does anyone know why? Seems kind of weird.


原文:https://stackoverflow.com/questions/107117
更新时间:2024-02-21 21:02

最满意答案

create table a (id number(10),  name  varchar2(10),  score number(10));
insert into a values (1,'a',111);
insert into a values (2,'b',222);
insert into a values (3,'c',78);
insert into a values (4,'d',11);
insert into a values (5,'v',111);
commit;

select a.*, b.*
  from (select a.*, row_number() over(order by a.id) rn
           from a
          where mod(a.id, 2) = 1) a,
       (select a.*, row_number() over(order by a.id) rn
           from a
          where mod(a.id, 2) = 0) b
where a.rn=b.rn(+);

其他回答

(1) select deptno from dept where depptno in (select deptno from em);

(2)select empno,ename,sal from em where sal>(select sal from em where ename = 'smith');

(3)select e.ename,d.dname from em e,dept d where e.deptno=d.deptno and e.job = 'clerk';

(4)select empno,ename from em where job in (select job from em where ename = 'scott') ;

(5)select job,min(sal) from em group by job;

(6)select d.dname ,min(e.sal) from dept d,em e
where d.deptno=e.deptno and e.job ='manager' group by d.dname;

相关问答

更多
  • oracle存储过程[2022-03-15]

    一种方式是你拼成字符串,然后在程序中解析。 另外一种比较简单的方面是使用临时表,存储过程调用结束后把数据放到临时表中,然后在程序中读出来就可以了。 二者都可以,你不妨试试。
  • 手头都是项目的不能给你,现去搜了一个给你 书的话,基本上没什么,多找写简单的例子看吧. 挺简单的.都是固定格式. create or replace procedure getstudent( in_sno in VARCHAR2(7), out_sname out VARCHAR2(20), out_sage out NUMBER(2) ) is begin select sname into out_sname sage into out_sage from student w ...
  • 【delphi+oracle报表解决方案(一)】delphi中调用oracle的存储过程(分带返回游标,不返回值两种) 关键字: delphi ,oracle存储过程,游标,返回数据集,报表注:delphi 6+ oracle 8.1.6一.创建包与包体1.附:建表aaclass为下面作测试用create table aaclass(CID VARCHAR2(50), CNAME VARCHAR2(50), pnumber NUMBER(10,0) );INSERT INTO aaclass values( ...
  • 一、无参程序过程语法 create or replace procedure NoParPro as ; begin ; exception //存储过程异常 ; end; 二、带参存储过程实例 create or replace procedure queryempname(sfindno emp.empno%type) as sName emp.ename%type; sjob emp.job%type; begin .... exception .... end; 三、 带参数存储过程含赋值方式 cr ...
  • create or replace procedure Sel(@name in varchar2) as begin select * from user where name=@name; end; exec Sel(@name)
  • 手头都是项目的不能给你,现去搜了一个给你 书的话,基本上没什么,多找写简单的例子看吧. 挺简单的.都是固定格式. create or replace procedure getstudent( in_sno in VARCHAR2(7), out_sname out VARCHAR2(20), out_sage out NUMBER(2) ) is begin select sname into out_sname sage into out_sage from student where sno = in ...
  • 自己建几张表,模拟数据.找一个目的(就是你想要一个什么结果),然后写过程就是了.这是简单的......... 要想做复杂一点的,关键还是要有数据才行.还有就是需求,把一个需求纳入一个过程
  • 1.基本结构 CREATE OR REPLACE PROCEDURE 存储过程名字 ( 参数1 IN NUMBER, 参数2 IN NUMBER ) IS 变量1 INTEGER :=0; 变量2 DATE; BEGIN END 存储过程名字 2.SELECT INTO STATEMENT 将select查询的结果存入到变量中,可以同时将多个列存储多个变量中,必须有一条 记录,否则抛出异常(如果没有记录抛出NO_DATA_FOUND) 例子: BEGIN SELECT col1,col2 into 变量1, ...
  • create table a (id number(10), name varchar2(10), score number(10)); insert into a values (1,'a',111); insert into a values (2,'b',222); insert into a values (3,'c',78); insert into a values (4,'d',11); insert into a values (5,'v',111); commit; select a.*, ...
  • 下一个PLSQL Developer开发工具,清晰明了的就能看见了

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。