Language log 2014-04-24: On becoming friends with Japanese (1)

http://en.rocketnews24.com/5-reasons-foreigners-dont-want-to-be-friends-with-japanese-people

Here’s an interesting article about how difficult it is to make friends with Japanese. There’s also a wide-ranging discussion on the same theme in The Japan Times’ Community pages.

I haven’t posted for a long time. I promise I’ll get back to it!

Advertisements

Review I found of Assimil Japanese With Ease course

Here’s a review I found on goodreads.com on the Assimil Japanese with Ease series (which is just two books really). This should be the link here (http://goo.gl/4gm54Z). I like the review because it details the method the reviewer used to help her learn Japanese. Here’s a quote from the review:

The way I worked through each lesson during the passive phase was:

1. listen to the audio a few times seeing how much I could understand,

2. listen to the audio while reading the text,

3. shadow/chorus the audio while reading the text,

4. listen to and read the exer-cise sentences, and

5. review the previous few les-sons.

During the active phase, work-ing on the second-wave lesson to do the active pass on it included:

1. covering up the Japanese and translating the English word-for-word translation to Japanese,

2. seeing where I messed up in (1),

3. listening to the audio again while reading the text,

4. listening to the audio again while shadowing/chorusing the text aloud,

5. listening to and reading the exercise sentences again, and

6. doing the ‘production’ exer-cise sentences (which I just total-ly skipped during passive phase) and checking my answers on those.

During the passive phase, after the first few weeks, I ignored the non-literal translation and only looked at the English word-for-word translation (when I encoun-tered words I didn’t know). Fig-uring out the meaning from the Japanese plus those extra vocab word meanings and the grammar footnotes wasn’t too bad. Also, I should note that I saw a few places where the English non-literal translation was actually incorrect. Maybe that’s why I shied away from using it.

+++

Good review!

Language log 2014-03-10: Notes on Luca webinar interview

Recently, I viewed a YouTube series given by the polyglot Luca. (It’s a seven-part “webinar,” easy enough to find on YouTube.)

Here are some notes I took from it. I include them here purely so that I can refer back to later.

++++

Luca. Bidirectional. Easier to translate from target language to home language.

I’ve refined the technique over the years.

How do I learn from scratch? Get hold of a language series that you can get from the market.

But I have to add that you have to know how to use it.

Books were written to help you acquire an ability. Learn how to choose material. You have to figure out the best way to use it, to make the best out of it.

Find yourself a language partner as soon as possible.

Nobody has really ever learned a language totally by themselves. When you interact with human beings, that’s the moment when your language learning really takes off.

If you don’t live in your target country, then use the Internet. A site like Sharetalk or conversationexchange.com.

How do I know if a book is good?

It has to look good visually. It needs to have some grammar, but not be overloaded with.

It should have some phonetic information. Assimil adds stress patterns.

Next question: Learning a language takes a lot time. How can you maintain the discipline? How to maintain a language-learning routine?

There are some cognitive principles that are important.

· Stick to your routine every single day. But, a lot of people don’t stick to it because they don’t have a lot of time.

· First, ask yourself, Why am I learning this language? If your motivation is weak, you’ll flag.

· Think of what you stand to gain from learning the language.

· Reframe the question: Don’t say I don’t have the time, say I don’t make the time.

o Divide up your study time into blocks. Scientific research shows that intense high-attention study is very effective.

Luca talks about “extensive reading”. What is that? Look it up.

· Energy levels change during the day. They tend to be high in the morning, dwindle after lunch, and then rise again in the evening. “Know your own biorhythm.”

Tasker example: Random vacation SMS

Original URL: http://tasker.wikidot.com/fileproc

Random Vacation SMS

This example brings together several ideas about variables, flow control and widgets.

The purpose of the exercise is to send a random ‘On Vacation’ SMS in reply to a received SMS, and write a log file of which message we sent to who.

We only want to do this when we set a particular variable %ONVAC, so we need two tasks; one to turn on/off the vacation messaging, and one to send the response to SMSs when necessary.

Data File: vac.txt

First, we need to create a data file with our random responses. Each record consists of the message to send, and a tag that we’ll write to a log file log.text so we know which message we sent to who.

Hello, Fred here.
Thanks for your message of %SMSRD. I’m away at the moment but back soon!
;;;
Sent Away Message 1 to %SMSRN at %SMSRT.

Hello, Fred here. I’m on the beach. Wish you were here ?
;;;
Sent Beach Message 2 to %SMSRN at %SMSRT.

There must be a blank line between the two records, because we are going to be reading paragraphsfrom the file.

Note that the items in each record are divided into fields by ;;;, so we can access them separately in our task.

%SMSRN, %SMSRD and %SMSRT are built-in variables which store the last received SMS number, date and time.

We’ll put this file a /sdcard/vac.txt

Responder Task

1. Stop
If %ONVAC = no
Don’t do anything if we’re not on vacation.

2. Variable Randomize %RECNO, 1, 2
Pick a random record between 1 and 2.

3. Read Paragraph vac.txt, %RECNO, %RECORD
Read it into a variable %RECORD.

4. Variable Split %RECORD, ;;;
Split it into the different fields %RECORD1 and %RECORD2.

5. Send SMS %SMSRN, %RECORD1
Send the first field (the message) off to the sender of the SMS we received.
To enter %SMSRN, click the Var button and select Last SMS From.

6. Write File log.txt, %RECORD2, Yes
Append a line to the log file with the second field.

This task is set as the Enter task of a profile containing an SMS Received event.

Control Task

We still need a task to toggle the value of %ONVAC. This would be useful as a homescreen widget, so we create one called TOGGLER to run it.

1. Goto 4
If %ONVAC = yes
If we’re vacationing, jump to the part that turns off vacationing.

2. Variable Set %ONVAC, yes
If we got here, we’re not vacationing. Turn it on.

3. Goto 5
Jump to the part that sets the widget label.

4. Variable Set %ONVAC, no
Turn off vacationing.

5. Set Widget Label TOGGLER, %ONVAC
Set the label of TOGGLER so we can see the current state.

So if %ONVAC is yes, the action flow is 1, 4, 5, otherwise if it’s no it’s 1, 2, 3, 5.

You could instead set the icon of the TOGGLER widget for a more visual indication
with the Set Widget Icon action.

 
page revision: 5, last edited: 5 Aug 2013, 22:36 (213 days ago)
 
+++
 
 

Tasker: Flow Control

 Original URL: http://tasker.dinglisch.net/userguide/en/flowcontrol.html

Flow Control

Overview

Task flow control is based on the following Tasker elements:

  • variable values
  • conditions on individual actions
  • If / Else / Endif actions for conditional grouping of following actions
  • For / End For to do a set of actions once for each of a set of elements
  • Goto action (jumping around within a task).
  • Perform Task action (calling other tasks as subroutines)
  • Stop action (terminate task immediately)

On the Wiki there is a detailed example of processing a file’s content [External Link].

Tip: if you accidentally create a task that never ends when experimenting with loops, use the Kill button in the Task Edit screen to end it manually.

Conditions

Every action can have a condition associated with it (specify this in the Action Edit screen). If the condition does not match, the action will be skipped.

A condition consists of an operator (‘equals’ etc) and two parameters. The possible operators are:

  • Matches (~)
    The right parameter is a pattern which the left parameter is matched against.
  • Not Matches (!~)
    As above, but the match must fail for the action to be executed.
  • Less Than (<)
    Both parameters (after variables are substitued) must be numbers or mathematical expressions and the first must be less than the second e.g. 3 < 6. See Maths for more info.
  • Greater Than (>)
    As above, but the first parameter must evaluate to more than the second.
  • Equals (=)
    As above, but the two parameters must be numerically equal.
  • Not Equals (!=)
    As above, but the two parameters must be not numerically equal.
  • Is/Isn’t Set
    Whether the specified variable has a value or not.

Expressions which are not mathematically valid e.g. I Am The Walrus > 5 give a warning and evaluate to false when used with a mathematical operator.

Foreach Loop

Goal: perform a set of actions for each of applepear and banana.

1. For
%item
apple,pear,banana
Loop once for each of apple, pear and banana
2.   Action One Example: Flash %item
3.   Action Two
4. End For Return to action 1 if we havn’t done all the items yet

Result: Action One and Action Two are performed three times. The first time, the variable %item is set to apple, the second time pear and the last time banana.

You can insert a Goto action in the loop with either Top of Loop (meaning continue, skip to the next item straight away) or End of Loop (meaning break, stop without doing any more items) specified.

In adition to simple text, the For action accepts any comma-separated combination of these Items:

  • a numeric range e.g. 1:5 (= 1,2,3,4,5)
  • a numeric range with a jump e.g. 8:2:-2 (= 8,6,4,2)
  • a numeric range defined by variable values e.g. 2:%end:%skip1:%arr(#)
  • a variable name (which is replaced) e.g. %fruit (= banana maybe)
  • variable array part e.g. %arr(1:2) (= %arr1, %arr2 = apple,banana maybe)

A common case is to use %arr(), which performs a loop for each element in the array %arr.

For Loop

Goal: perform a set of actions for each of a range of numbers in turn.

Use the Foreach Loop as described above, with the Items parameter being a range specification e.g. 4:0, 100, 0:8:2 (= 4,3,2,1,0,100,0,2,4,6,8).

Until Loop

Goal: perform a Task X until some condition is met (at least once)

1. Action One
2. Action Two
3. Goto

If %qtime < 20
Return to action 1 if runtime < 20

Result: Action One and Action Two are performed until %QTIME contains the value 20 or more i.e. until the task has been running for 20 seconds.

Note: %QTIME is a builtin local variable available in all tasks.

While Loop

Goal: perform a Task X while some condition is met.

1. Stop

If %fruit Not Matches Apple

Stop task if it’s not crunchy, otherwise go to next action
2. Action One
3. Action Two
4. Goto
1
Go back and see if we’re still crunchy

Result: Action One and Action Two are performed while %fruit contains the value Apple.

Counter Loop

Goal: perform a Task X a set number of times.

1. Variable Set
%count, 0
Initialize the counter
2. Action One
Label: LoopStart
3. Action Two
4. Variable Add
%count, 1
Add one to %count
5. Goto
LoopStart 
If %count < 10
Return to action 2 if count < 10

Result: after initialization of %count to 0, the task loops around the actions from 2-5 until %count reaches 10, at which point the condition on the Goto fails and the end of the task is reached.

Note that we used a Goto to a labelled action this time. In all but the very simplest tasks it’s better to use a label rather than a number. It’s easier to work out what’s happening and if you insert or delete actions before the loop starts, the Goto will still jump to the right place.

An alternative way to do this loop is to use a For action specified as 0:10.

If / Then / Else Condition

Goal: perform certain Tasks if conditions are met, otherwise perform a different task.

1. If
%fruit ~ Apple
~ is short for ‘matches’
2.   Action One
3.   Action Two
4. Else If
%fruit ~ Pear
an Else action with a condition
5.   Action Three
6. Else  
7.   Action Four

Result: actions One and Two are executed if %fruit matches Apple, Action Three is executed if %fruit matches Pear, otherwise Action Four is executed.

Notes:

  • you can have as many Else Ifs in a condition as you like
  • if your condition is in the middle of a more complicated task, you need to tell Tasker where the condition ends with an End If action

Subroutines

To call another task, use the Perform Task action. To use it as a subroutine, you just need to ensure that the priority of the calling task is less than the priority of the called task (more info: scheduling).

The parent can optionally pass values to the child and receive a result back:

Parent Task

1.   Perform Task 
Child, 
Priority, 10 
%par1, 5, 
Result Value Variable, %result
pass 5 to the child, expect a result in %result
2.   Variable Flash
Result: %result
what did we get back ?

Child Task

1.   Variable Set 
%newval, %par1 + 1, Do Maths
add one to the value that was passed
1.   Return
%newval 
set %result in the parent to the value of %newval in the child

Result: the parent flashes 6

Notes:

  • changes made to %par1 and %par2 in the child task are not reflected by their changing in the parent task
  • receiving a return value is optional for the parent, even if the child tries to give it one
  • unlike Return statements in most computer languages, Tasker’s does not necessarily stop the child task, so if the child and parent have the same priority they can both run together and the child return several results over time.

Tasker: Variables

Variables

General

A variable is a named value which changes over time e.g. the level of the battery, the time of day.

When Tasker encounters a variable name in a text, it replaces the name with the current value of the relevant variable before carrying out the action.

The main purposes of variables are:

  • dynamic binding: doing something with an action with data which is unknown when the task is created e.g. respond to an SMS; the sender is not known until the SMS is received.
  • allow flow control within and between tasks
  • record data for some future use e.g. passing data between tasks

Built-In Variables

The values of Built-In variables are updated by Tasker. Their names always use all-capital letters.

  • Airplane Mode Status
    (dynamic)
    %AIR
    Whether Airplane Mode is on or off
  • Airplane Radios
    %AIRR
    A comma-separated list of the radios which will be disabled when entering Airplane Mode.
    Common radio names are: bluetooth, cell, nfc, wifi, wimax.
  • Battery Level 
    %BATT 
    Current device battery level from 0-100.
  • Bluetooth Status (dynamic)
    %BLUE 
    Whether Bluetooth is on or in some other state (off).
  • Calendar List
    %CALS
    Newline-separated list of calendars available on the device. 
    Each entry is in the format calendarprovider:calendarname.
    Example usage:
    	Variable Set, %newline, \n
    	Variable Split, %CALS, %newline
    	Flash, %CALS(#) calendars, first one is %CALS(1)

    For the sign \n, press carriage-return on the keyboard.

  • Calendar Event Title / Descr / Location %CALTITLE / %CALDESCR / %CALLOC
    The title, description and location of the current calendar event, if there is one. If there are multiple current calendar events the variables refer to the shortest
    Tip: find other details about the current event(s) using the Misc / Test action, specifying %TIMES for the data.
  • Call Name / Number/ Date / Time (In) (dynamic, monitored)
    %CNAME / %CNUM / %CDATE / %CTIME
    The caller name, number, date and time of the current (if a call is in progress) or last call received.
    Caller number is 0 if it’s unknown.
    Caller name is ? if it’s unknown (probably because the caller number was blocked) and set to the caller number if the contact couldn’t be looked up. It’s unavailable on Android versions prior to 2.0.
  • Call Name / Number/ Date / Time / Duration (Out)(dynamic, monitored)
    %CONAME / %CONUM / %CODATE / %COTIME / %CODUR
    The called name, number, date and time of the last (not the current) outgoing call made.
    Called Name is set to the called number if the contact couldn’t be looked up. It’s unavailable on Android versions prior to 2.0.
  • Cell ID (dynamic,monitored) 
    %CELLID
    The current cell tower ID if known.
    If you are using a Cell Near state, note that sometimes the Cell Near state will stay active even though %CELLID reports that the tower ID is unknown or invalid; that is because Cell Near only responds to valid IDs to prevent the state becoming inactive e.g. due to a service interruption.
  • Cell Signal Strength (dynamic,monitored) 
    %CELLSIG 
    The current phone signal level from 0-8 inclusive on a rougly linear scale. On some CDMA phones, the level will rise in steps of 2 (0,2,4,6,8). The value is -1 if the value is unknown or there is e.g. no service. 
    There is a bug with some Android versions that the reported signal strength is not updated until the device is turned off and on.
  • Cell Service State (dynamic,monitored) 
    %CELLSRV
    The current phone service state. One of unknown, service, noservice, emergency, nopower.
  • Clipboard Contents
    (dynamic,monitored) %CLIP 
    The current contents of the system clipboard.
  • CPU Frequency
    %CPUFREQ 
    The current frequency CPU 0 is running at. See also: CPU Control.
  • CPU Governor
    %CPUGOV 
    The current governor controlling the frequency of CPU 0. See also: CPU Control.
  • Date 
    %DATE 
    Current human-readable date.
  • Day of the Month 
    %DAYM 
    Current Day of the Month, starting at 1.
  • Day of the Week 
    %DAYW 
    Current Day of the Week starting with Sunday.
  • Device ID / Manufacturer / Model / Product 
    %DEVID / %DEVMAN / %DEVMOD / %DEVPROD
    The ID, manufacturer, model and product name of the device. 
    Note: ID is not a unique identifier for the device, but rather for the hardware of the device. See also: %DEVTID.
  • Device Telephony ID 
    %DEVTID
    Returns the unique telephony-based ID for the device (e.g. for GSM the IMEI, for CDMA the MEID or ESN). 
    Not available on all devices.
  • Display Brightness %BRIGHT 
    Current screen brightness, 0-255. On some devices, if the Android setting Auto Brightness is enabled, the value will always be 255.
  • Display Timeout %DTOUT 
    Current system screen timeout (seconds).
  • Email From / Cc / Subject / Date / Time (dynamic)
    %EFROM / %ECC / %ESUBJ / %EDATE / %ETIME
    The From, Cc, Subject, Received Date and Received Time of the last email received by the K9 email agent.
  • Free Memory
    %MEMF
    System free memory remaining in MB.
  • GPS Status
    (monitored,dynamic Gingerbread+) %GPS
    Whether the system GPS receiver is on or off.
  • HTTP Response Code / Data / Content Length
    (dynamic)%HTTPR / %HTTPD / %HTTPL
    Values from the last HTTP POST/GET action.
    If the server doesn’t return a content length, %HTTPL will be calculated from the returned data where possible.
  • Input Method
    %IMETHOD
    The current active input method. Consists of 4 parts separated by commas: Method Name, SubType Name, Mode, Locale. 
    To access particular parts, use the Variable Split action.
  • Keyguard Status
    %KEYG
    Whether the Keyguard is on or off
  • Last Application
    %LAPP
    The name of the application that was in the foreground before the current one e.g. Maps.
  • Last Photo
    %FOTO
    The filesystem path to the last photo taken by Tasker or the standard system camera application.
  • Light Level (dynamic,monitored) 
    %LIGHT
    The last recorded light level in lux.
    Note that Android does not return a value until the light level changes, so to test the sensor is working you should put it near a bright light initially. 
    May not change when the device display is off, see Menu / Prefs / More / Display Off Monitoring / Light Sensor.
  • Location (dynamic) 
    %LOC
    The latitude and longitude of the last GPS fix. 
    See note.
  • Location Accuracy (dynamic) 
    %LOCACC
    The accuracy in metres of the last GPS fix. 
    See note.
  • Location Altitude (dynamic) 
    %LOCALT
    The altitude in metres of the last GPS fix, or 0 if unavailable. 
    See note.
  • Location Speed (dynamic) 
    %LOCSPD
    The speed in metres/second at the last GPS position fix or 0 if unavailable. 
    See note.
  • Location Fix Time Seconds (dynamic) 
    %LOCTMS
    The time in seconds of the last GPS fix. To get age of fix, take this away from %TIMES. 
    This value is not set until an offset of the GPS time from the fixed time has been calculated (should be after the first GPS fix) because the value is meaningless until that point. 
    See note.
  • Location (Net) (dynamic) 
    %LOCN
    The latitude and longitude of the last network location fix. 
    See note.
  • Location Accuracy (Net) (dynamic) 
    %LOCNACC
    The accuracy in metres of the last network location fix. 
    See note.
  • Location Fix Time (Net) (dynamic) 
    %LOCNTMS
    The time in seconds of the last net location fix. To get age of fix, take this away from %TIMES. 
    See note.
  • Magnetic Field Strength (monitored,dynamic) 
    %MFIELD
    The total magnitudes in micro-Teslas of the magnetic fields acting on all three axis of the devices sensor. 
    Updated once per second.
    See Also: state Magnetic Field.
  • Music Track (dynamic,monitored))
    %MTRACK
    The current playing music track, supported for:
    • Tasker actions Music Play and Music Play Dir
    • Built-in Android music-player, probably not on all devices however
    • Power AMP
    • BeyondPod (Tasker v1.2.1+)
    • Phantom Music Control Pro
    • Media Utilities

    Priority: if both Tasker and one of the other supported apps are playing simultaneously, the non-Tasker track will be shown. If more than one of the other supported apps is playing simultaneuosly, behaviour is unspecified. 
    Notes:

    • if you don’t have a supported player, you could try Phantom Music Control Pro or Media Utilities, which support a lot of players and should pass the info on to Tasker
    • pausing a track clears the variable, unpausing sets it again
    • your music player may need an option enabled in order to broadcast the track information, or the broadcast may only be available in a ‘pro’ version
  • Muted 
    %MUTED
    Whether the microphone is currently muted (on) or not (off).
  • Night Mode 
    %NIGHT
    The current Android Night Mode.
    One of onoff or auto.
    If auto, Android will decide whether it should be in Night Mode itself.
  • Notification Title (monitored, dynamic) 
    %NTITLE
    The title of the last notification shown in the status bar. Requires Tasker’s accessibility server to be running (see Android Accessibility Settings). Notifications generated by Tasker are not shown. Notifications for some apps will not register i.e. the variable will be blank. 
    Not available on Cupcake.
  • Phone Number 
    %PNUM
    The current phone number of the device, if it’s in service.
    On some phones it doesn’t work (Android limitation), seems related to the type of SIM.
  • Pressure (monitored,dynamic) 
    %PRESSURE
    The current air pressure on the device in millibars. 
    May not change when the device display is off, see Menu / Prefs / Monitor / Display Off Monitoring / Pressure Sensor.
  • Profiles Active (dynamic) 
    %PACTIVE
    A comma-separated list of the currently active, named profiles in activation order. Duplicate names will appear on the list only once. The list always starts and ends with a comma to make matching easier, if it’s not empty.
  • Profiles Enabled (dynamic) 
    %PENABLED
    A comma-separated list of the currently enabled, named profiles in creation order. Duplicate names will appear on the list only once. The list always starts and ends with a comma to make matching easier, if it’s not empty.
  • Roaming 
    %ROAM
    on if device is roaming on the current telephone network, otherwise off.
  • Root Available 
    %ROOT
    yes if root functions are available on this device, otherwise no.
  • Screen (dynamic) 
    %SCREEN
    Whether the screen is on (value on) or off (value off).
  • SDK Version 
    %SDK
    The numeric Android SDK version of the device.
  • Silent Mode (dynamic) 
    %SILENT
    The current state of silent mode: offvibrate or on.
  • SIM Serial Number 
    %SIMNUM
    The serial number of the SIM card, if one is present and accessible. 
    If the SIM has not been unlocked it will not be available.
  • SIM State 
    %SIMSTATE
    The current state of the SIM card.
    One of unknownabsentpinrequiredpukrequirednetlocked or ready.
  • Speakerphone 
    %SPHONE
    Whether the speakerphone is on or off
  • Speech (dynamic) 
    %SPEECH
    The current utterance as a result of a Say or Say File action, if applicable.
  • Tasks Running (dynamic) 
    %TRUN
    A comma-separated list of any named tasks which are currently running. The list always starts and ends with a comma to make matching easier, if it’s not empty.
  • Telephone Network (dynamic, monitored) 
    %TNET
    The current telephony network operator the device is using. 
    May be unreliable on CDMA networks
  • Temperature (monitored,dynamic) 
    %TEMP
    The current ambient temperature in degrees Celsius. 
    May not change when the device display is off, see Menu / Prefs / Monitor / Display Off Monitoring / Temp. Sensor
    See also: state Temperature.
  • Text From/Date/Subject/Time (monitored) 
    %SMSRF / %SMSRN / %SMSRB / %MMSRS / %SMSRD / %SMSRT
    The sender address, name, body, subject, date and time of the last text (SMS or MMS) received. 
    These variables will be empty until the first time a text is received after they have been referenced because Tasker does not monitor texts unless it’s needed.
    Name is set to sender address of no contact could be looked up. It’s unavailable on Android versions prior to 2.0. 
    Body (%SMSRB) is only set for SMSs. 
    Subject (%MMSRS) is only set for MMSs.
  • Time 
    %TIME 
    Current human-readable time separated by a period e.g. 10.59
  • Time MilliSeconds 
    %TIMEMS
    The current time in milliseconds.
    (milliseconds since some time in January, 1970, if you must know).
  • Time Seconds 
    %TIMES
    The current time in seconds.
    (seconds since some time in January, 1970, if you must know).
  • UI Mode (dynamic,monitored) 
    %UIMODE
    The current Android UI mode.
    One of cardeskappliancetv (television), undef (undefined) or normal.
  • Uptime Seconds 
    %UPS
    The number of seconds since the device last booted.
  • Volume – Alarm/Call/DTMF/Media/Notification/Ringer/System (dynamic)
    %VOLA / %VOLC / %VOLD / %VOLM / %VOLN / %VOLR / %VOLS
    Current audio channel volume level.
    On some devices, volume changes are not picked up dynamically, on others not when using the phone app.
  • WiFi Info
    %WIFII
    When connected to an Access Point (AP), shows human-readable data about the AP. When not connected, show details of the most recent Wifi scan results for nearby APs.
  • WiFi Status (dynamic)
    %WIFI
    Whether WiFi is on or off. Note: if WiFi is enabling or disabled, in fact anything but enabled, it’s classed as off.
  • Wimax Status 
    %WIMAX
    Whether Wimax is on or off. Note: if Wimax is enabling or disabled, in fact anything but enabled, it’s classed as off.
  • Window Label (monitored)
    %WIN
    The label of the current window, which could be a full-screen activity or a dialog. 
    Not set if the label is unknown. 
    For some windows, the label might be that of the first item in the window e.g. a menu entry or even a button.
General Notes

Variables marked dynamic in the list above trigger changes in Variable Value states and Variable Set events whenever their value changes.

Variables marked monitored will cause the relevant monitor to startup to track their state when they are used in contexts or tasks which are used by widgets or enabled profiles. For instance, %CELLS used in a Flash action will cause cell location to be tracked.

Limitation: monitored variables cannot be detected in anonymous shortcuts.

Note On Location Variables

When the relevant provider (Net or GPS) of a location context is active, these variables report the values from the provider, which may be more recent than Tasker has seen if other applications are asking for location.

When the relevant provider is not active, these variables report the last values seen by Tasker, which could be the result of a Get Location action or of monitoring for a Location Context.

That means the the reported fix times could go backwards, if you turn off the location provider between two uses of the variables.

Location variables can also be manually updated by running the Get Location action.

User Variables

The action Variable Set (and several others) can be used to create new variables. Variable names have the following restrictions:

  • they must start with the % character
  • they are case-sensitive
  • then must at least a further 3 alphanumeric characters
  • they can also contain the underscore character (_) but not start or end with it

Global vs Local Variables

All built-in variables are global, meaning they are visible anywhere in Tasker (e.g. %WIFI)

User variables which have one or more capital letters in their name are also global (e.g. %Car)

However, user variables which have all-lower-case names (e.g. %fruit) are local, meaning they are only visible in the task or scene in which they are used.

In general, it’s best to use local variables wherever possible because:

  • you know they won’t be interfered with by other tasks or scenes
  • they are more efficient in several ways

Note: multiple copies of the same task running at the same time each have their own separate copy of their local variables.

Scene-Local Variables

Each scene has its own set of local variables, which are initially populated from copies of the local variables of the task which created or showed the scene.

Any task which starts as a result of a scene event (e.g. a tap on an element) shares the variables of the scene; both the scene and task see changes to the variables made by either.

Note as a consequence that a task started by a scene event (e.g. Tap on an element) which shows a new scene e.g. via the Show Scene action, will pass copies of all the variables of the first scene to the new scene.

Builtin Local Variables

  • Task Queue Seconds 
    %qtime
    The number of seconds since the current task first started executing. Note that tasks can be interrupted by higher priority tasks, so this number is not necessarily the total run-time of the task.

Escaping Variable Names

If you want to prevent a variable name being replaced, put a \ in front of it e.g.

Variable Set, %new, \%old

Will set the value of %new to %oldnot the value of %old.

In order to precede a variable name with a \ you can escape the backslash e.g.

 

Variable Set, %new, \\%old

Will set the value of %new to \ followed by the value of %old.

Variable Lifetime

The value a global variable holds lasts until Tasker is uninstalled if it is not changed by any task.

Local variables are lost at the end of the task they were created in, or when the parent scene is destroyed in the case of tasks called from scenes.

Uninitialized Variables

User-variables which have not had a value assigned do not have replacements carried out e.g. in the expression I love %fruit, if %fruit is uninitialized, the expression remains as it is, otherwise %fruit is replaced with the value.

Exception: uninitialized variables used in mathematical expressions are replaced with 0.

Variables In Plugins

Plugin developers can tell Tasker to replace variables it finds in plugin strings with their current Tasker value. If you have a plugin which doesn’t support this, send the developer this URL

http://tasker.dinglisch.net/plugins.html

which has the relevant details.

Variable Arrays

Tasker supports pseudo-arrays.

They are especially useful when used with the For action, since you can perform a set of actions on each element in turn e.g. list a set of files then test each one.

Examples

If the four variables %arr1, %arr2, %arr3, %arr4 hold respectively a, b, c and d then we have an array with 4 elements. These variables can be used just like any other, however it is also possible to access them in special ways. Here are some examples:

  • %arr(#)
    The number of defined array elements (4 in this case)
  • %arr(#>)
    The index of the first defined array element, or 0 if none are defined (1).
  • %arr(#<)
    The index of the last defined array element, or 0 if none are defined (4)
  • %arr(#?b/c)
    A comma-separated list of the array indices (lowest to highest) with matching values, or 0 if none match (2,3 in the example)
  • %arr(>)
    The contents of the first defined array element (a)
  • %arr(<)
    The contents of the last defined array element (d)
  • %arr() or %arr(:)
    All of the array elements separated by commas (a,b,c,d)
  • %arr(2) or just %arr2
    The content of the element with index 2 (b)
  • %arr(2:4)
    Contents of defined elements with indices 2 to 4 (b,c,d)
  • %arr(:3)
    All the defined elements with indices up to 3 (a,b,c)
  • %arr(3:)
    All the defined elements with indices starting from 3 (c,d)
  • %arr(1:2)
    All the defined elements with indices from 1 to 2 (a,b)

Notes:

  • arrays will virtually always have all their elements defined so e.g. %arr(>) will be the same as %arr(1), %arr(#) will be the same as %arr(#<)
  • index specifiers can themselves be variables (e.g. %arr(1:%MAX) or %arr(#?%FINDME))

Creating An Array

  1. using Variable Split:
    Variable Set %arr a,b,c,d
    Variable Split %arr
    If your data has commas in it, you can separate the values with e.g. @ and specify @ also in the Variable Split action.
  2. by assigning individual elements with Variable Set:
    Variable Set, %arr3, c.
  3. using Array Push to add an initial element
  4. some other actions also create arrays for their results e.g. List Files.

Inserting Elements

Use the Array Push action.

The Fill Spaces parameter might need more explanation. It is only relevant if one or more of the array elements are undefined. As an example, if we have the array elements %arr1 and %arr3 containing apple and banana:

  • Array Push %arr1, 1, pear
    leaves %arr1, %arr2 and %arr4 containing pearapple and banana.
  • but Array Push %arr2, 1, pear, Fill Spaces
    leaves %arr1, %arr2 and %arr3 containing pearapple and banana.

Removing Elements

Use the Array Pop action. Note the difference between Array Pop and Variable ClearPop reduces the number of elements in the array, while Clear merely changes elements to undefined.

Example: if we have the array elements %arr1, %arr2, %arr3 containing apple,pear and banana:

  • Variable Clear %arr2
    leaves %arr1 and %arr3 containing apple and banana.
  • but Array Pop %arr2
    leaves %arr1 and %arr2 containing apple and banana.

Deleting An Array

Use Array Clear.

In most cases you could also use Variable Clear %arr* with Pattern Matching checked, but that would also delete variables called e.g. %arrTOODEETOO so Array Clear is safer.

Sorting

The Array Process offers various sorting options, amongst other things.

Array Efficiency

Arrays are intended for convenience when processing high-level data, not for e.g. processing astronomical data. Doing thousands of array actions will likely take several seconds (although mostly due to the housekeeping work done by Tasker in-between each action rather than due to the array operations themselves).

 

In terms of storage efficiency, they are also fairly hopeless. You probably do not want to store tens of thousands of items in an array.

State-of-Being Practice Exercises (copula_ex)

State-of-Being Practice Exercises (copula_ex)
Meaning: State-of-Being Practice Exercises
JLPT Level: 4
Category: lesson
Author: TaeKim

[ Edit This Grammar Entry ]

Notes:
Sorry…no Notes exist yet for this entry…
[ Add Note(s) ]
Tutorial:

Outline

  1. Vocabulary used in this section
  2. Conjugation Exercise 1
  3. Conjugation Exercise 2
  4. Question Answer Exercise

Vocabulary used in this section

In the following exercises, we will practice the state-of-being conjugations we just covered. But first, you might want to learn or review the following useful nouns that will be used in the exercises.

Kanji
To start with, I have listed the kanji you will need for the vocabulary for your convenience. The link will take you to a diagram of the stroke order. However, it doesn’t clearly show the direction (though you can kind of tell by the animation) so you should check with a kanji dictionary if you’re not sure. I recommend practicing the kanji in the context of real words (such as the ones below).

  1. – person
  2. – child
  3. – small
  4. – middle
  5. – big
  6. – friend
  7. – life
  8. – ahead
  9. – study
  10. – school
  11. – high
  12. – car
  13. – accompanying
  14. – reach

Vocabulary
Here is the list of some simple nouns that might be used in the exercises.

  1. うん – casual word for "yes" (yeah, uh-huh)
  2. ううん – casual word for "no" (nah, uh-uh)
  3. これ – this
  4. それ – that
  5. あれ – that over there
  6. こう – (things are) this way
  7. そう – (things are) that way
  8. 人 【ひと】 – person
  9. 大人 【おとな】 – adult
  10. 子供 【こども】 – child
  11. 友達 【ともだち】 – friend
  12. 車 【くるま】 – car
  13. 学生 【がくせい】 – student
  14. 先生 【せんせい】 – teacher
  15. 学校 【がっこう】 – school
  16. 小学校 【しょうがっこう】 – elementary school
  17. 中学校 【ちゅうがっこう】 – middle school
  18. 高校 【こうこう】 – high school
  19. 大学 【だいがく】 – college

Conjugation Exercise 1

We are now going to practice the state-of-being conjugations in order. Take each noun and conjugate it to the following forms: the declarative, negative state-of-being, past state-of-being, and negative past state-of-being.
Sample: 人 = 人だ、人じゃない、人だった、人じゃなかった

1. これ
declarative =
negative =
past =
negative-past =
2. 大人
declarative =
negative =
past =
negative-past =
3. 学校
declarative =
negative =
past =
negative-past =
4. 友達
declarative =
negative =
past =
negative-past =
5. 学生
declarative =
negative =
past =
negative-past =

Show all answers | Hide all answers

Conjugation Exercise 2

In this second exercise, we are really going to test your conjugation knowledge as well as the vocabulary by translating some simple English sentences. Please note that while the positive, non-past state-of-being can be implied, for the purpose of this exercise, we will assume it’s always declaratory. Don’t forget that this creates a very firm and declaratory tone.
Sample: Is student. = 学生だ。

1. Is college.
2. Is not high school.
3. Was teacher.
4. Is adult.
5. Was not child.
6. This was the way it was.
7. Wasn’t that over there.
8. Is not middle school.
9. Is friend.
10. Was not car.
11. Was this.
12. That’s not the way it is.

Show all answers | Hide all answers

Question Answer Exercise

In this last exercise, we’ll practice answering very simple questions using the state-of-being. The yes or no answer (うん or ううん) will be given and it is your job to complete the sentence. In deciding whether to use the declaratory 「だ」, I’ve decided to be sexist here and assume all males use the declaratory 「だ」 and all females use the implicit state-of-being (not the case in the real world).

Sample:
Q) 学生?
A) ううん、学生じゃない。

Q1) 友達?
A1) うん、。 (female)
Q2) 学校?
A2) ううん、。
Q3) それだった?
A3) ううん、。
Q4) そう? (Is that so?)
A4) うん、。 (male)
Q5) これ?
A5) ううん、。(object is away from the speaker)
Q6) 先生だった?
A6) うん、。
Q7) 小学校だった?
A7) ううん、。
Q8) 子供?
A8) うん、。 (female)

