Open Interpretability Models Contributors Research Posts About

Qwen/Qwen2.5-1.5B · L18/N3546 · 20261102T115814Z

Experiment 1 of 1 on this neuron, most conclusive first · record

#1 · negative pole − REJECTED moderate evidence against · 0.74 self-reviewed counts toward status 2026-11-02 · 20261102T115814Z

This pole fires on the token that continues or opens a qualified code expression — a member name after `.`, a scope part after `::`, an index/key after `[` or `(`, or a camelCase/snake_case suffix of a code identifier — when a code object, namespace, or call precedes it; the same tokens in prose or after a non-code word activate it far less. It reacts to the access-chain context already read, not to a specific upcoming token.

The whole hypothesis

This pole fires on the token that continues or opens a qualified code expression — a member name after `.`, a scope part after `::`, an index/key after `[` or `(`, or a camelCase/snake_case suffix of a code identifier — when a code object, namespace, or call precedes it; the same tokens in prose or after a non-code word activate it far less. It reacts to the access-chain context already read, not to a specific upcoming token.

Hard negatives 14/14 rejected · holdouts 0/6 fired (independent observations; 20 probes) · P(useful) 0.13

Balanced accuracy
0.50
Sufficiency
0.77
Necessity
0.64
Lookahead KL
0.0003
✓ enough hard negatives ✓ enough holdouts ✓ specificity ✗ sensitivity ✓ counterfactual reproduction ✓ lookahead consistent ✓ independent review ✗ beats confound baseline ✓ not default on

specificity 1.00 · sensitivity 0.00 · counterfactual reproduction 1.00 · protocol v0.8

.Tables["::Reply.get.PInfo.name[

Adversarial review

hard_negative: 14/14 passed; positive_holdout: 0/6 passed; counterfactual: 6/6 passed; lookahead_consistency: 1/1 passed. Failed gates: sensitivity, beats_confound_baseline.

Hard negatives 14/14 stay below Positive holdouts 0/6 reach it threshold 1.27 (25% of max) → active passed · 0.073 (1% of max) The answer to ( three plus four ) times two is fourteen, as we worked out together on the whiteboard. passed · 0.084 (2% of max) .get started on your essay early, and remember to outline your arguments before writing the first draft. passed · 0.149 (3% of max) For further Info about parking and directions, check the notice board in the lobby of the building. passed · 0.150 (3% of max) Please send a quick Reply to the invitation by Friday so we can confirm the headcount for dinner. passed · 0.160 (3% of max) The final score was posted as 12::13 after extra time, and the tired crowd slowly went home. passed · 0.164 (3% of max) // quick note: user.name should be checked with the team before the meeting tomorrow morning passed · 0.169 (3% of max) We cleared the hall after the banquet. Tables were folded and chairs were stacked against the far wall. passed · 0.176 (3% of max) We discussed refactoring and testing strategies for hours, focusing on readability, teamwork, and careful reviews. passed · 0.187 (4% of max) My shopping list for the weekend includes [ apples, bread, cheese, and fresh flowers from the market ]. passed · 0.213 (4% of max) I wrote to Jones twice last week. Reply never came, so I eventually called her office on Tuesday. passed · 0.281 (6% of max) Visit our new gallery at example.com/about sometime this spring to see photographs from local artists. passed · 0.367 (7% of max) She added a funny face ::) at the end of her message, which made everyone in the group chat laugh. passed · 0.394 (8% of max) In yesterday's lecture the word Tables came up many times while discussing how to arrange furniture neatly. passed · 0.425 (8% of max) The renowned Dr. Smith gave a lecture on poetry and left the audience inspired by her closing remarks. failed · -0.000 (-0% of max) String token = sessionManager.getUserProfile(userId); failed · 0.173 (3% of max) df.groupby.columns.tolist() returned the expected headers after we loaded the survey results into pandas. failed · 0.231 (5% of max) player_inventory.add_item_to_backpack(quest_reward); failed · 0.244 (5% of max) The quarterly audit began as a routine assignment in late January, when the finance team asked Maya to reconcile three years of regional sales records scatte… failed · 0.458 (9% of max) let engine = physics::world::rigid::Body::create(&factory, &spec, mass); failed · 0.852 (17% of max) if (matrix[i][j] > threshold) { total += matrix[i][j]; } 0 max 5.06
passed failed Each probe's peak negative-pole strength. The shaded side of the line counts as active. Hover a dot for its prompt.
All 27 probes
TestInputExpectedObserved
✓ hard negative Please send a quick Reply to the invitation by Friday so we can confirm the headcount for dinner.
Tests the claimed Reply trigger in a plain prose email context with no code object before it.
inactive 0.150
✓ hard negative For further Info about parking and directions, check the notice board in the lobby of the building.
Tests the claimed Info trigger in ordinary prose with no code namespace or call preceding it.
inactive 0.149
✓ hard negative We cleared the hall after the banquet. Tables were folded and chairs were stacked against the far wall.
Tests period-plus-Tables in prose where no code object precedes, unlike ds.Tables in code.
inactive 0.169
✓ hard negative The final score was posted as 12::13 after extra time, and the tired crowd slowly went home.
Tests the :: trigger in a prose score/time-like context with no code namespace before it.
inactive 0.160
✓ hard negative My shopping list for the weekend includes [ apples, bread, cheese, and fresh flowers from the market ].
Tests bracket indexing in a prose shopping list with no code object or call before the bracket.
inactive 0.187
✓ hard negative We discussed refactoring and testing strategies for hours, focusing on readability, teamwork, and careful reviews.
Keeps the code topic and vocabulary but removes the access-chain feature entirely.
inactive 0.176
✓ hard negative The renowned Dr. Smith gave a lecture on poetry and left the audience inspired by her closing remarks.
Tests dot-plus-name after a prose abbreviation where no code object precedes the member name.
inactive 0.425
✓ hard negative // quick note: user.name should be checked with the team before the meeting tomorrow morning
Places the access-chain pattern inside a code comment, where the preceding context is prose rather than code.
inactive 0.164
✓ hard negative .get started on your essay early, and remember to outline your arguments before writing the first draft.
Tests the .get trigger in sentence-initial position with no code object before it.
inactive 0.084
✓ hard negative In yesterday's lecture the word Tables came up many times while discussing how to arrange furniture neatly.
Mentions the Tables word in prose discussion with no dot or code object before it.
inactive 0.394
✓ hard negative The answer to ( three plus four ) times two is fourteen, as we worked out together on the whiteboard.
Tests parenthesis indexing in arithmetic prose with no code call or object before the paren.
inactive 0.073
✓ hard negative Visit our new gallery at example.com/about sometime this spring to see photographs from local artists.
Tests dots in a URL in prose, where no code object precedes the member-like token.
inactive 0.281
✓ hard negative I wrote to Jones twice last week. Reply never came, so I eventually called her office on Tuesday.
Tests Reply after a prose sentence with no code call preceding it.
inactive 0.213
✓ hard negative She added a funny face ::) at the end of her message, which made everyone in the group chat laugh.
Tests :: in an emoticon in prose chat with no code namespace before it.
inactive 0.367
✗ positive holdout df.groupby.columns.tolist() returned the expected headers after we loaded the survey results into pandas.
Positive holdout: novel Python method chain with member access after a code object.
active 0.173
✗ positive holdout let engine = physics::world::rigid::Body::create(&factory, &spec, mass);
Positive holdout: novel Rust scope chain with :: after namespaces, unlike the Java/C# examples.
active 0.458
✗ positive holdout if (matrix[i][j] > threshold) { total += matrix[i][j]; }
Positive holdout: novel C-style double index access after an array object.
active 0.852
✗ positive holdout String token = sessionManager.getUserProfile(userId);
Positive holdout: novel Java-style camelCase member and suffix after a session object.
active -0.000
✗ positive holdout player_inventory.add_item_to_backpack(quest_reward);
Positive holdout: novel snake_case suffix continuation of a game-script identifier.
active 0.231
✗ positive holdout The quarterly audit began as a routine assignment in late January, when the finance team asked Maya to reconcile three years of regional sales records scattered across spreadsheets, email attachments, and an aging reporting portal. She spent weeks interviewing warehouse managers, cross-checking shipment logs against invoices, and documenting every discrepancy in a shared notebook that grew to hundreds of pages. By March the team had built a clean pipeline that pulled nightly extracts, normalized currency codes, and flagged duplicate order numbers for manual review. New analysts joined in April and wrote tutorials explaining each transformation step, while Maya reviewed pull requests, added validation rules, and chased down missing tax tables from two vendors. After months of evening reconciliation sessions, stakeholder demos, training workshops, and a final weekend of end-to-end checks, she opened the consolidated workbook to verify the headline figure with the query var cell = workbook.Sheets["Summary"].Tables["Quarterly"].Columns["Revenue"];
Long-context positive holdout placing a qualified Tables/Columns chain deep after extended prose.
active 0.244
✓ counterfactual s.version = Jekyll::LastModifiedAt::VERSION -> s.version = Jekyll/LastModifiedAt/VERSION Δ 0.35 Δ 0.35
✓ counterfactual backend = load_backend(db["ENGINE"]) -> backend = load_backend(my["ENGINE"]) Δ 0.17 Δ 0.17
✓ counterfactual String response = client.getReplyString(); -> String response = client greetsString(); Δ 0.13 Δ 0.13
✓ counterfactual String response = client.getReplyString(); -> The happy client getReplyString danced; Δ 0.10 Δ 0.10
✓ counterfactual result = ds.Tables["Menu"]; -> result = my Tables["Menu"]; Δ 0.08 Δ 0.08
✓ counterfactual result = ds.Tables["Menu"]; -> output = ds.Tables["Menu"]; Δ 0.00 Δ -0.05
✓ lookahead consistency s.version = Jekyll::LastModifiedAt::VERSION; backend = load_backend(db["ENGINE"]); String response = client.getReplyString();; String response = client.getReplyString();; result = ds.Tables["Menu"];; result = ds.Tables["Menu"];
claimed retrospective; measured retrospective (KL=0.0002785, tokens=['"].', '().', 'VERSION', '[', '::'])

