Allow arbitrary transformations after deserialization from shake database

I'm using a custom builtin rule through which almost all operations are performed. It's worked well up to this point, but I'm in the midst of a refactor and having a tricky time.
Previously, the data which was used as a key for the custom rule had a type field, which was a normal sum type (and rather extensive). I wanted to make this more modular by breaking up that sum type to be separate types defined in separate modules. This immediately causes problems because the binary deserialization needs to know the type it's deserializing. I had been using static pointers previously to solve this (as the key type also contains arbitrary data unrelated to type), and I know that works (P.S. thanks for your post on just that problem). However, I wanted to move away from the static pointers and instead try to use a registry of types indexed by UUID, and serialized with that ID. The trouble is that the Binary.get implementation must be pure, so there's no opportunity for my code to post-process the loaded data to properly lookup by uuid and deserialize the "untyped" data.
I have been trying to work around this, and thought I had a solution that would work, but something is amiss and the deserialization is failing in a non-obvious way.
The shake database does not allow users to insert some operation between deserialization and hashing/equality checking. If there was a way to set such an operation, it would solve my problem. I'm thinking it would be most appropriate to specify such an operation with addBuiltinRule. Otherwise, I might just go back to using static pointers, because that did at least work before.

I guess my first question would be why you don't have multiple rules? It seems if you are doing registry etc you are duplicating something Shake itself is doing, and which is pretty difficult to do correctly, so might as well steal from Shake.
Is your code available anywhere, or is it private?

It is private unfortunately. I understand your point, and it's a bit difficult to explain, but it does require a single builtin rule for this, as there is shared information that must be present for all keys (i.e. there is one key type which contains 'sub-keys' of sorts). Internally the implementation is using a few builtin rules, but there is a single rule that all client code uses. Basically, I've built up a library over shake which more accurately stores and uses arbitrary information about intermediate results (as opposed to just interacting with files). I suppose I could flip that: allow client code to key off of arbitrary data (make their own rules), and make a type class to pull the shared information out. But that would imply a decent amount of boilerplate for clients, and probably some other things I haven't thought of yet.
FYI I did just now find the small bug that was preventing the type registration to deserialize properly in some cases, so it is working. However, my original request still stands, because (for instance) now the Show instance doesn't have enough information to show correctly before the extra information is deserialized. It seems like the show always uses the deserialized key data rather than the runtime-constructed key which matched it. Would it be possible to prefer/use the runtime-constructed key instead?
Also note that technically, because the builtin rule result is passed as just a bytestring, doing this sort of thing on the result type is possible since the implementer controls the deserialization. But I realize that case is simpler than the key case since the key is used in a hashmap.