Adjective Practice Exercises (adjectives_ex)

Adjective Practice Exercises (adjectives_ex)
Meaning: Adjective Practice Exercises
JLPT Level: 4
Category: lesson
Author: TaeKim

[ Edit This Grammar Entry ]

Notes:
Sorry…no Notes exist yet for this entry…
[ Add Note(s) ]
Tutorial:

Outline

  1. Vocabulary used in this section
  2. Conjugation Exercise
  3. Sentence completion exercise

Vocabulary used in this section

In the following exercises, we will practice the conjugations for adjectives. But first, you might want to learn or review the following useful adjectives that will be used in the exercises.

Kanji
I have listed the kanji you will need for the vocabulary for your convenience. The link will take you to a diagram of the stroke order. However, it doesn’t clearly show the direction (though you can kind of tell by the animation) so you should check with a kanji dictionary if you’re not sure. I recommend practicing the kanji in the context of real words (such as the ones below).

  1. – mask; face
  2. – white
  3. – exist
  4. – name
  5. – hate
  6. – like
  7. – quiet
  8. – music; comfort
  9. – cut
  10. – spicy; bitter
  11. – materials
  12. – reason

Vocabulary

Here is a list of some simple adjectives (and one noun) that might be used in the exercises.

  1. きれい – pretty; neat
  2. いい – good
  3. かっこいい – cool; good-looking
  4. 面白い 【おもしろい】 – interesting
  5. 有名 【ゆうめい】 – famous
  6. 嫌い 【きらい】 – dislike; hate
  7. 好き 【すき】 – like
  8. 大きい 【おおきい】 – big
  9. 小さい 【ちいさい】 – small
  10. 静か 【しずか】 – quiet
  11. 高い 【たかい】 – high; expensive
  12. 楽しい 【たのしい】 – fun
  13. 大切 【たいせつ】 – important
  14. 辛い 【からい】 – spicy
  15. 料理 【りょうり】 – cuisine