Minimal pairs

Pair 1 Sufficiency: 0.78 · effect 7.52e-05 (matched |effect| median 2.2e-05, max 0.000379) s.version = Jekyll::LastModifiedAt::VERSION → s.version = Jekyll/LastModifiedAt/VERSION Necessity: 0.53 · effect 3.31e-05 (matched |effect| median 3.17e-05, max 0.00045) s.version = Jekyll::LastModifiedAt::VERSION → s.version = Jekyll/LastModifiedAt/VERSION Pair 2 Sufficiency: 0.59 · effect 8.9e-06 (matched |effect| median 3.29e-06, max 0.000116) backend = load_backend(db["ENGINE"]) → backend = load_backend(my["ENGINE"]) Necessity: 0.53 · effect 1.45e-05 (matched |effect| median 1.33e-05, max 0.000169) backend = load_backend(db["ENGINE"]) → backend = load_backend(my["ENGINE"]) Pair 3 Sufficiency: 0.75 · effect 5.19e-05 (matched |effect| median 1.18e-05, max 0.000158) String response = client.getReplyString(); → String response = client greetsString(); Necessity: 0.84 · effect 3.66e-05 (matched |effect| median 5.42e-06, max 0.000197) String response = client.getReplyString(); → String response = client greetsString(); Pair 4 Sufficiency: 0.78 · effect 1.47e-05 (matched |effect| median 2.31e-06, max 3.49e-05) String response = client.getReplyString(); → The happy client getReplyString danced; Necessity: 0.75 · effect 2.7e-05 (matched |effect| median 6.17e-06, max 8.39e-05) String response = client.getReplyString(); → The happy client getReplyString danced; Median (score) Sufficiency: 0.77 · median of 4 pairs 0.77 Necessity: 0.64 · median of 4 pairs 0.64 0.5 = a typical matched neuron 0 0.25 0.5 0.75 1
sufficiency (clean → corrupted) necessity (corrupted → clean) Hover a bar for its effect and prompts.
#Base → counterfactualExpected ΔObserved ΔSufficiencyNecessity
1 s.version = Jekyll::LastModifiedAt::VERSION
→ s.version = Jekyll/LastModifiedAt/VERSION
0.35 0.35 0.78
effect 7.52e-05
matched 2.2e-05 / 0.000379
0.53
effect 3.31e-05
matched 3.17e-05 / 0.00045
2 backend = load_backend(db["ENGINE"])
→ backend = load_backend(my["ENGINE"])
0.17 0.17 0.59
effect 8.9e-06
matched 3.29e-06 / 0.000116
0.53
effect 1.45e-05
matched 1.33e-05 / 0.000169
3 String response = client.getReplyString();
→ String response = client greetsString();
0.13 0.13 0.75
effect 5.19e-05
matched 1.18e-05 / 0.000158
0.84
effect 3.66e-05
matched 5.42e-06 / 0.000197
4 String response = client.getReplyString();
→ The happy client getReplyString danced;
0.10 0.10 0.78
effect 1.47e-05
matched 2.31e-06 / 3.49e-05
0.75
effect 2.7e-05
matched 6.17e-06 / 8.39e-05
5 result = ds.Tables["Menu"];
→ result = my Tables["Menu"];
0.08 0.08 — —
6 result = ds.Tables["Menu"];
→ output = ds.Tables["Menu"];
0.00 -0.05 — —
Read more

Δ is the base prompt's peak negative-pole strength minus the counterfactual's, as a fraction of the max activation.

Each causal score ranks the pole's patch effect among the 32 same-layer neurons that change as much between each pair, so 0.5 is typical. Sufficiency patches clean into corrupted, and necessity corrupted into clean. The score is the median over 4 non-control pairs, on next-token KL. Median effect 3.33e-05 (sufficiency) and 3e-05 (necessity). In the table, each cell gives the percentile, the pole's signed effect, and the matched neurons' median and largest |effect|, in nats of KL. Self-repair (the hydra effect) was mitigated by freezing downstream MLP outputs.

Top-activating examples

