「ID/パスワードを保存しますか?」
と聞いてきます。
ここでID/パスワードを保存すると、次にログインするときには自動で値が設定されます。
確かに便利な機能ではあるんですが、これなんとテキストでそのまま見えてしまうんですね。
パスワードはパスワードであって、テキスト表示されるのはセキュリティ上問題がある、と考えられる方は以下のサイトでパスワードを削除できます。
var y=getY(document.getElementById("top"));
$('body,html').animate({
scrollTop: y
}, 800);
| Chicago |
| IT Pro Evangelist: Brian Lewis |
| Chicago |
<div style="display:box;display:-moz-box;display:-webkit-box;position:absolute;top:100px"> <div style="width:100px;height:100px;border:1px solid blue"></div> <div style="width:100px;height:100px;border:1px solid blue"></div> </div>
$filter="ga:hostname!=ホスト名";
$ga->requestReportData(homepageId,null,array('pageviews','visits','bounces','entrances','timeOnSite','exits','newVisits'),null,$filter,$startDate,$endDate);
$(function(){
$('img').each(function(){
if(!this.complete){
$(this).hide();
return;
}
});
});
#import <stdio.h>
#import <foundation/foundation.h>
#import <Foundation/NSObject.h>
@interface Verb:NSObject
-(void)print: (NSString*)stem;
@end
@implementation Verb
-(void)print: (NSString*)stem
{
char* str=[stem UTF8String];
printf("%sim\n",str);
printf("%sis\n",str);
printf("%si\n",str);
printf("%sime\n",str);
printf("%site\n",str);
printf("%si\n",str);
}
@end
int main()
{
NSString *stem=@"rozumim";
id obj=[Verb alloc];
[obj print:stem];
return 0;
}
GNUSTEP_MAKEFILES=c:/GNUstep/GNUstep/System/Library/Makefiles include $(GNUSTEP_MAKEFILES)/common.make TOOL_NAME = verb verb_OBJC_FILES = verb.m include $(GNUSTEP_MAKEFILES)/tool.make
#import >stdio .h=".h">
#import >foundation bject.h="bject.h">
@protocol ToString
-(void)toString;
@end
@interface Test:NSObject>tostring>
@end
@implementation Test
-(void)toString
{
printf("This is class Test.\n");
}
@end
int main()
{
id obj=[Test alloc];
[obj toString];
return 0;
}
#import <stdio.h>
#import <Foundation/NSObject.h>
@interface Test:NSObject
{
int index;
}
- (void) hello;
- (void) setIndex:(int) i;
+ (void) dump;
@end
@implementation Test
- (void) setIndex:(int) i
{
self->index=i;
}
-(void)hello
{
printf("Hello NSObject %d\n",self->index);
}
+(void)dump
{
printf("Class method = static");
}
@end
int main()
{
[Test dump];
return 0;
}
#import <stdio.h>
#import <Foundation/NSObject.h>
@interface Test:NSObject
-(void) hello;
@end
@implementation Test
-(void)hello
{
printf("Hello NSObject\n");
}
@end
int main()
{
id obj=[Test alloc];
[obj hello];
return 0;
}
gcc nsclass.m -I c:/GNUstep/GNUstep/System/Library/Headers -L c:/GNUstep/GNUstep/System/Library/Libraries -lobjc -lgnustep-base
#import <stdio.h>
#import <Foundation/NSObject.h>
@interface Test:NSObject
{
int index;
}
- (void) hello;
- (void) setIndex:(int) i;
@end
@implementation Test
- (void) setIndex:(int) i
{
self->index=i;
}
-(void)hello
{
printf("Hello NSObject %d\n",self->index);
}
@end
int main()
{
id obj=[Test alloc];
[obj setIndex:10];
[obj hello];
return 0;
}
(defun replace-tags-region (from-string to-string begin end)
"Replaces from-string to to-string in the region from begin to end."
(let ((len (- (length to-string)(length from-string))))
(goto-char begin)
(while (search-forward from-string end t)
(replace-match to-string t)
(setq end (+ end len)))))
(defun replace-tags-list (tag-list)
"Takes a list of (from-string to-string) and replaces all from-string to to-string in the buffer."
(replace-tags-region (car tag-list) (cadr tag-list)(point-min)(point-max)))
;; Usage:
;; (setq tag-list '(("TABLE" "table")("TD" "td")("TR" "tr")))
;; (replace-tags tag-list)
(defun replace-tags (tag-list)
"Takes a list of lists of (from-string to-string) and replaces all from-string to to-string in the buffer."
(mapcar 'replace-tags-list tag-list))
(defun create-end-tag (tag-name)
"Creates closing tag from the given tag-name."
(concat "</" tag-name ">"))
(defun create-half-begin-tag (tag-name)
"Creates opening tag from the given tag-name."
(concat "<" tag-name " "))
(defun create-attribute-tag (tag-name)
"Creates attribute string from the given tag-name."
(concat " " tag-name "=\""))
(defun create-begin-tag (tag-name)
"Creates opening tag from the given tag-name."
(concat "<" tag-name ">"))
;; Usage:
;;(setq tag-list '("TABLE" "TD" "B" "BR" "A" "HTML" "NOSCRIPT" "SCRIPT" "HEAD" "BODY" "TR" "TITLE" "I"))
;;(mapcar (lambda (x)(create-replacement-list 'create-end-tag x)) tag-list)
(defun create-replacement-list (create-list tag-name)
"Creates a list of tag name and lowercase tag name lists."
(cons (funcall create-list tag-name) (list (funcall create-list (downcase tag-name)))))
(defun lowercase-html-tags()
"Converts uppercase HTML tag names to lowercase."
(interactive)
(let* ((tag-list '("TABLE" "TD" "B" "BR" "A" "HTML" "NOSCRIPT" "SCRIPT" "HEAD" "BODY" "TR" "TITLE" "I"))
(attribute-list '("VALIGN" "ALIGN" "WIDTH" "HEIGHT" "BOTTOM" "CLASS" "BGCOLOR" "BORDER" "LEFT" "RIGHT" "TOP" "CELLPADDING" "CELLSPACING" "BORDERCOLOR" "CENTER" "MIDDLE" "HREF" "COLSPAN" "ROWSPAN" "SRC" "onMouseOver" "onMouseOut" "ALT" "NAME" "ID" "VSPACE" "LINK" "META" "LEFTMARGIN" "TOPMARGIN" "MARGINWIDTH" "MARGINHEIGHT" "onLoad" "BACKGROUND" "TYPE" "HTTP-EQUIV" "CONTENT" "REL" "LANGUAGE"))
(half-tag-list '("TABLE" "TD" "A" "IMG" "LINK" "META" "SCRIPT" "BODY" "TR" "DIV"))
(replacement-end-tags (mapcar (lambda (x)(create-replacement-list 'create-end-tag x)) tag-list))
(replacement-begin-tags (mapcar (lambda (x)(create-replacement-list 'create-begin-tag x)) tag-list))
(replacement-half-begin-tags (mapcar (lambda (x)(create-replacement-list 'create-half-begin-tag x)) half-tag-list))
(replacement-attribute-tags (mapcar (lambda (x)(create-replacement-list 'create-attribute-tag x)) attribute-list)))
(replace-tags replacement-attribute-tags)
(replace-tags replacement-end-tags)
(replace-tags replacement-half-begin-tags)
(replace-tags replacement-begin-tags)))
display: -webkit-box;
display: -moz-box;
display: box;
内部のDIV要素がきれいに並んでくれます。
ただし、上記のようにIEには対応していません。
そこで、この flexie.js を導入すると、見事に横並びボックスが実現できます。
ダウンロード:http://flexiejs.com/
これでページのHTMLタグが整理できそうです。
Dim objVBCOMPO As Object For Each objVBCOMPO In ActiveWorkbook.VBProject.VBComponents With objVBCOMPO.CodeModule If .CountOfLines <> 0 Then .DeleteLines 1, .CountOfLines End With If (objVBCOMPO.Type = vbext_ct_StdModule Or objVBCOMPO.Type = vbext_ct_MSForm) Then ActiveWorkbook.VBProject.VBComponents.Remove objVBCOMPO End If Next objVBCOMPO Set objVBCOMPO = Nothing End Sub
$(document).ready(function(){
$(".millimeters").hide();
$("#convertIN").click(function(){
$(".millimeters").hide();
$(".inches").show();
});
$("#convertMM").click(function(){
$(".millimeters").show();
$(".inches").hide();
});
});
$(document).ready(function(){
$(".クラス名").click(function (event){
event.preventDefault();
document.location="飛ばしたい先のアドレス";
});
});
$cfg['Servers'][$i]['user'] = 'ユーザー名'; $cfg['Servers'][$i]['password'] = 'パスワード';
;error_reporting = E_ALL | E_STRICT error_reporting = E_ERROR
short_open_tag = On extension=php_curl.dll
コントロールパネルもアップグレードされておりました。
<audio autoplay="false" controls="true" src="ファイル名"></audio>
改造したファイルをepub形式に変換するときは、単に圧縮するだけでは.epub形式とはなりません。
Windows上でepubを作成するには、
#include<iostream>
using namespace std;
int main()
{
int arraytest[5]={1,2,3,4,5};
for(int i:arraytest)
cout<<i;
cout<<endl;
for(int &i:arraytest)
i=0;
for(int i:arraytest)
cout<<i;
}
コンパイラオプションは以下の通り。
$> g++ -std=c++0x range.cc
#include <iostream>
#include <chrono>
int main()
{
auto tp=std::chrono::system_clock::time_point();
std::time_t t=std::chrono::system_clock::to_time_t(tp);
std::cout << std::ctime(&t)<<std::endl;
std::chrono::seconds sec(10);
std::chrono::minutes min(3);
auto result=sec+min;
std::cout << result.count() << std::endl;
}
コンパイラのオプションは以下の通り。
/usr/bin/g++-4 -std=c++0x chrono.cppc++11ではラムダ式も使えます。
std::cout << [](int x, int y){return x+y;}(1,2) << std::endl;
public class VarLen
{
int sum(int ... list)
{
int s=0;
for(int i:list)
{
s+=i;
}
return s;
}
public static void main(String args[])
{
VarLen varLen=new VarLen();
System.out.println(varLen.sum(1,2,3,4,5,6,7,8,9,10));
}
}
INSERT INTO pages SELECT '',title,contents,url FROM pages WHERE ID=$id
<div style="padding-bottom:0px;"> <div style="float:left;"> Floating block </div> </div>
<div style="margin: 20px 0;border:1px solid red;"></div>
public class Closure
{
class Test{};
Closure()
{
final int i=0;
(new Test()
{
void test()
{
System.out.println(i);
}
}).test();
}
public static void main(String args[])
{
Closure closure=new Closure();
}
}
もちろん値は変更できません。:)
function getCommonPos($s0,$s1) { $len=strlen($s0); $len1=strlen($s1); if($len1<$len) { $len=$len1; } while($s0[$i]==$s1[$i] && ++$i<$len1); return $i; } function diffStr($s0, $s1) { $pos=getCommonPos($s0,$s1); $end=strrpos(substr($s0,0,$pos),"\\"); return substr($s0,$end); } function countSlashes($str) { return substr_count($str,"\\"); } function getRelativePath($p0,$p1) { $p0=realpath($p0); $p1=realpath($p1); $dir=diffStr($p0,$p1); if(!empty($dir)) { $n=countSlashes($dir); $path=""; for($i=0;$i<$n;$i++) { $path.=".."; if($i<$n-1) { $path.="\\"; } } } $newDir=diffStr($p0,$p1); $newDir=$path.$newDir; if(empty($newDir)) $newDir="."; return $newDir; }
As the Silhouette Cameo is here, I wrote a Java program to draw regular convex polygons and cut out shapes from paper. The photo shows the final product, a bookmark. You can put any of your design into 'production'. With Silhouette Cameo, you get the final products right away. ![]() |
| Silhouette Cameo |
![]() |
| Shamrock |
class Test
{
function __call($name,$parameter)
{
$value=$parameter[0];
switch($name)
{
case "round":
$value=round($value);
break;
case "floor":
$value=floor($value);
break;
case "ceil":
$value=ceil($value);
break;
}
return $value;
}
}
$test=new Test;
echo "Rounding: round(16.4) = ".$test->round(16.4);
echo "<br />";
echo "Floor: floor(16.4) = ".$test->floor(16.4);
echo "<br />";
echo "Ceiling: ceil(16.4) = ".$test->ceil(16.4);
echo "<br />";
This actually is a potential technological breakthrough -- in that the methods bears arbitrary names that are pseudo-defined and typed not dynamically then at programming time. This is a conceptual revolution in the programming. Remember, OOP is just a different form of C's structure.
Rounding: round(16.4) = 16 Floor: floor(16.4) = 16 Ceiling: ceil(16.4) = 17
class HookTest
{
private $a=1;
public function __get($name)
{
echo "$name is being retrieved<br />";
return $this->$name;
}
public function __set($name,$value)
{
echo "$name is being set<br />";
$this->$name=3;
}
}
echo "<pre>";
$test=new HookTest;
$test->a=2;
echo $test->a;
List of fonts:
European
Cyrillic
select's option does not take br tags, or new lines. All lines have to be in a single line.
Here is a jQuery code that select/deselect European and Cyrillic fonts at the same time. The code hooks any click on the European fonts to a handler that select/deselect Cyrillic fonts.
$('#European').live("click",function(){
var selected=$('#European').attr("selected");
if(selected=="selected")
{
$('#Cyrillic').attr("selected","selected");
}
else
{
$('#Cyrillic').attr("selected",false);
}
});
// de-selects the Cyrillic option.
$("#reset").click(function(){
$('#Cyrillic').attr("selected",false);
});
table.background tr td
{
background-color:red;
}
table.background td
{
background-color:blue;
}
<table class="background"> <tr><td>test<td>test <tr><td>test<td>test </table>
var array=new Array(); array[0,0]=0; array[1,0]=1; alert(array[0,0]); alert(array[1,0]);
int index=1; while(val/=base && ++index<len);
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if(e.ColumnIndex==5)
{
// If set, the following will be shown in the cell. The Cell's value typed as an int will not be set correctly.
//e.Value = "1";
// Instead, directly access the Cell object.
int row = e.RowIndex;
int col = e.ColumnIndex;
dataGridView1.Rows[row].Cells[col].Value = 1;
break;
}
}
comboBox1.DataSource = TimeZoneInfo.GetSystemTimeZones(); comboBox2.DataSource = TimeZoneInfo.GetSystemTimeZones();
System.Collections.ObjectModel.ReadOnlyCollectionlist = TimeZoneInfo.GetSystemTimeZones(); TimeZoneInfo[] tzList = list.ToArray(); comboBox1.Items.AddRange(tzList); comboBox2.Items.AddRange(tzList);
public class InitTest
{
int test=0;
InitTestClass testClass=new InitTestClass(test);
public static void main(String args[])
{
InitTest test=new InitTest();
}
}
class InitTestClass
{
int test=0;
InitTestClass(int test)
{
this.test=test;
}
}
namespace InitTest
{
class Program
{
int test = 0;
// Error
InitTestClass testClass = new InitTestClass(test);
static void Main(string[] args)
{
}
}
class InitTestClass
{
int test = 0;
public InitTestClass(int test)
{
this.test = test;
}
}
}
private void comboBox1_DrawItem(object sender, DrawItemEventArgs e)
{
e.DrawBackground();
if (e.Index < comboBox1.Items.Count)
{
e.Graphics.DrawString((string)comboBox1.Items[e.Index], e.Font, Brushes.Black, e.Bounds);
if (e.Index < modifiedMessages.Count() && modifiedMessages[e.Index])
{
Bitmap bmp = new Bitmap(Properties.Resources.checkMark);
int iconWidth = 16;
int iconHeight = 16;
e.Graphics.DrawImage(bmp, e.Bounds.Right - iconWidth, e.Bounds.Bottom - iconHeight, iconWidth, iconHeight);
}
}
e.DrawFocusRectangle();
}
private void dataGridView1_CellFormatting(object sender
, DataGridViewCellFormattingEventArgs e)
{
if (e.Value == null)
{
switch (e.ColumnIndex)
{
case 0:
e.Value=dataGridView1.Rows.Count;
break;
case 1:
break;
case 2:
e.Value = "Instant";
break;
case 3:
break;
case 4:
e.Value = "0";
break;
case 5:
e.Value = "0 sec";
break;
}
}
}
public class NewClassTest
{
class A
{
int i=0;
A(int i)
{
this.i=i;
}
}
class B extends A
{
B()
{
super(1);
}
}
public void test()
{
System.out.println(new B().i);
}
public static void main(String args[])
{
new NewClassTest().test();
}
}
class Class1
{
protected string value = "to be overwritten";
public Class1(string convert)
{
value = convert;
}
}
class Class2 : Class1
{
public Class2(string additional, string convert)
: base(convert)
{
value = convert + additional;
}
public string value { get; set; }
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Class2 test = new Class2(" additional text", "original text");
label1.Text = test.value;
}
}
using System.Runtime.InteropServices;
const int WM_USER = 0x400;
const int PBM_SETSTATE = WM_USER + 16;
const int PBM_GETSTATE = WM_USER + 17;
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
public enum ProgressBarStateEnum : int
{
Normal = 1,
Error = 2,
Paused = 3,
}
public static void SetState(ProgressBar pBar, ProgressBarStateEnum state)
{
SendMessage(pBar.Handle, PBM_SETSTATE, (IntPtr)state, IntPtr.Zero);
}
SetState(progressBar1, ProgressBarStateEnum.Error);
SetState(progressBar1, ProgressBarStateEnum.Normal);
if (progressBar1.Maximum * .9 < len)
{
progressBar1.Value = 0;
SetState(progressBar1, ProgressBarStateEnum.Normal);
progressBar1.Value = len;
SetState(progressBar1, ProgressBarStateEnum.Error);
}
else
{
progressBar1.Value = len;
SetState(progressBar1, ProgressBarStateEnum.Normal);
}
private const int WM_LBUTTONDOWN = 0x201;
private const int WM_NCLBUTTONDBLCLK = 0x00A3;
private const int WM_NCLBUTTONDOWN = 0x00A1;
public bool PreFilterMessage(ref Message msg)
{
switch (msg.Msg)
{
case WM_NCLBUTTONDBLCLK:
case WM_NCLBUTTONDOWN:
case WM_LBUTTONDOWN:
{
int lparam = (int)msg.LParam;
int x = lparam & 0xffff;
int y = lparam >> 16;
Simulator simulator = (Simulator)sender;
Point pos = simulator.RichTextBox1.PointToClient(new Point(x, y));
Rectangle rect = new Rectangle(0, 0, simulator.RichTextBox1.Bounds.Width
, simulator.RichTextBox1.Bounds.Height + SystemInformation.HorizontalScrollBarThumbWidth);
if (!rect.Contains(pos))
{
simulator.focusOff();
}
}
break;
}
return false;
}
LocalPrintServer myPrintServer = new LocalPrintServer();
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
string jobList = "";
foreach (PrintQueue pq in myPrintQueues)
{
if (!pq.IsWaiting)
{
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
jobList = jobList + "Job: " + job.JobName + " ID: " + job.JobIdentifier+"\n";
}
}
}
chrome.browserAction.onClicked.addListener(function(tab) {
alert(tab.url);
});
$data=array();
array_push($data,1);
array_push($data,2);
array_push($data,3);
$width=300;
$height=10+10*count($data);
$image=imagecreatetruecolor($width,$height);
$white=imagecolorallocate($image,255,255,255);
imagefilledrectangle($image,0,0,$width,$height,$white);
$black=imagecolorallocate($image,0,0,0);
$i=0;
foreach($data as $item)
{
$y0=5+10*$i;
$x1=$item*10;
imagefilledrectangle($image,0,$y0,$x1,$y0+10,$black);
$i++;
}
$filename="t.png";
imagepng($image,$filename);
imagedestroy($image);
?>
function copyDirectory($imageDir, $destDir)
{
$handle=opendir($imageDir);
while($filename=readdir($handle))
{
if(strcmp($filename,".")!=0
&& strcmp($filename,"..")!=0)
{
if(is_dir("$imageDir/$filename"))
{
if(!empty($filename) && !file_exists("$destDir/$filename"))
mkdir("$destDir/$filename");
copyDirectory("$imageDir/$filename","$destDir/$filename");
}
else
{
if(file_exists("$destDir/$filename"))
unlink("$destDir/$filename");
copy("$imageDir/$filename","$destDir/$filename");
}
}
}
}
Flask の Blueprint は、ルート、静的ファイル、テンプレートをまとめて管理できます。しかし、テンプレートが指定できません。 ここでは、Blueprint の template_folder の問題点と回避策を説明します。 Blueprint のテンプレート問題...