---
layout: post
title: "Week in Review"
date: 2023-08-07 07:01:00 +0000
tags:
image: https://audreywatters.s3.amazonaws.com/2023-08-07-donut.jpg
imagecredits: https://audreywatters.com
---
Poppy thought she knew the new routine. But then Kin had a WFH day on Monday; and for the rest of the week, he’s gone into a different office than usual, so there’s been a totally different morning walk. Even without this change, each morning walk is a little bit different; Poppy and I walk Kin to work, but we take a different route every day — a different route there, and a different one back. It’s fun to explore the new neighborhood. (It’s less fun when our zigzag path takes us through Times Square, even though, at 7:30 in the morning, it’s pretty empty.)
Poppy craves the routine — or maybe I’m just projecting. We like to think that dogs live in the present moment; that time is a human construct that they aren’t burdened with. But dogs do sense the passage of time. Poppy knows, at the very least, that certain things happen in a certain order — “the routine.” We walk every morning, and Kin leaves us halfway through. But shortly after her dinner, he comes home. She’ll eat and then wait by the front door. She gets a bit anxious when certain things don’t happen in the right order. Weekends, for example, are weird. (How the hell would she know it's a Saturday.)
I thought she'd stopped howling and barking when left alone at home now — she knows this is her home. But I still fret about her when I’m gone. And on Friday, when I went to the gym and Kin, working from home again, was the person to put her in her crate while he ran an errand, she started howling again. "Routine," she cried. "Where's my routine?"
Otherwise, the past week looked a little like this:
Monday:
- I hired housecleaners, which is a huge privilege, but damn, I hate cleaning so very, very much. And the apartment we moved into wasn't really thoroughly cleaned — that's my excuse. I don't know if I can afford to have them come regularly. Man, I hope so.
Tuesday:
- I did my weekly speed-work on the treadmill. I gotta admit, I'm sort of enjoying it now that I've come to terms with it. It certainly makes something like "hill repeats" easier.
- I spent much of the day (it felt like) making the obligatory eye, doctor, dentist appointments. Navigating new insurance and finding new care providers is such a pain. (I realize as I'm typing this that the dentist never got back to me. Damnit.)
Wednesday:
- Finally I had a day of lifting where my lifts were good.
- I was really annoyed by the Citibike availability on my way to and from the gym — I had to walk farther to pick one up; took my longest bike ride thus far; had to bike farther to deposit it; had to walk farther to pick one up after the gym. (I wrote about all this in Second Breakfast)
- On a whim — to notify folks who I haven't told that we've moved to NYC, I re-activated FB, only to learn about death of a friend’s little brother and be suggested by the company that I friend a throwaway account of Isaiah’s.
Thursday:
- Thursday's treadmill was also good. I tried to do Gatorade Sweat test, but it didn't work. Honesty much of reviewing technology — fitness or education or otherwise — seems to be "this didn't work."
- I stopped at Amy’s Bread on the way back from walking Kin to work to buy some bread. Leaving Poppy tied up outside gives me huge anxiety.
Friday:
- Friday lifts — deadlifts and overhead press — were good, in no small part because I found the microplates for the latter.
- Friday's biking was good.
- Friday's swim, also good — I think I prefer training by time rather than by distance. I quickly lose track of the number of laps, but I can always look at the clock and see how long I've been at it
- I ordered donuts for delivery from Doughnut Project and HOLY FUCKING SHIT they were the most amazing donuts ever -- chili lime mango, everything bagel, cinnamon roll, maple cruller.
Saturday:
- Ess-a-Bagel again
- Saturday's run was outdoors. It was very humid but quite cool — I can run at 6am on weekends, whereas I run around 10 during the week, so the treadmill. And this time, the Gatorade sweat test worked. Story to come on Second Breakfast.
- Kin and I went out for dinner Saturday: Lumlum for Thai food and Schmakerys for dessert. I wasn't blown away by either.
Sunday:
- Sunday are my long run day in this training block, and it was back to Central Park for the 6 mile loop (with the additional 1.5 mile loop around the reservoir) — 9 miles all told. There was a bike race going on, and now I'm even more nervous about that triathlon I signed up for. My god, they ride so fast! So bunched up together!


Before Change
ialpha = 1.0/alpha
aTH = alpha*TH
if beta == 0:
return W/(cos(TH)/tan(aTH)+sin(TH))*((cos(aTH)+sin(aTH)*tan(TH))/W)**ialpha
val0 = beta*tan(pi*alpha/2)
th0 = arctan(val0)/alpha
val3 = W/(cos(TH)/tan(alpha*(th0+TH))+sin(TH))
res3 = val3*((cos(aTH)+sin(aTH)*tan(TH)-val0*(sin(aTH)-cos(aTH)*tan(TH)))/W)**ialpha
return res3
After Change
sz = self._size
alpha = broadcast_to(alpha, sz)
beta = broadcast_to(beta, sz)
TH = uniform.rvs(loc=-pi/2.0, scale=pi, size=sz)
W = expon.rvs(size=sz)
aTH = alpha*TH
bTH = beta*TH
cosTH = cos(TH)
tanTH = tan(TH)
res = _lazywhere(alpha == 1, (alpha, beta, TH, aTH, bTH, cosTH, tanTH, W),
alpha1func, f2=alphanot1func)


{% extends "base.html" %} {% block additional_headers %} {% endblock %} {% block header %}Part 1 - Overview{% endblock %} {% block body %}
Start » Overview » Psychographic battery » Sexuality » Finish
Firstly, let's establish how you relate to the furry fandom.
This question is asked to check for any shifts in the overall age of the furry subculture, as well as to check for signs of 'aging out'.
This question is asked to understand the breakdown of gender identity within the furry subculture.
Optional: in addition, you may click anywhere in the diamond below to indicate both where you feel you fit on the spectrum of gender identity, as well as how strongly you experience gender.
This section requires JavaScript to complete
This question is asked to understand the breakdown gender alignments within furry.
Optional: in addition, you may click anywhere in the diamond below to indicate both where you feel you fit on the spectrum of gender expression, as well as how strongly you express that gender.
This question is asked to explore the breakdown of sexual orientation within the fandom, and generally follows the Kinsey scale.
This question is asked to investigate where furries live in the world and how that shifts over time.
This question explores how large a city furries live in, and helps with estimates of the fandom's size.
This question is asked to understand the general racial background of the furry subculture. Note: this question follows a structure similar to the US Census, and is intended to imply only broad racial categories. Please feel free to be more specific in the provided space.
This question is asked to see how furries identify spiritually.
This question is used to estimate where most furries are on political matters.
This question asks what your primary occupation is. Select all that apply.
This question is asked to understand the level of education attained by furries. Note that, in some parts of the world such as the United States, university may be referred to as 'college', which carries a different meaning elsewhere. We refer here strictly to university-level education.
This question is asked to understand the relationships that furries enter. If you are in multiple relationships, please enter for the primary or first relationship - there are options to select below for sexually open or polyamorous relationships.
This question is used to see how big of a part furry plays in the respondent's life.
Optional: in addition, you may click anywhere in the diamond below to indicate your gender expression within the furry fandom, both where you feel you fit on the gender spectrum, as well as how strongly you experience gender
Leave blank if you do not have an opinion on or haven't interacted with the topic.
This question asks about the persona with which you use to interact with the furry fandom, referred to here as your "character". Please enter the details for your primary character only below; only check the species that applies to your primary character. If you have additional or previous characters, you may click the '+ Add Character' button below; only check the species that applies to that character. Enter as much or as little information for as many or as few characters as you want!


Food Lovers
I
♥
FOOD
Customer Name
Food Type
shawarma
burger
pizza
Order Image
Order Details
Remove Your Orders


--- tags: - 基础算法-模拟 grammar_cjkRuby: true catalog: true layout: post header-img: "img/header/P23.jpg" preview-img: "/img/preview/P63.jpg" ---
标签：模拟
From beginning till end, this message hasbeen waiting to be conveyed.
For a given unordered multiset ofnlowercase English letters ("multi" means that a letter may appearmore than once), we treat all letters as strings of length 1, and repeat thefollowing operationn - 1 times:
The cost of such operation is defined to be, wheref(s, c) denotes the number of times characterc appears in strings.
Given a non-negative integerk,construct any valid non-empty set of no more than 100 000 letters, such that the minimum accumulative cost of the wholeprocess is exactlyk. It can be shown that a solution always exists.
Input
The first and only line of input contains anon-negative integerk (0 ≤ k ≤ 100 000) — the required minimum cost.
Output
Output a non-empty string of no more than 100 000 lowercase English letters — any multiset satisfying therequirements, concatenated to be a string.
Note that the printed string doesn't needto be the final concatenated string. It only needs to represent an unorderedmultiset of letters.
Example
Input
12
Output
abababab
Input
3
Output
codeforces
Note
For the multiset {'a', 'b', 'a', 'b', 'a', 'b','a', 'b'}, one of the ways to complete the process is as follows:
The total cost is 12, and it can be provedto be the minimum cost of the process.
题意：给你一个字符串序列的最小价值，求该字符串本身，反正题意十分不明确
最小价值：定义每个小写字母在字符串中出现x次，那么cost=sum(x*(x+1)/2)
题目中那些玄学的价值计算方法都是浮云，实际上就是反着倒退模拟，
参考代码
#include<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
cin>>n;
for(int i=1;i<=26;i++)
{
k=1;
while(k*(k+1)/2<=n)k++;
n-=k*(k-1)/2;
for(int j=1;j<=k;j++)printf("%c",'a'+i-1);
}
return 0;
}


Player 1 Won!
Change Settings
Play Again
Player 1
Player 1 roll
Player 2
Player 2 roll
Leaderboard
Reset Game
Player 3
Player 3 roll
Player 4
Player 4 roll


B
uild and
D
eploy
Dev Teams
{{team.teamName}}
Tools
Recent Activity
Graphs
Find Host
Work Items
Users
Parameters
Help
{{team.teamName}}
{{service.serviceName}}
Back


System software queries¶
What Linux distribution version am I running?¶
The following commands can be used:
cat /etc/redhat-release
or
lsb_release -a
What software levels are installed on the system?¶
The Module utility is used to install packages on the system. The following will give you a list of available software:
module spider
If you want to see information about your conda environment, you can issue:
conda info
and to see the packages installed, issue:
conda list
System hardware queries¶
What is my CPU configuration?¶
The lscpu command will give you information such as architecture, model name, sockets, cores per socket, threads per core, min/max CPU clockspeed, caches sizes:
lscpu
How much RAM is there on my nodes?¶
The amount of RAM that is expected to be available on a system is summarized elsewhere. The command to interrogate a node for the total available memory is
grep MemTotal /proc/meminfo
Note that for Satori system, this will include the available GPU RAM as well.
What SMT mode are my nodes in?¶
The command to interrogate a node for the SMT mode is
ppc64_cpu --smt
What CPU governor is in effect on my nodes?¶
The command to establish the governor in effect for a node is
frequency-info | grep -A 2 "current policy"
What are the logical IDs and UUIDs for the GPUs on my nodes?¶
There should be four operational GPUs on every node. The command to obtain a brief pertinent summary for a node is
nvidia-smi -L
A less terse summary may be obtained from
nvidia-smi
Detailed information may be obtained from
nvidia-smi -q
What is the IBM model of my system?¶
It can also be obtained from the command
grep "model" /proc/cpuinfo
Which logical CPUs belong to which socket?¶
Each integrated circuit die on the system is a NUMA node in the output of the command
numactl --hardware
or
numactl -H
which will list the available logical CPUs and the NUMA nodes to which they belong.
Questions about my jobs¶
How can I establish which logical CPU IDs my process is bound to?¶
Establish your process’s ID (PID) using, e.g., the ps command,
ps -ef | grep ${USER}
and then use the taskset command
taskset -acp PID
against the retrieved PID.
Can I see the output of my job before it completes?¶
Yes. The command
bpeek
will cat the current output of your job to screen. If your job generates a lot of output, you may prefer to pipe it through other commands: e.g.,
bpeek | tail
bpeek | more
bpeek | less
bpeek | grep ...
to control the output or filter it down to what you find interesting.
I have a job waiting in the queue, and I want to modify the options I had selected¶
You can use the bmod command to do this in many cases. The only alternative is to bkill your job and resubmit it with the options you prefer edited in.
I have submitted my job several times, but I get no output¶
There can be several reasons for this: for instance
You may have failed to submit the job properly: e.g., you forgot to use the appropriate redirection: i.e., you issued bsub myBatchScript instead of the correct form bsub < myBatchScript
In your batch script or command line, you may have failed to use one of options (-e, -eo, -o, -oo) that specify the filename that is to capture the stderr and/or stdout streams from your job. In such cases, LSF attempts to mail the output to you; if mail is not set up on the system, your output will never arrive by this route.
The output is not in the directory or filesystem you expect it to be in: this can happen for several reasons; three are: You did not specify a pathname for the output filename of your job, but you used the -cwd option of bsub to change the current working directory of your job; your output will then be in the directory that you specified with the -cwd option. You used a filesystem that has the same pathname on several nodes—e.g., /tmp or an NVMe filesystem—that is not a shared filesystem. You have exhausted your filespace quota.
How do I set a time limit on my job?¶
Use the -W [h:]m group of the bsub option: e.g., to set a (wall-clock) limit of 90 minutes, use either one of
#BSUB -W 1:30
#BSUB -W 90
Can I make a job’s startup depend on the completion of a previous one?¶
Yes. LSF provides significant functionality in this context. As a trivial example, consider the following, where the #BSUB -w “done (first_job)” in second_job ensures that it will only start after first_job is done:
$ cat first_job.lsf
#BSUB -J first_job
#BSUB -e "first_job.stderr.\%J"
#BSUB -o "first_job.stdout.\%J"
#BSUB -q "normal"
#BSUB -R "affinity[core]"
#BSUB -M "40"
#BSUB -R "rusage[mem=40]"
#BSUB -x
echo -n "Job first_job started: "; date
sleep 180
echo -n "Job first_job ended: "; date
$ cat second_job.lsf
#BSUB -J second_job
#BSUB -e "second_job.stderr.\%J"
#BSUB -o "second_job.stdout.\%J"
#BSUB -q "normal"
#BSUB -R "affinity[core]"
#BSUB -M "40"
#BSUB -R "rusage[mem=40]"
#BSUB -w "done (first_job)"
#BSUB -x
echo -n "Job second_job started: "; date
$ bsub < first_job.lsf; bsub < second_job.lsf
Job <34445> is submitted to queue <normal>.
Job <34446> is submitted to queue <normal>.
The second job will start almost immediately after the completion on the first job. You can use the bjobs command to check the status of the jobs.
How do I select a specific set of hosts for my job?¶
By default, your jobs can be scheduled to any of the hosts that are available to your queue, which may be listed with
bqueues -l queue_name | grep HOSTS
To ensure that jobs are scheduled to some subset of these, add the bsub group -m “hostname1 hostname2 hostname3 … hostnamen”; for instance, to choose from the three hosts node0002, node0042, node0051 in a batch script, add the #BSUB line
#BSUB -m "node0002, node0042, node0051"
Note that the items in the double-quoted list are delimited by white space.
To select a specific node to be the first one in the allocation, follow its hostname by an exclamation mark: e.g.,
#BSUB -m "node0002, node0042, node0051!"
will ensure that node0002 will be the first node in the allocation list.
How do I deselect specific nodes for my job?¶
To ensure that jobs are not scheduled to specific nodes, say node0034 and node0045, one can add a #BSUB statement such as the following:
#BSUB -R "select[hname!=node0034&&hname!=node0045]"
My job’s runtime environment is different from what I expected¶
By default, LSF preserves the user’s submit-time environment. If this is not desirable, add the group -L shell_pathname to your bsub command or, e.g.,
#BSUB -L /bin/bash
to your batch script so that your batch job starts in a “pristine” bash shell.
I want to know precisely what my job’s runtime environment is¶
For serial, POSIX threads, or OpenMP jobs, simply add the line
env
to your job script after the #BSUB lines.
For jobs that employ Spectrum MPI or OpenMPI, do the above, and, in addition, modify the generic invocation
mpirun ./my_exe my_opts < my_inp > my_out
to
mpirun helper.sh > my_out
where the content of helper.sh (which must be executable: i.e., chmod +x helper.sh) is
#!/bin/sh
env > env.${OMPI_COMM_WORLD_RANK}
./my_exe my_opts < my_inp > my_out
This will generate one file env.${OMPI_COMM_WORLD_RANK} for every extant value of ${OMPI_COMM_WORLD_RANK} in the job.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Debuging.20.60simp.60.20set.html ---
I'm formalizing quaternions, and I have a timeout in simp
probably because of some cycle in my simp
set. Can I ask Lean to simp
for some fixed amount of cycles, then report lemmas it used?
Maybe supplying max_steps
with simp {max_steps:= 100}
will help?
The default is apparently 10000000
.
Thank you, I'll try
The standard way is to enable set_option trace.simplify.rewrite true
, this outputs one line per used simp lemma. You can then use try_for 12345 { simp }
to stop simp before it is finished.
Last updated: Apr 24 2020 at 19:02 UTC


EUR/USD could still re-visit the 1.1180 region – Commerzbank
by Pablo PiovanoAccording to Karen Jones, Team Head FICC Technical Analysis Research at Commerzbank, the pair could still move to the 1.1180 region if clears the area around 1.1090.
Key Quotes
“No change. EUR/USD continues to recover off the 61.8% retracement at 1.0994 and we have seen a recovery to the 55 day ma at 1.1089. We will need to regain this for a viable retest of the 1.1180 recent high (favoured). While capped by the 55 day ma, the market is regarded as under pressure and capable of extending the decline to the next Fibonacci support at 1.0943”.
“Above 1.1180 will target the 1.1262 top of the channel and the 1.1359 200 week ma”.


Properties
- ActiveTab - The current active tab
- ActiveTabIndex - The first tab to show
- ActiveTabIndexForClient - The first tab to show
- AutoPostBack - Make an auto postback from JavaScript when a tab index changes
- CssTheme - Gets or sets a CSS theme predefined in a CSS file
- Height - Height of a tab body (does not include TabPanel headers)
- OnClientActiveTabChanged - Fires on the client side when a tab is changed
- OnDemand - Determines whether or not to render/load precise tabs on demand or all tabs on page load
- ScrollBars - Determines whether or not to display scrollbars (None, Horizontal, Vertical, Both, Auto) in the TabContainer body
- Tabs - A collection of tabs
- TabStripPlacement - Determines whether or not to render tabs on top of the container or below (Top, Bottom)
- UniqueID - AutoPostback ID
- UseVerticalStripPlacement - Determines whether or not to render tabs on the left or right side of the container
- VerticalStripWidth - Width of tab panels when tabs are displayed vertically
- Width - Width of the tab body
Events
- ActiveTabChanged - Fires on the server side when a tab is changed after a postback


Qpid Proton 0.38.0 Release Notes
Proton is a high-performance, lightweight messaging library. More
about Qpid Proton.
For more information about this release, including download links and
documentation, see the release overview.
New features and improvements
- PROTON-2438 - [cpp] Cancellable tasks
- PROTON-2487 - [cpp] Implement distributed tracing
- PROTON-2494 - Improve python-qpid-proton wheel build regarding pkgconfig and deps
- PROTON-2521 - The new frame codec doesn't omit enough nulls!
- PROTON-2527 - Since we produce python packages and ruby gems there is no need to "install" anything if SYSINSTALL_BINDINGS is off
- PROTON-2532 - CMake find_package will fail unhelpfully when user asks for component that is not provided
- PROTON-2536 - [Python] Modernize package setup
- PROTON-2540 - [cpp] Provide a way to query proton::connection for the url it was created with
- PROTON-2542 - Simplify and Speed up proton-c object system
- PROTON-2555 - Remove internal details from the proton/object.h API header file
- PROTON-2562 - Refactor logging so that it doesn't allocate any heap memory
- PROTON-2590 - Remove "from __future__ import ..." as they are all the default behaviour for Python 3
- PROTON-2633 - Proactor: allow early writes to reduce latency
- PROTON-2640 - Set a reasonable default maximum frame size
- PROTON-2641 - use consistent socket io cals in epoll proactor
Bugs fixed
- PROTON-2458 - Python Qpid Proton won't compile on Windows with Python 3.10
- PROTON-2520 - More error checking for received AMQP frames
- PROTON-2525 - Received link handles greater or equal to 2^31 cause proton-c to misbehave
- PROTON-2526 - [Python] distutils will soon be removed from Python, we should stop using it
- PROTON-2534 - Compilation failure on CentOS 7: error: 'for' loop initial declarations are only allowed in C99 mode
- PROTON-2535 - TLS library - false indication of user data in OpenSSL
- PROTON-2544 - Build fails on Fedora 36 + Ubuntu 22.04
- PROTON-2546 - Leak of raw connection pn_event
- PROTON-2567 - Fuzz-proactor-receiver doesn#t work with response file
- PROTON-2568 - Leak of addrinfo memory held by raw connection
- PROTON-2578 - Support Python 3.11
- PROTON-2583 - [Python/swig] Build warnings from recent versions of CMake
- PROTON-2586 - TLS OpenSSL library: incomplete decryption/encryption of staged buffers
- PROTON-2612 - TLS OpenSSL library: uninitialized raw buffer size for output buffers
- PROTON-2613 - TLS OpenSSL library: write channel not fully configured.
- PROTON-2617 - Header file proton/version.h exposes the install prefix
- PROTON-2622 - TLS OpenSSL library: ensure capacity values match given capacity
- PROTON-2645 - pip install fails on Windows
- PROTON-2647 - Fix FLOW event processing in send-abort example.
Tasks
Apache Qpid, Messaging built on AMQP; Copyright © 2015
The Apache Software Foundation; Licensed under
the Apache
License, Version 2.0; Apache Qpid, Qpid, Qpid Proton,
Proton, Apache, the Apache feather logo, and the Apache Qpid
project logo are trademarks of The Apache Software
Foundation; All other marks mentioned may be trademarks or
registered trademarks of their respective owners


14 tweets from the party may not appear in this replay feed because they have been deleted by the author


Kollam Travel Guide
Zone: South
Headquarters: Kollam
Kollam is also known as Quilon or Desinganadu, is the place which takes the credit for being the hub of the countrys cashew trading and processing industry. Affording an impeccable blend of scenic surrounding, tradition and hospitality, Kollam is often referred to as the dreamland of Kerala
Best Places to Visit in Kollam
1. Lighthouse
The lighthouse built at Quilon by the British in the year 1902 is visible as far as 13 miles in the sea. The lighthouse stands to an amazing height of 144 feet and is the second tallest lighthouse as well as one of the most visited lighthouses of Kerala.
2. Ashtamudi Lake
The serene Ashtamudi Lake is a great place to hanker for in the Kollam district. It is the most visited backwater and lake of Kerala. Ashtamudi means ‘Eight Coned’ in Malayalam. This lake or Kayal is lined with palm and coconut trees.
3. Mayyanad
Mayyanad is noted for its shrines and temples. The most important of the nine temples here is the Subramanya temple at Umayanallor. This shrine is said to have been consecrated by the great Hindu philosopher Sree Sankaracharya. There are frequent buses from Kollam to Mayyanad


What are the pre-requisites?
In order to use it, you need your email account to be added to the application accounts list.
See Also:
HowTo


comclient_garbage_collect
comclient_garbage_collect/0
performs an atom garbage
collection, i.e. garbage_collect_atoms/0
, so it should be used
sparingly.
comclient_is_object(
+Object)
comclient_valid_object/1
. Currently an object looks like
'$comclient_object'(
stuff)
where stuff is some prolog
term. Do not rely on this representation!
comclient_valid_object(
+Object)
comclient_equal(
+Object1,
+Object2)
'IUnknown'
interfaces are identical)
comclient_clsid_from_progid(
+ProgID,
-CLSID).
CLSIDFromProgID
. You rarely need this since
you can use the ProgID directly in most cases.
comclient_progid_from_clsid(
+CLSID,
-ProgID).
ProgIDFromCLSID
. Rarely needed. The ProgID
returned will typically have the version suffix appended.
Example, to determine what version of Excel.Application
is installed:
| ?- comclient_clsid_from_progid('Excel.Application, CLSID), comclient_progid_from_clsid(CLSID, ProgID). CLSID = '{00024500-0000-0000-C000-000000000046}', ProgID = 'Excel.Application.8'
comclient_iid_from_name(
+IName,
-IID)
| ?- comclient_iid_from_name('IDispatch', IID). IID = '{00020400-0000-0000-C000-000000000046}'
comclient_name_from_iid(
+IID,
-IName)
comclient_create_instance(
+ID,
-Object)
comclient_create_instance('Excel.Application', App)
Corresponds to CoCreateInstance
.
comclient_get_active_object(
+ID,
-Object)
comclient_get_active_object('Excel.Application', App)
An exception is thrown if there is no suitable running object.
Corresponds to GetActiveObject
.
comclient_invoke_method_fun(
+Object,
+CallSpec,
-ComValue)
comclient_invoke_method_proc(
+Object,
+CallSpec)
comclient_invoke_put(
+Object,
+CallSpec,
+ComInArg)
comclient_invoke_put(App, visible, 1)
comclient_release(
+Object)
Please note: The same COM-object can be represented by different prolog terms. A COM object is not released from SICStus Prolog until all such representations have been released, either explicitly by callingcomclient_release/1
or by callingcomclient_garbage_collect/0
.You cannot use Obj1
==
Obj2 to determine whether two COM-objects are identical. Instead usecomclient_equal/2
.
comclient_is_exception(
+ExceptionTerm)
catch(<some code>, Exception, ( comclient_is_exception(E) -> handle_com_related_errors(E) ; otherwise -> % Pass other exceptions upwards throw(E) ))
comclient_exception_code(
+ExceptionTerm,
-ErrorCode)
comclient_exception_culprit(
+ExceptionTerm,
-Culprit)
comclient_exception_description(
+ExceptionTerm,
-Description)
HRESULT
causing the exception. Culprit is a
term corresponding to the call that gave an
exception. Description, if available, is either a term
'EXCEPINFO'(...)
corresponding to an EXCEPINFO
structure or 'ARGERR'(MethodName, ArgNumber)
.
The EXCEPINFO
has six arguments corresponding to, and in the
same order as, the arguments of the EXCEPINFO
struct.


--- title: fastdot.core keywords: fastai sidebar: home_sidebar summary: "Drawing graphs with graphviz." description: "Drawing graphs with graphviz." nb_path: "00_core.ipynb" ---
pydot
uses the same name-based approach to identifying graph items as graphviz
. However we would rather use python objects. Therefore, we patch pydot
to use unique names.
g = Dot()
a = Node('a')
g.add_node(a)
g
If a 2-tuple is passed to add_node
, then the 2nd element becomes the tooltip. You can also pass any kwargs
that are accepted by graphviz
.
g = Dot()
g.add_node(Node(['a', "My tooltip"], fillcolor='pink'))
g
Keyword args can also be arbitrary functions, which will called with the node's label.
g = Dot()
o = 'a'
g.add_node(Node(o, fillcolor=lambda o:'pink'))
g
object2graph(o).get_fillcolor()
The callable kwargs functionality can be used to map labels to colors in a consistent way..
graph_colors1 = partial(obj2node_color, plt.get_cmap('rainbow'), 30, 160)
graph_colors2 = partial(obj2node_color, plt.get_cmap('tab20'), 30, 160)
These predefined color mapping functions provide a good range of colors and readable text.
g = Dot()
g.add_node(Node('a', fillcolor=graph_colors1))
g.add_node(Node('b', fillcolor=graph_colors1))
g
g = Dot()
g.add_node(Node('a', fillcolor=graph_colors2))
g.add_node(Node('b', fillcolor=graph_colors2))
g
We'll use the former color function as our default. You can change it by simply modifying node_defaults
.
g = Dot()
sg = Cluster('clus', tooltip='Cluster tooltip')
sg.add_node(Node(['a', "My tooltip"]))
sg.add_node(Node('b'))
g.add_subgraph(sg)
g
You can subscript into a Graph
's Node
s by index:
print(sg[0].get_label())
There's no good reason to have different methods for adding clusters vs nodes (as pydot
requires), so we provide a single method.
g = Dot()
sg = Cluster('clus')
g.add_item(sg)
sg.add_item('a')
g
sg1 = Cluster('clus')
sg1.add_items('n1', 'n2')
sg2 = Cluster()
sg2.add_item('n')
graph_items(sg1,sg2)
sg2 = Cluster('clus2')
n1 = sg2.add_item('n1', fillcolor='pink')
n2 = sg2.add_item('n2', fillcolor='lightblue')
sg2.add_item(n1.connect(n2))
sg1 = Cluster('clus1')
sg1.add_item(sg2)
a,b = Node('a'),Node('b')
edges = a.connect(b),a.connect(a),sg1.connect(b),sg2[0].connect(a)
g = Dot()
g.add_items(sg1, a, b, *edges)
g
This is a shortcut for creating connections between objects that are already in a graph.
a,b = 'a','b'
g = graph_items(a, b)
g.add_items(*object_connections([(a,b)]))
g
Since it's common to want to connect a series sequentially, we provide some simple shortcuts for this functionality.
g = Dot()
its = g.add_items('a','b','c')
g.add_edges_seq(its)
g
g = Dot()
g.add_item(seq_cluster(['a','b','c'], 'clust'))
g.add_item(seq_cluster(['1','2','c'], 'clust2'))
g
g = Dot()
g.add_item(seq_cluster(['a','b','c'], 'clust'))
g
sg1 = seq_cluster(['a','b','c'], 'clust1')
sg2 = seq_cluster(['a1','a2',sg1], 'clust2')
g = Dot()
g.add_item(sg2)
g
sg1 = seq_cluster(['inp'], 'clust1')
sg2 = seq_cluster(['a','b','c'], 'clust2')
sg2.add_items(sg1.connect(sg2[-1]), sg1.connect(sg2))
g = Dot()
g.add_items(sg1,sg2)
g
sg = Cluster('clus')
a,b,c = sg.add_items('a','b','c')
p = sg.add_item(Point())
sg.add_item(p.connect(c))
sg.add_items(p.connect(a), a.connect(b), b.connect(c))
g = Dot()
g.add_items(sg)
g


 Sniff around.
