605 items|« First « Prev 7 8 (9/61) 10 11 Next » Last »|
Submitted by Little Bear on 2 ต.ค. 61 08:41

กำลังอยู่ในช่วงรื้อ code jQuery jeditable แก้ไขใหม่จาก GitHub หลังจากศึกษาจากคู่มือ ก็จำต้องเขียน plugin บางตัวขึ้นใช้เอง

นี่คือ plugin ที่ง่ายที่สุดแล้ว 555

$.editable.addInputType('radio', {

})

แต่เนื่องจากว่ามันไม่ได้ทำอะไรเลย หลังจากสร้าง element เรียบร้อยแล้ว ก่อนที่จะ return จึงต้องสั่งให้มันบันทึกข้อมูลทันที

// SAVE value immediately when radio or checkbox click
if (inputType == 'radio' || inputType == 'checkbox') {
    self.save($this, value, callback)
}
Submitted by Little Bear on 4 ก.ย. 61 10:00
Intro Am / G Am / Am /Am
C         G       Am   C          G    Am
อันสรรพสิ่งมากมี หรือหมองไป โอย...ผู้เฒ่าถอนใจ โถเอาอะไรชีวิตคน
C            G    Am        C          G    Am   F  G      Am / F G/Am
เราเล่นกับมัน มันก็เล่น ระวังชีวีจะสับสน เรามีกันมาแต่ละคน ต่างตรง สุดไว้ด้วยความตาย
        F    G            Am (3/3) F          G   Am
** โอย...ความตาย ผู้ถ่ายเทการกำเนิด      มากันเถิดผองชีวิต กองเกวียนคนยาก
C      G   Am         C       G   Am   F G       Am/F G/Am
กระบี่อยู่ที่ใจ มีไว้ติดลับให้คม คนละคมสองคม ป้องไว้ ป้องภัยจึงปลอดภัย
2/3(3/3)F         G         Am(3/3)  F      G        Am
..โอย...หนีก็ต้องหนี ไปบ้านผีไม่มีคนตาม       มุ่งจะไปสวรรค์ ถ้าไม่ยังงั้น ไปยังกองเกวียน
C         G  Am     (3/3)    C   G    Am F        G            Am
ไง..ร่างนี้ขอฝาก คืน...สู่ให้กับโลก พ่อแม่พี่น้อง ลูกเมีย เพื่อนมนุษย์ สัตว์ทั้งหลาย อโหสิกรรมด้วย
Solo F / G /Am / Am / F G / Am / 2/3 F G / Am 2/3 C / G / Am / Am / C / G / Am / Am / F G / Am / Am / Am / Am / Am F  G    Am อโห...อโหสิกรรม อโห....อโหสิกรรมด้วย อโห....อโหสิกรรมนะ อโห....อโหสิกรรมด้วย

ที่มา MusicSTM

Submitted by Little Bear on 25 ส.ค. 61 14:02

Firebase Database Security Rules ยังเขียนไม่ค่อยจะเป็น ขอเก็บข้อมูลไว้ศึกษาก่อน

Submitted by Little Bear on 24 ส.ค. 61 13:09

LetsEncrypt certificate error ประมาณ

Details
Getting challenge for domain.com from acme-server...
Error: http://domain.com/.well-known/acme-challenge/letsencrypt_xxxxxxxxxx is not reachable. Aborting the script.
Please make sure /.well-known alias is setup in WWW server.

ยังหาสาเหตุไม่เจอ

แก้ไขชั่วคราว

Check /etc/httpd/conf/extra/httpd-alias.conf that have this line: Alias /.well-known /var/www/html/.well-known

หากไม่มีก็เพิ่มเข้าไป

Alias /.well-known /var/www/html/.well-known

แล้วลองสร้าง SSL หากขึ้น error ก็ให้สร้าง folder /var/www/html/.well-known/acme-challenge/letsencrypt_xxxxxxxxxx ด้วย

mkdir /var/www/html/.well-known/acme-challenge/letsencrypt_xxxxxxxxxx

แล้วสร้าง SSL ใหม่อีกที

Submitted by Little Bear on 16 ส.ค. 61 09:39
Hello Darling
written and recorded by Conway Twitty

C                                           C7
Hello darling  nice to see you  it's been a long time
               F                      C
You're just as lovely  as you used to be
                             G7      C
How's your new love  are you happy   hope you're doing fine
        D7                       G7
Just to know it means so much to me
C                            G7          C
What's that darling  how'm I doing   I'm doing all right
         F                                    C
Except I can't sleep and I cry all night till dawn
                             F                   C
What I'm trying to say is  I love you and I miss you
           F          G7        C
And I'm so sorry that I did you wrong

                        G7                 C
Look up darling  let me kiss you  just for old time sake
       F                            C
Let me hold you in my arms one more time
                           G7         C
Thank you darling  may God bless you  and may each step you take
          D7                               G7
Bring you closer to the things you seek to find

C                         G7         C
Goodbye darling  gotta go now  gotta try to find a way
              F                              C
To lose these memories of a love so warm and true
                                       F        C
And if you should ever find it in your heart to forgive me
                          G7          C
Come back darling I'll be waiting for you


Hello Darling
written and recorded by Conway Twitty

C/G C/G C/G C7 C/G                        G        C          C7 Hello darling  nice to see you  it's been a long time               F                      C G You're just as lovely  as you used to be C/G                          G      C                C7 How's your new love  are you happy  Hope you're doing fine         D                        G Just to know it means so much to me C/G                  G                  C        C7 What's that darling  how'm I doing  I'm doing all right         F                                    C G Except I can't sleep and I cry all night till dawn         C        C7        F              C What I'm trying to say is  I love you and I miss you     F            G              C G And I'm so sorry that I did you wrong

