Posts

objective c - Bold + Italic Shortcuts in Document-Based Applications -

i've been reading using first responder proxy object, , dragging connections buttons in order create usable actions (align left, right, etc). however, default, first responder doesn't contain bold , italic actions. tried adding these actions opening menu.xib , dragging (font > bold) menu item first responder , setting boldit function (custom) overwrites existing action (font manager: addtrait). there way efficiently add bold/italic button on document.xib? seems lot of work common. new obj-c best, zach in menu xib, there object (the bold menu item), tag 2, , action connected -addfonttrait: method of nsfontmanager instance. you need same thing in document xib. add nsfontmanager object; create bold button; set tag 2; , connect action -addfonttrait on nsfontmanager.

ide - Is there a way to directly edit files on a server? -

is there anyway directly code on server, meaning open file server , save there? or there method faster traditional ftp automatically syncs server when save locally? using svn option. read this: combined svn ftp system

What is the de facto library for creating Python Daemons -

i attempting use python-daemon library seemed me safest way create daemon without forgetting anything. documentation quite poor, being pep 3143 . on other hand , have found lot of links sander marechal's a simple unix/linux daemon in python . looks nicer solution or though have not yet attempted use it. edit: have used sander marechal's solution , seems work nicely. so de facto way in python community create daemon, 1 of these libraries, or doing (forking twice etc.)? also, think library pep far better choice since closer comprehensive way of creating daemon (or @ least more standard way) other solution. deal python-daemon package, ever included in standard library? i went sander marechal's a simple unix/linux daemon in python , is simple, , work creating subclass , overriding run() method, feels natural way things (rather with context: approach of python-daemon module.

c - While creating IP, IGMP packets using Raw Sockets, How to fille the hex value in those packets? -

i have 1 ip packet, includes igmp packet. want simulate using raw socket programming. checksum field of ip packet e1c9, how assign value in programming. tried iphdr->iph_chksum="e1c9"; also iphdr->iph_chksum=57801; is above thing right? it not working properly, please tell me exact way? thanks in advance....... :) the c syntax hexadecimal values 0xe1c9 in case. should ensure using correct byte order, need pass value through htons

jsp - How to loop the value stored in session? -

sorry interrupt of you. i have question session. in case, need check session has stored value or not. if session not null, want loop value comparison. now, use if statement check last record of book id repetitive or not. but don't know how use loop check there book id repetitive or not. would 1 provide advice me acheive goal? many thanks. here source code: <%@ page contenttype="text/html; charset=big5"%> <%@ page import="java.io.*" %> <%@ page import="java.sql.*" %> <%@ page import ="javax.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="java.lang.*"%> <%! public class bookinfo { private string id; private string name; private int count; public bookinfo(string id, string name, int count) { this.id = id; this.name = name; this.count = count; } public string getid() { return id; } publ...

javascript - jQuery ways to dynamically .append a div to the dom, and then find it later without setting an ID, class, or anyway to indentify it -

update: contributed, it's appreciated, kind , generous , of deserve dear respect. cheers. note: i'm making simple jquery tooltip plugin, tooltip fire on mouseover. mouseover create instance of div tool-tip specific each anchor launched div tool-tip. each anchor class .c_tool have own created div erase after mouseout. anyway details irrelevant. important how create div .append() or .add() on , find way call , apply actions div without setting identifier (id), class, or means identify it. i know theres way find div counting, if gave every created div same class , counted them find one, don't know if efficient method why i'm asking help. i'm not going post whole plugin script thats unnecessary, i'll paste simplified version. <a href="#" class="c_tool">hover me</a> <a href="#" class="c_tool">hover me</a> $(document).ready(function() { obj = $('a.c_tool'); obj.mouseover...

android - how to split main.xml to other xmls? -

i have main.xml , large file, want split of components(some layouts) other xml can link main.xml itself. possible android ? you can use <include layout="@layout/commonlayout" android:id="@+id/id" /> refer import xml xml