There are only two things to be loyal to in this world: your self, and your integrity. And usually, if you lose one, the other goes along with it.
If any other “loyalty” seems to collide with those two—family, party, country, job, what-have-you—you’re in trouble. Drop it like a bad habit. Run fast. That ship is sinking.
In other words, “I got only two things in this world: my word, and my balls. And I don’t break ’em for nobody.”


Hooman Bargrizan
Consultant | Developer | Soul Rebel
Home
Photos
About
Contact
Featured Articles
"Life is either a daring adventure or nothing at all..." -- H.Keller
Technical Blog Posts
Cultural Blog Posts


Joe Marler Gives Bizarre In-House Interview Ahead Of Club Return
by The PA TeamHarlequins got their Heineken Cup campaign off to a difficult start last weekend shipping 53 points in a defeat to Clermont Auvergne.
The Premiership outfit face Bath this coming weekend and are bolstered by the return of loosehead prop Joe Marler.
Marler played a pivotal role for England en route to the Rugby World Cup final in Japan less than two years after initially retiring from international rugby.
As a result of their exploits, Marler and his England teammates were given an extended break and missed last weekend’s opening round of the Champions Cup.
He’s back this week though as they look to avoid falling behind early in the group to a Bath side who also lost their opening round fixture against Ulster.
Ahead of the game, the ever-colourful Marler gave an in-house interview that took a strange turn.