Conjugation Exercise

We are now going to practice the adjectives conjugations in order. Take each adjective and conjugate it to the following forms: the declarative (when applicable), negative, past, and negative past. In order to emphasize the fact that you can’t use the declarative 「だ」 with i-adjectives, you should just write "n/a" (or just leave it blank) when a conjugation does not apply.

plain declarative negative past negative-past
面白い
有名
嫌い
好き
大きい
きれい
小さい
いい
静か
高い
かっこいい
楽しい
大切

Show all answers | Hide all answers

Sentence completion exercise

Now that we’ve practiced the basic conjugations for adjectives, we are going to practice using them in actual sentences using the particles covered in the last section.

Fill in the blank with the appropriate adjective or particle

Sample:
Q) 学生?
A) ううん、学生じゃない。

1.
ジム) アリス、今忙しい?
アリス) ううん、。
 
2.
アリス) 何楽しい?
ボブ) ゲーム楽しい。
 
3.
アリス) 人は誰?
ボブ) ジム大切だ。
 
4.
アリス) 料理は、好き?
ボブ) ううん、辛くない料理好きだ。
 
5.
アリス) ジム、かっこいい人?
ボブ) ううん、。
 
6.
アリス) ボブは、人?
ボブ) ううん、有名じゃない。
 
7.
アリス) 昨日のテストは、よかった?
ボブ) ううん、。