For the time being, I ended up putting some unsafePerformIO in the Binary instances to access the registry of dynamic types (I realized I didn't need to go back to static pointers regardless). It works well now. But it would be nice to achieve the same thing without doing unsafe IO. In this case it's going to be safe because it's only doing reads of an IORef during Actions, which won't change beyond the initial Rules evaluation.

Is https://hackage.haskell.org/package/shake-0.17.3/docs/src/Development.Shake.Internal.Core.Rules.html#addBuiltinRuleInternal addBuiltinRuleInternal what you're after? The BinaryOp is basically a ByteString to and from value.

Actually yeah, that's exactly what I'd like to have. That would allow me to define deserialization that used the state built up before adding the built-in rules.

Next question is whether it should be a variant of that which works on Binary types Get and Put, one that works on ByteString directly, or something else?

Good question. I guess since the value/answer functionality gives a ByteString to decode, it might be consistent to also have the variant operate on ByteStrings directly. Though I was wondering why BuiltinRun provides a ByteString as opposed to an Either String value where the Left is the decodeOrFail error string.

BuiltinRun doesn't require Binary, and all the Shake internal rules don't use it, preferring more efficient storage solutions. Some literally shuffle the bytes around manually.

Ah I see, makes sense.

So I don't have a good name for this function, and I don't have a good type for it, being somewhat torn between Binary instance types and direct ByteString types, when the actual real types underneath aren't ones I want to expose. Given all the uncertainty, and a reasonable (but very grim) path of a global IORef, I am starting to wonder if it's worth doing. Although that may be a way of saying "I wonder if other peoples pain matters less than my own"... I'd appreciate your viewpoint.

There is a solution, it could be cleaner, but I suspect it's a rare problem. Closing for now, but do shout if it causes ongoing pain.


fix(charts): Time range filters are not being applied to charts that were overwritten

SUMMARY
When GENERIC_CHART_AXES  FF is on and we overwrite a chart, any filter coming from the dashboard is not saved (it gets removed since its marked as isExtra). However, removing such filter doesn't have to mean we delete the original temporal filter if any, otherwise the dashboard wont be able to filter the chart again.
This PR keeps the original adhoc_filters from the slice so when calling the PUT API it doesn't get removed. So any call to  api/v1/dashboard/{db_id}/charts is consistent even after you overwrite the chart.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:

After:

TESTING INSTRUCTIONS

Make sure GENERIC_CHART_AXES FF is ON
Create a chart and add it to a dashboard.
Add a time range filter to the dashboard and apply any value.
Click on the chart title to access it in the Chart Builder menu.
Overwrite the chart (no changes are needed).
Go back to the dashboard, and apply any time range filter.
The filter must keep working after overwriting the chart

ADDITIONAL INFORMATION

[ ] Has associated issue:
[X] Required feature flags: GENERIC_CHART_AXES
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

/testenv up FEATURE_GENERIC_CHART_AXES=true

@Antonio-RiveroMartnez There's a regression from this change.
With this change, user cannot remove the applied adhoc_filters. (Please see the following video. It keeps reverting back the filter option)
https://github.com/apache/superset/assets/1392866/497db3a0-6f72-45d4-800f-fd77da478da9

Hey @justinpark thanks for letting me know. I will have a look as soon as possible 😎


In JS, out-of-order prototype assignments crash in the binder

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @filename: a.js
OOOrder.prototype.m = function () {
    this.p = 1
}
function OOOrder() {
    this.x = 1
}

Expected behavior:
No crash, and OOOrder has instance type { p: number | undefined, x: number }
Actual behavior:
Crash in the binder trying to add p to OOOrder: constructorSymbol.members = constructorSymbol.members || createSymbolTable(); when constructorSymbol isn't defined.
Before #22643, this incorrectly added p to the instance of m, which is incorrect. So falling back to the old behaviour isn't a good option. Instead it needs the same created-nested-namespace logic as bindPropertyAssignment and bindExportsPropertyAssignment.

This is best fixed by binding functions first, which will fix a lot of related bugs I found while surveying popular javascript packages.


Fix issue #350

Fix issue #350.
How to test it?
Run the following command:
roslaunch vrx_gazebo gymkhana.launch extra_gazebo_args:="--verbose"

You should see just one instance of each debug message.

I ran the task, validated that scoring still works the same as before, and am seeing only one instance of the "OnReady", "Publishing Goal coordinates", and "OnRunning" messages.  The "Vehicle released" message is no longer appearing at all - is that intentional?  If so, this is good to merge.


Forms-reset by normalize-scss overwrite button font-family

Problem:
Forms-reset by normalize-scss overwrite button font-family. See on line 422, /_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss.
Example:
$body-font-family: Verdana;
<button>Example Button</button>
Result: Button's font-family is sans-serif.
Solution:
Adding $button-font-family as similar to /scss/forms/_text.scss.

Went ahead and made teh settings fix myself, and merged.


'Release not found' on status, delete etc after 'successfull' install

Installed mysql stable/mysql
I can list, but I can not get / delete / status
garylucas@gary-lucas:~/dev/ub-data-hub/local-dev|DAT-581
⇒  helm install --name msyql-latest stable/mysql
NAME:   msyql-latest
LAST DEPLOYED: Thu Jun 15 13:33:36 2017
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/Secret
NAME                TYPE    DATA  AGE
msyql-latest-mysql  Opaque  2     0s

==> v1/PersistentVolumeClaim
NAME                STATUS   VOLUME    CAPACITY  ACCESSMODES  STORAGECLASS  AGE
msyql-latest-mysql  Pending  standard  0s

==> v1/Service
NAME                CLUSTER-IP  EXTERNAL-IP  PORT(S)   AGE
msyql-latest-mysql  <IP_ADDRESS>  <none>       3306/TCP  0s

==> v1beta1/Deployment
NAME                DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
msyql-latest-mysql  1        1        1           0          0s

NOTES:
MySQL can be accessed via port 3306 on the following DNS name from within your cluster:
msyql-latest-mysql.default.svc.cluster.local

To get your root password run:

    kubectl get secret --namespace default msyql-latest-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo

To connect to your database:

1. Run an Ubuntu pod that you can use as a client:

    kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il

2. Install the mysql client:

    $ apt-get update && apt-get install mysql-client -y

3. Connect using the mysql cli, then provide your password:
    $ mysql -h msyql-latest-mysql -p

Examples:
garylucas@gary-lucas:~/dev/ub-data-hub/local-dev|DAT-581⚡
⇒  helm list
NAME        	REVISION	UPDATED                 	STATUS  	CHART      	NAMESPACE
msyql-latest	1       	Thu Jun 15 13:33:36 2017	DEPLOYED	mysql-0.2.6	default

garylucas@gary-lucas:~/dev/ub-data-hub/local-dev|DAT-581⚡
⇒  helm delete mysql-latest
Error: Unable to lock release mysql-latest: release not found

Same response for other commands (get, status etc)
Versions:
garylucas@gary-lucas:~/dev/ub-data-hub/local-dev/db|DAT-581⚡
⇒  helm version
Client: &version.Version{SemVer:"v2.4.2", GitCommit:"82d8e9498d96535cc6787a6a9194a76161d29b4c", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.4.2", GitCommit:"82d8e9498d96535cc6787a6a9194a76161d29b4c", GitTreeState:"clean"}

⇒  kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.5", GitCommit:"490c6f13df1cb6612e0993c4c14f2ff90f8cdbf3", GitTreeState:"clean", BuildDate:"2017-06-14T22:30:46Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-30T22:03:41Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
garylucas@gary-lucas:~/dev/ub-data-hub/local-dev/db|DAT-581⚡

garylucas@gary-lucas:~/dev/ub-data-hub/local-dev/db|DAT-581⚡
⇒  minikube version
minikube version: v0.19.1

Thanks!

it's not 'fixed' but I did helm reset --force, nuke the pod and nuke the config map so it's gone...

assign this one to me, I am working on this one, was able to repro, it seems there is something in the particular name, as this works with other names, only mysql-latest has issue

hehehe, the fix is a funny one:
the issue is nothing but the typo in name when install command was issued
helm install --name **msyql-latest** stable/mysql

but we were trying to query/delete the instance which really never existed 👍
helm delete **mysql-latest**

I'm not sure what you're trying to say.  I'll try to reproduce this issue again in my local env and see what happens.  Was I issuing a bad command of some sort?

@luck02 you typo'd mysql in the command
helm install --name msyql-latest stable/mysql

OMG :(  sorry  I literally couldn't see that :(


Need the ability to view products in the user's cart

As a User
I need to view products in my shopcart
So that I can see the item, price, and total
Details and Assumptions

shopcart automatically is saved
counter will be needed to aggregate product total
counter will be needed to aggregate price / total

Acceptance Criteria
Given a shopcart
When I am on the page
Then I can view all of my products in one place

May want to remove references to price and total. This should be just a list of items in the user's cart.


Fails to compile

Hi!
I tried using your library in a project, but it fails to compile, and i cannot figure out why.
I have mono <IP_ADDRESS> installed.
Here is the error:
= note: /usr/bin/ld: /home/user/Code/mono-scripting/wrapped_mono/examples/basic_test/target/debug/deps/libwrapped_mono-33b7c765d5c2f537.rlib(wrapped_mono-33b7c765d5c2f537.ys639iur3mgd8dr.rcgu.o): in function 'wrapped_mono::gc::gc_unsafe_enter':           /home/user/Code/mono-scripting/wrapped_mono/src/gc.rs:95: undefined reference to 'mono_threads_enter_gc_unsafe_region_internal'           collect2: error: ld returned 1 exit

In order to help, I will need slightly more information, mainly:

Which OS are you using? With exact version.
Which version of mono have you installed?
Did you install mono in the default location?
Is this the whole error message, or are there more undefined reference-s?

It seems pretty weird that only mono_threads_enter_gc_unsafe_region_internal is missing, because mono_threads_exit_gc_unsafe_region_internal is used in the same places, so enter should be present if exit is present.

I am using OS: Pop!_OS 22.04 LTS x86_64
Mono version is: Mono JIT compiler version <IP_ADDRESS>
I installed mono-complete through apt, and the header files are present in /usr/include/mono-2.0/mono as the build script expects.
For completeness, here is the whole error message:

error: linking with 'cc' failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcPsyNo7/symbols.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.3i8d6xszn6hj692l.rcgu.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.3id4rar8nzml5s1l.rcgu.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.3wthj8uh1remu7i0.rcgu.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.4x3ye5l4si465auo.rcgu.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.51bvvk82ilssru03.rcgu.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.pjewnfjg6bpc9sp.rcgu.o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def.309fentfnn5l60lh.rcgu.o" "-Wl,--as-needed" "-L" "/home/user/Code/mono-scripting/target/debug/deps" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/user/Code/mono-scripting/target/debug/deps/libwrapped_mono-c66e6fe639fba802.rlib" "/home/user/Code/mono-scripting/target/debug/deps/liblazy_static-b33cd6b8ee13db74.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-de6eb09a538b2205.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-d358cd1c731d2b91.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-ff8c8dedfd335408.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-69331cac3b071e01.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-b38caf09facb79de.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-403b266484b5f5f9.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-67601fa47a6a7e4c.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-6088e1f23d1750e9.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-02e51d881611b69a.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-6419689ad9800fd6.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-4afc2866178d292d.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-706d2d909b8d6281.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-4babd1cfcf3314af.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-e52f7f2201915b42.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a5319eed00c3264d.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-863cf80d159af754.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-522518611024dce5.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-05898138a596088a.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-72a5840bf6c2fe5a.rlib" "-Wl,-Bdynamic" "-lmono-2.0" "-lstdc++" "-lz" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/user/Code/mono-scripting/target/debug/deps/mono_scripting-4eb00fa2a4193def" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/user/Code/mono-scripting/target/debug/deps/libwrapped_mono-c66e6fe639fba802.rlib(wrapped_mono-c66e6fe639fba802.wrapped_mono.91f6e2eb-cgu.15.rcgu.o): in function 'wrapped_mono::gc::gc_unsafe_enter':
          /home/user/.cargo/git/checkouts/wrapped_mono-f25d5be027b7eec9/a5a38c7/src/gc.rs:95: undefined reference to 'mono_threads_enter_gc_unsafe_region_internal'
          collect2: error: ld returned 1 exit status

  = note: some 'extern' functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the '-l' flag to specify native libraries to link
  = note: use the 'cargo:rustc-link-lib' directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

warning: 'mono-scripting' (bin "mono-scripting") generated 1 warning
error: could not compile 'mono-scripting' due to previous error; 1 warning emitted

It appears that there was a breaking change within the mono API, and this crate needs updating. mono_threads_enter_gc_unsafe_region_internal  informs mono about critical sections of code, during which GC may not run. A very temporary and unsafe fix is to simply comment out those functions at line 79 in gc.rs, like that:
extern "C" {
    // #[doc(hidden)]
    //pub fn mono_threads_enter_gc_unsafe_region_internal(msd:&MonoStackData)->GCUnsafeAreaMarker;
    // #[doc(hidden)]
    // pub fn mono_threads_exit_gc_unsafe_region_internal(gc_unsafe_cookie:GCUnsafeAreaMarker,msd:& MonoStackData);
}
#[doc(hidden)]#[must_use = "GCUnsafeAreaMarker marks a section of code that could be disturbed by GarbageCollector and prevents this from happening.
 It is created at begging of that critical section and must be consumend at its end, otherwise GCUnsfae Mode will newer be exited which will result in bugs and crashes."] #[repr(transparent)]
pub struct GCUnsafeAreaMarker {
    #[allow(dead_code)] // This field is not unused, but it seems like it tor rust since it does not know anything about the C side of things
    gc_unsafe_cookie:*mut i32,
}
#[doc(hidden)] #[inline(always)]
pub fn gc_unsafe_enter()->(GCUnsafeAreaMarker,MonoStackData){
    let stack_item:u8 = 0; //Useless dummy value used to get the stack pointer.
    let msd = crate::gc::MonoStackData{dummy:0,stack_ptr:&stack_item as *const u8}; // StackDataObject used to restore the stack.
    let marker = GCUnsafeAreaMarker{gc_unsafe_cookie:std::ptr::null_mut()};
    ///let marker = unsafe{crate::gc::mono_threads_enter_gc_unsafe_region_internal(&msd)}; // Entering GC Unsafe mode (signalling to GC that we will be using managed objects that should not be moved)
    (marker,msd)
}
#[doc(hidden)] #[inline(always)]
pub fn gc_unsafe_exit(markers:(GCUnsafeAreaMarker,MonoStackData)){
    // unsafe{crate::gc::mono_threads_exit_gc_unsafe_region_internal(markers.0,&markers.1)};
}

This is obviously not a fix, and will sometimes cause crashes, which can be seen in 2 tests failing:
testing::gc::test_gc_array
testing::gc::test_gc_exception
those tests stress-test the GC by creating thousands of temporary objects, and if GC unsafe areas are not marked properly, will crash. A proper fix requires updating to use newer versions of those mono functions, but this could take a little bit more time.

Thanks!
I've applied your workaround and it does indeed compile now!
I'm unfortunately not sure if i can help you fix it, as i don't really know anything about how mono/C# works.

I figured it out. It seems it was renamed to mono_threads_enter_gc_unsafe_region. So a full fix will come soon.

Full fix added in https://github.com/FractalFir/wrapped_mono/commit/d18bfe70815f21b61f41c99b2d6b9e317b2e9ccb. Does everything work now?

Thanks!
I can't test it now, but I well as soon as I get back.

It works now and it passes all tests!


Add method setMessage and property messageLineBreakMode

Hi, thanks for PR.
Can you explain, why do you need this changes?
I think that:

Message is just a simple text, for good readability, it should break lines with NSLineBreakByWordWrapping, not with NSLineBreakByCharWrapping. And it definitely should be fully visible, that's why we can't use clipping and truncating.
If you want to make messages dynamic, you need to recalculate full layout every time it changed. And why only messages? If messages will be dynamic, then other pieces of library should be dynamic too: title, buttons... even style.

To make message dynamic you can use LGAlertView with inner view and make any changes inside it. Check in demo project:

"LGAlertView + UIView"
"LGAlertView + UIScrollView"
"LGAlertView + XIB"

In the process of downloading multiple files, I would like to dynamically display the message name in the alert view, only show the percentage of progress will be a bit monotonous.

Sometimes the file name will be longer, would like to flexibly set LineBreakMode, such as NSLineBreakByTruncatingMiddle, so set this property visible.

I tried implement it, but really, It's not so easy.
Initially, for this purpose we had progressLabelText property. In the latest release 2.4.0 I added ability to use it with alertView with activityIndicator as well as with 'progressView'.
Check demo project for version 2.4.0

"LGAlertView + ActivityIndicator"
"LGAlertView + ProgressView"

You can make it looks like this:
+----------------------+
|        Title         |
|       Message        |
| #####=============== |
|      File name       |
|       Percent        |
+----------------------+


Quill not showing when loading from CDN - new Vue instance

Below code does not work, not sure why as it is actually not returning nothing at all
Is this not supported?
JSFiddle: https://jsfiddle.net/39epgLj0/44/
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Vue Quill test</title>

	<link href="https://cdn.quilljs.com/1.3.4/quill.snow.css" rel="stylesheet">

Also
this.$refs.myQuillEditor.quill returns undefined
Adding

and removing component returns:
vue:6 TypeError: (0 , r.default) is not a function
    at a.initialize (vue-quill-editor.min.js:5)
    at a.n [as initialize] (vue:6)
    at a.mounted (vue-quill-editor.min.js:5)
    at Le (vue:6)
    at Object.insert (vue:6)
    at k (vue:6)
    at Ot.r.nodeOps [as __patch__] (vue:6)
    at Ot.e._update (vue:6)
    at Ot.r (vue:6)
    at Uo.get (vue:6)

BUG REPORT TEMPLATE
Vue.js version and component version
Latest
What is Expected?
Should load
What is actually happening?
Nothing

I will fox it.

https://jsfiddle.net/mz32fpmq/

You need keep can get the window['object-assign']

Vue.use(VueQuillEditor) or components: { quillEditor: VueQuillEditor.quillEditor }

Include css in html, not css resource

Thanks a lot for the prompt response! Works like a charm.
Was not aware of window['object-assign']

You can update to v3.0.4, it will fix it.

https://jsfiddle.net/h0syhaab/

https://jsfiddle.net/ugo7r53d/

Thanks a lot! Updated and working fine as well


chore: split CategoryTheory.FinCategory

Minor clean up of imports, getting ready to minimize the heartbeats variation observed/reduced in #9732.
This has the effect of slightly (although not enough) delaying the import of positivity (which in turn imports the kitchen sink) into the category theory development.

Thanks :tada:
bors merge

bors r-
Can you merge master?
bors d+

bors merge

bors merge

lake build

bors merge


Show errors adding people to teams inside the add dialog

@keybase/react-hackers
We were just black barring errors that show up when you're adding people to a team.
This new approach is:

wait to decide whether to close the add dialog until we know whether the add succeeded, put a spinner on the Add button while we're waiting

if it did, just close the dialog.  This close moves to the Saga instead of the container, since the Saga's what knows about the success/failure.

if it failed, gather up the failures in an array (you can add more than one person at once, so you can have more than one error) and send it to the store as a \n-joined string.

for a specific error (trying to add someone as owner using sharing-before-signup), rewrite it to be more friendly.

at the top of the dialog, show each failure, let people try again.

I'm not very happy with the single string, and the way that we have a separate try call for each RPC, but changing how the saga's hooked up should probably be its own cleanup story.

would also be nice to just have the rpc take multiple

Filed DESKTOP-6633 for that change, maybe we can get an RPC that takes multiple IDs at once.


In master branch, ml_exp.py still has "S2" problem

32 from sollya import (
33     S2, Interval, round, inf, sup, log, expm1, log2,
34     guessdegree, dirtyinfnorm, floor
35 )

Then I try to fix the bug according to the commit e75a0ee,  found that metalibm_core/utility/num_utils.py also has “S2” problem.
After fixing the bugs in the two files, everything is OK.

Hi @TimoTokki ,
Thank youfor reporting the issue. Indeed, fixing S2 import issue that arises with new pythonsollya version was not propagated everywhere. I will try to do an overpass soon but if you have a fix of your own and can send a pull request I will be happy to merge it.
Regards

@nibrunie ,
I am very happy to contribute my own modifications. I have sended a pull request just now. But I'm not familiar with git, so there may be some errors.

Pull request accepted with small modifications. It should fix the issue.
Thank you a lot for your contirbution.


it can not work where graph TD contains chinese character

Thanks for your input!
In essence this is the same issue as #162. This will be resolved in release 0.5.0 when you can put any character between quotes like this "您好". I will close this as a duplicate.

thank you！

where can i download the version 0.5.0

i found !

i found the dev-0.5.0。can you tell me where is the version release 0.5.0


Please Read - simpleWeather is currently not working.

Simple Weather Gives me the following error: THERE WAS A PROBLEM RETRIEVING THE LATEST WEATHER INFORMATION.
Also, I tried the plugin in the website http://simpleweatherjs.com/ and the same result is happen.
Please help me to find a solution for it

Yahoo has made some changes to their API including requiring oAuth. As simpleWeather is pure JavaScript using oAuth isn't an easy option as I don't want people publishing their consumer and secret keys. I'm looking into other API options but honestly not sure when I'll have a replacement.
It has also been up and down a few times today so it's possible it could start working again.

I need use it like temporary module, please show me how to fix it with secret keys!

You can still use the rss feed, like this: http://weather.yahooapis.com/forecastrss?w=WOEID_HERE.
Since it's XML, you can parse it as well with jQuery automatically

Just a side node, it's possible to do something better so it'll be futureproof, using OAuth. This requires modifying a bit the code so it first fetch the access token from Yahoo's server, but it'll also imply having to modify simpleWeather instantiation so it includes the Yahoo's developer API as a mandatory parameter. For example about how to do it, see this: https://gist.github.com/hannestyden/563893

It's unlikely I'll update simpleWeather to work with OAuth. It is not recommended to have secret keys or tokens in client side code as it's not really secret anymore. The initial option would be to provide a PHP proxy but that complicates simpleWeather more than I would like at the moment.
The XML feed is also limited by woeid only so location names and geolocation wouldn't work which I believe is the majority of the simpleWeather use cases.
I have been looking at other options for the data. One might be to use weather.gov but it will be a complete change in data returned and how location works; http://forecast.weather.gov/MapClick.php?lat=38.4247341&lon=-86.9624086&FcstType=json is an option but uses coordinates vs location name. forecast.io API would also require a proxy due to OAuth but it also only gives 1,000 free API calls a day before charging. I'm not sure when I'll have the time to really work on it or whether the weather.gov data will be the best option.
If anybody has recommendations for those wanting an alternate solution to simpleWeather please share. Thanks!

fleeting, can use http://openweathermap.org/ ?

Broke 13 of my apps. Dammit!

The XML RSS looks promising. We can still make it work with geolocation by retrieving woeid from geo.places in a separate call.

The XML solution is working in my case. Thanks for that.

I'm glad the XML feed is a workable solution for some. The geo.places call will continue to work for getting the woeid until Yahoo rolls out OAuth to it as well.

@fleeting Please read my second comment and the derek's blog, as it's a method to avoid distributing your Yahoo's API key. Basically you'll store the keys/token on Yahoo's servers directly, only referencing them in your request.

Sorry guys, I've tried the XML feed option but can't quite make it work. Can anyone advise as to where exactly the above XML code should go? This is what I'm currently using in my header.php file of my Wordpress install and up until yesterday it worked perfectly:
`

This broke ~150 sites. I really hate that Yahoo isn't more proactive with warnings.

If somebody is interested, this is how I my code looks like now after change XML/RSS. I'm not using geo.places, so it was a quick fix.
`function getWeatherData() {
var woeid = '2375129';
var weatherURL = 'http://weather.yahooapis.com/forecastrss?w=' + woeid;
$.ajax({
    url: "http://query.yahooapis.com/v1/public/yql",
    async: true,
    data: {
        q: "select * from xml where url='" + weatherURL + "'",
        format: "json"
    },
    success: function (data) {

        var weather = data.query.results.rss.channel.item;

        // Today
        $('#condition').find('.weather').addClass('icon-' + weather.condition.code);
        $('#conditionText').text(weather.condition.text);
        $('#todayHighText').find('span').html(weather.forecast[0].high + '°');
        $('#todayLowText').find('span').html(weather.forecast[0].low + '°');
        $('#todayCurrentText').find('.value').html(weather.condition.temp + '°');
        $('#todayCurrentText').find('.unit').text('F');

        // Forecast
        $('#day1 .weather').addClass('icon-' + weather.forecast[1].code);
        $('#day1 .weekdayHigh').html(weather.forecast[1].high + '°');
        $('#day1 .weekdayLow').html(weather.forecast[1].low + '°');
        $('#day2 .weather').addClass('icon-' + weather.forecast[2].code);
        $('#day2 .weekdayHigh').html(weather.forecast[2].high + '°');
        $('#day2 .weekdayLow').html(weather.forecast[2].low + '°');
        $('#day3 .weather').addClass('icon-' + weather.forecast[3].code);
        $('#day3 .weekdayHigh').html(weather.forecast[3].high + '°');
        $('#day3 .weekdayLow').html(weather.forecast[3].low + '°');

        $('#weatherContainer').addClass('fadeInDown');

    },
    error: function () {
        $('#weatherContainer').html('No weather data available').addClass('fadeInDown');
    }
});

}`

For my needs I'm switching to the weather underground API

Using the XML method proposed by @X-Ryl669 this is a simplified version of the code I used just in case it helps anyone: http://plnkr.co/edit/dClPDtnToMhHqvKpfCzj?p=preview
var zipCode = 90210;

$.ajax({
    dataType: "json",
    headers:  { "Accept": "application/json; odata=verbose" },
    url: "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D"+zipCode+"%20limit%201&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys",
    beforeSend: function(xhr){xhr.setRequestHeader('Accept', 'application/json; odata=verbose');},
    success: function(data){
        $.getJSON("https://query.yahooapis.com/v1/public/yql?callback=?", {
            q: "select * from xml where url=\"https://weather.yahooapis.com/forecastrss?w="+data.query.results.place.locality1.woeid+"\"",
            format: "json"
        },function (data) {
          var weather = data.query.results.rss.channel;
          var html = '
'+weather.item.condition.temp+'°'+weather.units.temperature+'
Feels like: '+weather.wind.chill+'°
';
          $("#weather").html(html);
        });
    },
});

Was also able to work with XML using code below. You will know have the weather object with all the data you need. My only concern is how often these XML/RSS get updated. Anyone know this?
`  var woeid = "12772140";
var $url = "http://query.yahooapis.com/v1/public/yql?callback=?";
$.getJSON($url, {
q: "select * from xml where url=" +
""http://weather.yahooapis.com/forecastrss?w=" + woeid + """,
format: "json"
}, function (data) {
  var weather = {
    code: data.query.results.rss.channel.item.condition.code,
    temp: data.query.results.rss.channel.item.condition.temp,
    phrase: data.query.results.rss.channel.item.condition.text
  };

  weather.temp_alt = Math.round( (weather.temp - 32) * 5 / 9 );

}

);
`

I have modified Simple Weather to use the new rss and xml solution provided by @X-Ryl669 and @mattferderer. It should work as before, just swap the old script for this one.
(function($) {
  "use strict";

  function getAltTemp(unit, temp) {
    if(unit === 'f') {
      return Math.round((5.0/9.0)*(temp-32.0));
    } else {
      return Math.round((9.0/5.0)*temp+32.0);
    }
  }

  $.extend({
    simpleWeather: function(options){
      options = $.extend({
        location: '',
        woeid: '',
        unit: 'f',
        success: function(weather){},
        error: function(message){}
      }, options);

      if(options.location !== '') {
        $.ajax({
          dataType: "json",
          headers: {"Accept": "application/json; odata=verbose"},
          url: "https://query.yahooapis.com/v1/public/yql?format=json&q=select%20woeid%20from%20geo.places(1)%20where%20text%3D%22" + options.location + "%22&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=",
          beforeSend: function (xhr) {
            xhr.setRequestHeader('Accept', 'application/json; odata=verbose');
          },
          success: function (data) {
            if (data !== null && data.query !== null && data.query.results !== null && data.query.results.place !== null && data.query.results.place.woeid !== null) {
              var woeid = data.query.results.place.woeid;
              getWeatherData(woeid);
            } else {
              options.error({message: "There was an error retrieving the latest weather information. Please try again.", error: null});
            }
          }
        });
      } else if(options.woeid !== '') {
        getWeatherData(options.woeid);
      } else {
        options.error({message: "Could not retrieve weather due to an invalid location."});
        return false;
      }

      var now = new Date();
      function getWeatherData (woeid) {
        $.getJSON('https://query.yahooapis.com/v1/public/yql?callback=?&rnd='+now.getFullYear()+now.getMonth()+now.getDay()+now.getHours(), {
          q: 'select * from xml where url="https://weather.yahooapis.com/forecastrss?w='+woeid+'&u='+options.unit+'"',
          format: "json"
        },function (data) {
          if(data !== null && data.query !== null && data.query.results !== null && data.query.results.rss !== null && data.query.results.rss.channel.description !== 'Yahoo! Weather Error') {
            var result = data.query.results.rss.channel,
                weather = {},
                forecast,
                compass = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N'],
                image404 = "https://s.yimg.com/os/mit/media/m/weather/images/icons/l/44d-100567.png";

            weather.title = result.item.title;
            weather.temp = result.item.condition.temp;
            weather.code = result.item.condition.code;
            weather.todayCode = result.item.forecast[0].code;
            weather.currently = result.item.condition.text;
            weather.high = result.item.forecast[0].high;
            weather.low = result.item.forecast[0].low;
            weather.text = result.item.forecast[0].text;
            weather.humidity = result.atmosphere.humidity;
            weather.pressure = result.atmosphere.pressure;
            weather.rising = result.atmosphere.rising;
            weather.visibility = result.atmosphere.visibility;
            weather.sunrise = result.astronomy.sunrise;
            weather.sunset = result.astronomy.sunset;
            weather.description = result.item.description;
            weather.city = result.location.city;
            weather.country = result.location.country;
            weather.region = result.location.region;
            weather.updated = result.item.pubDate;
            weather.link = result.item.link;
            weather.units = {temp: result.units.temperature, distance: result.units.distance, pressure: result.units.pressure, speed: result.units.speed};
            weather.wind = {chill: result.wind.chill, direction: compass[Math.round(result.wind.direction / 22.5)], speed: result.wind.speed};

            if(result.item.condition.temp < 80 && result.atmosphere.humidity < 40) {
              weather.heatindex = -42.379+2.04901523*result.item.condition.temp+10.14333127*result.atmosphere.humidity-0.22475541*result.item.condition.temp*result.atmosphere.humidity-6.83783*(Math.pow(10, -3))*(Math.pow(result.item.condition.temp, 2))-5.481717*(Math.pow(10, -2))*(Math.pow(result.atmosphere.humidity, 2))+1.22874*(Math.pow(10, -3))*(Math.pow(result.item.condition.temp, 2))*result.atmosphere.humidity+8.5282*(Math.pow(10, -4))*result.item.condition.temp*(Math.pow(result.atmosphere.humidity, 2))-1.99*(Math.pow(10, -6))*(Math.pow(result.item.condition.temp, 2))*(Math.pow(result.atmosphere.humidity,2));
            } else {
              weather.heatindex = result.item.condition.temp;
            }

            if(result.item.condition.code == "3200") {
              weather.thumbnail = image404;
              weather.image = image404;
            } else {
              weather.thumbnail = "https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+result.item.condition.code+"ds.png";
              weather.image = "https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+result.item.condition.code+"d.png";
            }

            weather.alt = {temp: getAltTemp(options.unit, result.item.condition.temp), high: getAltTemp(options.unit, result.item.forecast[0].high), low: getAltTemp(options.unit, result.item.forecast[0].low)};
            if(options.unit === 'f') {
              weather.alt.unit = 'c';
            } else {
              weather.alt.unit = 'f';
            }

            weather.forecast = [];
            for(var i=0;i<result.item.forecast.length;i++) {
              forecast = result.item.forecast[i];
              forecast.alt = {high: getAltTemp(options.unit, result.item.forecast[i].high), low: getAltTemp(options.unit, result.item.forecast[i].low)};

              if(result.item.forecast[i].code == "3200") {
                forecast.thumbnail = image404;
                forecast.image = image404;
              } else {
                forecast.thumbnail = "https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+result.item.forecast[i].code+"ds.png";
                forecast.image = "https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+result.item.forecast[i].code+"d.png";
              }

              weather.forecast.push(forecast);
            }

            options.success(weather);
          } else {
            options.error({message: "There was an error retrieving the latest weather information. Please try again.", error: data.query.results.rss.channel.item.title});
          }
        });
      }
      return this;
    }
  });
})(jQuery);

@rhyshalsey +1, worked immediately for me

One note, it appears to be reporting the wrong weather status. It's 54 degrees and raining here, but shows snowing. Could be an issue with the icons I'm using.

@rhyshalsey, thank you!

@rhyshalsey Thanks from me as well, I was neck deep in other options for my applications.  Glad you got this figured out!

@rhyshalsey thanks!! This worked for me as well. I just made the code change and its now working.

@rhyshalsey, you should move the line var now = new Date(); into the function just below, else it's undefined in the function itself where you're using it.

Just a comment, guys: This is only a temporary workaround. As soon as more people will use this, Yahoo is going to protect with oAuth either their RSS feed, either their XML to JSON converter.
I still think we need to figure out how to use their weather api with oAuth in pure JS without having to give our reader our own dev API tokens.

Good catch @X-Ryl669, updated the code. I also agree that this should not be considered a long term solution.
I have been trying to get a consumer key for the YDN all day, but I'm being been hit with a "An internal error occurred" when trying to access the YDN apps section. Anyone else getting this error?

@X-Ryl669 Send me a link and I'll try.

I've been getting a "Server Connection Closed" error all day when trying to go to https://developer.yahoo.com/apps/
Trying to create an app gives me some server connection error on submit.

Same error here.

Same for me. I guess their weather API change is currently overloading their processing buffers.

With talks of Yahoo trying to sell the majority of their internet business & staff, plus large shareholders trying to remove their entire board, the best path forward may be to find a different weather api. Unfortunately I can't find any that are free, utilize zip codes or city/state/country, and have a high request per hour/day limit.

@mattferderer I'm probably going to fork this and hook this up with weatherunderground's API.  500 calls a day @ 10 an hour max suits my needs.

@webdevbrian +1

@webdevbrian Are you going to cache the response from Weather Underground or do you get less than 10 visitors per hour on your site or am I mistaken in how I read that?

@webdevbrian Where I live, there's only 24 hours a day. So the best I could expect with only 10 call per hour would be 240 calls per day. Did I miss something ?

@X-Ryl669 Whoops, meant to say minute. Here are their limits for their free account. Feel free to dig into it if it'll work for you (and their other packages if you need more and what you'll be paying) See here

Just started my fork, I'm out on vacation next week but I need this working again so probably expect it to be done in a few weeks. I'll ping @fleeting to see what he wants to do? Holler at me buddy. Also, I might be in Boston soon, we should meet up for some :beers: .
@mattferderer I'll probably set a rate limit. I'll need more than 500 a day for my needs, but at least people will be able to throttle it so it doesn't get canned. I'll have to think it over a few margaritas on the beach next week :)
:boat: :sunrise: :sunny: :sunglasses:

I think the difference is the application. I only use it for a digital signage (updates every 5 mins) whereas someone else may use it on a website and may load it 1000's of times a day.

@kgiszewski Correct -- I'll probably just rate limit it which people can define whatever they'd like in the options depending how crazy they want to get, haven't thought to that point yet. Currently mapping the response from wunderground to what @fleeting has, there's a bunch of things to change.

@rhyshalsey Looks like we are starting to get an error on your work around. Was working great until 2 minutes ago. "Unhandled exception at line 53, column 21, 0x800a138f - JavaScript runtime error: Unable to get property 'channel' of undefined or null reference" anyone else seeing this?
Doug

@dmcrock, same here

Looks like they're requiring OAuth on the XML feed now. Glad to see Yahoo took the time to implement that fix but still haven't fixed their Developer App section so you can login & create an app to connect through OAuth.

So what? When hundreds of people enter my website, I can not show the weather? This is so absurd. Is there another weather app I can use?

Long time SimpleWeather user, first time commentor. Not sure if others are experiencing this, but it seems like it is only displaying Fahrenheit.  Sorry to be a pain, but in Canada we use Celsius.
Otherwise, thanks for all the updating you have been doing to this plugin.

@dmcrock, same here. The workaround provided by @rhyshalsey (by the way, thanks for trying) worked for a few hours until around 5pm'ish EST today (3/24/16).
I am now getting the following console error:
Uncaught TypeError: Cannot read property 'channel' of undefined

Yahoo claims the site to create an app works now. I can't verify though.
On Thu, Mar 24, 2016 at 3:13 PM -0700, "grandoompa"<EMAIL_ADDRESS>wrote:
@dmcrock, same here. The workaround provided by @rhyshalsey (by the way, thanks for trying) worked for a few hours until around 5pm'ish EST today (3/24/16).
I am now getting the following console error:
Uncaught TypeError: Cannot read property 'channel' of undefined
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

Yes, it is working now - but their example code doesn't reference the API keys so I'm not sure where we're supposed to pass them.

@rhyshalsey don't work

I think openweathermap.org is only one replacement for the Yahoo API, because it has the best limits (Calls per minute 60). I don't see any other way to make this plugin work again, because as I know there are no public weather APIs without limitations. Even in this way we have to expose keys.

Ok, for those interested, I've started my port with weatherunderground and it's working for my need.
You'll need to register an api key from the Weatherunderground website, and add a apiKey member to the options of simpleWeather. The woeid does not exist in weather underground, but I've used the "id" they are using. Either you use the location member of options to specify the location (but it'll make 2 request to WU, one to figure out the id, and the second for the forecast), either you capture the output of the former request on the console, and use that as woeid
Not everything is ported (feel free to adjust to your need), but for those using metrics system, it works quite well.
(function($) {
  "use strict";

  function getAltTemp(unit, temp) {
    if(unit === 'f') {
      return Math.round((5.0/9.0)*(temp-32.0));
    } else {
      return Math.round((9.0/5.0)*temp+32.0);
    }
  }

  $.extend({
    simpleWeather: function(options){
      options = $.extend({
        location: '',
        woeid: '',
        unit: 'f',
        apiKey: '',
        city: '',
        success: function(weather){},
        error: function(message){}
      }, options);

      if(options.location !== '') {
        if (options.location == 'auto')
        {
            $.ajax({
              dataType: "json",
              headers: {"Accept": "application/json; odata=verbose"},
              url: "http://api.wunderground.com/api/"+options.apiKey+"/geolookup/q/autoip.json",
              beforeSend: function (xhr) {
                xhr.setRequestHeader('Accept', 'application/json; odata=verbose');
              },
              success: function (data) {
                 if (data !== null && data.location !== null && data.location.l !== null) {
                    var query = data.location.l;
                    console.log("Fetching weather forecast for :" + query);
                    getWeatherData(query);
                 } else {
                    options.error({message: "There was an error retrieving the latest weather information. Please try again.", error: null});
                 }
              }
            });
        }
        else
        {
            $.ajax({
              dataType: "json",
              headers: {"Accept": "application/json; odata=verbose"},
              url: "http://api.wunderground.com/api/"+options.apiKey+"/geolookup/q/" + options.location + ".json",
              beforeSend: function (xhr) {
                xhr.setRequestHeader('Accept', 'application/json; odata=verbose');
              },
              success: function (data) {
                 if (data !== null && data.location !== null && data.location.l !== null) {
                    var query = data.location.l;
                    console.log("Fetching weather forecast for :" + query);
                    getWeatherData(query);
                 } else {
                    options.error({message: "There was an error retrieving the latest weather information. Please try again.", error: null});
                 }
              }
            });
        }
      } else if(options.woeid !== '') {
        getWeatherData(options.woeid);
      } else {
        options.error({message: "Could not retrieve weather due to an invalid location."});
        return false;
      }

      function iconToCode(icon) {
         var night = /^nt_/.test(icon);
         var i = icon.replace("nt_", "");
         switch(i) {
            case "chanceflurries": // Chance of Flurries
                return 13;
            case "chancerain": // Chance of Rain
                return 40;
            case "chancesleet": // Chance of Freezing Rain
                return 10;
            case "chancesnow": // Chance of Snow
                return 42;
            case "chancetstorms": // Chance of Thunderstorms
                return 38;
            case "clear": // Clear
                 return night ? 31 : 32;
            case "flurries": // Flurries
                 return 13;
            case "fog": // Fog
                 return 20;
            case "hazy": // Haze
                 return 21;
            case "mostlycloudy": // Mostly Cloudy
                 return night ? 27 : 28;
            case "mostlysunny": // Mostly Sunny
                 return night ? 33 : 34;
            case "partlycloudy": // Partly Cloudy
                 return night ? 29 : 30;
            case "partlysunny": // Partly Sunny
                 return night ? 33 : 34;
            case "rain": // Rain
                 return 11;
            case "sleet": // Sleet
                 return 18;
            case "snow": // Snow
                 return 16;
            case "sunny": // Sunny
                 return 32;
            case "tstorms": // Thunderstorms
                 return 4;
            case "cloudy": // Overcast
                 return 26;
            default:
            case "unknown": // Unknown
                 return 3200;
         }
      }

      function padToTwo(number) {
         if (number<=99) { number = ("0"+number).slice(-2); }
         return number;
      }

      function getWeatherData (woeid) {
        $.getJSON('http://api.wunderground.com/api/' + options.apiKey + '/conditions/astronomy/forecast10day' + woeid + '.json', { format: 'json' }, function(data) {
          if(data !== null && data.current_observation !== null && data.sun_phase !== null && data.forecast !== null && data.forecast.simpleforecast !== null && data.forecast.simpleforecast.forecastday !== null) {
            var current = data.current_observation,
                weather = {},
                forecast,
                compass = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N'],
                image404 = "https://s.yimg.com/os/mit/media/m/weather/images/icons/l/44d-100567.png";
                weather.title = 'Conditions for ' + current.display_location.city;
                weather.city = current.display_location.city;
                weather.temp = options.unit == 'f' ? current.temp_f : current.temp_c;
                weather.humidity = current.relative_humidity.replace("%", "");
                weather.pressure = current.pressure_mb;
                weather.currently = current.weather;
                weather.code = iconToCode(current.icon);

                weather.sunrise = data.sun_phase.sunrise.hour + ':' + padToTwo(data.sun_phase.sunrise.minute);
                weather.sunset = data.sun_phase.sunset.hour + ':' + padToTwo(data.sun_phase.sunset.minute);

           var result = data.forecast.simpleforecast.forecastday;
                weather.forecast = [];

                     for(var i=0;i<Math.min(result.length, 5);i++) {
                        var forecast = {};
                        forecast.day = result[i].date.weekday;
                        forecast.low = result[i].low[options.unit == 'c' ? "celsius" : "fahrenheit"];
                        forecast.high = result[i].high[options.unit == 'c' ? "celsius" : "fahrenheit"];
                        forecast.code = iconToCode(result[i].icon);
                        forecast.text = result[i].conditions;
                        weather.forecast.push(forecast);
                     }

                     weather.todayCode = weather.code;
                     weather.high = weather.forecast[0].high;
                     weather.low = weather.forecast[0].low;
                     weather.text = weather.forecast[0].text;

/*
            weather.rising = result.atmosphere.rising;
            weather.visibility = result.atmosphere.visibility;
            weather.sunrise = result.astronomy.sunrise;
            weather.sunset = result.astronomy.sunset;
            weather.description = result.item.description;
            weather.city = result.location.city;
            weather.country = result.location.country;
            weather.region = result.location.region;
            weather.updated = result.item.pubDate;
            weather.link = result.item.link;
            weather.units = {temp: result.units.temperature, distance: result.units.distance, pressure: result.units.pressure, speed: result.units.speed};
            weather.wind = {chill: result.wind.chill, direction: compass[Math.round(result.wind.direction / 22.5)], speed: result.wind.speed};

            if(result.item.condition.temp < 80 && result.atmosphere.humidity < 40) {
              weather.heatindex = -42.379+2.04901523*result.item.condition.temp+10.14333127*result.atmosphere.humidity-0.22475541*result.item.condition.temp*result.atmosphere.humidity-6.83783*(Math.pow(10, -3))*(Math.pow(result.item.condition.temp, 2))-5.481717*(Math.pow(10, -2))*(Math.pow(result.atmosphere.humidity, 2))+1.22874*(Math.pow(10, -3))*(Math.pow(result.item.condition.temp, 2))*result.atmosphere.humidity+8.5282*(Math.pow(10, -4))*result.item.condition.temp*(Math.pow(result.atmosphere.humidity, 2))-1.99*(Math.pow(10, -6))*(Math.pow(result.item.condition.temp, 2))*(Math.pow(result.atmosphere.humidity,2));
            } else {
              weather.heatindex = result.item.condition.temp;
            }

            if(result.item.condition.code == "3200") {
              weather.thumbnail = image404;
              weather.image = image404;
            } else {
              weather.thumbnail = "https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+result.item.condition.code+"ds.png";
              weather.image = "https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+result.item.condition.code+"d.png";
            }

            weather.alt = {temp: getAltTemp(options.unit, result.item.condition.temp), high: getAltTemp(options.unit, result.item.forecast[0].high), low: getAltTemp(options.unit, result.item.forecast[0].low)};
            if(options.unit === 'f') {
              weather.alt.unit = 'c';
            } else {
              weather.alt.unit = 'f';
            }
*/

                       options.success(weather);
            } else {
               options.error({message: "There was an error retrieving the latest weather information. Please try again.", error: data.query.results.rss.channel.item.title});
            }
        });
      }
      return this;
    }
  });
})(jQuery);

X-Ryl669 Thank you for posting this!  I went to WeatherUnderground and got an API key, but I'm getting this in the console:
XMLHttpRequest cannot load http://api.wunderground.com/api//geolookup/q/Solana Beach, CA, United States.json. The 'Access-Control-Allow-Origin' header has a value 'http://www.wunderground.com' that is not equal to the supplied origin. Origin 'http://mydomain.com' is therefore not allowed access.
Am I missing something obvious here?

It has stopped working on my sites so until it can be fixed, I am using WillyWeather.  http://www.willyweather.com/widget/createWidget.html
Lynne
From: Lars Helgeson<EMAIL_ADDRESS>Sent: Saturday, March 26, 2016 8:09 AM
To: monkeecreate/jquery.simpleWeather<EMAIL_ADDRESS>Subject: Re: [jquery.simpleWeather] Please Read - simpleWeather is currently not working. (#221)
X-Ryl669 Thank you for posting this! I went to WeatherUnderground and got an API key, but I'm getting this in the console:
XMLHttpRequest cannot load http://api.wunderground.com/api//geolookup/q/Solana Beach, CA, United States.json http://api.wunderground.com/api/geolookup/q/Solana Beach, CA, United States.json . The 'Access-Control-Allow-Origin' header has a value 'http://www.wunderground.com' that is not equal to the supplied origin. Origin 'http://mydomain.com' is therefore not allowed access.
Am I missing something obvious here?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub https://github.com/monkeecreate/jquery.simpleWeather/issues/221#issuecomment-201852840 https://github.com/notifications/beacon/AK1w8-wcuxoPBSfchqxaNB2jb3Ncuwwoks5pxUwDgaJpZM4H3hyT.gif

Ah - never mind - I forgot to camel case apiKey.  It works.

@larsinsd can you help me understand what is camel case? i am getting the same error you used to :(

It's apiKey not apikey or APIKey.
Kind regards, CR
Le 27 mars 2016 9:11 AM, takemuraori<EMAIL_ADDRESS>a écrit :
@larsinsd can you help me understand what is camel case? i am getting the same error you used to :(
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@X-Ryl669 but in your example it is already apiKey.... and it still gives this errot to me, it also gives me Uncaught TypeError: Cannot read property 'l' of undefined in line 54, and if i remove all instances of that it starts to give me Access-Control-Allow-Origin :(

It's probably because you aren't properly formatting the location.  Look at Weather Underground's API documentation.  In the US, it's State/City and internationally it's Country/City.

I feel stupid but after adding response.countryCode from my ip location API to the Location, the original plugin works perfectly for me... where I used to have say 'Singapore' it is now 'Singapore, SG' and it all works.

@X-Ryl669 Thanks for the code. I'm integrating it now and discovering some of the things missing from Weather Underground. This isn't an implication of your code or WU, just pointing out some bumps:

Units (Celsius /Fahrenheit) not given as a parameter
Temperature is a decimaled number, just have to parse it
Wind direction/speed not provided

Also, be aware that WU requires an attribution to be displayed regardless of use: https://www.wunderground.com/weather/api/d/terms.html
Not calling this out as a show-stopper, but be aware.
Thanks again for the code.

The WU API does return more information, but it does need to be mapped as @X-Ryl669 pointed out.
I'm also trying to debug why IE11 is not playing nice with this code as well.

WU provides both units in their answer, so selection is done client-side. I haven't extracted wind speed and direction but it's it's there too. You are right, you need to attribute them.
Kind regards, CR
Le 28 mars 2016 2:21 PM, Kevin Giszewski<EMAIL_ADDRESS>a écrit :
@X-Ryl669 Thanks for the code. I'm integrating it now and discovering some of the things missing from Weather Underground. This isn't an implication of your code or WU, just pointing out some bumps:
Units (Celsius /Fahrenheit) not given as a parameterTemperature is a decimaled number, just have to parse itWind direction/speed not provided
Also, be aware that WU requires an attribution to be displayed regardless of use: https://www.wunderground.com/weather/api/d/terms.html
Not calling this out as a show-stopper, but be aware.
Thanks again for the code.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

Is anyone else having CORS issues with IE 11 and the Weather Underground solution? I'm half tempted to just pull it with server side code. Just curious.

Not tested, but did you try with .jsonp + &callback=test at the url of the URL instead of .json to avoid CORS ?

The Javascript example from wunderground API docs works fine for me (with jsonp):
$.ajax({         url: 'http://api.wunderground.com/api/---yourapikey---/conditions/forecast/q/'+state+'/'+city+'.json',         dataType: "jsonp",         success: function (data) {}})

Any news?

My yahoo api is working now. But sometimes show this error:
THERE WAS A PROBLEM RETRIEVING THE LATEST WEATHER INFORMATION.
I use old simpleweather

Same on my sites... +1

@odunsair @soRailicious  it works absolutely fine change the way you format location, instead of just a city try city + country. that is all it took for me.

@takemuraori location: 'Bremen, DE', thats what i've wrote in my request

@soRailicious in my webapp your location gives me: "Bremen, DE
Forecast: sun chilly day".
In here http://codepen.io/fleeting/pen/xwpar it gives 45F for Bremen, DE. it all works.

In here http://codepen.io/fleeting/pen/xwpar it gives 45F for Bremen, DE. it all works.
Unfortunately it does not work:  "There was a problem retrieving the latest weather information."

@takemuraori and @infosion yes... but from time to time it is 50% chance to get the weather ... in maybe every 2nd-3rd click / reload it says "THERE WAS A PROBLEM RETRIEVING THE LATEST WEATHER INFORMATION."

@soRailicious - I have realized that and my clients, too ;-)

@soRailicious - that is strange coz it never gives me an error. could it be that you are using it for a mobile app or something? because my use is in a website and it works very well.

@infosion sorry for that :D

when will be released a version that works please? soon? i use the plugin on 10 website and i am not able to fix it...or provide more details/instructionts to get it works. i don't understand the fixes above. many thanks

@Mik75 I'm honestly not sure when a new version will be released. The fixes above are mostly temporary so until I can really get some time to look into other options that don't have API keys or just adding a PHP proxy, I'm not sure. I hope soon but it could be a few weeks.

i've seen another plugin on stackoverflow which was using:
https://github.com/isaacs/authentipede/tree/master/yahoo
from the project https://github.com/isaacs/authentipede
Maybe this is an option?

@uliworm That project hasn't been active for seven years and the main site isn't up anymore. However, that uses PHP to handle the consumer and secret key which using a PHP proxy is an option for those who are able to use PHP and want to go that route.

I see, and i would like to stick to this plugin.
Just tried it with an php-call including key and secret and it took longer than your plugin (and because i didnt ajaxed the page stopped loading until the api came back) and the main problem is, that i also got null-values as response very often!!
But why not offering your plugin with key and secet in the meantime as input-parameters? I just created a new app on their site and wouldn't mind putting the key in my js-source because you insert a callback-domain when creating and it says:

Please specify the domain to which your application will be returning after successfully authenticating. Yahoo OAuth flow will redirect users to a URL only on this domain (or its sub-domain) after they authorize access to their private data.

So do i understand this correct, that key, secret and domain must fit? If so, then noone else can use the api-key, right?
so i think i will just sit back and hope you find a solution.

Hi,
Oh, I love this plugin. I'm using it in a Wordpress site. Is there anyway I can use the following with SimpleWeather?
`<?php
include_once("yosdk/lib/Yahoo.inc");
define("API_KEY","your-api-key-here");
define("SHARED_SECRET","your-secret-here");
YahooLogger::setDebug(true);
$twoleg = new YahooApplication (API_KEY, SHARED_SECRET);
$query = 'select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="84054") and u="f"';
$results = $twoleg->query ($query);
print_r ($results);`
(from: http://stackoverflow.com/questions/36186538/making-yahoo-weather-api-request-with-oauth-1/36207117#36207117)
I am only a PHP and JS fiddler, so I have no idea how to marry the above code to SimpleWeather.js
I've literally just built the site, almost ready for launch when Yahoo made it's changes. I'm currently using 'location: 'Point Salines, GND','

I tried that myself, and despite creating a valid $twoleg object, I get no results with the query.

I'm currently migrating to a different weather API. While SimpleWeather has been great, these current changes by Yahoo render it basically useless; no offense. There should be a notice on the plugin homepage or something - just a suggestion. Thanks for the work on this either way.

this API seems promising.
https://developer.forecast.io/

Ah yes, I've looked at that before. But am not expert enough to 'plug' that
into SimpleWeather. I also think they have some type of login you have to
do.

Working with simpleweather as well, kept getting the error status.
What solved it for me: I used the woeid, AND made sure it was the first attribute on the js. So I just deleted everything that was above ( zipcode / location etc).
$.simpleWeather({ 		woeid: '733252', 		location: '', 		unit: 'c', 		success: function(weather) {
etc etc..
Hope this helps!!

Maybe it's time to close this issue, and report on the main page that simpleWeather is no more working with new Yahoo API change, else we'll get tons of report like the one above where in the exceptional rare time where Yahoo does not require OAuth, it seems to work.

I would also recommend to inform the user on the project home page due to the particular problems with yahoo.

Just want to say thanks to @X-Ryl669 for modifying the script to work with Wunderground. Works perfectly.

I am with X-
Close this issue so we can stop receiving the flood of emails.  I can’t seem to get removed from the thread.
From: X-Ryl669<EMAIL_ADDRESS>Sent: Wednesday, April 6, 2016 7:11 AM
To: monkeecreate/jquery.simpleWeather<EMAIL_ADDRESS>Cc: Lynne<EMAIL_ADDRESS>Subject: Re: [monkeecreate/jquery.simpleWeather] Please Read - simpleWeather is currently not working. (#221)
Maybe it's time to close this issue, and report on the main page that simpleWeather is no more working with new Yahoo API change, else we'll get tons of report like the one above where in the exceptional rare time where Yahoo does not require OAuth, it seems to work.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/monkeecreate/jquery.simpleWeather/issues/221#issuecomment-206390034 https://github.com/notifications/beacon/AK1w8-ZYGCfTAcsCeH4kaQtezGNXIzQvks5p077pgaJpZM4H3hyT.gif

@X-Ryl669 Thanks for posting the WU code. I'm trying to implement it but without much success. I'm not getting any errors but neither is any weather displaying.
I copied your code to a new document named jquery.weather.js and call that at the bottom of the WP page INSTEAD of jquery.simpleWeather.min.js and then in a separate js file I have:
`jQuery(document).ready(function() {
jQuery.simpleWeather({
apiKey: 'mywuapikeyishere',
location: 'Point Salines, Grenada',
woeid: '',
unit: 'c',
success: function(weather) {
html = ''+weather.temp+'°'+weather.units.temp+' '+weather.currently+'  ';
html += '  Wind Speed: '+weather.wind.speed+' '+weather.units.speed+' '+weather.wind.direction+'';
html += ' Humidity: '+weather.humidity+' %';
html += ' Pressure: '+weather.pressure+' mb';
html += ' Visibility: '+weather.visibility+' '+weather.units.distance+'';
html += ' '+weather.sunrise+'  '+weather.sunset+'';
html += 'Tomorrow: '+weather.forecast[1].text+'';
html += 'Weather from '+weather.city+'';
  jQuery("#weather").html(html);
},
 error: function(error) {
  jQuery("#weather").html('
'+error+'
');
}

});
});`
What am I doing wrong?
I'm trying to rebuild this which at the moment is SimpleWeather: www.gotoalmanac.com
Thanks very much for your help.
Tracy

The location format is different from Yahoo and Wunderground. If I remember correctly, it's "/state/city" (please refer to WUnderground documentation). Anyway, since you're doing fixed location, you can run the request once on WUnderground developer console to find out the /q/whatever code for this location and put that information in the woeid field of your options.
For example, if I want the weather from San Francisco, CA, I would have to put "CA/San_Francisco" in the location member for the option, which would lead to a first request emitted:
http://api.wunderground.com/api/yourKeyHere/conditions/q/CA/San_Francisco.json

Notice that if you have your javascript console opened, it'll print you something about the woeid to use (which would be something like /q/zmw:94101.1.99999)
Put that in the woeid and leave the location empty, it'll avoid a geolookup request each time you load the page.

FWIW, this plugin seems to be working reliably again as of yesterday, so maybe Yahoo changed something back. I'd like to get more feedback from others if this is true.

It seems to be working! Hopefully reliably ;-)

This hasn't been working for me since March. I am using ZipCodes to get weather data and I get the error message: "could not retrieve weather due to an invalid location" - is this the part of the same issue people have been running into, or is this something new?

Where Do I found woeid?

On yahoo weather website.
It's the number at the end of Web address.
When you look for weather of your city of course.

In case anyone needs it, I made an ugly hack to plug the forecast.io API into simpleWeather.
https://github.com/danielpradilla/jquery-simpleWeather-forecastio

The API is working for me, however I can't figure out how to use both F and Celsius. I want to be able to use a button to toggle between the two. Anyone know how to implement both Fahrenheit and Celsius in Simple Weather? The developer says you can do it, but I haven't yet been successful. This is the link to my repo:  Thanks!

please how select from choose city from dropdown??? this code is work
$(document).on('click', 'a.weather-link', function (e) {
var city = $(this).data('city');
loadWeather(city);
e.preventDefault();
});

Whats the status about this topic?

It's working again but sometimes on the first call, it will fail. After a refresh, it will loadthe data, so what do I have to change to retry the call at least one more time if it fails? Also, is the data being stored on local cache? If no, how could this be done with SimpleWeather?

With the state of Yahoo as a company, it's unlikely their weather API will ever become stable again. Most stable and feature rich weather APIs like https://openweathermap.org/api and https://darksky.net/dev/ require API keys and have pricing options which is outside the scope of this project for now. I'll update the readme and website to note how unstable the Yahoo API is. If I get some time moving forward I'll look at the other API options.

It is not working anymore

See #281.


[Blocker] User store does not behave as expected when it is created through admin service with only mandatory parameters

Type: Bug
Priority: Highest
Severity: Blocker
Release: wso2is-5.4.0-update1
User store does not behave as expected when it is created through addUserStore admin service with only mandatory parameters.
Steps

Create a JDBC secondary user store successfully via admin services

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
   <soap:Header/>
   <soap:Body>
      <xsd:addUserStore>
         <!--Optional:-->
         <xsd:userStoreDTO>
            <!--Optional:-->
            <xsd1:className>org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager</xsd1:className>
            <!--Optional:-->
            <xsd1:description>created with admin services</xsd1:description>
            <!--Optional:-->
            <xsd1:disabled>false</xsd1:disabled>
            <!--Optional:-->
            <xsd1:domainId>PRIMARY-JDBC780-ATTRIBUTE-STORE</xsd1:domainId>
            <!--Zero or more repetitions:-->
            <xsd1:properties>
               <xsd1:name>url</xsd1:name>
               <xsd1:value>jdbc:mysql://localhost:3306/is520user</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
               <xsd1:name>userName</xsd1:name>
               <xsd1:value>wso2carbonxxx</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
               <xsd1:name>password</xsd1:name>
               <xsd1:value>wso2carbonxxx</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
               <xsd1:name>driverName</xsd1:name>
               <xsd1:value>com.mysql.jdbc.Driver</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
               <xsd1:name>CountRetrieverClass</xsd1:name>
               <xsd1:value>org.wso2.carbon.identity.user.store.count.jdbc.JDBCUserStoreCountRetriever</xsd1:value>
            </xsd1:properties>
         </xsd:userStoreDTO>
      </xsd:addUserStore>
   </soap:Body>
</soap:Envelope>

Try to add a user to the created user store

Issue
Error message will say the password length does not match even though it is matched.

The issue is the request does not handle the other optional parameters such as username/password regex and other db queries internally when the request is sent. Without those optional parameters there is no use of the created user store. Note, that there are around 100 optional parameters if the user has to create a user store via admin services and it is not practical from users perspective. Therefore, this blocks the automation of user store creation for scenario 27 of [1].
[1] https://medium.facilelogin.com/thirty-solution-patterns-with-the-wso2-identity-server-16f9fd0c0389

Mail thread : [IAM] User store does not behave as expected when it is created through admin services with only mandatory parameters

Same applies to ReadWriteLDAP user store

@wso2/is-doc-team - A complete sample/request to create JDBC and other user stores needs to be included in the document ASAP for us to continue automation

Thank you for your contribution!
We are closing this issue since it has not been prioritized for a long time. Chances are that it has already been solved in more recent versions. If not, we will be re-evaluating this when it becomes a priority.


Error starting web application after deploying a build built by Visual Studio Team Services

Hi All,
Sorry in advance if I've posted this in the wrong place. If you think I have just let me know.
I've got an ASP.NET 5 (rc1-final) web application whose code I keep in Visual Studio Team Services (VSTS). I recently got VSTS builds working (I borrowed the build-related info from this article: https://msdn.microsoft.com/en-us/library/vs/alm/build/azure/deploy-aspnet5).
Once a VSTS build is complete you can download the build's artifacts by interacting with the VSTS UI. The result is that you get a file named drop.zip that contains wwwroot and approot which are populated just like if I did a build and publish locally from within Visual Studio.
The issue is that if I extract wwwroot and approot from drop.zip and put them on my QA web server, I get the following error:
Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web, ef.
System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadFile(String assemblyPath)
at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext)
at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName)
at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName)
at Microsoft.Dnx.Host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName)
at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory)
at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadAssemblyImpl(AssemblyName assemblyName)
at Microsoft.Dnx.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
So I followed the link in the error message and I get that I need to put <loadFromRemoteSources enabled="true" /> into some config file, but I'm not sure which one. Would it be in Kestrel's or my application's web.config or somewhere else?
Thanks!
-Brian Eriksen

Before you extract the zip check it's properties and see if it is marked as "blocked". If so, unblock it before extracting it. This is a Windows security feature on executable internet downloads.

Thanks, @Tratcher. In fact I was only testing things with a drop.zip that I manually downloaded from VSTS. I now have built a small client that pulls a specific build's drop.zip down via the VSTS REST Api, and when I write the zip file to disk myself the file isn't "blocked" to begin with. So when Chrome downloads the file for you then the the "blocked" status is set for the file.
Anyways, I did do some research and you can delete the "blocked" status programmatically. I used this info to incorporating unblocking (until I realized I didn't need it): http://stackoverflow.com/questions/6375599/is-this-pinvoke-code-correct-and-reliable
-Brian Eriksen


query of item now only returns default qualities=1 instead of all qualities

is the missing other qualities from 2-4 missing on purpose?  It used to return all qualities...

is the missing other qualities from 2-4 missing on purpose? It used to return all qualities...

you are wrong sir - &qualities=0 returns all qualities, 1 returns Normal only.
hope that helps :)

Actually, the old software did, in fact, used to return all when you sent in no qualities.

@bonished I see, I verified 0 works to return the old behavior
@phendryx thanks for verifying that I didn't make a mistake


set Display.errch and use it for errors from mouse/keyboard

i've only seen error EOF from devdraw mouse/keyboard, when i close
a window (at least on macos), or by calling Display.Close().  before
this change, the draw lib would call log.Fatal, ending the entire
program.  now, it will send the error on errch.  it is the caller's
responsibility to pass an errch to Init() that has buffering, if
it wants to be sure it sees the errors.
this doesn't remove the "TODO use errch" comment at Init(), because
not all errors are handled yet. there are still some log.Fatal's,
around allocimage/allocwindow.
i need this for applications that create multiple windows over their lifetime. before this change, closing any window log.Fatal's the entire program. i am launching multiple devdraw's. perhaps it's possible (or should) be to have devdraw manage multiple windows?

about errch being assigned: i think i added a channel so other parts of the code could simply send (non-blocking) on it, without requiring "if errch != nil" checks in many places. can still be the wrong approach.
fwiw, i didn't intent to push the other changes (plan9-support) in this PR... i had forgotten that fork had a PR attached and github would add the new commits to the PR.
if there's interest in getting some of these changes merged, i can make cleaner changes.


Add searching capabilities for PHP Resources section

Add simple and useful search form for php-resources content.

First incarnation of lunr.js integrated. Closing.


switch Dockerfile to llvm-11

I tried to use @Artanicus changes proposed in opened PR #609, but it was unsuccessful:
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-kdy8iwo_
       cwd: /tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/
  Complete output (15 lines):
  running bdist_wheel
  /usr/bin/python3 /tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/ffi/build.py
  LLVM version... 10.0.1

  Traceback (most recent call last):
    File "/tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/ffi/build.py", line 220, in <module>
      main()
    File "/tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/ffi/build.py", line 210, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-v7fd0qsh/llvmlite_2d5e74e65b57449b9ca2d13ab00f319e/ffi/build.py", line 172, in main_posix
      raise RuntimeError(msg)
  RuntimeError: Building llvmlite requires LLVM 11.x.x, got '10.0.1'. Be sure to set LLVM_CONFIG to the right executable path.
  Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.

  error: command '/usr/bin/python3' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite

TLDR:
RuntimeError: Building llvmlite requires LLVM 11.x.x, got '10.0.1'. Be sure to set LLVM_CONFIG to the right executable path.

That's why I updated llvm to version 11.

Btw, current Dockerfile crashes with:
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-unqu4w6u
       cwd: /tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/
  Complete output (11 lines):
  running bdist_wheel
  /usr/bin/python3 /tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/ffi/build.py", line 220, in <module>
      main()
    File "/tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/ffi/build.py", line 210, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-bcduayqd/llvmlite_7ddfea482a25471e8f6e44e0fb54a699/ffi/build.py", line 134, in main_posix
      raise RuntimeError(msg) from None
  RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
  error: command '/usr/bin/python3' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite

It would be nice if you could tag this PR as hacktoberfest-accepted if it would be accepted and merged. :)


Preserve order while deserializing

Assume the following xml:
<parent>
  <objA/>
  <objB/>
  <objA/>
</parent>

How can I deserialize this in a fashion that preserves the order 'objA' 'objB' 'objA'?
Deserializing into a Vec<ObjA> and a Vec<ObjB> would not preserve the information that the single ObjB was deserialized between the other two.
I guess in this case an enum like enum Obj { ObjA, ObjB}, and then a Vec<Obj> would make sense, but from what I saw in the tests this only works when the xml looks like <obj xsi:type="ObjA"> etc.
Is there a good way to do this (without deserializing the whole parent manually)?

Sequences in XML are hard :) That's why I went with only accepting the xsi:type method for now.
What do you think about the following structure, similar to how it's done for inner text by using $value?
enum Obj { ObjA, ObjB }
struct Parent {
    #[serde(rename="$sequence")]
    data: Vec<Obj>,
}

@oli-obk Looks good to me! As a full feature, I would expect this method to also extend to cases like the following:
enum Obj { ObjA, ObjB }
enum Foo { FooA, FooB }
struct Parent {
    #[serde(rename="$sequence")]
    data_obj: Vec<Obj>,
    #[serde(rename="$sequence")]
    data_foo: Vec<Foo>,
}

to deserialize xml like:
<parent>
  <objA/>
  <fooA/>
  <fooB/>
  <objB/>
  <objA/>
  <fooA/>
</parent>

With the obvious semantics. Maybe a new attribute like #[serde(sequence)] would be appropiate for this case. Using #[serde(rename="$sequence")] looks kind of like a hack, even though it's only different syntax for the same result.

That's not possible in serde without first parsing the entire subtree. I don't really want to support interleaved sequences.

In that case the solution you proposed sounds good to me. I also don't have a use case for the interleaved example I wrote, so it's not something I actually encountered the need for.


Show moves in the Compare Modal

this is present but missing the move description
Also missing the pokemon ability and level which may be useful information, rather than having to close the modal

All information adding - still missing held items


Type not found: 'V' on Mac and iOS Targets

export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=7B91b
export XCODE_VERSION_ACTUAL=0710
export XCODE_VERSION_MAJOR=0700
export XCODE_VERSION_MINOR=0710
export ZERO_LINK=NO
export arch=arm64
export diagnostic_message_length=80
export variant=normal
/Applications/Xcode.app/Contents/Developer/usr/bin/make

Haxe device build: Release-iphoneos-v7
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/Release-iphoneos-v7
/usr/lib/haxe/std/Map.hx:136: lines 136-138 : Type not found : V
make: *** [build-haxe-armv7] Error 1
** BUILD FAILED **
The following build commands failed:
ExternalBuildToolExecution Build\ Haxe
(1 failure)

What version of haxe do you have?
If not the latest (3.2.1) does upgrading help?
Does the error also occurs on other targets?

The problem has been solved by the most recent OpenFL update.


E-mails containing files in html mode

When I try to test the file in email is available. and I just put a file in the email. I got nothing.
So could you tell me if the forwarding service supports emails containing files please? Thank you！

Now the Telegram preview does not support file, but the forwarding function supports files. You can add an alternative email address to FORWARD_LIST and then download the corresponding file from this email.

OK, thanks for your answer!🙇

I added the attachment download feature in https://github.com/TBXark/testmail-viewer/commit/9e700ad673933421c4f5ad256911d7cae02f6d35. You can use it in combination with mail2telegram by simply adding testmail to the forwarding address.


Can you tag a release please?

If you tag a release, I can start in on a FreeBSD port.

https://github.com/jpmens/hared-hare/releases


ComputeLibrary courses

Hi!
Could you please tell me if you have courses on your Compute Library or ARMNN library for DL

Hi @allnes
Is there anything in particular you're looking for?
Please see below our ACL guides:

Tutorial: Running AlexNet on Raspberry Pi with Compute Library
Gian Marco's talk on Performance Analysis for Optimizing Embedded Deep Learning Inference Software
Gian Marco's talk on optimizing CNNs with Winograd algorithms at the EVS
Gian Marco's talk on using SGEMM and FFTs to Accelerate Deep Learning

Hope this helps.

Hi @allnes
Is there anything in particular you're looking for?
Please see below our ACL guides:

Tutorial: Running AlexNet on Raspberry Pi with Compute Library
Gian Marco's talk on Performance Analysis for Optimizing Embedded Deep Learning Inference Software
Gian Marco's talk on optimizing CNNs with Winograd algorithms at the EVS
Gian Marco's talk on using SGEMM and FFTs to Accelerate Deep Learning

Hope this helps.

ARM has courses https://www.arm.com/resources/education/online-courses/compendium
I thought that I find information about ACL or ARMNN in ARM compendium

Thanks @allnes
I'm going to communicate this request internally and see if we can put some ACL/ARMNN content there.


To use ACTIONS_RUNTIME_TOKEN for writing into Package Registry

Feature Description
Because ACTIONS_RUNTIME_TOKEN could be used to pull the code from Repository, it looks obvious to use this token later to write build result into Package Registry.
Screenshots
No response

Pulling the code from the Repository is a read permission of Code, it's not a write permission. I don't think the logic is reasonable.

I think that end user should be able to make this decision. Because hardcoding or mocking some dummy user looks even less reasonable.

This is screenshot from GitHub page and looks like they agreed with that.

GitLab as well propose as option to use ${CI_JOB_TOKEN} to access to Maven Package Registry.

@ChristopherHX As I see it, ACTIONS_RUNTIME_TOKEN regenerates each time on job starts execution. It looks much more secure instead of any hard coded value. No sense to store and remember this at all.
BTW: Values of ACTIONS_RUNTIME_TOKEN and GITHUB_TOKEN are equals now (checked it on Gitea v1.21.7)

Looks like this issue 23642 is about the same problem.

I agree, this would be really nice and remove the need for PATs. The way Gitlab does it is quite neat IMHO :)

It seems that for each project (many many projects), we now need to create ubique dummy user and two tokens for it:

will be hardcoded in CI and used in the build process to upload packages.
will be hardcoded on the test and production servers to download packages.

This results in the creation of a large number of extra users, which will interfere with regular users using the interfaces, as they cannot be hidden.
Consequently, the system will have hundreds of dummy users. Creating just a few and grant access to multiple repositories is not correct from a security standpoint. Additionally, we need to remember their passwords to log in and generate tokens.
Perhaps a good solution would be an ability to create tokens for projects rather than users. This way, there would be no extra users in the system.


no such file or directory: /bin/grep

On Mac Os X when running :grep
no such file or directory: /bin/grep
grep on my Mac Os X system is in /usr/bin/grep

I can recommend using Ack / Ag, much faster.
Please read the documentation on  :grep to see how to config the binary location.