“We’ve got another week to get back on the horse and take that horse to water and you can ask that horse. You can say, ‘Hey horsey do you want to have a drink or do you want to have a swim.”
Watch the full clip of Marler’s interview below:


---
type: post
format: html
title: "PhoneGap 3.0 \xE2\x80\x93 Stuff to be aware of\xE2\x80\xA6"
status: publish
tags:
- PhoneGap Network
link: http://devgirl.org/2013/09/05/phonegap-3-0-stuff-to-be-aware-of/
date: 2013-09-05 16:40:21 Z
external: true
author: Holly Schinsky
---
PhoneGap 3.0 was announced recently and there are some important things to note that I have attempted to summarize below PhoneGap CLI If you hadn't heard yet, the fastest and easiest way to use PhoneGap 3.0 is with the new Command Line Interface. To install the CLI, follow the specific instructions here. So what does [...]


Terunofuji endured tough times to get back on track
by John GunningOn a day when yokozuna Hakuho all but sealed his 43rd Emperor’s Cup, the biggest news out of Fukuoka concerned a man in sumo’s third division.
Terunofuji clinched the makushita title with a perfect 7-0 record and will be back in the salaried ranks in January for the first time in over a year and a half.
After missing four straight tournaments through injury from July 2018 on, the former ozeki had fallen all the way down to the second-lowest division (jonidan).
Given how poor his physical condition looked, both prior to, and immediately after the drop, many fans were calling for the massive Mongolian to quit the sport out of concern for his health.
Apart from torn ligaments, Terunofuji battled diabetes, cellulitis, organ problems and kidney stones.
Still relatively young though at 26, the Ulan Bator native decided to soldier on and after a very tough 18 months finally got his reward.
Terunofuji’s sumo life has never been anything but difficult.
Magaki beya, his original stable, seemed snakebitten, with wrestlers being kicked out of the sport for match fixing and drug use, as well as the stablemaster suffering a stroke and his wife and another rikishi dying.
Things got so bad that prior to the stable closing down Terunofuji spent many mornings training alone in the practice arena with no other rikishi or coaches present.
Wakamisho, as Terunofuji was known then, became so demotivated that he talked regularly with friends about quitting the sport altogether.
When the Magaki stable shut down, however, he was transferred to Isegahama and under the tutelage of yokozuna Harumafuji he bloomed.
Terunofuji won the May 2015 title and seemed set to be the sport’s next yokozuna before injury struck.
That’s likely a dream that is no longer feasible, but given the way Terunofuji has performed and improved over the past few months, reaching the top division again is certainly achievable.
GET THE BEST OF THE JAPAN TIMES IN FIVE EASY PIECES WITH TAKE 5
JOIN THE CONVERSATION


We wrote Texture at a real crossroads for the band. Nicolas Bougaïeff, who guided us wayward characters through our first record deals with International Feel and was such a source of inspiration when Private Agenda got going had recently departed to put his full energies into his solo project.
‘Texture’ was the sound of us trying to find our feet as a duo. Instrumentally, it’s playful, colourful disco.  In many regards, the epitome of what we try and capture in our music: the interplay between an almost cocksure presentation, but a real vulnerability when you look a little closer.
You’ll find ‘Texture’ sitting alongside the likes of DJ Tennis, The Juan Maclean and Yuksek on the seventh installment of LaGaSta’s annual ‘Late Summer Compilation’ – a compilation that’s become a bit of an institution.
How we ended up on the compilation is a classic tale of pestering which lead to eventual friendship. Vangelis of LaGaSta had been running a regular party at Dalston Superstore (one of London’s best small gay clubs) and we were desperate to get on the bill. Our nagging eventually worked and we found ourselves playing our first live show in London (and our first without Nick), playing the bar upstairs. We had to cram all our gear; mic stands, synths – the lot – into this tiny DJ booth. Wes Baggaley was opening up the night and I remember feeling so grateful that he was so relaxed about us ‘taking over’ the booth as he finished up his set just to get our stuff set up. Not many DJs would have been so patient. I’m glad he’s such an in-demand DJ now – a great selector and even nicer guy.
That night was special for so many reasons, playing in-front of so many friends who’ve supported our music-making for years, but I remember we were also sharing a bill with Alexis from Hot Chip – one of our favourite bands. Sinking a few cocktails after the show and having a jig to George Michael downstairs capped off a special night for us.