Language log 2014-02-17: Studying harder, or studying smarter?

Studying harder, or studying smarter?

Since I started using gold lists to build up my vocabulary, I’ve noticed that I’m studying with more commitment. But is studying harder the same as studying smarter?

Am I making the best use of my time? Am I concentrating too much on vocabulary building at the expense of listening and reading?

Of course, I don’t think this is a zero-sum situation. It’s possible that by focusing on vocabulary, I’m also helping to build up the rest of my Japanese.

However, any spill-over gains from all this vocab work have diminishing returns.

That’s why I’ve been considering cutting back the vocab work so that I bite into reading and listening.

So, where am I now, and what’s the plan going forward?

Right now, I get to work shortly before seven, and aim to do two 20-minute distillation sessions, so that I can finish up by 7:50 am, ready for a 10-minute break before launching into reading and listening at eight.

It rarely works out that way. In practice, I start the first distillation at a good time, around 7:55 or 8 am. However, each distillation takes substantially longer than a pure gold list method because I mix it up with some transcription-style learning.

Instead of writing each word just once, I end up writing it at least twice, and often three times. I do this because kanji is more demanding to learn than anything based on the Latin alphabet. Plus, it’s good for writing practice.

So, in the end, a distillation period can take more than 30 minutes. To be clear, with the second and especially the third distillation, I try to pack in two distillations per 20-minute session.

