现在位置: 首页 > djmax发表的所有文章
  • 10月
  • 07日
综合 ⁄ 共 961字 评论关闭
AppDomain Only have the Load() method which can only load assembly by name. What if you want to load from the physical path? See the code following: // Assembly you want to loadString assemblyFileName = @"D:TestTest.exe";String assemblyName = @"Test"; // Setup the evidenceEvidence evidence = new Evidence( AppDomain.CurrentDomain.Evidence ); AppDomain TestDomain = AppDomain.CreateDomain(  // The friendly name of the domain.  "TestDomain",                     // Evidence mapped through the ......
阅读全文
文章目录 处理方法 android开发,我在我的 activity 插入一个按钮,如果andriod market找不到的话就使用 toast进行提示,在使用的时候出现了一些问题,下面的代码报错了 Context cannot be resolved to a variable  1 2 3 4 5 6 7 Uri uri = Uri.parse("market://details?id=" + getApplicationContext().getPackageName()); Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri); try {     startActivity(goToMarket); } catch (Activity......
阅读全文
  • 09月
  • 07日
综合 ⁄ 共 532字 评论关闭
import android.os.Parcel; import android.os.Parcelable; public class MyParcelable implements Parcelable { public int result; public static final Parcelable.Creator<MyParcelable> CREATOR = new Creator<MyParcelable>() { @Override public MyParcelable[] newArray (int size) { return new MyParcelable[size]; } @Override public MyParcelable createFromParcel(Parcel source) { MyParcelable item = new MyParce......
阅读全文
  • 02月
  • 28日
综合 ⁄ 共 1074字 评论关闭
传送门 虽然看了下题目知道是考数据结构了,但是不知道怎么做。后来才明白。。。 这里用树状数组做,先输入所有要输入的,然后离线做,这样可以将问询排序,然后在跟新树状数组的时候选择恰到好处的时机进行查询。 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int a[50005]; int d[50005][150]; int t,n,m,x,y,u,k; int pre[50005]; int ans[50005]; struct Query { int l,r; int id; }q[50005]; int c[50005]; void init() { memset(......
阅读全文
  • 08月
  • 02日
综合 ⁄ 共 1070字 评论关闭
 moonRise UI是真正的黑色皮肤,改变的不仅仅是代码编辑区。我找之前看到好多人在找,因为自带的实在是太丑了,白底黑字看久了也太刺眼。下面基本是从github拷贝过来的介绍,加上点翻译。方便下大家。我目前用的eclipse是4.4版本,完美运行。先附上项目地址:http://guari.github.io/eclipse-ui-theme/ MoonRise UI Theme   An early version of a dark UI theme for Eclipse 4+. Requirements Eclipse 4.2+ Installation  Eclipse Marketplace:(推荐;直接拉动到Eclipse就能安装) ← Drag this button to your Ecl......
阅读全文
  • 06月
  • 10日
综合 ⁄ 共 1166字 评论关闭
    基本INT13H中断,实际上就是早期的INT13H中断。后来随着硬盘容量的快速增长,INT13H中断已不适应,于是技术人员又设计了扩展INT13H中断。为了与后者便于区分,所以在前面冠以“基本”二字。     现在介绍两种调用基本INT13H中断读扇区数据的方法,一种是在汇编语言里调用,另一种是在C语言里调用。     介绍在汇编语言里的调用方法,可为以后学习扩展INT13H中断的调用打下基础,形成一个由浅入深、循序渐进的过程。     一般情况下,在工具程序和应用软件里调用基本INT13H中断时,使用C语言比较方便。因为在C语言里,系统......
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 2255字 评论关闭
最近做程序用到汉字转汉语拼音的问题,首先想到Google一下,但是拿来看了一下源码,不是甚清楚。 后来想到自己Delphi有一个获得拼音的代码。于是找了出来。研究了一下代码如下:     function get_hz_pywb(hzstr: string; pytype: integer): string; var I: Integer; allstr: string; hh: THandle; pp: pointer; ss: TStringList; function retturn_wbpy(tempstr: string; tqtype: integer): string; var outstr, str: string; i: integer; begin //################### 汉字查询电位 i := 0; w......
阅读全文
  • 04月
  • 19日
综合 ⁄ 共 1447字 评论关闭
转自:http://blog.csdn.net/zhy_cheng/article/details/7954105 LayoutAnimationController可以控制一组控件按照规定显示,有两种方法来实现 1.下面以XML文件实现,先在res下新建anim文件夹,新建一个文件alpha.xml [html] view plaincopy <?xml version="1.0" encoding="utf-8"?>   <set xmlns:android="http://schemas.android.com/apk/res/android"       android:interpolator="@android:anim/accelerate_interpolator"       android:shareInterpolator="true"       >       <alpha   ......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 1368字 评论关闭
C++/C 获取当前系统时间 //方案— 优点:仅使用C标准库;缺点:只能精确到秒级 #include <time.h> #include <stdio.h> int main( void ) {     time_t t = time(0);     char tmp[64];     strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 本年第%j天 %z",localtime(&t) );     puts( tmp );     return 0; } size_t strftime(char *strDest, size_t maxsize, const char *format, const struct tm *timeptr); 根据格式字符串生成字符串。 struct tm *localtime(const time_t *timer); 取得当地时间,l......
阅读全文
  • 03月
  • 21日
综合 ⁄ 共 960字 评论关闭
在vm里克隆出来的linux。。 ifconfig...没有看到eth0.。然后重启网卡又报下面错误。 解决办法: 首先,打开/etc/udev/rules.d/70-persistent-net.rules内容如下面例子所示: # vi /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated by the /lib/udev/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key. # PCI device 0x1022:0x2000......
阅读全文
对于两个正整数 x, n 总存在整数 q, r 使得x = nq + r, 其中  0<= r <n                  //最小非负剩余q, r 是唯一确定的。q = [x/n], r = x - n[x/n]. 这个是带余除法的一个简单形式。在 c 语言中, q, r 容易计算出来: q = x/n, r = x % n.所谓把 x 按 n 对齐指的是:若 r=0, 取 qn, 若 r>0, 取 (q+1)n. 这也相当于把 x 表示为:x = nq + r', 其中 -n < r' <=0                //最大非正剩余   nq 是我们所求。关键是如何用 c 语言计算它。由于我们能处理标准的带余除法,所以可以把这个式子转换成一个标准的......
阅读全文
  • 02月
  • 18日
综合 ⁄ 共 1737字 评论关闭
    创建地图缓存,会明显提高我们浏览地图服务的速度,特别对于应用中使用的非常详细的底图数据,创建缓存以提高应用性能尤为重要。如果之前创建过缓存,你可能已经意识到,创建大数据缓存将花费大把的时间,占用大量的磁盘空间。     对于服务器管理人员来说,在开始创建缓存之前自然想搞清楚这项工作需要多长时间、切片需要多少磁盘空间。ArcGIS10.1提供了几个全新功能,使我们可以轻松估算缓存大小,追踪切片创建的进度。 1、估算缓存大小     10.1中缓存服务一个非常重大的变化是:在发布服务之前就可以定义缓存,设置各种缓......
阅读全文