Class: Sketchup::Edge
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Drawingelement ,
Entity
|
|
|
Instance Chain:
self,
Drawingelement ,
Entity
|
|
| Inherits: |
Sketchup::Drawingelement
|
Overview
The Edge class contains methods modifying and extracting information for edges.
Instance Attribute Summary
-
#smooth=(value) ⇒ Boolean
rw
The #smooth= method is used to set the edge to be smooth.
-
#smooth? ⇒ Boolean
rw
The #smooth? method is used to retrieve the current smooth setting for an edge.
-
#soft=(value) ⇒ Boolean
rw
The #soft= method is used to set the edge to be soft.
-
#soft? ⇒ Boolean
rw
The #soft? method is used to retrieve the current soft setting for an edge.
Drawingelement
- Inherited
| #casts_shadows= | The casts_shadows= method is used to set the |
| #casts_shadows? | The casts_shadows? method is used to determine if the |
| #hidden= | The hidden= method is used to set the hidden status for an element. |
| #hidden? | The hidden? method is used to determine if the element is hidden. |
| #layer | The layer method is used to retrieve the |
| #layer= | The layer= method is used to set the layer for the drawing element. |
| #material | The material method is used to retrieve the material for the drawing element. |
| #material= | The material= method is used to set the material for the drawing element. |
| #receives_shadows= | The receive_shadows= method is used to set the |
| #receives_shadows? | The receive_shadows? method is used to determine if the |
| #visible= | The visible= method is used to set the visible status for an element. |
| #visible? | The visible? method is used to get the visible status for an element. |
Entity
- Inherited
Instance Method Summary
-
#all_connected ⇒ Array<Sketchup::Entity>
The all_connected method retrieves all of the entities connected to an edge, including the edge itself.
-
#common_face(edge2) ⇒ Sketchup::Face?
The common_face method is used to identify a face that is common to two edges.
-
#curve ⇒ Sketchup::Curve?
The curve method is used to get the
Curve
object that this edge belongs to, if any. -
#end ⇒ Sketchup::Vertex
The end method is used to retrieve the
Vertex
object at the end of the edge. -
#explode_curve ⇒ Sketchup::Edge
The explode_curve method is used to explode the curve that the given edge is a part of.
-
#faces ⇒ Array<Sketchup::Face>
The #faces method is used to retrieve all of the faces common to the edge.
-
#find_faces ⇒ Integer
The find_faces method is used to create all of the Faces that can be created with this edge.
-
#length ⇒ Length
The #length method is used to retrieve the length of an edge in current units.
-
#line ⇒ Array(Geom::Point3d, Geom::Vector3d)
The line method is used to retrieve the line defined by the edge.
-
#other_vertex(vertex1) ⇒ Sketchup::Vertex
The other_vertex method is used to find the opposite vertex given one vertex of the edge.
-
#reversed_in?(face) ⇒ Boolean
The #reversed_in? method is used to determine if the edge is reversed in a face’s bounding loop.
-
#split(position) ⇒ Sketchup::Edge
The split method is used to to split an edge into two or more distinct edges.
-
#start ⇒ Sketchup::Vertex
The start method is used to retrieve the
Vertex
object at the start of the edge. - #used_by?(element) ⇒ Boolean
-
#vertices ⇒ Array<Sketchup::Vertex>
The vertices method is used to retrieve the vertices on the edge.
Drawingelement
- Inherited
| #bounds | The |
| #erase! | The |
Entity
- Inherited
| #add_observer | The add_observer method is used to add an observer to the current object. |
| #attribute_dictionaries | The attribute_dictionaries method is used to retrieve the |
| #attribute_dictionary | The attribute_dictionary method is used to retrieve an attribute dictionary with a given name that is attached to an |
| #delete_attribute | The |
| #entityID | The entityID method is used to retrieve a unique ID assigned to an entity. |
| #get_attribute | The |
| #inspect | The to_s method is used to retrieve the string representation of the entity. |
| #model | The model method is used to retrieve the model for the entity. |
| #parent | The parent method is used to retrieve the parent of the entity. |
| #persistent_id | The |
| #remove_observer | The remove_observer method is used to remove an observer from the current object. |
| #set_attribute | The set attribute is used to set the value of an attribute in an attribute dictionary with the given name. |
| #to_s | The to_s method is used to retrieve the string representation of the entity. |
| #typename | The typename method retrieves the type of the entity, which will be a string such as “Face”, “Edge”, or “Group”. |
Instance Attribute Details
#smooth=(value) ⇒ Boolean
(rw)
The soft and smooth properties are normally set in pairs. You can observer this when the Soften/Smooth Edges feature or holding down Ctrl when using the Eraser Tool.
The #smooth=
method is used to set the edge to be smooth.
A smooth edge will cause the shading between connected faces to blend to a smooth transition. The edge will still be visible.
#smooth? ⇒ Boolean
(rw)
The #smooth?
method is used to retrieve the current smooth setting for an edge.
A smooth edge will cause the shading between connected faces to blend to a smooth transition. The edge will still be visible.
#soft=(value) ⇒ Boolean
(rw)
The soft and smooth properties are normally set in pairs. You can observe this when the Soften/Smooth Edges feature or holding down Ctrl when using the Eraser Tool.
The #soft=
method is used to set the edge to be soft.
A soft edge will cause the connected faces to be treated as a surface. This means that if you have Hidden Geometry off and select one face it will also select all faces connected with soft edges. A soft edge will also appear hidden.
#soft? ⇒ Boolean
(rw)
The #soft?
method is used to retrieve the current soft setting for an edge.
A soft edge will cause the connected faces to be treated as a surface. This means that if you have Hidden Geometry off and select one face it will also select all faces connected with soft edges. A soft edge will also appear hidden.
Instance Method Details
#all_connected ⇒ Array<Sketchup::Entity>
The all_connected method retrieves all of the entities connected to an edge, including the edge itself.
#common_face(edge2) ⇒ Sketchup::Face?
The common_face method is used to identify a face that is common to two edges.
#curve ⇒ Sketchup::Curve?
#end ⇒ Sketchup::Vertex
The end method is used to retrieve the Vertex
object at the end of the edge.
#explode_curve ⇒ Edge
The explode_curve method is used to explode the curve that the given edge is a part of.
#faces ⇒ Array<Sketchup::Face>
The #faces
method is used to retrieve all of the faces common to the edge.
#find_faces ⇒ Integer
The find_faces method is used to create all of the Faces that can be created with this edge. For example, if you use the API to draw three edges that form a triangle, the face between them will not show up because you’ve only drawn the edges, but if you call find_faces on one of the edges, the triangle will be filled in.
The #length
method is used to retrieve the length of an edge in current units.
You can pass in an optional ::Geom::Transformation
(or an array that can represent a transformation), to correct for a parent group’s transformation. For example, if an edge is inside of a group that is scaled to 200%, the length method will return the unscaled length of the edge. So by passing a 200% transformation object to this method, you can account for that to get the “visual” length of the edge.
#line ⇒ Array(Geom::Point3d, Geom::Vector3d)
#other_vertex(vertex1) ⇒ Sketchup::Vertex
The other_vertex method is used to find the opposite vertex given one vertex of the edge.
#reversed_in?(face) ⇒ Boolean
The #reversed_in?
method is used to determine if the edge is reversed in a face’s bounding loop.
#split(position) ⇒ Edge
The split method is used to to split an edge into two or more distinct edges. If a Point3d is given, it must be a point that is on the Edge
.
If a Float is given, it is a number between 0 and 1 that gives the relative position along the edge at which to split it. For example, edge.split(0.5) will split the Edge
at its midpoint. This split position is measured from the Edge
.start.
Returns the new Edge
that was created as a result of splitting this one.
#start ⇒ Sketchup::Vertex
The start method is used to retrieve the Vertex
object at the start of the edge.
#used_by?(element) ⇒ Boolean
#vertices ⇒ Array<Sketchup::Vertex>
The vertices method is used to retrieve the vertices on the edge.