That means that each day before work, I’m doing 2? to 3 hours of study, but the majority of this is simply reviewing vocabulary. I want to change the balance.

My current emphasis on learning words is partly out of necessity ? I simply don’t have enough words to start following along to news items or dramas on TV. But it’s also partly because I’m scared of the work involved in taking the next step.

So, this blog post is a way for me to not just formulate a new plan, but to get myself on record so that I don’t slip into lazy habits.

Here’s the new plan: Cut down the vocab to half the time ? i.e. do no more than one 20- to 30-minute session. After that, take the 10-minute break and go straight into listening and reading. If I can start the guts of my daily Japanese by 8:30 am, then I can aim to do at least an hour of solid reading. During the rest of the day, I can plug in the earphones and listen in the background.

And that’s the plan. I’m pretty sure I’ll act on it eventually. It’s just a question of when. A question of building myself up to the point where I feel comfortable with it.

Because it still feels a like a really big step.

JGram – The volitional

(desire)
Meaning: Desire and Suggestions
JLPT Level: 0
Category: lesson
Author: TaeKim

[ Edit This Grammar Entry ]

Notes:
Sorry…no Notes exist yet for this entry…
[ Add Note(s) ]
Tutorial:

OutlineHow to get your way in JapanVerbs you want to do with 「たい」Indicating things you want or want done using 「欲しい」Making a motion to do something using the volitional form (casual)Making a motion to do something using the volitional form (polite)Making Suggestions using the 「ば」 or 「たら」 conditional