C/G                    G              C            C7 Look up darling  let me kiss you  just for old time sake       F                            C G Let me hold you in my arms one more time C/G                    G                      C            C7 Thank you darling  may God bless you  and may each step you take           D                                G Bring you closer to the things you seek to find

C/G                    G            C            C7 Goodbye darling  gotta go now  gotta try to find a way               F                              C G To lose these memories of a love so warm and true C/G                    G              C        C7 And if you should ever find it in your heart to forgive me           F              G          C        F C G C Come back darling I'll be waiting for you

Video : 1 2
Ref : 1 2

Submitted by Little Bear on 3 ส.ค. 61 17:00

วิธีสำเนา Android Application Source Code ไปเป็น Application ใหม่ ลองทำตามขั้นตอนดังนี้

Copy and rename a project

For some lessons, you will need to make a copy of a project before making new changes. You may also want to copy a project to use some of its code in a new project. In either case you can copy the existing project (ExistingProject), and then rename and refactor the new project's (NewProject) components to use the new project's name. (In the instructions below, substitute your actual project names for ExistingProject and NewProject.

1. Copy the project

  1. On your computer's file system (not in Android Studio), make a copy of the ExistingProject directory.
  2. Rename the copied directory to NewProject .

2. Rename and refactor the project components

The old name of the project, ExistingProject, still appears throughout the packages and files in the new copy of your project. Change the file and the package references in your app to the new name, as follows:

  1. Start Android Studio
  2. Click Open an existing Android Studio project.
  3. Navigate to the NewProject directory, select it, and click OK.
  4. Select Build > Clean Project to remove the auto-generated files.
  5. Click the 1:Project side-tab and choose Android from the drop-down menu to see your files in the Project view.
  6. Expand app > java.
  7. Right-click com.example.android.existingproject and choose Refactor > Rename. This opens the Rename dialog.
  8. Change existingproject to newproject.
  9. Check Search in comments and strings and Search for text occurrences and click Refactor.
  10. The Find Refactoring Preview pane appears, showing the code to be refactored.
  11. Click Do Refactor. (ปุ่ม Do Refactor อยู่ที่แถบด้านล่าง มองหาตั้งนาน เพิ่งเจอ)
  12. Expand res > values and double-click the strings.xml file.
  13. Change the name="app_name" string to New Project.

3. Update the build.gradle and AndroidManifest.xml files

Each app you create must have a unique application ID, as defined in the app's build.gradle file. Even though the above steps should have changed the build.gradle file, you should check it to make sure, and also sync the project with the gradle file:

  1. Expand Gradle Scripts and double-click build.gradle (Module: app).
  2. Under defaultConfig, check to make sure that the value of the applicationID key has been changed to "com.example.android.newproject". If it has not changed, change it manuall now.
  3. Click Sync Now in the top right corner of the Android Studio window.
    Tip: You can also choose Tools > Android > Sync Project with Gradle File to sync your gradle files.

In addition, some apps include the app name in readable form (such as "New Project" rather than newproject) as a label in the AndroidManifest.xml file.

  1. Expand app > manifests and double-click AndroidManifest.xml.
  2. Find the statement below, and if necessary, change the label if to the string resource for the new app name:
android:label="@string/app_name"

เปิดใช้งาน ADB ผ่าน WIFI โดยไม่ต้องใช้สาย USB

$Library/Android/sdk/platform-tools/adb tcpip 5555
$Library/Android/sdk/platform-tools/adb connect 192.168.2.103:5555

อ่านรายละเอียดต่อได้ที่ Copy and rename a project

Submitted by Little Bear on 2 ก.ค. 61 23:21

คาดว่า Mainboard ของ WD My Book Live คงจะเสียหายจากฟ้าผ่า หลังจากรื้อเอา harddisk ออกมา ก็หาทางเอาข้อมูลออก

เนื่องจากไม่มีเครื่องคอมตั้งโต๊ะเหลืออยู่อีกแล้ว เลยสั่ง Orico Harddisk Dock มา 1 ตัว

หลังจากเสียบ harddisk ลงไปก็มองเห็น harddisk แต่ mount ไม่ได้

จำเป็นต้องใช้ fuseext2 ตามนี้

ติดตั้งโปรแกรมก่อน

sudo apt-get install fuseext2 parted
sudo parted -l

มองเห็น partition /dev/sdb4

สั่ง mount disk

sudo mkdir -p ~/WD
sudo fuseext2 -o ro -o sync_read /dev/sdb4 ~/WD

แล้วก็หาทาง copy data ออกมา

อ่านต่อได้ที่ Recovering data from a WD Mybook Live 2TB / 3TB

Submitted by Little Bear on 2 ก.ค. 61 00:32

CMD+SHFT+ALT+K is the easiest way to convert from Java to Kotlin in Android Studio

รายละเอียด

Submitted by Little Bear on 18 มี.ค. 61 09:34

เกิดปัญหาจากการ mount network drive บน Finder ของ Mac OSX เมื่อใช้ SMB ที่ป้อนรหัสแล้วไม่ผ่าน เลยเปลี่ยนมาเป็น CIFS ที่ป้อนรหัสเดียวกัน กลับผ่านเฉยเลย

open 'cifs://user:password@server/share'

หาก mount ด้วย SMB เมื่อป้อนรหัสแล้วไม่ผ่าน (ยังไม่รู้ว่าเกิดอะไรขึ้น) แต่หาก mount ด้วย CIFS ด้วยรหัสเดียวกัน จะผ่าน เมื่อเปิดดู Info ก็จะบอกว่าเป็น smb เหมือนกัน

open 'smb://user:password@server/share'

ที่มา How can I mount an SMB share from the command line? , Make your AFP NAS more responsive

605 items|« First « Prev 7 8 (9/61) 10 11 Next » Last »|