NUDOTA
问题描述 :
输入:
The input contains N, M, K.(N<1000,M<1000,K<100000)
N means the number of players in team1.
M means the number of players in team2.(lenth of string is less than 1000)
next line containing the N strings indicating the names of N players in team1, seperating by one or more spaces.
next line containing the M strings indicating the names of M players in team2, seperating by one or more spaces.
K means there are K commands and queries.
K lines follow a char that is ‘K’ or ‘Q’.
‘K’ then PLAYER1 kill PLAYER2 in CURRENTTIME.(No two Killing events happens in the same time)
‘Q’ then PLAYER in CURRENTTIME.
input is sorted by CURRENTTIME.( 0<CURRENTTIME<100,000,000 )
输出:
The input contains N, M, K.(N<1000,M<1000,K<100000)
N means the number of players in team1.
M means the number of players in team2.(lenth of string is less than 1000)
next line containing the N strings indicating the names of N players in team1, seperating by one or more spaces.
next line containing the M strings indicating the names of M players in team2, seperating by one or more spaces.
K means there are K commands and queries.
K lines follow a char that is ‘K’ or ‘Q’.
‘K’ then PLAYER1 kill PLAYER2 in CURRENTTIME.(No two Killing events happens in the same time)
‘Q’ then PLAYER in CURRENTTIME.
input is sorted by CURRENTTIME.( 0<CURRENTTIME<100,000,000 )
样例输入:
1 1 2 a b K a b 10 Q a 11
样例输出:
1014
NUDOTA
Time Limit: 2000/1000 MS
(Java/Others)
Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s):
143 Accepted
Submission(s): 38
Problem Description
Welcome to NUDOTA, it’s a game that attracts thousands of people
around the campus. In the game, we first get 603 unit of money, and
every seconds we get 1unit of money first. When our hero died, we
lose 300 unit of money(you will always have non-negative amount of
money). Every time you kills an enemy, you will get 200, and if you
are the first one to kill enemy among all players, it is called
First Blood and you will get an extra 200 unit.  Remember
the max unit of extra money you get is 400 unit.
Input
Multiple cases.
The input contains N, M,
K.(N<1000,M<1000,K<100000)
N means the number of players in team1.
M means the number of players in team2.(lenth of string is less
than 1000)
next line containing the N strings indicating the names of N
players in team1, seperating by one or more spaces.
next line containing the M strings indicating the names of M
players in team2, seperating by one or more spaces.
K means there are K commands and queries.
K lines follow a char that is ‘K’ or ‘Q’.
‘K’ then PLAYER1 kill PLAYER2 in CURRENTTIME.(No two Killing events
happens in the same time)
‘Q’ then PLAYER in CURRENTTIME.
input is sorted by CURRENTTIME.(
0<CURRENTTIME<100,000,000 )
Output
If it is a ‘Q’ command you are asked to output the hero’s money in
the CURRENTTIME.
Sample Input
1 1 2
a
b
K a b 10
Q a 11
Sample Output
1014
Author
alpc21
Source
2010 ACM-ICPC Multi-University Training Contest（15）——Host by
NUDT
#######################################解题报告：
水题！！！简单模拟即可。
但还是有需要注意的地方滴。。。
比如处理掉换行和空格。不用字符而是用字符串读取命令，否则容易读入空格。
还有题意实在是。。。没玩过dota纠结了好久才知道什么规则。。。有几点需注意的：1，若此次被杀后血点（不知道专有名词是什么，将就用吧）小于0，则令其为0，记录下此时时间。2，
是多余加分不多于400而不是总加分不超400！！！
好了，A了吧哈哈。
########################################Source code:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct man
{
int
team;
char
name[15];
int
po; //his remaining point
int
lt;
int
kiin;//has killed for how many enemy
}mn[2005];
int main()
{
int i, j, n,
m, k, ct, an, bn;
bool
fir;
//freopen(“data_byhand.txt”, “r”, stdin);
//freopen(“my.txt”, “w”, stdout);
char ch[3],
killer[15], killed[15];
while(scanf(“%d%d%d”, &n, &m,
&k)!=EOF)
{
fir=false;
for(i=0; i<n+m; i++)
{
if(i<n)
mn[i].team=1;
else
mn[i].team=2;
scanf(“%s”, mn[i].name);
mn[i].po=603;mn[i].kiin=0;mn[i].lt=0;
}
getchar();//care!!!!!!!!!!!!!
for(i=0; i<k; i++)
{
scanf(“%s”, ch);
if(ch[0]==’K')
{
scanf(“%s%s%d”, killer, killed, &ct);
getchar();
an=-1; bn=-1;
for(j=0;(!(an>=0&&bn>=0))&&(j<n+m);
j++){
if(strcmp(mn[j].name, killer)==0)
an=j;
else if(strcmp(mn[j].name, killed)==0)
bn=j;
}
if(mn[an].team!=mn[bn].team)
{
mn[an].kiin++;
if(fir==false)
{mn[an].po+=400;fir=true;}
else if(mn[an].kiin>=10)
mn[an].po+=600;
else if(mn[an].kiin<=1)
mn[an].po+=200;
else
mn[an].po+=(200+50*(mn[an].kiin-2));
}
mn[bn].po-=300;
if(mn[bn].po<0)
{
mn[bn].po=0;
mn[bn].lt=ct;
}
mn[bn].kiin=0;
}
else if(ch[0]==’Q')
{
scanf(“%s%d”, killer, &ct);
getchar();
for(j=0; j<n+m; j++)
if(strcmp(mn[j].name, killer)==0)
{
an=j;
break;
}
int re=mn[an].po+ct-mn[an].lt;
printf(“%d\n”, re);
}
}
}
return
0;
}
参考：http://blog.sina.com.cn/s/blog_6a46cc3f0100kf1k.html
很早就说过我讨厌熊猫
这个条件 “两个数的乘积最小”可以忽略
为什么暴力求解方法循环到sqrt(n) 就可以了呢
头文件的颜色是有意设成这种灰暗色的吗？感觉看不清
哇，算法有这么多呢！
int half(int *array,int len,int key)
{
int l=0,r=len;
while(l<r)
{
int m=(l+r)>>1;
if(key>array )l=m+1;
else if(key<array )r=m;
else return m;
}
return -1;
}
这种就能避免一些Bug
l,m,r
左边是l,m;右边就是m+1,r;
有没有C++编译的？
终于找到一篇能看懂的，mark
第一题还是比较考验智商~
。。。
通不过。
不错，值得借鉴
第一题还是比较考验智商~
Gucci New Fall Arrivals
This is really nice to know. I hope it will be successful in the future. Good job on this and keep up the good work.
第二个方法很不错啊


---
layout: base
title: "Damir Cavar's CV"
author: "Damir Cavar"
desc: "This is Damir Cavar's Curriculum Vitae (CV)."
keywords: "Damir Cavar, CV, Natural Language Processing, NLP, AI"
link: cv
---
Curriculum Vitae: Damir Cavar - March 2019
Content
Summary
Since Fall 2016 I am Associate Professor at Indiana University.
Dr. phil. (magna cum laude), University of Potsdam, September 1999, Advisors: Prof.Dr. Peter Staudacher and Prof.Dr. Gisbert Fanselow
Professional experience
- since summer 2018 Fellow at the Center for Applied Cybersecurity Research (CACR) at Indiana University
- since summer 2017 Data Science Faculty in the School of Informatics, Computation, and Engineering (SICE), Indiana University
- since January 2018 Co-founder of Semiring Inc., an AI, NLP, ML company.
- since August 2016 Associate Professor of Computational Linguistics, Department of Linguistics, Indiana University.
- 2014-2018 Co-Director of The LINGUIST List at Indiana University.
- 2014-2016 Associate Research Scientist, Computational Linguistics, at Indiana University.
- 2013-2014 Director of the Institute for Language Information and Technology at Eastern Michigan University.
- 2011-2014 Assistant and Associate Professor (tenured and quit 2014), Computational Linguistics, at Eastern Michigan University.
- since 2006 Adjunct Assistant Professor of Computational Linguistics in the Department of Linguistics at Indiana University.
- 2011 Adjunct Affiliate Researcher at the Institute of Croatian Language and Linguistics (IHJJ).
- 2010-2011 Substituting Professor of Computational Linguistics in the Linguistics Department at the University of Konstanz (Germany), temporary one-year professorship.
- 2009-2011 Head of the branch office of the Institute of Croatian Language and Linguistics in Zadar (with its main institute in Zagreb)
- 2009-2010 Acting Chair of the Linguistics Department at the University in Zadar
- 2007-2008 Acting Chair of the English Department at the University in Zadar
- 2005-2011 Assistant Professor of Computational Linguistics at the University in Zadar, Linguistics Department (English Department till 2008)
- 2006-2009 Head of the department for theoretical and computational linguistics at the Institute of Croatian Language and Linguistics in Zagreb
- 2003-2006 Director of the Computational Linguistics Program in the Department of Linguistics at Indiana University
- 2003-2006 Assistant Professor of (Computational) Linguistics in the Department of Linguistics at Indiana University
- 2002-2003 Visiting Assistant Professor in the Department of Linguistics at Indiana University
- 2001-2002 IT Architect, Project Manager and Researcher in the Research & Innovations group of the IS-STA (Dresdner Bank AG and Allianz AG) in Frankfurt a.M. (Germany)
- 2000-2001 Researcher (PostDoc) at the Berlin-Brandenburgian Academy of Science, Project DWDS, PI: Prof.Dr. Manfred Bierwisch and Prof.Dr. Wolfgang Klein
- 2000 Researcher (PostDoc), Department of Computer Science at the Technical University in Berlin, KIT Group, Project Verbmobil
- 1999 Researcher at the University of Potsdam, Linguistics Department, in the interdisciplinary project “Formale Modelle Kognitiver Komplexität” (Formal Models of Cognitive Complexity), WP PI: Prof.Dr. Gisbert Fanselow
- 1998-1999 Researcher, Computer Science at the University in Hamburg, Natural Language Systems Group (NATS), PI: Prof.Dr. Walther von Hahn and Prof.Dr. Wolfgang Menzel, Project Verbmobil
- 1994-1998 Researcher, Berlin-Brandenburgian Academy of Science, Project RULE (Rule Learning and Rule Knowledge), PI: Prof.Dr. Jürgen Weissenborn and Prof.Dr. Angela Friederici
- 1994-1995 Researcher at the Innovationskolleg and Research Project “Formale Modelle Kognitiver Komplexität” (Formal Models of Cognitive Complexity), Linguistics Department, University of Potsdam, WP PI: Prof.Dr. Gisbert Fanselow
Board Member
Affiliations
Education
Degrees
Studies
- Goethe University in Frankfurt am Main: Geophysics, Math and Physics (Undergraduate studies)
- Goethe University in Frankfurt am Main: German (General Linguistics with Prof. Dr. Helen Leuninger and
Prof. Dr. Günther
Grewendorf), Slavic languages and Japanese (Undergraduate and MA studies)
- University of Potsdam: General Linguistics (with
Prof. Dr. Gisbert Fanselow,
Prof. Dr. Peter Staudacher and Prof. Dr. Jürgen Weissenborn) and Slavic linguistics (Diploma and PhD
studies)
Primary and Secondary School


Description
The @x:Act string type is based on the Java String type and holds sequences of 16-bit characters. Unlike Java that uses reference semantics for string == equality, in @x:Act == string equality is always value equality that compares the characters in the string.
String iterators include Chars[s] and Lines[s].
Views of string include boolean, fold, date, and file.
Examples of how to use the date view can be found in the string example.
Type string
@x:type string
| @x:type |
@x:func sys:Cat(a, |
| @x:type |
@x:func sys:Eq(a~string, |
| @x:type |
@x:func sys:Ne(a~string, |
| @x:type |
@x:func sys:Less(a~string, |
| @x:type |
@x:func sys:LessEq(a~string, |
| @x:type |
@x:func sys:Greater(a~string, |
| @x:type |
@x:func sys:GreaterEq(a~string, |
| @x:self | @x:func sys:Init(a)~void |
| @x:self | @x:func sys:Subscript(index) |
| @x:self | @x:const size~int |
Type Function sys:Cat
|
@x:func sys:Cat(a, |
||||
|
Semantics
The result is the string concatenation of string(a) and string(b).Type Function sys:Eq
|
@x:func sys:Eq(a~string, |
||||
|
Semantics
If a and b have the same size and same characters, then the result is true, else the result is false.Type Function sys:Ne
|
@x:func sys:Ne(a~string, |
||||
|
Semantics
If a and b have the same size and same characters, then the result is false, else the result is true.Type Function sys:Less
|
@x:func sys:Less(a~string, |
||||
|
Semantics
If a is less than b, then the result is true, else the result is false.Type Function sys:LessEq
|
@x:func sys:LessEq(a~string, |
||||
|
Semantics
If a is less than or equal to b, then the result is true, else the result is false.Type Function sys:Greater
|
@x:func sys:Greater(a~string, |
||||
|
Semantics
If a is greater than b, then the result is true, else the result is false.Type Function sys:GreaterEq
|
@x:func sys:GreaterEq(a~string, |
||||
|
Semantics
If a is greater than or equal to b, then the result is true, else the result is false.Self Function sys:Init
| @x:func sys:Init(a)~void | ||
|
Semantics
There are two forms of string constructor: a special single character constructor and a general purpose string constructor.
For the special single character constructor, a should have the form code=nnn where nnn is an integer value in the range 0 to 65535. The result will be a string with a single character whose internal code was given by n.
All other cases are general purpose string constructors.
If a?string then the object is initialized to
a
otherwise the object is initialized to
Type[a].toString()
Self Function sys:Subscript
| @x:func sys:Subscript(index) | ||
|
Semantics
There are two kinds of string subscript: character subscript and substring.
For a character subscript of a string s, index should be an integer in the range 0 to s.size. The result will be the integer character code for the index'th character. The value will be in the range 0..65535.
For a substring of a string s, index should have the form i..j where i and j have type int. If i == j + 1 the result is the empty string (""). Otherwise we require 1 <= i & i <= j & j <= s.size. In this case the result will be the substring of s containing character in positions i through j inclusive.
Self Const size
| @x:const size~int |
Semantics
The number of character in the string.


In this project, you're going to use CSS to create cartoon-like images that you can then animate
See the Pen Sleepy Bear - Pure CSS Image by Diulia Severgnini (@diulia-severgnini) on CodePen.
See the Pen Koala | Pure CSS by James Patrick Kerrane (@jamesjpk123) on CodePen.
The “pure CSS” refers to creating an image simply by adding style (with CSS) to several divs in your HTML — No JavaScript involved!
See the Pen PureCSS Square by Alex (@alexraby) on CodePen.
In this example, a div is given a width, height and background color, and it's a square! What would happen if you added a border radius?
Click "Edit on CodePen" in the upper right corner to find out!
1. Find an animal you'd like to add to your menagerie!
You can also search CodePen for more ideas: Click Here
2. Think about all the different shapes that make up this picture. What's the main base and the other shapes that are layered on top?
Make a list of the different shapes that you'll need.
Come back to this section if you're feeling stuck!
3. Give the body a background-color.
Then, create a frame for your animal using a border. It should be large enough that you can fit your coding artwork inside. Make sure you center it on the screen.
(Hint: Use margins).
4. Create a div that will serve as the head of your animal. Make sure you give it a unique class name like "head" for styling.
5. Add two more divs for ears. Think about how you can style them with the same class and add a second class for their location.
6. Add divs for an inner-ear. You'll probably want to put them behind the head — think about the layers of shapes that could make this happen. (Hint: You may need to add an extra head layer)
7. Give your animal some eyes.
8. Add a shape for a nose — try out a bunch of different types until you find the one you want.
9. Give your character a mouth. Using borders could work really well here.
10. Put in any finishing touches. Here are a few ideas:
See the Pen PureCSS Canvas by Alex (@alexraby) on CodePen.
11. Remove the border from around your animal's frame and voila! Show off your new friend!


The RGIK is a self-contained library for manipulating geographic information. The primary purpose of this library is to support Ehlschlaeger team research projects, so there's no formal spec for what it does.
This is not a GIS "system" -- it's not intended to be a complete environment for working with geographic info, but rather an environment for performing deep research into certain aspects of GIS algorithms.
RGIK is not built on top of a GIS, as it's low-level classes may contain features not found in other systems.


{% block title %}{% endblock %} - {% site_branding %}
{% include "horizon/_conf.html" %}
{% block css %}
{% include "_stylesheets.html" %}
{% endblock %}
{% include "horizon/client_side/_script_loader.html" %}
{% block content %}
{# FIXME(gabriel): remove the following warning block when Nova fixes their scoping upstream. #}
{% if request.user.is_superuser and request.horizon.dashboard.slug == "nova" %}
{% trans "Caution" %}:{% trans "You are acting as an admin user in the project dashboard." %}


--- prev_page: '/tutorial/tutorial_intro.html' next_page: '/tutorial/tutorial_interact.html' --- {% raw %}
# HIDDEN
# Clear previously defined variables
%reset -f
To begin, visit https://github.com/ and create an account. If you already have an account, you should log in.
Then, create a new repo. You may do this using the GitHub UI or visiting https://github.com/new . Name the repo nbinteract-tutorial
. If you'd like a different name, feel free to name it something else; just keep in mind that we will use this repo name in later parts of the tutorial.
Make sure your repo is public, and click the checkbox to initialize your repo with a README. Your page should look like:
Now, click on the Settings link for the repo near the top of the page, scroll down to the GitHub Pages section, and select the main
branch as the GitHub pages source. Click the Save button to save your changes.
Now, any file you upload to this repo will have a public URL. For example, the README.md
file in the repo has the following URL:
{username}.github.io/nbinteract-tutorial/README.md
Where {username}
is replaced with your GitHub username. For example, if my username is SamLau95
, my URL is:
SamLau95.github.io/nbinteract-tutorial/README.md
If you can visit that URL and the page contains text (and not a 404 error) you've set up your GitHub repo correctly.
Now, visit http://mybinder.org/ and paste in the URL to your repo. It should look like:
https://github.com/{username}/nbinteract-tutorial
Where {username}
is replaced with your GitHub username.
Launch the Binder server to open Jupyter.
If you are working locally, you should instead run the following commands in your terminal:
# Clone the repo
git clone https://github.com/{username}/nbinteract-tutorial
# Move into the repo directory
cd nbinteract-tutorial
# Start Jupyter
jupyter notebook
Via the notebook interface, click on New -> Terminal. This should open a terminal prompt. Run the following commands:
# Installs nbinteract
pip install nbinteract
# Initializes nbinteract. When prompted, create a requirements.txt file. Since we aren't
# adding additional packages in this tutorial, re-run the command to finish initialization.
nbinteract init
git add -A
git commit -m "Setup nbinteract"
git push origin main
This initializes the nbinteract
package and pushes the configuration files to GitHub.
If you are working locally, skip the pip install command
above and run the remaining commands in your terminal.


{% extends 'base.html' %} {% block content %}
After analyzing this data set. I managed to confirm my original hypothesis, which
was that the declining rate of primary enrolment is caused by the declining
birth rate.
However, there was 1 peculiar observation in the dataset, notice how from 1986
to 1988, there was a sudden spike in the number of live births, from 38,379
to 52,957.
This sudden spike is attributed to the establishment of the
Inter-Ministerial Population Committee in 1986, and later on, the
introduction of the Three or more if you can afford it
policy that was implemented in 1987. This actually aligns well with the changes in the live births rate.
| Year | Number of live births |
|---|---|
| 1986 | 38,379 |
| 1987 | 43,616 |
| 1988 | 52,957 |
Table: Spikes in live birth rates between 1986 and 1988
Other spikes could also be attributed to other reasons, such as the spike from 1999 to 2000
caused by the year of 2000 being the Year of the Dragon which is an auspicious year in which more
Chinese couples will try for a baby.
From this data set, it is very obvious that whilst the government has been putting in place many different
birth policies to encourage its citizens to give birth, most do not see a lot of success, apart from the
Three or more if you can afford it policy.
| Year | Number of live births |
|---|---|
| 1999 | 43,336 |
| 2000 | 46,997 |
Table: Spikes in live birth rates due to the Year of the Dragon
{% endblock %} {% block gallery %}


E-Commercials
In the 90s E-Commercial websites were not that popular. The internet wasn't that bing back then.
Not many people had a computer nor internet. Today this is not a problem and it is a reason
why E-Commercial websites are a huge part of the internet in this time.
Amazon was one of the first website to start selling online. They used to sell books online.
It wasn't until the 2000s that Amazon began to get bigger. To start selling not just books, but
more products that we could use in the everyday life.  It has become so important today that these companies
relied on them. It is where they mostly earn money and why people visit their websites.
eBay is the other E-Commercial website that competes with Amazon. There are many
more, but I'm focusing on the most popular. In this case eBay and Amazon were founded
almost in the same time. However, eBay was more than just a selling type website. People
could and still can auction products. Unlike Amazon, this is one of the bigger reason
why eBay has become better at it. In the other hand, Amazon has become better for companies
to sell their products while eBay is better for people to sell anything they want.
This is where the competition ends. One is better for auctions while the other for selling products.
Amazon became better at selling products specially technology. eBay became better for auctions
and for selling used products. Today since more people are using the internet, E-Commercial
websites are becoming more important. People tend to buy something from the internet than
going out to their local store. This is one of the reasons why local stores are closing
and moving to the online world.
Back then these website were lacking on a lot of
features. Since technology has improve, these websites did as well. We can find and we can
interact with more things then what we could before.


wizardly
`Prev `__
W
`Next `__
--------------
**wizardly**: adj.
Pertaining to wizards. A wizardly `*feature* <../F/feature.html>`__ is
one that only a wizard could understand or use properly.
--------------
+--------------------------------+----------------------------+------------------------------------+
| `Prev `__ | `Up <../W.html>`__ | `Next `__ |
+--------------------------------+----------------------------+------------------------------------+
| wizard mode | `Home <../index.html>`__ | wok-on-the-wall |
+--------------------------------+----------------------------+------------------------------------+


Returns the vertical or horizontal position of a point on a chart item. Use these position numbers with FORMAT.MOVE and FORMAT.SIZE to change the position and size of chart items. Position is measured in points; a point is 1/72nd of an inch.
Syntax
GET.CHART.ITEM(x_y_index, point_index, item_text)
X_y_index is a number specifying which of the coordinates you want returned.
| X_y_index | Coordinate returned |
| 1 | Horizontal coordinate |
| 2 | Vertical coordinate |
Point_index is a number specifying the point on the chart item. These indexes are described below. If point_index is omitted, it is assumed to be 1.
If the specified item is a point, point_index must be 1.
If the specified item is any line other than a data line, use the following values for point_index.
| Point_index | Chart item position |
| 1 | Lower or left |
| 2 | Upper or right |
If the selected item is a legend, plot area, chart area, or an area in an area chart, use the following values for point_index.
| Point_index | Chart item position |
| 1 | Upper left |
| 2 | Upper middle |
| 3 | Upper right |
| 4 | Right middle |
| 5 | Lower right |
| 6 | Lower middle |
| 7 | Lower left |
| 8 | Left middle |
If the selected item is an arrow in Microsoft Excel 4.0, use the following values for point_index. In Microsoft Excel version 5.0 or later, arrows are named lines, and the arrowhead position returned is equivalent to the end of a line where the arrowhead begins.
| Point_index | Chart item position |
| 1 | Arrow shaft |
| 2 | Arrowhead |
If the selected item is a pie slice, use the following values for point_index.
| Point_index | Chart item position |
| 1 | Outermost counterclockwise point |
| 2 | Outer center point |
| 3 | Outermost clockwise point |
| 4 | Midpoint of the most clockwise radius |
| 5 | Center point |
| 6 | Midpoint of the most counterclockwise radius |
Item_text is a selection code that specifies which item of a chart to select. See the chart form of SELECT for the item_text codes to use for each item of a chart.
If item_text is omitted, it is assumed to be the currently selected item.
If item_text is omitted and no item is selected, GET.CHART.ITEM returns the #VALUE! error value.
Remarks
If the specified item does not exist, or if a chart is not active when the function is carried out, the #VALUE! error value is returned.
Examples
The following macro formulas return the horizontal and vertical locations, respectively, of the top of the main-chart value axis:
GET.CHART.ITEM(1, 2, "Axis 1")
GET.CHART.ITEM(2, 2, "Axis 1")
You could then use FORMAT.MOVE to move a floating text item to the position returned by these two formulas.
Related Functions
GET.DOCUMENT Returns information about a workbook
GET.FORMULA Returns the contents of a cell
Return to index


---
layout: post
title: Domain Driven Design
author: Alexander Arimond
category : talk
---
Greenfield software projects always start promising, but after some time they often tend to evolve into so called "Big-Ball-of-Muds": complex systems, costly to enhance and maintain, and incapable of quickly adapting to new business requirements.
This is often due to a common lack of understanding of the business domain and it's in-proper representation in code.
Domain Driven Design is an approach for developers and domain experts to enhance communication and effectively manage the design and construction of maintainable software systems which are better in serving business needs.
In this Talk we will discuss the most important concepts and patterns of DDD and will have a look on how these can be applied at real world challenges.
Der Vortrag wird auf deutsch gehalten.
24.01.2019, 19:00, Chaos Computer Club Kaiserslautern
Sprecher:
Alexander Arimond arbeitet als Data Scientist und Software-Entwickler bei Sociovestix Labs.


CSCI-567
Homework1
Homework2
Homework3
Homework4
Homework5
Homework6
README.md
notes
template.tex
template.tex.sample


Downloading Windows 10 Insider Preview Iso Gives Me Iso Of A Stable Windows Version Microsoft Tech Community
How To Download And Install Windows 10 Insider Preview For Free Extremetech
Download Windows 10 Insider Preview Iso Insider Windows 10 Forums
Download Windows 10 Build 21354 Insider Preview Iso File Pureinfotech
Download Windows 10 Iso Preview 21359 21h1 X64 X86 Free Via Direct Links
How To Download Windows 10 Insider Preview Iso H2s Media
Windows 10 Insider Preview Build 21354 Dev Channel Iso Image Now Available For Download Youtube
Windows 10 Insider Preview 21364 Iso Offline Download
Windows 10 Insider Preview Build 21364 Available For Download Askvg
First Windows 10 Redstone 4 Isos Now Available For Download
Windows 10 Insider Preview Build 20161 1000 Rs Prerelease July 1 Insider Windows 10 Forums
Windows 10 Build 18343 Iso Now Available For Download Mspoweruser
Windows 10 Redstone 5 Iso Images Now Available For Download
Windows 10 Build 20150 Iso Now Available For Download From Microsoft Mspoweruser
Download E Novita Di Windows 10 19h1 Build 18343 E 20h1 Build 18841
Windows 10 X64 Build 18947 20h1 Iso Download File Now Available Windows 10 Insider Preview Youtube
Download Windows 10 8 7 Original Iso Images
Download Windows 10 19h1 V1903 Insider Preview Build 18343 Iso Images Tech Journey
Windows 10 Build 19013 20h1 Official Iso Is Now Available For Download Microsoft Tech Community
How To Download Windows 10 21h1 Iso File Preview Pureinfotech
Windows Insider Download Page 1 Line 17qq Com
Download Windows 10 Iso File Page 48 Tutorials
Download Windows 10 Insider Preview Build 21364
Windows 10 19037 20h1 Iso Download
Windows 10 Version 1607 Download Windows 10 As A Windows Insider Windows 10 Installation Guides
Windows 10 Event How To Watch The Live Stream And Live Blog By Microsoft For Today S Event Windows 10 Windows Microsoft
Downloads Windows Iot Microsoft Docs
The Best Tool To Download Official Microsoft Windows And Office Iso Images Nextofwindows Com


Torque 2D - 3D Shapes Tutorial
In this tutorial, you'll learn how to use 3D shapes in Torque 2D. The 3D file format that T2D uses is the '.dts' format. This is the same format that is used by the Torque Game Engine and other Garage Games products. There are many tutorials and reference documents available on the Garage Games website about creating these files using various 3D graphics suites. We won't go into that here. This tutorial assumes that you already have 3D shapes created and converted to the .dts format.
To
prepare for this tutorial, run Torque 2D and create a new
project by choosing New Project...
from the file menu. Name the new project "Shapes" and use
the Empty Game project
template. This creates a new folder called Shapes
in your TorqueGameBuilder/Games
folder.
We'll need to add a 3D shape to the Shapes project for this tutorial. When you're building your own game you'll create your own, but for now we're just going to copy a couple files from the TutorialBase project supplied with T2D. 3D shapes are stored in the data/shapes folder, so open your file browser and browse to the TTorque Game Builder 1.7.5 Pro/Games/TutorialBase/game//data/shapes folder. Copy the files called player.dts and player_blue.jpg. Paste them into the Torque Game Builder 1.7.5 Pro/Games/Shapes/game/data/shapes folder. These two files are the shape file and the image used to paint the shape. In most cases, you will have at least one image (or 'texture') that goes along with your 3D shapes.
The final step in this process is to reload your project file. There are two ways to do this... you can either close and re-open T2D, or you can select Open Project... from the File menu, open a different project, then re-open the Shapes project.
You can now find your player.dts shape in the object picker. In the Create tab, scroll down to 3D Shapes... there it is! You can now drag it onto the screen just like any other image (as shown in Figure 1). You can also use the object handles to size it, but not to rotate it.
Now that we have our 3D shape on the screen, let's check out the properties we can edit on it. Go to the Edit tab and check out the 3D Shape section at the top. There are 4 properties, each with an X, a Y, and a Z value: Angular Velocity, Rotation, Offset, and Scale. The X, Y, and Z options are the axes of the shape... you can picture X as a line going from left to right through the center of the shape, Y as a line going from top to bottom through the center, and Z as a line coming up, out of the screen, through the center of the object. While we're checking out these properties, you may want to zoom in on the object (with the '+' key).
The Angular Velocity property applies a constant rotation to the object. Set the Angular Velocity Y property to "20", and you'll see that our object was actually facing backwards (as shown in Figure 2)! Set it back to "0" when you're done watching it rotate. Take a minute to experiment with each of the following properties:
Angular Velocity sets a constant rotation around the chosen axis.
Rotation sets a rotation value around the axes, but not a moving rotation. Note that because of the complications of 3D math, combining rotations around different axes can cause some unpredictable effects.
Offset moves the 3D shape along the axes. Note that you can't move the object toward or away from the camera, because T2D is a two-dimensional world!
Scale sizes the object in 3D space. Note that you can't scale the object toward or away from the camera, again because T2D is a two-dimensional world.
The 3D shape's special 3D functions can be accessed through the object's class, just like with any other T2D Scene Object. There are many tutorials that go through using class functions in depth. For this tutorial, it is assumed that you understand the basics of this, and we'll just jump into this one simple example...
First, go to the Scripting section in the Edit tab for the 3D shape. Enter "player" as the Class. Next, add the following code to the very bottom of the game.cs file in your game/gameScripts folder:
sceneWindow2D.setUseObjectMouseEvents(true); function player::onAdd(%this) { %this.setUseMouseEvents(true); } function player::onMouseDown(%this, %modifier, %worldPosition, %mouseClicks) { %this.setShapeAngularVelocity(0,20,0); } |
To activate this code, you will again need to re-load the project, so either close and re-open T2D or open another project then re-open this one. Now, click the Play Level button in the toolbar. When you click on the object, it starts to rotate.
This tutorial has given you the bare essentials of using 3D Shapes. You can find quite a bit more detail in the 3D Shapes reference document that is included with T2D. You can also find brief documentation on all the possible functions for 3D objects in the T2D Reference under t2dShape3D.


| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| dist | 58.49% | 5008/8562 | 49.53% | 2440/4926 | 63.78% | 391/613 | 58.83% | 4979/8463 | |
| packages/ebnf-parser/dist | 38.68% | 1796/4643 | 28.35% | 752/2653 | 46.54% | 121/260 | 39.23% | 1785/4550 | |
| packages/ebnf-parser/tests | 99.1% | 220/222 | 72.22% | 13/18 | 98.33% | 59/60 | 99.1% | 220/222 | |
| packages/helpers-lib/dist | 64.74% | 112/173 | 39.81% | 43/108 | 82.61% | 19/23 | 67.27% | 111/165 | |
| packages/helpers-lib/tests | 98.46% | 64/65 | 83.33% | 5/6 | 100% | 15/15 | 98.46% | 64/65 | |
| packages/jison-lex/dist | 66.02% | 1947/2949 | 55.05% | 889/1615 | 76.88% | 133/173 | 66.56% | 1937/2910 | |
| packages/jison-lex/tests | 98.22% | 1378/1403 | 81.4% | 35/43 | 99.17% | 119/120 | 98.22% | 1378/1403 | |
| packages/jison2json | 87.5% | 7/8 | 50% | 1/2 | 100% | 1/1 | 87.5% | 7/8 | |
| packages/jison2json/tests | 100% | 9/9 | 100% | 0/0 | 100% | 2/2 | 100% | 9/9 | |
| packages/json2jison | 44.71% | 38/85 | 33.87% | 21/62 | 60% | 6/10 | 44.71% | 38/85 | |
| packages/json2jison/tests | 100% | 8/8 | 100% | 0/0 | 100% | 2/2 | 100% | 8/8 | |
| packages/lex-parser/dist | 46.12% | 880/1908 | 34.86% | 366/1050 | 47.62% | 50/105 | 46.61% | 874/1875 | |
| packages/lex-parser/tests | 99.03% | 205/207 | 50% | 4/8 | 94.44% | 51/54 | 99.03% | 205/207 | |
| tests | 100% | 12/12 | 100% | 0/0 | 100% | 2/2 | 100% | 12/12 | |
| tests/parser | 68.43% | 2207/3225 | 21.54% | 224/1040 | 77.65% | 278/358 | 68.52% | 2198/3208 |


The day of the week you were born
should give you your respective Akan name
Enter date of birth
Select gender
Male
Female
Submit
Output:


Hardware setup structure. More...
#include <csl_a15.h>
Data Fields | |
| CSL_A15MmuShortDescType | type |
| Uint32 | phyAddr |
| Uint32 | bufferable |
| Uint32 | cacheable |
| Uint32 | shareable |
| Uint32 | noexecute |
| Uint32 | imp |
| Uint32 | domain |
| Uint32 | accPerm |
| Uint32 | tex |
| Uint8 | nonSecure |
Hardware setup structure.
| Uint32 CSL_A15MmuShortDescAttr::accPerm |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::bufferable |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::cacheable |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::domain |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::imp |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::noexecute |
32 bit load value to be loaded to Timer Period Register low
| Uint8 CSL_A15MmuShortDescAttr::nonSecure |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::phyAddr |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::shareable |
32 bit load value to be loaded to Timer Period Register low
| Uint32 CSL_A15MmuShortDescAttr::tex |
32 bit load value to be loaded to Timer Period Register low
| CSL_A15MmuShortDescType CSL_A15MmuShortDescAttr::type |
32 bit load value to be loaded to Timer Period Register low


Shania Twain brings curtain down on the AMAs with hit-laden medley of songs
Twain had the star-studded audience, including a delighted Post Malone, on their feet.
Shania Twain brought the curtain down on the American Music Awards with a career-spanning medley of her best-known songs.
The Canadian singer-songwriter took to the stage after Taylor Swift – now the most successful artist in AMAs history – picked up her prize for artist of the year.

She then launched into the medley of her own tracks, beginning with her 1998 hit You’re Still The One and following it up with Any Man Of Mine.
Twain had the star-studded crowd, including a delighted Post Malone, on their feet for Don’t Impress Me Much before closing the show with Man, I Feel Like A Woman as confetti rained down.
It was Twain’s first AMAs performance since 2003. She was among a female-led slate of performers during Sunday’s ceremony, where Swift was the big winner on the night with six gongs.
Lizzo, Camila Cabello, Billie Eilish and Selena Gomez also performed.
Twain, a five-time Grammy winner, has sold more than 100 million records, making her one of the most successful musicians ever.


ccnc.h file
Main CCNC functions.
Classes
- struct MotorPins
- A struct containing motor pin numbers.
- struct MotorGPIOD
- A struct containing motor GPIOD line pointers and state.
Typedefs
- using uint = unsigned int
Functions
- void initMotor(struct MotorPins* motorPins, struct MotorGPIOD* motorGPIOD, struct gpiod_chip* chip)
- Initializes a A4988-style motor driver.
- void releaseMotor(struct MotorGPIOD* motorGPIOD)
- Safety releases all GPIOD connections for a given motor.
- void prepareSubcommand(uint scmd, struct MotorGPIOD* motorGPIOD)
- Prepares pin states for a subcommand.
- void executeSubcommand(uint scmd, struct MotorGPIOD* motorGPIOD, uint wait)
- Executes a subcommand with a specified wait time between step pin high and low.
- void executeSubcommandsOnMotors(uint scmds[], struct MotorGPIOD* motorGPIODs[], uint wait, uint number)
- Executes multiple subcommands on multiple motors (one per motor).
- void runScmd(uint scmd, uint wait, struct gpiod_line* stp, struct gpiod_line* dir, struct gpiod_line* ms1, struct gpiod_line* ms2, struct gpiod_line* ms3) deprecated
- Execute a subcommand by manually supplying GPIOD lines.
- void runScmdFromArray(uint scmd[5], uint wait, struct gpiod_line* stp, struct gpiod_line* dir, struct gpiod_line* ms1, struct gpiod_line* ms2, struct gpiod_line* ms3) deprecated
- Execute a subcommand from an array by manually supplying GPIOD lines.
- auto parity(uint i) -> uint
- Computes integer parity.
- auto addParityBit(uint i) -> uint
- Prepends parity bit to an integer.
- auto checkParity(uint i, uint parityBit) -> bool
- Checks if parity bit is properly set.
- auto concatenateSubcommands(uint scmd0, uint scmd1) -> uint
- Concatenates two subcommands.
- auto deconstructCommand(uint cmd) -> uint*
- Deconstructs command.
- void demoMotors(struct MotorGPIOD* xMotor, struct MotorGPIOD* yMotor, struct MotorGPIOD* zMotor)
- A small motor demo.
Defines
- #define BUFFER_SIZE
- #define COMMAND_LENGTH
- Number of subcommands in a command.
Typedef documentation
typedef unsigned int uint
Shorthand for unsigned integer.
Function documentation
void initMotor(struct MotorPins* motorPins, struct MotorGPIOD* motorGPIOD, struct gpiod_chip* chip)
Initializes a A4988-style motor driver.
| Parameters | |
|---|---|
| motorPins | Motor driver GPIO pins. |
| motorGPIOD | Uninitialized pointer to a MotorGPIOD instance that is to be populated. |
| chip | Pointer to the GPIOD chip. |
Calls GPIOD and request pin output access as the "cnccontroller" consumer. Initial pin values are set to low.
void releaseMotor(struct MotorGPIOD* motorGPIOD)
Safety releases all GPIOD connections for a given motor.
| Parameters | |
|---|---|
| motorGPIOD | Pointer to the MotorGPIOD instance to be released. |
void prepareSubcommand(uint scmd, struct MotorGPIOD* motorGPIOD)
Prepares pin states for a subcommand.
| Parameters | |
|---|---|
| scmd | A 5-bit subcommand. |
| motorGPIOD | Pointer to the MotorGPIOD instance. |
A subcommand is a 5-bit value with the following build-up:
| Address (LE) | Abbreviation | Meaning |
|---|---|---|
| 0 | MS3 | Microstep 3 |
| 1 | MS2 | Microstep 2 |
| 2 | MS1 | Microstep 1 |
| 3 | DIR | Direction |
| 4 | ENA | Enable |
void executeSubcommand(uint scmd, struct MotorGPIOD* motorGPIOD, uint wait)
Executes a subcommand with a specified wait time between step pin high and low.
| Parameters | |
|---|---|
| scmd | A 5-bit subcommand. |
| motorGPIOD | Pointer to the MotorGPIOD instance. |
| wait | Wait time in microseconds. |
void executeSubcommandsOnMotors(uint scmds[], struct MotorGPIOD* motorGPIODs[], uint wait, uint number)
Executes multiple subcommands on multiple motors (one per motor).
| Parameters | |
|---|---|
| scmds | An array of 5-bit subcommands. |
| motorGPIODs | An array of pointers to MotorGPIOD instances. |
| wait | Wait time in microseconds. |
| number | Number of motors to be commanded. |
void runScmd(uint scmd, uint wait, struct gpiod_line* stp, struct gpiod_line* dir, struct gpiod_line* ms1, struct gpiod_line* ms2, struct gpiod_line* ms3)
Execute a subcommand by manually supplying GPIOD lines.
| Parameters | |
|---|---|
| scmd | A 5-bit subcommand. |
| wait | Wait time in microseconds. |
| stp | Pointer to the STP gpiod_line. |
| dir | Pointer to the DIR gpiod_line. |
| ms1 | Pointer to the MS1 gpiod_line. |
| ms2 | Pointer to the MS2 gpiod_line. |
| ms3 | Pointer to the MS3 gpiod_line. |
void runScmdFromArray(uint scmd[5], uint wait, struct gpiod_line* stp, struct gpiod_line* dir, struct gpiod_line* ms1, struct gpiod_line* ms2, struct gpiod_line* ms3)
Execute a subcommand from an array by manually supplying GPIOD lines.
| Parameters | |
|---|---|
| scmd | An array of five integers. |
| wait | Wait time in microseconds. |
| stp | Pointer to the STP gpiod_line. |
| dir | Pointer to the DIR gpiod_line. |
| ms1 | Pointer to the MS1 gpiod_line. |
| ms2 | Pointer to the MS2 gpiod_line. |
| ms3 | Pointer to the MS3 gpiod_line. |
uint addParityBit(uint i)
Prepends parity bit to an integer.
| Parameters | |
|---|---|
| i | Integer. |
| Returns | Integer with prepended parity bit. |
Parity bit is added at address 0 (LE).
bool checkParity(uint i, uint parityBit)
Checks if parity bit is properly set.
| Parameters | |
|---|---|
| i | Integer to be checked. |
| parityBit | Supposed parity bit. |
| Returns | True if parity matches parity bit, false otherwise. |
uint concatenateSubcommands(uint scmd0, uint scmd1)
Concatenates two subcommands.
| Parameters | |
|---|---|
| scmd0 | First subcommand. |
| scmd1 | Second subcommand. |
| Returns | Concatenated subcommands. |
uint* deconstructCommand(uint cmd)
Deconstructs command.
| Parameters | |
|---|---|
| cmd | Command to be deconstructed. |
| Returns | Array of length COMMAND_ |
void demoMotors(struct MotorGPIOD* xMotor, struct MotorGPIOD* yMotor, struct MotorGPIOD* zMotor)
A small motor demo.
| Parameters | |
|---|---|
| xMotor | A pointer to the x-axis MotorGPIOD instance. |
| yMotor | A pointer to the y-axis MotorGPIOD instance. |
| zMotor | A pointer to the z-axis MotorGPIOD instance. |
Define documentation
#define BUFFER_SIZE
Character buffer size for stdin input.
#define COMMAND_LENGTH
Number of subcommands in a command.
Normally equals number of controlled motors.


|
|
I'm a Statistics and Art History student at the University of Chicago. |
| Projects | Writing | Drop me a line |
|---|---|---|
| BCNM Publications | Art Institute of Chicago Field Trip |<EMAIL_ADDRESS>|
| Voteworthy.org | UCB Library Student Council | |
| bGlass | Writing Portfolio | Github |


|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |
org.apache.commons.logging.Log.allowFlawedContext
)
of the system property which can be set true/false to
determine system behaviour when a bad context-classloader is encountered.
org.apache.commons.logging.Log.allowFlawedDiscovery
)
of the system property which can be set true/false to
determine system behaviour when a bad logging adapter class is
encountered during logging discovery.
org.apache.commons.logging.Log.allowFlawedHierarchy
)
of the system property which can be set true/false to
determine system behaviour when a logging adapter class is
encountered which has bound to the wrong Log class implementation.
AvalonLogger
that outputs to the given
Logger
instance.
AvalonLogger
that will log to a child
of the Logger
set by calling AvalonLogger.setDefaultLogger(org.apache.avalon.framework.logger.Logger)
.
org.apache.commons.logging.diagnostics.dest
)
of the property used to enable internal commons-logging
diagnostic output, in order to get information on what logging
implementations are being discovered, what classloaders they
are loaded through, etc.
org.apache.avalon.framework.logger.Logger.debug
.
org.apache.avalon.framework.logger.Logger.debug
.
java.util.logging.Level.FINE
.
java.util.logging.Level.FINE
.
java.util.logging.Level.FINE
.
java.util.logging.Level.FINE
.
org.apache.log4j.Priority.DEBUG
.
org.apache.log4j.Priority.DEBUG
.
org.apache.log.Priority.DEBUG
.
org.apache.log.Priority.DEBUG
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG
.
org.apache.avalon.framework.logger.Logger.error
.
org.apache.avalon.framework.logger.Logger.error
.
java.util.logging.Level.SEVERE
.
java.util.logging.Level.SEVERE
.
java.util.logging.Level.SEVERE
.
java.util.logging.Level.SEVERE
.
org.apache.log4j.Priority.ERROR
.
org.apache.log4j.Priority.ERROR
.
org.apache.log.Priority.ERROR
.
org.apache.log.Priority.ERROR
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR
.
LogFactory
implementation class to use, if no other can be found.
commons-logging.properties
) of the properties file to search for.
org.apache.commons.logging.LogFactory
) of the property
used to identify the LogFactory implementation
class name.
LogFactory
instances, keyed by
the ClassLoader
with which it was created.
org.apache.avalon.framework.logger.Logger.fatalError
.
org.apache.avalon.framework.logger.Logger.fatalError
.
java.util.logging.Level.SEVERE
.
java.util.logging.Level.SEVERE
.
java.util.logging.Level.SEVERE
.
java.util.logging.Level.SEVERE
.
org.apache.log4j.Priority.FATAL
.
org.apache.log4j.Priority.FATAL
.
org.apache.log.Priority.FATAL_ERROR
.
org.apache.log.Priority.FATAL_ERROR
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL
.
null
if there is no such attribute.
null
if there is no such attribute.
LogFactory
instance, using the following ordered lookup procedure to determine
the name of the implementation class to be loaded.
getInstance(String)
with it.
Log
instance,
using the factory's current set of configuration attributes.
Log
instance by class name
Log
instance by class
getInstance(String)
with it.
Log
instance,
using the factory's current set of configuration attributes.
String
array containing the names of
all logs known to me.
org.apache.commons.logging.LogFactory.HashtableImpl
)
value allows the Hashtable
used to store
classloaders to be substituted by an alternative implementation.
org.apache.avalon.framework.logger.Logger.info
.
org.apache.avalon.framework.logger.Logger.info
.
java.util.logging.Level.INFO
.
java.util.logging.Level.INFO
.
java.util.logging.Level.INFO
.
java.util.logging.Level.INFO
.
org.apache.log4j.Priority.INFO
.
org.apache.log4j.Priority.INFO
.
org.apache.log.Priority.INFO
.
org.apache.log.Priority.INFO
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO
.
Log
instances that have
already been created, keyed by logger name.
org.apache.avalon.framework.logger.Logger.debug
enabled?
DEBUG
priority.
LogKit
logger will log messages of priority DEBUG
.
org.apache.avalon.framework.logger.Logger.error
enabled?
ERROR
priority.
LogKit
logger will log messages of priority ERROR
.
org.apache.avalon.framework.logger.Logger.fatalError
enabled?
FATAL
priority.
LogKit
logger will log messages of priority FATAL_ERROR
.
org.apache.avalon.framework.logger.Logger.info
enabled?
INFO
priority.
LogKit
logger will log messages of priority INFO
.
org.apache.avalon.framework.logger.Logger.debug
enabled?
TRACE
priority.
LogKit
logger will log messages of priority DEBUG
.
org.apache.avalon.framework.logger.Logger.warn
enabled?
WARN
priority.
LogKit
logger will log messages of priority WARN
.
org.apache.commons.logging.Log
interface that wraps the standard JDK logging mechanisms that are
available in SourceForge's Lumberjack for JDKs prior to 1.4.org.apache.commons.logging.Log
interface that wraps the standard JDK logging mechanisms that were
introduced in the Merlin release (JDK 1.4).org.apache.commons.logging.Log
) of the system
property identifying our Log
implementation class.
Log
that maps directly to a
Logger for log4J version 1.2.LogFactory
or Log
instance cannot be created by the corresponding
factory methods.null
as its detail message.
Log
instances, with discovery and
configuration features similar to that employed by standard Java APIs
such as JAXP.LogFactory
that implements the
following algorithm to dynamically select a logging implementation
class to instantiate a wrapper for.org.apache.commons.logging.Log
that wraps the avalon-logkit
logging system.LogKitLogger
which wraps the LogKit
logger with given name.
LogFactory
instead - The default factory
implementation performs exactly the same algorithm as this class didLog
implementation class that will be used to create new instances.
setLogFactory
method of the selected
Log
method, if it exists.
setLogFactory
method to be used.
LogKit
logger
Log
implementation, based
on the given name.
LogFactory
implementation class, loaded by the specified class loader.
Log
instance for the specified name.
LogFactory
instance as in the
factories
map, but for the case where
getClassLoader
returns null
.
priority
) of the key in the config file used to
specify the priority of that particular config file.
Log
instances returned by this factory.
LogFactory
instances that have been associated with the specified class loader
(if any), after calling the instance method release()
on
each of them.
Log
instances returned by this factory.
LogFactory
instances, after calling the instance method release()
on
each of them.
SimpleLog
start with this
use_tccl
) of the key in the config file used
to specify whether logging classes should be loaded via the thread
context class loader (TCCL), or not.
org.apache.avalon.framework.logger.Logger.debug
.
org.apache.avalon.framework.logger.Logger.debug
.
java.util.logging.Level.FINEST
.
java.util.logging.Level.FINEST
.
java.util.logging.Level.FINEST
.
java.util.logging.Level.FINEST
.
org.apache.log4j.Priority.TRACE
.
org.apache.log4j.Priority.TRACE
.
org.apache.log.Priority.DEBUG
.
org.apache.log.Priority.DEBUG
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE
.
Hashtable
that uses WeakReference
's
to hold its keys thus allowing them to be reclaimed by the garbage collector.org.apache.avalon.framework.logger.Logger.warn
.
org.apache.avalon.framework.logger.Logger.warn
.
java.util.logging.Level.WARNING
.
java.util.logging.Level.WARNING
.
java.util.logging.Level.WARNING
.
java.util.logging.Level.WARNING
.
org.apache.log4j.Priority.WARN
.
org.apache.log4j.Priority.WARN
.
org.apache.log.Priority.WARN
.
org.apache.log.Priority.WARN
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN
.
org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN
.
StringBuffer
to the appropriate output destination.
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |


--- layout: index ---
I’m Graham Thomson and I make software.
I like clean application architecture and code that humans can understand. I usually use Python and Django.
I work at Octopus Energy in London, and help organize the London Django Meetup.