How to get your way in Japan

We will now learn how to say what you want by either by just coming out and saying it or by making discreet suggestions. The major topics we will cover will be the 「たい」 conjugation and the volitional form. We will also learn specialized uses of the 「たら」 and 「ば」 conditionals to offer advice.

Verbs you want to do with 「たい」

You can express verbs that you want to perform with the 「たい」 form. All you need to do is add 「たい」 to thestem of the verb. However, unlike most conjugations we learned where the verb turns into a ru-verb, this form actually transforms the verb into an i-adjective (notice how 「たい」 conveniently ends in 「い」). This makes sense because the conjugated form just becomes a description of something that you want to do. Once you have the 「たい」 form, you can then conjugate it the same as you would any other i-adjective. However, the 「たい」 form is different from regular i-adjectives because it is derived from a verb. This means that all the particles we normally associate with verbs such as 「を」、「に」、「へ」、or 「で」 can all be used with the 「たい」 form, which is not true for regular i-adjectives. Here’s a chart just for you.

「たい」 conjugationsPositiveNegativeNon-Past行きたい行きたくないPast行きたかった行きたくなかった

Examples

(1) 何をしたいですか。- What do you want to do?
(2) 温泉に行きたい。- I want to go to hot spring.
(3) ケーキ、食べたくないの?。- You don’t want to eat cake?
(4) 食べたくなかったけど食べたくなった。- I didn’t want to eat it but I became wanting to eat.
Example (4) was very awkward to translate but is quite simple in Japanese, refer to "Using 「なる」 with i-adjectives". The past tense of the verb 「なる」 was used to create, "became want to eat". Here’s a tongue twister using the negative 「~たくない」 and past-tense of 「なる」: 「食べたくなくなった」 meaning "became not wanting to eat".