Hover a token for its value.

  1. 5.06 … we have used another redis client library called csredis↵using (var redis = new RedisClient("yourhost"))↵{↵ string ping = redis.Ping();↵ var scanresult=redis.ZScan …
    All 307 tokens

    Q:↵↵how to get result with cursor and paging using ZSCAN command with stackexchange.redis library?↵↵I am using stackexchange.redis. ↵in that zscan is giving all matched value↵I want to get exactly given page size result and next cursor for remaining values. ↵↵I have debugged its source code library in that i found that they are↵ scanning entire source value until cursor became zero and provides all↵ matched values.↵so could we can get result as per cursor same as redis command Zscan.↵↵here is my code snap ↵ using (ConnectionMultiplexer conn = ConnectionMultiplexer.Connect(conf))↵ {↵ var dbs = conn.GetDatabase(); ↵ int currentpage = 0,pagesize=20;↵ var scanresult = dbs.SortedSetScan("key", "an*", pagesize, 0, 0, CommandFlags.None);↵ }↵↵here I am getting all values of matching criteria instead of page size and next cursor.↵so help out if any one has done it before↵↵A:↵↵This is because of stack stackexchange.redis library code. its scanning as per enumerable method. so its not working same as redis command line.↵To solve this issue we have used another redis client library called csredis↵using (var redis = new RedisClient("yourhost"))↵{↵ string ping = redis.Ping();↵ var scanresult=redis.ZScan(key, cursor, pattern, pagesize);↵↵}↵↵As shown in above code we will get all dadta into "scanresult".↵↵

    Values
    TokenNegative-pole strength
    we0.000
    have0.008
    used0.000
    another0.000
    0.000
    redis0.000
    client0.000
    library0.000
    called0.000
    cs0.006
    redis0.065
    ↵0.008
    using0.017
    (0.000
    var0.076
    redis0.000
    =0.000
    new0.004
    Redis0.088
    Client0.083
    ("0.009
    your0.004
    host0.000
    "))↵0.080
    {↵0.000
    0.000
    string0.054
    ping0.022
    =0.000
    redis0.950
    .P5.064
    ing2.549
    ();↵0.000
    0.000
    var0.000
    scan0.016
    result0.000
    =0.000
    redis0.476
    .Z0.746
    Scan0.800
  2. 3.75 … }↵↵ public static WeatherTodayModel fromCursor(Cursor cursor) {↵ String id = cursor.getString(cursor.getColumnIndex(WeatherDataHelper.WeatherDBInfo.ID));↵ WeatherTodayModel model = getFrom …
    All 417 tokens

    package tk.woppo.sunday.model;↵↵import android.database.Cursor;↵↵import com.google.gson.Gson;↵import com.google.gson.annotations.SerializedName;↵↵import java.util.HashMap;↵↵import tk.woppo.sunday.dao.WeatherDataHelper;↵import tk.woppo.sunday.dao.WeatherTodayDataHelper;↵↵/**↵ * Created by Ho on 2014/7/4.↵ */↵public class WeatherTodayModel extends BaseModel {↵↵ private static final HashMap<String, WeatherTodayModel> CACHE = new HashMap<String, WeatherTodayModel>();↵↵ /** ���市ID */↵ @SerializedName("cityid")↵ public String id;↵↵ /** ���市名称 */↵ @SerializedName("city")↵ public String cityName;↵↵ /** ��度 */↵ public String temp;↵↵ /** ��气 */↵ public String weather;↵↵ /** ���向 */↵ @SerializedName("WD")↵ public String wind;↵↵ /** ���力 */↵ @SerializedName("WS")↵ public String ws;↵↵ /** ���度 */↵ @SerializedName("SD")↵ public String sd;↵↵ /** 发布时间 */↵ public String time;↵↵ private static void addToCache(WeatherTodayModel model) {↵ CACHE.put(model.id, model);↵ }↵↵ private static WeatherTodayModel getFromCache(String id) {↵ return CACHE.get(id);↵ }↵↵ public static WeatherTodayModel fromJson(String json) {↵ return new Gson().fromJson(json, WeatherTodayModel.class);↵ }↵↵ public static WeatherTodayModel fromCursor(Cursor cursor) {↵ String id = cursor.getString(cursor.getColumnIndex(WeatherDataHelper.WeatherDBInfo.ID));↵ WeatherTodayModel model = getFromCache(id);↵ if (model != null) {↵ return model;↵ }↵ model = new Gson().fromJson(cursor.getString(cursor.getColumnIndex(WeatherTodayDataHelper.WeatherTodayDBInfo.JSON)), WeatherTodayModel.class);↵ addToCache(model);↵ return model;↵ }↵↵ public static class WeatherTodayRequestData {↵ public WeatherTodayModel weatherinfo;↵ }↵}↵

    Values
    TokenNegative-pole strength
    0.029
    }↵↵0.043
    0.072
    public0.000
    static0.000
    Weather0.000
    Today0.016
    Model0.013
    from0.000
    Cursor0.000
    (C0.000
    ursor0.000
    cursor0.125
    )0.157
    {↵0.000
    0.000
    String0.123
    id0.000
    =0.000
    cursor0.527
    .getString1.786
    (cursor0.268
    .getColumnIndex0.000
    (0.153
    Weather0.634
    Data0.387
    Helper2.267
    .We0.428
    ather0.685
    DB0.869
    Info3.747
    .ID0.871
    ));↵0.175
    0.080
    Weather0.000
    Today0.017
    Model0.057
    model0.015
    =0.000
    get0.000
    From0.275
  3. 3.25 … ) {↵ $(x).click(function (e) {↵ e.preventDefault();↵ var href = $(this).attr("href");↵ if (!/PDF|mailto/gi.test(href)) {↵ …
    All 312 tokens

    Q:↵↵Page transitions, depending on URL↵↵This code fades each page out, before going to the URL's destination. However, there are some instances where the user doesn't go to a new page, but goes to a PDF in the browser, or it opens the default mail application. On Safari it seems, if you go to an external site (www.twitter.com) and press the back button, the .wrapper is still faded out. (Perhaps a cache thing?)↵function fadeAndGo(x) {↵↵ $(x).click(function (e) {↵ e.preventDefault();↵ var href = this.href;↵ $('.wrapper').fadeOut(function(){↵ window.location = href;↵↵ });↵ // $('.wrapper').delay()fadeIn();↵ });↵}↵↵fadeAndGo('a');↵↵Is it possible to either:↵↵Fade out, only if the URL does not contain 'PDF, mailto', or is an external link?↵Fade in after a certain amount of time (it faded out, but faded back in after a couple of seconds, in case it was a PDF/mailto).↵↵A:↵↵Try this:↵function fadeAndGo(x) {↵ $(x).click(function (e) {↵ e.preventDefault();↵ var href = $(this).attr("href");↵ if (!/PDF|mailto/gi.test(href)) {↵ $('.wrapper').fadeOut(function () {↵ window.location = href;↵ }).delay(2000).fadeIn();↵ } else {↵ window.location = href;↵ }↵ });↵}↵↵fadeAndGo('a');↵↵

    Values
    TokenNegative-pole strength
    )0.000
    {↵0.000
    0.015
    $(0.000
    x0.000
    ).0.007
    click0.000
    (function0.003
    (0.000
    e0.053
    )0.000
    {↵0.000
    0.040
    e0.032
    .preventDefault0.000
    ();↵0.000
    0.064
    var0.107
    href0.000
    =0.000
    $(0.000
    this0.000
    ).0.057
    attr0.297
    ("0.000
    href0.044
    ");↵0.080
    0.051
    if0.030
    (!0.000
    /3.246
    PDF0.003
    |0.140
    mailto0.015
    /g0.374
    i0.720
    .test0.000
    (href0.000
    ))0.117
    {↵0.026
    0.000
  4. 3.13 … JniMethod::registerNatives() {↵ registerHybrid(↵ {makeNativeMethod("initHybrid", SamplingProfilerJniMethod::initHybrid),↵ makeNativeMethod("poke", …
    All 414 tokens

    // Copyright 2004-present Facebook. All Rights Reserved.↵↵#include "SamplingProfilerJniMethod.h"↵↵#include <JavaScriptCore/JSProfilerPrivate.h>↵↵#include <jschelpers/JSCHelpers.h>↵#include <jni.h>↵#include <string>↵↵using namespace facebook::jni;↵↵namespace facebook {↵namespace react {↵↵/* static */ jni::local_ref<SamplingProfilerJniMethod::jhybriddata>↵SamplingProfilerJniMethod::initHybrid(jni::alias_ref<jclass>,↵ jlong javaScriptContext) {↵ return makeCxxInstance(javaScriptContext);↵}↵↵/* static */ void SamplingProfilerJniMethod::registerNatives() {↵ registerHybrid(↵ {makeNativeMethod("initHybrid", SamplingProfilerJniMethod::initHybrid),↵ makeNativeMethod("poke", SamplingProfilerJniMethod::poke)});↵}↵↵SamplingProfilerJniMethod::SamplingProfilerJniMethod(jlong javaScriptContext) {↵ context_ = reinterpret_cast<JSGlobalContextRef>(javaScriptContext);↵}↵↵void SamplingProfilerJniMethod::poke(↵ jni::alias_ref<JSPackagerClientResponder::javaobject> responder) {↵ if (!JSC_JSSamplingProfilerEnabled(context_)) {↵ responder->error("The JSSamplingProfiler is disabled. See this "↵ "https://fburl.com/u4lw7xeq for some help");↵ return;↵ }↵↵ JSValueRef jsResult = JSC_JSPokeSamplingProfiler(context_);↵ if (JSC_JSValueGetType(context_, jsResult) == kJSTypeNull) {↵ responder->respond("started");↵ } else {↵ JSStringRef resultStrRef = JSValueToStringCopy(context_, jsResult, nullptr);↵ size_t length = JSStringGetLength(resultStrRef);↵ char buffer[length + 1];↵ JSStringGetUTF8CString(resultStrRef, buffer, length + 1);↵ JSStringRelease(resultStrRef);↵ responder->respond(buffer);↵ }↵}↵}↵}↵

    Values
    TokenNegative-pole strength
    J0.000
    ni0.000
    Method0.000
    ::0.000
    register0.020
    N0.057
    atives0.156
    ()0.007
    {↵0.000
    0.000
    register0.049
    Hy0.064
    brid0.011
    (↵0.000
    0.000
    {0.120
    make1.334
    Native0.006
    Method0.098
    ("0.000
    init0.135
    Hy0.000
    brid0.070
    ",0.000
    Sampling0.944
    Profiler0.423
    J0.201
    ni0.711
    Method0.992
    ::1.847
    init3.131
    Hy0.362
    brid0.854
    ),↵0.270
    0.176
    make0.290
    Native0.000
    Method0.000
    ("0.000
    poke0.000
    ",0.000
  5. 2.61 … class="col-sm-3" ng-controller="quizCtrl"> **Controller B**↵ <select ng-click="getQuizByCampID($('#selCampID').val())" class="form …
    All 748 tokens

    Q:↵↵Binding value to select in angular js across 2 controllers↵↵Working with angularJS I am trying to figure out a way to bind the value of a select element under the scope of controller A to use it as an argument for an ng-click call [getQuizByCampID() Function] under the scope of controller B.↵My first idea was to use jquery, but I have read in the link below that using jquery is not recommended when starting with angularJS. ↵"Thinking in AngularJS" if I have a jQuery background?↵I also read in the link below that this is performed using ng-model, the only problem is that that the example provided is all under the same controller. ↵ and Binding value to input in Angular JS↵What is the angularJS way to get the value of the select element under controller A into the function call in the select under controller B?↵Price.html view↵ <div class="col-sm-3" ng-controller="campCtrl"> **Controller A** ↵ <select id="selCampID" class="form-control" ng-model="campInput" >↵ <option ng-repeat="camp in campaigns" value="{{camp.camp_id}}">{{camp.camp_name}}</option> ↵ </select>↵ </div>↵↵ <div class="col-sm-3" ng-controller="quizCtrl"> **Controller B**↵ <select ng-click="getQuizByCampID($('#selCampID').val())" class="form-control" ng-model="quizInput">↵ <option ng-controller="quizCtrl" ng-repeat="quiz in quizzesById" value="{{quiz.quiz_id}}">{{quiz.quiz_name}}</option> ↵ </select>↵ </div>↵↵App.js↵var app= angular.module('myApp', ['ngRoute']);↵app.config(['$routeProvider', function($routeProvider) {↵ $routeProvider.when('/price', {templateUrl: 'partials/price.html', controller: 'priceCtrl'});↵}]);↵↵$routeProvider.when('/price', {templateUrl: 'partials/price.html', controller: 'priceCtrl'});↵↵Quiz Controller↵'use strict';↵↵app.controller('quizCtrl', ['$scope','$http','loginService', function($scope,$http,loginService){↵$scope.txt='Quiz';↵$scope.logout=function(){↵ loginService.logout();↵}↵getQuiz(); // Load all available campaigns ↵function getQuiz(campID){ ↵ $http.post("js/ajax/getQuiz.php").success(function(data){↵ $scope.quizzes = data;↵ //console.log(data);↵ });↵};↵ $scope.getQuizByCampID = function (campid) {↵ alert(campid);↵$http.post("js/ajax/getQuiz.php?campid="+campid).success(function(data){↵ $scope.quizzesById = data;↵ $scope.QuizInput = "";↵ });↵ };↵↵ $scope.addQuiz = function (quizid, quizname, campid) { ↵ console.log(quizid + quizname + campid); ↵ $http.post("js/ajax/addQuiz.php?quizid="+quizid+"&quizname="+quizname+"&campid="+campid).success(function(data){↵↵ getQuiz();↵ $scope.QuizInput = "";↵});↵ };↵↵}])↵↵A:↵↵You should store the value in a service.↵example: ↵app.factory('SharedService', function() {↵ this.inputValue = null;↵↵ this.setInputValue = function(value) {↵ this.inputValue = value;↵ }↵↵ this.getInputValue = function() {↵ return this.inputValue;↵ }↵↵ return this;↵});↵↵Example on Plunkr↵Read: AngularJS Docs on services↵or check

    Values
    TokenNegative-pole strength
    class0.000
    ="0.000
    col0.000
    -sm0.000
    -0.000
    30.000
    "0.037
    ng0.000
    -controller0.000
    ="0.000
    quiz0.014
    Ctrl0.026
    ">0.000
    0.000
    **0.000
    Controller0.004
    B0.032
    **↵0.000
    0.000
    <0.000
    select0.000
    0.000
    ng0.000
    -click0.000
    ="0.000
    get0.123
    Quiz0.000
    By0.118
    Camp0.000
    ID0.000
    ($('#2.612
    sel0.525
    Camp0.115
    ID0.239
    ').0.574
    val0.032
    ())0.021
    "0.136
    class0.000
    ="0.000
    form0.000
  6. 2.52 … ol(pval)) {↵ cell.1 <- createCell(rows, colIndex=j)[[1,1]]↵ setCellValue(cell.1, gen[i,j])↵ if ((pval[i,j …
    All 985 tokens

    Q:↵↵Conditional formatting: making cells colorful↵↵is it possible to do the following:↵loc1 <- c("Aa", "Aa", "aa", "Aa")↵loc2 <- c("aa", "aa", "aa", "AA")↵loc3 <- c("aa", "Aa", "aa", "aa")↵gen <- data.frame(loc1, loc2, loc3)↵↵loc1g <- c(0.01, 0.5, 1, 0.75)↵loc2g <- c(0.2, 0.1, 0.2, 0.6)↵loc3g <- c(0.8, 0.8, 0.55, 1)↵pval <- data.frame(loc1g, loc2g, loc3g)↵↵I want to print to a file to gen dataframe such way that is conditionally formatted by the pval dataframe. Means than (row1, col1) of gen color depends upon pvale (row1, col1). The following are color coding:↵0 to 0.3 is "red" text color ↵0.31 to 0.7 is "yellow"↵> 0.7 is "red" ↵↵gen[1,1] will be "Aa" printed in red text color and so on....↵appreciated your help. ↵EDITS:↵I am more interested in printing not plotting in graph. If I can save output as MS excel and open in MSEXCEL it would be great. I can also be other types of text editors format that can read color coded text. As my orginal data matrix should be of a dimension of 1000 x 1000 or even more. I would like to quicky know unlying p-value for each gen categories. ↵↵A:↵↵Sounds like you want to mimic Excel. Here are a couple examples:↵x = 1:ncol(pval)↵y = 1:nrow(pval)↵↵# Colored backgrounds↵dev.new(width=4, height=4)↵image(x, y, t(as.matrix(pval)),↵ col = c('red', 'yellow', 'red'),↵ breaks = c(0, 0.3, 0.7, 1),↵ xaxt='n', ↵ yaxt='n', ↵ ylim=c(max(y)+0.5, min(y)-0.5), ↵ xlab='', ↵ ylab='')↵centers = expand.grid(y, x)↵text(centers[,2], centers[,1], unlist(gen))↵↵ ↵# Colored text↵dev.new(width=4, height=4)↵image(x,y, matrix(0, length(x), length(y)),↵ col='white',↵ xaxt='n', ↵ yaxt='n', ↵ ylim=c(max(y)+0.5, min(y)-0.5), ↵ xlab='', ↵ ylab='')↵pvals = unlist(pval)↵cols = rep('red', length(pvals))↵cols[pvals>0.3 & pvals<=0.7] = 'yellow'↵text(centers[,2], centers[,1], unlist(gen), col=cols)↵grid(length(x),length(y))↵↵A:↵↵Giving a POC-like answer which is using an ugly loop and not the most beatiful design:↵Loading eg. the xlxs package to be able to write to Excel 2007 format:↵library(xlsx)↵↵Let us create a workbook and a sheet (see the manual!):↵wb <- createWorkbook()↵sheet <- createSheet(wb, "demo")↵↵Define some styles to use in the spreadsheet:↵red <- createCellStyle(wb, fillBackgroundColor="tomato", fillForegroundColor="yellow", fillPattern="BIG_SPOTS")↵yellow <- createCellStyle(wb, fillBackgroundColor="yellow", fillForegroundColor="tomato", fillPattern="BRICKS1")↵↵And the ugly loop which is pasting each cell to the spreadsheet with appropriate format:↵for (i in 1:nrow(pval)) {↵ rows <- createRow(sheet, rowIndex=i)↵ for (j in 1:ncol(pval)) {↵ cell.1 <- createCell(rows, colIndex=j)[[1,1]]↵ setCellValue(cell.1, gen[i,j])↵ if ((pval[i,j] < 0.3) | (pval[i,j] > 0.7)) {↵ setCellStyle(cell.1, red)↵ } else {↵ setCellStyle(cell.1, yellow)↵ }↵ }↵}↵↵Saving the Excel file:↵saveWorkbook(wb, '/tmp/demo.xls')↵↵Result: demo.xls↵↵Alternative solution with package ascii:↵ascii.data

    Values
    TokenNegative-pole strength
    ol0.086
    (p0.453
    val0.097
    ))0.152
    {↵0.015
    0.041
    cell0.072
    .0.077
    10.110
    <-0.000
    create0.000
    Cell0.008
    (rows0.006
    ,0.000
    col0.000
    Index0.000
    =j0.088
    )[0.000
    [0.000
    10.000
    ,0.021
    10.000
    ]]↵0.095
    0.059
    set0.000
    CellValue0.000
    (cell0.094
    .0.268
    10.000
    ,0.000
    gen2.521
    [i0.149
    ,j0.284
    ])↵0.008
    0.000
    if0.003
    ((0.249
    p0.228
    val0.710
    [i0.006
    ,j0.067
  7. 2.45 … dir__)↵Gem::Specification.new do |s|↵ s.name = 'jekyll-last-modified-at'↵ s.version = Jekyll::LastModifiedAt::VERSION↵ s.summary …
    All 251 tokens

    # frozen_string_literal: true↵↵require File.expand_path('lib/jekyll-last-modified-at/version.rb', __dir__)↵Gem::Specification.new do |s|↵ s.name = 'jekyll-last-modified-at'↵ s.version = Jekyll::LastModifiedAt::VERSION↵ s.summary = 'A liquid tag for Jekyll to indicate the last time a file was modified.'↵ s.authors = 'Garen J. Torikian'↵ s.homepage = 'https://github.com/gjtorikian/jekyll-last-modified-at'↵ s.license = 'MIT'↵ s.files = Dir['lib/**/*.rb']↵↵ s.add_dependency 'jekyll', '>= 3.7', ' < 5.0'↵ s.add_dependency 'posix-spawn', '~> 0.3.9'↵↵ s.add_development_dependency 'rake'↵ s.add_development_dependency 'rspec', '~> 3.4'↵ s.add_development_dependency 'rubocop'↵ s.add_development_dependency 'rubocop-performance'↵ s.add_development_dependency 'rubocop-standard'↵ s.add_development_dependency 'spork'↵end↵

    Values
    TokenNegative-pole strength
    dir0.000
    __)↵0.050
    Gem0.006
    ::0.003
    Specification0.000
    .new0.000
    do0.030
    |0.000
    s0.000
    |↵0.178
    0.000
    s0.000
    .name0.016
    0.000
    =0.000
    '0.063
    j0.000
    ekyll0.035
    -last0.045
    -mod0.049
    ified0.036
    -at0.112
    '↵0.000
    0.024
    s0.011
    .version0.000
    0.000
    =0.000
    J1.325
    ekyll0.291
    ::2.445
    Last0.144
    Modified0.325
    At0.000
    ::1.552
    VERSION0.619
    ↵0.070
    0.214
    s0.054
    .summary0.000
    0.000
  8. 2.21 … SetName = "Menus";↵ ds.Tables[0].TableName = "Menu";↵ DataRelation relation = new DataRelation("ParentChild",↵ ds.Tables["Menu"].Columns["MenuID"],↵ ds …
    All 731 tokens

    Q:↵↵How to change XML from dataset into HTML UL↵↵I'm working on a C# webforms application and have a datalayer which gathers information about the menu a customer can see, based on their customer number and order type.↵I was using the ASP.NET menu control for this until the qa department asked to change the menu to expand on click instead of hover. At that point, I decided to try and do the menu with a simpler css/html/jquery approach but I've hit a jam.↵I have the following method in my datalayer that gets information for the menu and returns it as XML. What I'm stuck on is how to take the XML that was being gathered, when I was using the menu control and hopefully reformat it into a UL for using in the html/css approach I'd like to do. ↵public static string BuildMenu(string cprcstnm, string docType)↵ {↵ DataSet ds = new DataSet();↵ string connStr = ConfigurationManager.ConnectionStrings["DynamicsConnectionString"].ConnectionString;↵ using (SqlConnection conn = new SqlConnection(connStr))↵ {↵ string sql = "usp_SelectItemMenuByCustomer";↵ SqlDataAdapter da = new SqlDataAdapter(sql, conn);↵ da.SelectCommand.CommandType = CommandType.StoredProcedure;↵ da.SelectCommand.Parameters.Add("@CPRCSTNM", SqlDbType.VarChar).Value = cprcstnm;↵ da.SelectCommand.Parameters.Add("@DOCID", SqlDbType.VarChar).Value = docType;↵ da.Fill(ds);↵ da.Dispose();↵ }↵ ds.DataSetName = "Menus";↵ ds.Tables[0].TableName = "Menu";↵ DataRelation relation = new DataRelation("ParentChild",↵ ds.Tables["Menu"].Columns["MenuID"],↵ ds.Tables["Menu"].Columns["ParentID"],↵ false);↵↵ relation.Nested = true;↵ ds.Relations.Add(relation);↵↵ return ds.GetXml();↵ }↵↵A sample of XMl that is output is as follows: ↵<Menus>↵- <Menu>↵ <MenuID>23</MenuID> ↵ <ITEMNMBR>0</ITEMNMBR> ↵ <Text>ACC</Text> ↵ <Description>ACC</Description> ↵ <ParentID>0</ParentID> ↵- <Menu>↵ <MenuID>34</MenuID> ↵ <ITEMNMBR>1</ITEMNMBR> ↵ <Text>BASE</Text> ↵ <Description>BASE</Description> ↵ <ParentID>23</ParentID> ↵- <Menu>↵ <MenuID>516</MenuID> ↵ <ITEMNMBR>2</ITEMNMBR> ↵ <Text>HYP</Text> ↵ <Description>HYP</Description> ↵ <ParentID>34</ParentID> ↵↵I would need to convert this to something such as :↵<ul class="dropdown">↵ <li><a href="#">ACC</a>↵ <ul class="sub_menu">↵ <li>↵ <a href="#">BASE</a>↵ <ul>↵ <li>↵ <a href="#">HYP</a>↵ <ul>↵ <li><a href="#">Terminal 1</a></li>↵ <li><a href="#">Terminal 1</a></li>↵ </ul> ↵ </li>↵ </ul>↵</li>↵↵A:↵↵You will get some ideas from the following MSDN link that illustrates writing html from a dataset using xslt↵http://msdn.microsoft.com/en-us/librar

    Values
    TokenNegative-pole strength
    SetName0.000
    =0.000
    "0.000
    Menus0.000
    ";↵0.038
    0.044
    ds0.000
    .Tables0.000
    [0.017
    00.000
    ].0.012
    TableName0.070
    =0.000
    "0.000
    Menu0.000
    ";↵0.113
    0.059
    Data0.000
    Relation0.000
    relation0.000
    =0.000
    new0.000
    Data0.000
    Relation0.000
    ("0.000
    Parent0.050
    Child0.048
    ",↵0.000
    0.000
    ds0.259
    .Tables2.214
    ["1.366
    Menu0.000
    "].0.716
    Columns0.332
    ["1.395
    Menu0.285
    ID0.205
    "],↵0.000
    0.000
    ds0.280
  9. 2.20 … user", "password");↵ }↵↵ public boolean hasXCRCSupport() throws IOException {↵ client.sendCommand("feat");↵ String response = client.getReplyString();↵ Scanner scanner = new Scanner(response);↵ …
    All 591 tokens

    Q:↵↵How to check if file exist when downloading from FTP↵↵I'm downloading from FTP server and I don't know exactly how to check if file already exist. What I want to do is that I retrieve filname from FTP server and then compare it with all files in folder. If file already exists then it compares next FTP filename with all files in folder and so on. ↵I already did comparison and it's working if all files from folder have same name as files on FTP server but if I add some older file then it downloads all files once again and I don't want that. ↵Here is my scratch code:↵String[] names = client.listNames();↵ File folder = new File("c:\\test\\RTR_ZIP\\");↵ String[] filename = folder.list();↵↵ for (;i<names.length;i++) {↵ name = names[i];↵↵ exists=false;↵↵ if (name.contains(".zip")) {↵↵ if (filename.length == 0) {↵ new_file = new FileOutputStream("C:\\test\\RTR_ZIP\\" + name);↵ client.retrieveFile(name, new_file);↵ j++;↵ exists=true;↵ } else {↵ for (;k<filename.length;k++) {↵ name = names[i];↵ i++;↵ name1=filename[k];↵ // CHECK IF FILE EXISTS↵ if (!name.equals(name1)) {↵ new_file = new FileOutputStream("C:\\test\\RTR_ZIP\\" + name);↵ client.retrieveFile(name, new_file);↵ j++;↵ exists=true;↵ } ↵ }↵ }//else↵ }//if contains .zip↵ }//for↵↵Thanks in advance. ↵↵A:↵↵If your ftp server supports XCRC command it could be possible to compare checksum (CRC32) of local and remote file.↵You could iterate all files in the folder and compare its crc with local one.↵import java.io.File;↵import java.io.IOException;↵import java.net.SocketException;↵import java.util.Scanner;↵↵import org.apache.commons.io.FileUtils;↵import org.apache.commons.net.ftp.FTPClient;↵↵public class DownloadFile {↵↵ private FTPClient client = new FTPClient();↵↵ public void connect() throws SocketException, IOException {↵ client.connect("127.0.0.1");↵ client.login("user", "password");↵ }↵↵ public boolean hasXCRCSupport() throws IOException {↵ client.sendCommand("feat");↵ String response = client.getReplyString();↵ Scanner scanner = new Scanner(response);↵ while(scanner.hasNextLine()) {↵ String line = scanner.nextLine();↵ if(line.contains("XCRC")) {↵ return true;↵ }↵ }↵ return false;↵ }↵↵ public boolean isSameFile() throws IOException {↵ if(hasXCRCSupport()) {↵ File file = new File("D:/test.txt");↵ String localCRC = Integer.toHexString((int) FileUtils.checksumCRC32(file))

    Values
    TokenNegative-pole strength
    user0.000
    ",0.000
    "0.000
    password0.000
    ");↵0.071
    }↵↵0.000
    public0.000
    boolean0.000
    has0.000
    X0.000
    CR0.000
    CS0.051
    upport0.098
    ()0.037
    throws0.000
    IOException0.000
    {↵0.000
    0.000
    client0.210
    .send0.220
    Command0.000
    ("0.000
    feat0.000
    ");↵0.000
    0.000
    String0.000
    response0.000
    =0.000
    client0.651
    .get0.963
    Reply2.202
    String1.126
    ();↵0.105
    0.046
    Scanner0.000
    scanner0.000
    =0.000
    new0.000
    Scanner0.000
    (response0.043
    );↵0.177
  10. 2.18 … ):↵adapter.SelectCommand = listfill;↵adapter.Fill(tabulusaraksts);↵listBox1.Items.AddRange(tabulusaraksts.AsEnumerable().Select(row => row[0].ToString()).ToArray());↵NpgsqlCommand show …
    All 654 tokens

    Q:↵↵Listbox returns System.Data.DataRowView instead of values↵↵I am doing a project for my school, where I have to make a C# Windows Forms application that lets me interact with my PostgreSQL database. I have made a listbox, which is supposed to get the names of the tables from my database, and when I select these names, data from that table is show in the datagridview object in the form. The problem is, however, all my listbox values are System.Data.DataRowView, and datagridview only displays values from the first table in the list.↵The code: ↵ DataTable tabulusaraksts = new DataTable();↵ DataTable tabula = new DataTable();↵ NpgsqlDataAdapter adapter = new NpgsqlDataAdapter();↵ NpgsqlDataAdapter adapter2 = new NpgsqlDataAdapter();↵ string tab;↵ public datubaze()↵ {↵ InitializeComponent();↵ string connectionstring = "Server=localhost;Port=5432;UserId=postgres;Password=students;Database=retrospeles;";↵ //string connectionstring = String.Format("Server={0};Port={1};" +↵ // "User Id={2};Password={3};Database={4};",↵ // serveris.ToString(), port.ToString(), user.ToString(),↵ // password.ToString(), database.ToString());↵ NpgsqlConnection ncon = new NpgsqlConnection(connectionstring);↵ NpgsqlCommand listfill = new NpgsqlCommand("select table_name from INFORMATION_SCHEMA.tables WHERE table_schema = ANY (current_schemas(false));", ncon);↵ adapter.SelectCommand = listfill;↵ adapter.Fill(tabulusaraksts);↵ listBox1.DataSource = tabulusaraksts;↵ listBox1.DisplayMember = "table_name";↵ NpgsqlCommand showtable = new NpgsqlCommand("select * from " + tab +";" , ncon);↵ adapter2.SelectCommand = showtable;↵ }↵public void listBox1_SelectedIndexChanged(object sender, EventArgs e)↵ {↵↵ tab = listBox1.GetItemText(listBox1.SelectedItem);↵ adapter2.Fill(tabula);↵ dataGridView1.DataSource = tabula;↵}↵↵A:↵↵That code should work. I tried it with some test data and ListBox was filled with correct values.↵To be sure, try to also set ValueMember like ↵listBox1.DisplayMember = "table_name";↵↵I think the best approach is to add DataTable rows to your ListBox using loop or Linq list. After filling tabulusaraksts iterate through DataRows and add them as items to ListBox, without setting DataSource Something like this (Linq):↵adapter.SelectCommand = listfill;↵adapter.Fill(tabulusaraksts);↵listBox1.Items.AddRange(tabulusaraksts.AsEnumerable().Select(row => row[0].ToString()).ToArray());↵NpgsqlCommand showtable = new NpgsqlCommand("select * from " + tab +";" , ncon);↵adapter2.SelectCommand = showtable;↵↵or, using foreach loop↵adapter.SelectCommand = listfill;↵adapter.Fill(tabulusaraksts);↵↵listBox1.Items.Clear();↵foreach (DataRow row in tabulusaraksts.Rows)↵{↵ listBox1.Items.add(tabulusaraksts[0].ToString());↵}↵↵NpgsqlCommand showtable = new NpgsqlCommand("select * from " + tab +";" , ncon);↵adapter2.SelectCommand =

    Values
    TokenNegative-pole strength
    ):↵0.000
    adapter0.005
    .SelectCommand0.000
    =0.000
    list0.162
    fill0.007
    ;↵0.000
    adapter0.000
    .Fill0.001
    (tab0.001
    ulus0.031
    arak0.000
    sts0.000
    );↵0.056
    list0.056
    Box0.000
    10.000
    .Items0.000
    .AddRange0.000
    (tab0.000
    ulus1.621
    arak1.021
    sts0.000
    .As0.000
    Enumerable0.000
    ().0.158
    Select2.116
    (row0.016
    =>0.000
    row0.570
    [2.182
    00.426
    ].0.600
    ToString0.078
    ()).0.000
    ToArray0.000
    ());↵0.025
    N0.000
    pgsql0.030
    Command0.000
    show0.000
  11. 2.15 … _DECL(long, N) > struct advance_backward;↵↵# define BOOST_PP_ITERATION_PARAMS_1 \↵ (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux …
    All 794 tokens

    ↵#if !defined(BOOST_PP_IS_ITERATING)↵↵///// header body↵↵#ifndef BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED↵#define BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED↵↵// Copyright Aleksey Gurtovoy 2000-2004↵//↵// Distributed under the Boost Software License, Version 1.0. ↵// (See accompanying file LICENSE_1_0.txt or copy at ↵// http://www.boost.org/LICENSE_1_0.txt)↵//↵// See http://www.boost.org/libs/mpl for documentation.↵↵// $Id$↵// $Date$↵// $Revision$↵↵#if !defined(BOOST_MPL_PREPROCESSING_MODE)↵# include <boost/mpl/prior.hpp>↵# include <boost/mpl/apply_wrap.hpp>↵#endif↵↵#include <boost/mpl/aux_/config/use_preprocessed.hpp>↵↵#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \↵ && !defined(BOOST_MPL_PREPROCESSING_MODE)↵↵# define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp↵# include <boost/mpl/aux_/include_preprocessed.hpp>↵↵#else↵↵# include <boost/mpl/limits/unrolling.hpp>↵# include <boost/mpl/aux_/nttp_decl.hpp>↵# include <boost/mpl/aux_/config/eti.hpp>↵↵# include <boost/preprocessor/iterate.hpp>↵# include <boost/preprocessor/cat.hpp>↵# include <boost/preprocessor/inc.hpp>↵↵namespace boost { namespace mpl { namespace aux {↵↵// forward declaration↵template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward;↵↵# define BOOST_PP_ITERATION_PARAMS_1 \↵ (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/advance_backward.hpp>))↵# include BOOST_PP_ITERATE()↵↵// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING↵template< BOOST_MPL_AUX_NTTP_DECL(long, N) >↵struct advance_backward↵{↵ template< typename Iterator > struct apply↵ {↵ typedef typename apply_wrap1<↵ advance_backward<BOOST_MPL_LIMIT_UNROLLING>↵ , Iterator↵ >::type chunk_result_;↵↵ typedef typename apply_wrap1<↵ advance_backward<(↵ (N - BOOST_MPL_LIMIT_UNROLLING) < 0↵ ? 0↵ : N - BOOST_MPL_LIMIT_UNROLLING↵ )>↵ , chunk_result_↵ >::type type;↵ };↵};↵↵}}}↵↵#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS↵#endif // BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED↵↵///// iteration, depth == 1↵↵// For gcc 4.4 compatability, we must include the↵// BOOST_PP_ITERATION_DEPTH test inside an #else clause.↵#else // BOOST_PP_IS_ITERATING↵#if BOOST_PP_ITERATION_DEPTH() == 1↵#define i_ BOOST_PP_FRAME_ITERATION(1)↵↵template<>↵struct advance_backward< BOOST_PP_FRAME_ITERATION(1) >↵{↵ template< typename Iterator > struct apply↵ {↵ typedef Iterator iter0;↵↵#if i_ > 0↵# define BOOST_PP_ITERATION_PARAMS_2 \↵ (3,(1, BOOST_PP_FRAME_ITERATION(1), <boost/mpl/aux_/advance_backward.hpp>))↵# include BOOST_PP_ITERATE()↵#endif↵↵ typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;↵ };↵↵#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)↵ /// ETI workaround↵ template<> struct apply<int>↵ {↵ typedef int type;↵ };↵#endif↵};↵↵#undef i_↵↵///// iteration, dep

    Values
    TokenNegative-pole strength
    _DECL0.000
    (long0.000
    ,0.000
    N0.000
    )0.035
    >0.066
    struct0.000
    advance0.319
    _backward0.197
    ;↵↵0.000
    #0.000
    0.000
    define0.000
    BOOST0.000
    _PP0.000
    _ITER0.000
    ATION0.077
    _PARAMS0.000
    _0.000
    10.000
    \↵0.000
    0.000
    (0.000
    30.000
    ,(0.000
    00.000
    ,0.011
    BOOST0.000
    _M0.235
    PL0.034
    _LIMIT2.146
    _UN0.000
    ROLL0.343
    ING1.071
    ,0.000
    <0.000
    boost0.000
    /m0.009
    pl0.000
    /0.072
    aux0.167
  12. 2.12 … usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 93, in __getitem__↵ backend = load_backend(db['ENGINE'])↵ File "/usr/local/lib/python2 …
    All 796 tokens

    Q:↵↵Modoboa 1.1.1 Deployment Errors↵↵I tried to install modoboa follow this steps: http://modoboa.readthedocs.org/en/latest/getting_started/install.html↵I installed modoboa with pip install modoboa:↵Traceback (most recent call last):↵ File "manage.py", line 10, in <module>↵ execute_from_command_line(sys.argv)↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line↵ utility.execute()↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute↵ self.fetch_command(subcommand).run_from_argv(self.argv)↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 272, in fetch_command↵ klass = load_command_class(app_name, subcommand)↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 77, in load_command_class↵ module = import_module('%s.management.commands.%s' % (app_name, name))↵ File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module↵ __import__(name)↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 8, in <module>↵ from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/sql.py", line 9, in <module>↵ from django.db import models↵ File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 40, in <module>↵ backend = load_backend(connection.settings_dict['ENGINE'])↵ File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 34, in __getattr__↵ return getattr(connections[DEFAULT_DB_ALIAS], item)↵ File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 93, in __getitem__↵ backend = load_backend(db['ENGINE'])↵ File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 27, in load_backend↵ return import_module('.base', backend_name)↵ File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module↵ __import__(name)↵ File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 17, in <module>↵ raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)↵django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb↵↵python manage.py syncdb --noinput failed, check your configuration↵Traceback (most recent call last):↵ File "manage.py", line 10, in <module>↵ execute_from_command_line(sys.argv)↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line↵ utility.execute()↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute↵ self.fetch_command(subcommand).run_from_argv(self.argv)↵ File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 272, in fet

    Values
    TokenNegative-pole strength
    usr0.014
    /local0.001
    /lib0.000
    /python0.000
    20.000
    .0.065
    70.000
    /dist0.001
    -packages0.105
    /d0.011
    jango0.009
    /db0.122
    /utils0.095
    .py0.178
    ",0.000
    line0.028
    0.000
    90.090
    30.159
    ,0.040
    in0.000
    __0.000
    getitem0.077
    __↵0.000
    0.040
    backend0.000
    =0.000
    load0.490
    _backend0.000
    (db0.693
    ['2.125
    ENGINE0.130
    '])↵0.000
    0.000
    File0.000
    "/0.000
    usr0.003
    /local0.000
    /lib0.001
    /python0.009
    20.036
Read more

Each token is shaded by negative-pole strength, as a fraction of the neuron's max activation. Each window shows up to 30 tokens before the peak and 10 after it.

Explanation scores on held-out text

How well a judge with only the hypothesis predicts the unit on new text. 0.5 is chance.

Read more

The judge reads 32-token windows of corpus text that the proposer never saw. Detection: it picks the windows that activate the unit. Fuzzing: it checks whether the marked tokens are the active ones. Recorded, not gated.

Detection
0.88
Fuzzing
—
Embedding AUROC
0.44

Detection recall by activation strength

—
0.00
1.00
1.00
1.00
weakeststrongest

False alarms on inactive windows: 0%.

Judge
muse-spark-1.3
Held-out windows
4 active of 4,000
Judged
8 detection · 0 fuzzing
Detection outcomes
1 missed · 0 false alarm · 3 hit · 4 correct rejection
Seed
1179751716 · NeelNanda/pile-10k@127bfedc (data/*.parquet, first 500 docs)
Detection windows (8), the explanation's mistakes first
  1. missed 1.31 · sim 0.10 - Ester Mariucci↵bibliography:↵- 'refs.bib'↵title: Asymptotic equivalence for pure jump Lévy processes with unknown
  2. hit 1.79 · sim 0.01 src = os.getcwd()↵global mydir↵def filecreation(content, filename):↵↵ mydir = os.path.join(os.getcwd(), datetime.datetime.now().strftime('%
  3. hit 1.50 · sim -0.07 $this->db->where_in('genre_id',$row['genre_id']); ↵}↵else{ // for single record.↵ $this->db->
  4. hit 1.38 · sim -0.07 where('genre_id',$row['genre_id']);↵}↵$query = $this->db->get();↵print_r($query->result_array()); // will generate result
  5. correct rejection 0.32 · sim -0.01 android:text="@string/next"↵ android:textColor="@color/background_green"↵ android:textSize="18sp"↵ app:layout_constraintEnd_to
  6. correct rejection 0.21 · sim -0.06 ="@+id/song_item_name"↵ android:layout_width="wrap_content"↵ android:layout_height="wrap_content"↵ android:singleLine="
  7. correct rejection 0.20 · sim 0.04 How do the Kings players handle the trade rumors?↵↵The trade deadline is 12pm PST on Thursday and the rumors are swirling. Do the Kings players cr
  8. correct rejection 0.14 · sim -0.05 tutorial for how to create↵your own stationeries with MS Word. Along with the↵OpenOffice Suite digital stationery training, that↵we already had for

Activation and mechanism

Activation distribution

[0, 0.169): 182945 [0.169, 0.338): 15272 [0.338, 0.506): 1251 [0.506, 0.675): 180 [0.675, 0.844): 90 [0.844, 1.01): 47 [1.01, 1.18): 38 [1.18, 1.35): 19 [1.35, 1.52): 16 [1.52, 1.69): 9 [1.69, 1.86): 6 [1.86, 2.03): 3 [2.03, 2.19): 7 [2.19, 2.36): 4 [2.36, 2.53): 2 [2.53, 2.7): 2 [2.7, 2.87): 0 [2.87, 3.04): 0 [3.04, 3.21): 2 [3.21, 3.38): 1 [3.38, 3.55): 0 [3.55, 3.71): 0 [3.71, 3.88): 1 [3.88, 4.05): 0 [4.05, 4.22): 0 [4.22, 4.39): 0 [4.39, 4.56): 0 [4.56, 4.73): 0 [4.73, 4.9): 0 [4.9, 5.06): 1 0.00 5.06

Negative-pole strength per token; bar height is log(1 + count).

Mechanism

Claimed retrospective: responds to tokens already in context.

Input attribution

0 back
11%
1 back
12%
2–4 back
9%
5–16 back
13%
17–64 back
12%
65+ back
43%
  • #1 at .P: .P0 0.44 redis-1 0.10 ping-3 -0.06 library-23 0.06 Redis-12 -0.03
  • #2 at Info: DB-1 0.11(cursor-9 0.09.We-3 0.08Info0 0.05(-7 -0.05
  • #3 at /: (!-1 0.34 if-2 0.13href-5 0.06/0 -0.04("-6 0.03
  • #4 (not converged) at init: ("-11 -0.14",-7 0.12init0 0.11 {-15 -0.07N-25 0.06
  • #5 (not converged) at ($('#: -click-7 0.10ID-1 -0.09get-5 0.05Camp-2 0.04="-6 0.04

Shares of the gap to <|endoftext|> at every position but the first · converged on 3 of 5 · mean 88.2 tokens back · agreement with replacing one token at a time ρ = 0.25 · reported, not gated

Vocabulary projection

The tokens that this unit's output raises and lowers most.

Jacobian lens

.</ · z = +13.57 · #1 promoted .</ ).</ · z = +13.18 · #2 promoted ).</ ."). · z = +13.01 · #3 promoted ."). ."</ · z = +11.54 · #4 promoted ."</ .'</ · z = +11.28 · #5 promoted .'</ ).[ · z = +11.26 · #6 promoted ).[ .". · z = +11.03 · #7 promoted .". '). · z = +10.77 · #8 promoted '). 。</ · z = +10.70 · #9 promoted 。</ :</ · z = +10.61 · #10 promoted :</ ␣? · z = -9.02 · #10 suppressed ␣? ? ↵ · z = -9.05 · #9 suppressed ? ↵ ?↵↵ · z = -9.18 · #8 suppressed ?↵↵ ?"↵ · z = -9.39 · #7 suppressed ?"↵ ?)↵ · z = -9.55 · #6 suppressed ?)↵ ?↵ · z = -9.66 · #5 suppressed ?↵ ? · z = -9.93 · #4 suppressed ? ␣?↵ · z = -10.33 · #3 suppressed ␣?↵ ? · z = -10.55 · #2 suppressed ? ?↵ · z = -11.03 · #1 suppressed ?↵ -15 -10 -5 0 +5 +10 +15

Logit lens

.</ · z = +8.83 · #1 promoted .</ #endif · z = +8.26 · #2 promoted #endif :</ · z = +7.41 · #3 promoted :</ (''). · z = +7.21 · #4 promoted (''). ).</ · z = +7.11 · #5 promoted ).</ (""). · z = +7.11 · #6 promoted (""). (). · z = +7.00 · #7 promoted (). 工作的 · z = +6.79 · #8 promoted 工作的 >.</ · z = +6.74 · #9 promoted >.</ .'</ · z = +6.56 · #10 promoted .'</ ию · z = -4.33 · #10 suppressed ию ␣?↵ · z = -4.50 · #9 suppressed ␣?↵ "? · z = -4.51 · #8 suppressed "? 是韩国 · z = -4.51 · #7 suppressed 是韩国 ?)↵ · z = -4.74 · #6 suppressed ?)↵ ?↵ · z = -4.91 · #5 suppressed ?↵ ?↵ · z = -5.11 · #4 suppressed ?↵ ?")↵ · z = -5.18 · #3 suppressed ?")↵ ?"↵ · z = -5.20 · #2 suppressed ?"↵ )?↵ · z = -5.39 · #1 suppressed )?↵ -15 -10 -5 0 +5 +10 +15
promotes suppresses Hover a bar for its value.
Values
#Jacobian lens promotessuppressesLogit lens promotessuppresses
1 .</ +13.57 ? -11.03 .</ +8.83 )? -5.39
2 ).</ +13.18 ? -10.55 #endif +8.26 ?" -5.20
3 ."). +13.01 ? -10.33 :</ +7.41 ?") -5.18
4 ."</ +11.54 ? -9.93 (''). +7.21 ? -5.11
5 .'</ +11.28 ? -9.66 ).</ +7.11 ? -4.91
6 ).[ +11.26 ?) -9.55 (""). +7.11 ?) -4.74
7 .". +11.03 ?" -9.39 (). +7.00 是韩国 -4.51
8 '). +10.77 ? -9.18 工作的 +6.79 "? -4.51
9 。</ +10.70 ? -9.05 >.</ +6.74 ? -4.50
10 :</ +10.61 ? -9.02 .'</ +6.56 ию -4.33

Top-10 overlap 40% · cos(w, J·w) 0.57 · kurtosis 12.8 (Jacobian) / 3.9 (logit) · 100 prompts

Read more

The output direction is read through the final norm and the unembedding. The Jacobian lens first carries it to the last layer. Bar length is the token's z-score over the vocabulary, and ␣ marks a space. A kurtosis near 3 means no specific set of tokens.

Patchscope

The model's own description of this unit's output, with no examples.

Read more

The unit's direction replaces the residual stream after the named layer, at the ? of each prompt. It is scaled to each multiple of the norm it replaces, and the model continues greedily. The control injects a random direction, so text that both rows share comes from the prompt. Read after the proposer answered, and shown to neither agent. Reported, not gated.

PromptLayer ×1×2×4
category 2 unit politicspoliticsfood
control furniturepoliticspolitics
category 18 unit foodfoodfood
control ???
meaning 2 unit "little" or "small" and is used to indicate____.____
control ____.____.:
meaning 18 unit ____.____.____.
control ____.____.____.

Hover a prompt's name for its text.

Steering

What the model writes with this pole ablated, untouched, and clamped. Text that matches the baseline is faded.

Read more

The prompts are neutral. The clamp is a multiple of the top activation in the scan (5.06), at every token, and decoding is greedy. Drift at ×1 or ×2 shows what the pole makes the model write. Drift only at ×4 is off-distribution. At most 24 new tokens. Taken after the proposer answered, and shown to neither agent. Reported, not gated.

The weather today is …
Ablated

very hot. The temperature is 30 degrees Celsius. If the temperature increases by 5 degrees Celsius tomorrow, what

Baseline

very hot. The temperature is 30 degrees Celsius. If the temperature increases by 5 degrees Celsius tomorrow, what

Clamped ×1

very hot. The temperature is 30 degrees Celsius. If the temperature increases by 5 degrees every hour, what

Clamped ×2

very hot. The temperature is 35 degrees Celsius. If the temperature increases by 10 degrees Celsius every hour

Clamped ×4

very hot. The temperature is 35 degrees Celsius. If the temperature increases by 10 degrees Celsius every hour

I went to the shop and bought …
Ablated

a new pair of shoes. I put them on and walked out of the store. I was so happy that I had

Baseline

a new pair of shoes. I put them on and walked out of the store. I was so happy that I had

Clamped ×1

a new pair of shoes. I also bought a new shirt and a new pair of socks. I paid $10

Clamped ×2

a new pair of shoes for my daughter. (改为同义句) I bought a new pair of shoes for my

Clamped ×4

some food for lunch. I bought 2 sandwiches, each costing $3, and 3 bottles of water, each

The best way to learn is …
Ablated

to do. The best way to do is to practice. The best way to practice is to play. The best way

Baseline

to do. The best way to do is to practice. The best way to practice is to play. The best way

Clamped ×1

to do it yourself. The best way to learn is to do it yourself. The best way to learn is to do

Clamped ×2

to do it yourself. The best way to learn is to do it yourself. The best way to learn is to do

Clamped ×4

to do it yourself. The best way to learn is to do it yourself. The best way to learn is to do

Once upon a time, …
Ablated

there was a little girl named Lily. She lived in a small village with her parents and grandparents. One day, Lily

Baseline

there was a little girl named Lily. She lived in a small village with her parents and grandparents. One day, Lily

Clamped ×1

there was a little girl named Lily who loved to play with her toys. One day, she found a magical box that

Clamped ×2

there was a little girl named Lily who loved to play with her toys. One day, she found a magical box that

Clamped ×4

there was a young girl named Lily who loved to read. She would spend hours in her room reading books, and she

The report concluded that …
Ablated

the number of people who died in the 2010 earthquake was 22,000, with

Baseline

the number of people who died in the 2010 earthquake was 22,000, with

Clamped ×1

the number of people who died in the 2010 earthquake was 22,000, with

Clamped ×2

the 1998-99 season was the worst in the 100-year history of the league

Clamped ×4

the 1998-99 season was the worst in the 100-year history of the league

Wiring

The units that write most directly into this pole (upstream) and read most directly from it (downstream).

Read more

"Directly" means along the residual stream, through no other unit. Linked units have pages in the registry. Reported, not gated.

From the weights. Virtual weights, with each norm's gain folded in. They rank units but have no absolute scale. Each number is how much one unit reads of the other's write. It is signed when one vector reads another (+ means a positive activation raises the read), and a norm otherwise. Heads count through their OV circuit upstream, and through their Q, K and V reads downstream. Channels are on hover.

From activations. Averaged over this pole's peak on 2 of the review's prompts where it fired. Upstream: the first-order change in its strength when a unit's direct write is removed (+ excites). Downstream: the change in a later unit when this pole's write is removed from that unit's input alone (one of Q, K or V for a head).

From the weights

Upstream neurons
L17/N6899 gate +0.365
L14/N1935 gate +0.35
L14/N7030 gate -0.292
L16/N6783 gate +0.243
L12/N644 gate -0.242
L14/N2781 gate -0.231
L14/N2037 gate -0.229
L16/N1476 gate +0.218
L15/N2031 gate -0.209
L14/N5002 gate +0.208
Upstream heads
L17/H11 up +0.755
L17/H7 up +0.725
L17/H9 gate +0.725
L18/H4 gate +0.69
L17/H8 gate +0.631
L14/H10 up +0.625
L17/H10 gate +0.592
L17/H6 gate +0.566
L15/H9 gate +0.529
L14/H8 gate +0.514
Downstream neurons
L21/N4815 gate +0.805
L20/N4677 gate -0.552
L19/N1332 gate +0.531
L24/N3965 up +0.474
L19/N1533 up +0.457
L27/N7513 gate +0.45
L24/N62 up +0.444
L19/N8441 gate -0.442
L23/N1441 gate +0.418
L24/N5982 gate +0.391
Downstream heads
L19/H6 v +1.16
L19/H7 v +1.16
L19/H8 v +1.16
L19/H9 v +1.16
L19/H10 v +1.16
L19/H11 v +1.16
L24/H0 v +0.66
L24/H1 v +0.66
L24/H2 v +0.66
L24/H3 v +0.66

From activations

Upstream neurons
L1/N8160 -0.351
L4/N4046 -0.309
L17/N6899 +0.279
L14/N1935 +0.247
L4/N8380 +0.236
L11/N599 +0.236
L7/N5416 +0.212
L17/N4417 +0.203
L7/N6736 -0.18
L5/N2598 +0.16
Upstream heads
L15/H7 -0.445
L18/H8 +0.373
L13/H4 -0.332
L15/H1 +0.27
L9/H11 -0.261
L18/H10 -0.244
L5/H8 +0.236
L4/H0 -0.215
L11/H2 -0.204
L18/H4 +0.202
Downstream neurons
L22/N8309 -0.648
L21/N4815 -0.454
L26/N7572 +0.326
L20/N3617 +0.311
L19/N3134 +0.23
L27/N5152 +0.217
L19/N2639 -0.212
L27/N7234 +0.191
L21/N7042 -0.19
L24/N4138 -0.189
Downstream heads
L19/H6 v +1.37
L20/H7 v +0.281
L19/H7 v +0.256
L21/H11 q +0.225
L27/H10 v +0.217
L25/H3 v +0.205
L27/H9 v +0.205
L19/H10 v +0.2
L21/H6 q +0.189
L19/H11 v +0.186

Covariance and confounds

Confounds

Token identity R²
0.29
Position R²
0.01
Frequency r
0.07
Best trivial baseline
never active · 1.00
Hypothesis
0.50 ✗

Info.P["_wrapHelper.Tables_LIMIT.nameulus.c mutableListOf._

Co-activating neuron poles

Pole Lift ≥ Both ρ r
N7158− 32.3 28 -0.05 -0.03
N1744+ 25.0 23 -0.07 +0.01
N366+ 22.3 21 -0.01 +0.01
N6024+ 21.0 20 +0.04 +0.05
N7221− 19.7 19 -0.04 -0.02
N1079− 19.7 19 +0.03 -0.05
N7545+ 19.7 19 +0.03 +0.05
N6039− 18.6 18 -0.07 -0.01
N2855+ 18.4 18 -0.11 +0.00
N8892− 18.4 18 +0.03 -0.03
Read more

Ranked by the 95% lower bound of co-activation lift: how much more often a pole fires when this one does, with chance coincidences discounted. ρ ranks the values, so heavy tails don't sway it.

Joint ablation

Partners
N7158, N1744, N366
KL pole alone
4.57e-05
KL partners
2.00e-04
KL together
2.36e-04
Redundancy ratio
0.78

The partners don't change the pole's effect much.

Run details

Submitted by
muse-spark-1.3
Reviewed by
muse-spark-1.3 (same model as the proposer: not an independent review)
Reviewed at
2026-11-02 11:58 UTC
Max activation
5.0644
Selection
random (seed 958906508)
Corpus
NeelNanda/pile-10k@127bfedc (data/*.parquet, first 500 docs) · 199,896 tokens · seeded sample of 477/500 docs (≤ 200,000 tokens, seed 0) · licence bigscience-bloom-rail-1.0
Model revision
8faed761d45a · float32
Ran on
scan cpu · review cpu
Run cost
205.3 min (slowest: scan, 102.6 min) · 3 LLM calls · 466,271 + 24,389 tokens · $0.02