This may seem obvious but 「ある」 cannot have a 「たい」 form because inanimate objects cannot want anything. However, 「いる」 can be used with the 「たい」 form in examples like the one below.
(1) ずっと一緒にいたい。- I want to be (lit: exist) together forever.

Also, you can only use the 「たい」 form for the first-person because you cannot presume to be able to read someone else’s mind to see what he/she wants to do. For referring to anyone beside yourself, it is normal to use expressions such as, "I think he wants to…" or "She said that she wants to…" We will learn how to say such expressions in a later lesson. Of course, if you’re asking a question, you can just use the 「たい」 form because you’re not presuming to know anything.

(1) 犬と遊びたいですか。- Do you want to play with dog?

Indicating things you want or want done using 「欲しい」

In English, we employ a verb to say that we want something. In Japanese, ‘to want’ is actually an i-adjective and not a verb. We saw something similar with 「好き」 which is an adjective while ‘to like’ in English is a verb. While I didn’t get too much into the workings of 「好き」, I have dedicated a whole section to 「欲しい」 because when combined with the te-form of a verb, it becomes, "to want something done". We will learn a more polite and appropriate way to make requests in the "Making Requests" lesson instead of saying, "I want this done." Though not a set rule, whenever words come attached to the te-form of a verb to serve a special grammatical function, it is normal to write it in hiragana. This is because the kanji is already used for the verb and the attached word becomes part of that verb.

Examples

(1) 大きい縫いぐるみが欲しい!- I want a big stuffed doll!
(2) 全部食べてほしいんだけど・・・ – I want the whole thing eaten but…
(3) 部屋をきれいにしてほしいのよ。 – It is that I want the room cleaned up, you know.
Like I mentioned, there are more appropriate ways to ask for things which we won’t go into until later. This grammar is not used too often but is included for completeness of this lesson.

Making a motion to do something using the volitional form (casual)

The term volitional is here means a will to do something. In other words, the volitional form actually indicates that someone is set out to do something In the most common example, this simply translates into the English "let’s" or "shall we?" but we’ll also see how this motion to do something can be used to express an effort to do something in a lesson further along.

To conjugate verbs into the volitional form for casual speech, there are two separate rules for ru-verbs and u-verbs. For ru-verbs, you simply remove the 「る」 and add 「よう」. For u-verbs, you replace the / u / vowel sound with the / o / vowel sound and add 「う」.

Conjugations rules for the casual volitional formFor ru-verbs: Remove the 「る」 and add 「よう」
例) 食べ → 食べ + よう → 食べようFor u-verbs: Replace the / u / vowel sound with the / o / vowel sound and add 「う」
例) 入 → 入 + → 入ろう

Here is the same chart you should be used to seeing.Sample ru-verbsPlainVolitional食べ食べようよう信じ信じようよう起き起きようよう掛け掛けよう Sample u-verbsPlainVolitionalローマ字ローマ字 (Vol.)そうhanasuhanasouこうkikukikouぼうasobuasobouとうmatumatouもうnomunomouろうnaorunaorouのうshinushinou Exception VerbsPlainVolitionalするしようくるこよう

Examples

I doubt you will ever use 「死のう」 (let’s die) but I left it in for completeness. Here are some examples.
(1) 今日は何をしようか? – What shall we do today?
(2) テーマパークに行こう! – Let’s go to a theme park!
(3) 明日は何を食べようか? – What shall eat tomorrow?
(4) カレーを食べよう! – Let’s eat curry!
Remember, since you’re setting out to do something, it doesn’t make sense to have this verb in the past tense. Therefore, there is only one tense and if you were to replace 「明日」 in (3) with, for example, 「昨日」 then the sentence would make no sense.

Making a motion to do something using the volitional form (polite)

The conjugation for the polite form is even simpler. All you have to do is add 「~ましょう」 to the stem of the verb. Similar to the masu-form, verbs in this form must always come at the end of the sentence. In fact, all polite endings must always come at the end and nowhere else, as we’ve already seen.

Conjugations rules for the polite volitional formFor all verbs: Add 「~ましょう」 to the stem of the verb
例) 食べ → 食べ + ましょう → 食べましょう
例) 入 → 入 + ましょう → 入りましょう

Sample verbsPlainVolitionalするしましょうくるきましょう寝る寝ましょう行く行きましょう遊ぶ遊びましょう
Again, there’s nothing new here, just the polite version of the volitional form.
(1) 今日は何をしましょうか? – What shall we do today?
(2) テーマパークに行きましょう! – Let’s go to a theme park!
(3) 明日は何を食べましょうか? – What shall eat tomorrow?
(4) カレーを食べましょう! – Let’s eat curry!

Making Suggestions using the 「ば」 or 「たら」 conditional

You can make suggestions by using the 「ば」 or 「たら」 conditional and adding 「どう」. This literally means, "If you do X, how is it?" In English, this would become, "How about doing X?" Grammatically, there’s nothing new here but similar to 「~たくなる」 and 「~てほしい」, this is a set phrase.

Examples

(1) 銀行に行ったらどうですか。- How about going to bank?
(2) たまにご両親と話せばどう?- How about talking with your parents once in a while?

← Previous (Expressing "have to")Table of ContentsNext (Quoted subordinate clauses) →

Copyright © 2003-2006 Tae Kim (kimchi314)