IE 10 error on console.debug.apply

Just thought I'd test my NG2 app works in IE10 and I hit this stack trace:
Error: Uncaught (in promise): EXCEPTION: Error in ./AppComponent class AppComponent_Host - inline template:0:0
ORIGINAL EXCEPTION: TypeError: Unable to get property 'apply' of undefined or null reference
ORIGINAL STACKTRACE:
TypeError: Unable to get property 'apply' of undefined or null reference
   at debug (http://localhost/static/ng2/js/main.bundle.js:23918:35)
   at StorageService (http://localhost/static/ng2/js/main.bundle.js:23736:10)
...... lots of stack trace....
(http://95818bd8.ngrok.io/static/ng2/js/vq.polyfills.bundle.js:15998:27)
   at invoke (http://localhost/static/ng2/js/polyfills.bundle.js:15950:23)

It points to:
	    Logger.prototype.debug = function (message) {
	        var optionalParams = [];
	        for (var _i = 1; _i < arguments.length; _i++) {
	            optionalParams[_i - 1] = arguments[_i];
	        }
	        this.isDebugEnabled() && console.debug.apply(console, arguments);
	    };

Which I guess is this in the source:
https://github.com/code-chunks/angular2-logger/blob/master/app/core/logger.ts#L75
Does this library need to do some kind of guards for older IE 10 browsers?

Ended up adding a quick hack to my code to use native, if not use log, if not nothing.
// Shim support for console for older browser trying to fall back to log then to nothing
window.console.log = window.console.log || function() { };
window.console.log.apply = window.console.log.apply || function() { };
window.console.debug = window.console.debug || window.console.log || function() { };
window.console.debug.apply = window.console.debug.apply || window.console.log.apply || function() { };
window.console.info = window.console.info || window.console.log || function() { };
window.console.info.apply = window.console.info.apply || window.console.log.apply || function() { };
window.console.warn = window.console.warn || window.console.log || function() { };
window.console.warn.apply = window.console.warn.apply || window.console.log.apply || function() { };
window.console.error = window.console.error || window.console.log || function() { };
window.console.error.apply = window.console.error.apply || window.console.log.apply || function() { };

Hi @philjones88 ,
I don't have a PC with IE 10 atm, but I tried console.debug using IE 11 in IE 10 mode and it was working fine. Are you sure you were using IE 10? were you running it in an older version mode?
I haven't been able to reproduce it but I'll try to find a way to test it in a real IE 10 browser. Any clues or extra info would be appreciated.

Hi,
The issue only shows in IE10 not IE11 set to IE10 compat mode. Technically IE10 is now end of life but we have a customer with a few users which is frustrating, IE6 all over again!
Microsoft give away free VMs for testing IE versions:
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
Sent from my iPhone
On 22 Aug 2016, at 19:00, Armando Garcia Moran <notifications<EMAIL_ADDRESS>wrote:
Hi @philjones88https://github.com/philjones88 ,
I don't have a PC with IE 10 atm, but I tried console.debug using IE 11 in IE 10 mode and it was working fine. Are you sure you were using IE 10? were you running it in an older version mode?
I haven't been able to reproduce it but I'll try to find a way to test it in a real IE 10 browser. Any clues or extra info would be appreciated.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/code-chunks/angular2-logger/issues/62#issuecomment-241496637, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AApVL_P0sSrbPbYqkpnKmX1nYtLKHXj_ks5qieOhgaJpZM4Jp0sO.

IE6 all over again!

I feel you !
Thanks for the link, I'm actually downloading one of those right now to see if I can reproduce it there.

Thinking back to NG1. The $log code might be a good use for inspiration. Don't have any issues with the NG1 parts of our app and IE10.
Sent from my iPhone
On 22 Aug 2016, at 19:24, Armando Garcia Moran <notifications<EMAIL_ADDRESS>wrote:
IE6 all over again!
I feel you !
Thanks for the link, I'm actually downloading one of those right now to see if I can reproduce it there.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/code-chunks/angular2-logger/issues/62#issuecomment-241503724, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AApVL9xjtthpxBh_U486W-c_EaN-n-wlks5qiekYgaJpZM4Jp0sO.

I was able to reproduce it using a VM.
I don't feel comfortable adding a shim as part of the library code, this should be a user's decision. But I think I can do the following:

[ ] Create a little shim in a different project for this purpose or better yet try to find an existing one.
[ ] Update the documentation using this shim as an optional dependency of the project specifying to be used for older browsers if they are your targets.
[ ] Init the logger module with a warning message whenever you are using IE 10 without this dependency fulfilled giving the suggestion to the developer to add it. ( This warning should only appear when angular is running in development mode ).

A different approach might be to use a global setting that the user can turn on specifying to use console.log as the default console.debug function whenever the latter is missing. I'll sleep on it.
Let me know your thoughts @philjones88 .

There are a few shim's available I could find:
https://github.com/paulmillr/console-polyfill
and
https://github.com/kayahr/console-shim
But I couldn't get either of these to work with my scenario of Angular2 + Webpack etc. I didn't try super hard but it wasn't simple for some reason.
I do think for someone coming from AngularJS 1.x it seems strange that a logging library wouldn't handle the browser differences magically.
If you think back to $log in AngualrJS 1.x it seems to handle the console not being there and not require any action or additional setup from the user
https://github.com/angular/angular.js/blob/master/src/ng/log.js#L139
I'd therefore vote in favour of borrowing how $log worked with console?

Searching around a few of the seed project (e.g. angularclass's seeds) have reference (but not always enabled) ie-shim
https://github.com/AngularClass/angular2-webpack-starter/blob/master/src/polyfills.browser.ts#L3
https://github.com/AngularClass/angular2-seed/blob/master/src/dll.ts#L4
And the shim:
https://github.com/gdi2290/ie-shim/blob/master/index.js
This seems to shim console, maybe the solution is to test if the shim is compatible with say RC4/RC5 and then simply update the README to say use this shim if you want to support IE <= 10?

Angular 1 and Angular 2 are two completely different approaches.
I am not going to modify the default console implementation. What If the user has implemented its own debug method into it?
The second approach I mentioned requires no extra setup from the user.
Thanks for the links, I'll take a look at them.


Clear CachedPSO data for CreatePipelineState replay

When the replay --use-cached-psos option is not specified, clear the cached PSO data from the ID3D12Device2::CreatePipelineState parameters, similar to what is currently done for the ID3D12Device CreateComputePipelineState and CreateGraphicsPipelineState methods.

CI gfxreconstruct build queued with queue ID 290723.

CI gfxreconstruct build # 5233 running.

CI gfxreconstruct build # 5233 passed.


Update ocp for recent knative eventings

As per title
With 1.11 we do support 4.11+
Hence updating:

1.11
release-next (and aligning to what serving does here)

/unhold


ffuf QUESTION

Whenever I put wrong url or domain in ffuf It continue to execute while go buster says cant reach host how do i do that in ffuf

-se                 Stop on spurious errors (default: false) might solve your issue

% seq 1 999 | ffuf -s -w - -u https://somethingerror5813.tld/FUZZ -se
Receiving spurious errors, exiting.

Thank you @ola456
@Brutelover please feel free to re-open if your question was not answered.


Notifications - Goody Hut reward (#177)

This PR lays some ground work for future more custom notifications.
How it works
There is already a notification in the game related to Goody Huts but for unkown reasons it is disabled. It is used to handle Goody Huts in this PR. SendNotification() is a function used to do so. It needs a message and summary. Getting a summary is a bit complicated because normally it is done in the DLL (floating text that you see when triggering a goody hut). Some digging around modifiers is necessary.
Settings
I created additional section for future development. There are some lines commented out ready to be used for e.g. "trade deal expired", "population growth" and "border growth".
Examples in #177

Questions.

Meteor Sites are implemented as Goodu Huts in the game. I am not sure if they should be handled here as well. It is easy to filter them out.
The red text comes from original floating texts. It looks ok on the map, but so nice as a tooltip. I am thinking about removing the color tags and make all text standard white.

Yeah, the red text is not great.  Otherwise I like - more than once I've found a goody hut and wondered what it was.

Ok, colors removed.

Didn’t know about the x and y params. I was actually wandering what they were used for. Good change.


Increase flexibility of constructors, e.g., for pure functional transformations

Description
In the context of pure functional transformations, it would be beneficial to construct OpenXmlElement instances very flexibly. For example, one might want to construct a new element in the following way:
return new Paragraph(
    new ParagraphProperties(new ParagraphStyleId { Val = "MyStyleId" }),
    FunctionReturningIEnumerableOfRun(someParams));

Information

.NET Target: All
DocumentFormat.OpenXml Version: Latest

See discussion in #627.
Observed
Using the Paragraph class as an example, the subclasses of OpenXmlElement define the following constructors:
public Paragraph()
{
}

public Paragraph(IEnumerable<OpenXmlElement> childElements)
    : base(childElements)
{
}

public Paragraph(params OpenXmlElement[] childElements)
    : base(childElements)
{
}

public Paragraph(string outerXml)
    : base(outerXml)
{
}

With those constructors, the example instance can't be created, because we can't combine an OpenXmlElement  and an IEnumerable<OpenXmlElement>.
Expected
We should be able to create instances in the way shown in the description.
Design Idea
We could borrow the design from the System.Xml.Linq.XElement class, which, owing to how you can construct instances, is instrumental in pure functional transformations.
The two key XElement constructors for pure functional transformations are:
public XElement(XName name, object content)
    : this(name)
{
    this.AddContentSkipNotify(content);
}

public XElement(XName name, params object[] content)
    : this(name, (object) content)
{
}

Note how the second constructor delegates to the first one. Thus, the magic happens in the AddContentSkipNotify(object) method, which works with pretty much any meaningful actual parameter you throw at it.
Thus, using the Paragraph example, we could replace:

Paragraph(IEnumerable<OpenXmlElement>) with Paragraph(object) and
Paragraph(params OpenXmlElement[]) with Paragraph(params object[]).

@twsouthwick, this is based on the discussion we've had in #627. Tell me whether such a change is an option at all.
At the moment, I am dealing with the shortcomings of the constructors by using extension methods. However, more direct support for pure functional transformations would be a pretty appropriate feature of the Open XML SDK from my perspective.

This is interesting. I'll create a branch with the generated constructors if you want to prototype what the proposed constructors would look like.

@twsouthwick, yes, please do that.

Here's a branch: https://github.com/twsouthwick/Open-XML-SDK/tree/pure-functional-transformations.
I'm somewhat wary of adding a ton of new constructors, but let's see how this goes. Here's another option to explore:
return new Paragraph().With(
    new ParagraphProperties(new ParagraphStyleId { Val = "MyStyleId" }),
    FunctionReturningIEnumerableOfRun(someParams));

Where you can define the following:
public static class OpenXmlElementFunctionalExtensions
{
  public static T With<T>(object content) where T : OpenXmlElement
  {
    ...
  }

  public static T With<T>(params object[] content) where T : OpenXmlElement
    => With<T>((object)content);
}

This simplifies the number of constructors required. Something to explore - not sure how that affects your style of programming, but reduces the public APIs the SDK has to manage.

@twsouthwick, let me explore the extension method route. My initial thought is that this would enable the same approach while only requiring a little more code.


Codecov.yml config

Added the same config of swarmkit to start with
Signed-off-by: Flavio Crisciani<EMAIL_ADDRESS>

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@8d55670). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1937   +/-   ##
=========================================
  Coverage          ?   38.54%
=========================================
  Files             ?      137
  Lines             ?    27158
  Branches          ?        0
=========================================
  Hits              ?    10467
  Misses            ?    15393
  Partials          ?     1298

does not seem to be really needed, closing this for the moment


Ability to use apiary.manifest in preview

According to http://stackoverflow.com/questions/22643429/apiary-multiple-blueprint-file-into-one-api, it should be possible to split up an apiary API documentation over multiple files with the use of an apary.manifest file.
It would be ideal if the preview tool of the CLI supports this.

could lead to the confusing behaviour as apiary is not able to process manifest in both ways
closing for now

For users interested in this feature, I'd recommend checking out Working with multiple blueprint files and using Hercule within your workflow.
You can track adding proper support for multiple blueprints at API Blueprint:

https://github.com/apiaryio/api-blueprint/issues/8
https://github.com/apiaryio/api-blueprint/issues/20


Add support for skipping headings

Closes remarkjs/remark-toc#22.

The original request is kind of unusual. But this solves it in an unobtrusive manner

Agreed! And 👍
There are other cases where ignoring headings makes sense (such as license, and other trailers, for awesome-lint).


Can't set custom active class

v-scroll-spy-active="{selector: 'li.menu-item', class: 'custom-active'}" Doesn't appear to work. Can't set a custom class, even looking at the source it looks like it's setting active without even checking for config option.
Is this worked as expected? ✌

fixed.


Added envvars table needs an update due to newly added envvars

Refernces:
#9267 (feat: add exif panel options to web config struct)
#10572 (limit the number of workers of the jsoncs3 share manager)
Both contain a new envvar that is currently not part of the added table but must be present for 7.0.0
#9267 will most likely be merged
#10572 was merged
IMPORTANT:
#10572 in my understanding, it misses the global envvar OCIS_MAX_CONCURRENCY and the text should be harmonized as we have in all max_concurrency envvars to: Maximum number of concurrent go-routines. Higher values can potentially get work done faster but will also cause more load on the system. Values of 0 or below will be ignored and the default value will be used.
When all set, I create a PR with the env_vars.yaml update and when merged another one containing the added table update.
@butonic @micbar

Note, #9267 has not been merged, it got closed.


ci: use pycdc to generate types

This seemed potentially fruitful but there are too many unsupported instructions with pycdc to make for useful output.

Closed in favor of https://github.com/kmontag/modeStep/pull/7


Linux agent: run as service but not as root

On my private Linux agent I want to run the agent as service (so it starts automatically) but not as root (to secure the pipelines).
The config help states this as 'Windows only' options:

Startup options (Windows only):

--runAsService
Configure the agent to run as a Windows service. Requires administrator permission.

--runAsAutoLogon
Configure auto logon and run the agent on startup. Requires administrator permission.

--windowsLogonAccount
Used with --runAsService or --runAsAutoLogon. Specify the Windows user name in the format: domain\userName or<EMAIL_ADDRESS>

--windowsLogonPassword
Used with --runAsService or --runAsAutoLogon. Windows logon password.

--overwriteAutoLogon
Used with --runAsAutoLogon. Overwrite any existing auto logon on the machine.

--noRestart
Used with --runAsAutoLogon. Do not restart after configuration completes.

But the template suggests a user can be specified: https://github.com/Microsoft/vsts-agent/blob/master/src/Misc/layoutbin/systemd.svc.sh.template#L54-L55
I will try to dig into the scripts & templates but it seems like this is an un(der)documented feature.

When you tried it what uid was the systemd svc run as?  It shouldn't have been root which fits your requirements.

The command line help you're looking at is for windows config.  Per the docs your supposed to run svc.sh
https://docs.microsoft.com/en-us/vsts/pipelines/agents/v2-linux?view=vsts#run-as-a-systemd-service
If you run usage on that, you will see it does allow you to specify user:
https://github.com/Microsoft/vsts-agent/blame/master/src/Misc/layoutbin/systemd.svc.sh.template#L125

Thanks! On to the Windows install you specify it on the configure command whereas on Linux when running the svc.sh. That's where the confusion (or the oversight) came from. Probably worth mentioning on the docs that you cited.


Decreasing expandLevel does not update the component.

Hi,
I have an input to perform changes in the expandLevel, when increasing the number of expandLevel all goes ok and the changes are reflected in the react-inspector component but when I decrease the expandLevel it doesn't work, the component doesn't decrease its expand level. I'm almost new to react but as far as I know and logically, if I increase the expandLevel and it works, when decreasing it it should work too, right?

Hi,
Sorry for taking long to get back. Should be fixed in the next minor v

Thank you.

In the meantime https://github.com/xyc/react-object-inspector should be free of this.

I'm guessing this is completed?

This is still broken but I worked around it by temporarily dismounting the component and then remounting it with the lower expandLevel.   So something like this:
  render() {
    const {expandLevel = 4} = this.state;
    return (
          ...
          {expandLevel && <Inspector data={diagnostics} expandLevel={expandLevel} />}
          ...
    );

So my onExpand handler looks like this:
  onExpand = expandLevel => {
    if (expandLevel < this.state.expandLevel) {
      this.setState({expandLevel: 0}, () => this.setState({expandLevel}));
    } else {
      this.setState({expandLevel});
    }
  }

Cheers,
Alvaro


we now pass selected text as URL 'quote' parameter for Facebook

This helps to fill in the Facebook share text field by passing it via URL 'quote' parameter

Thanks for your second contribution !! You addition is available in the v1.1.3 :)


[Docs] - Update remote image example

I've seen quite a few newbs trip on this, so I'm fixing it.
First - you have to set the width/height on a remote image, otherwise nothing shows.  This is even on stack overflow.
Second - with the addition of ATS in iOS most people who copy/paste this example will not be able to load an insecure image, so I changed it to the https.
RESULT this doc becomes copy/paste friendly again for beginners.

By analyzing the blame information on this pull request, we identified @JoelMarcey and @charpeni to be potential reviewers.

@facebook-github-bot shipit

Thanks for importing.If you are an FB employee go to Phabricator to review internal test results.


Geofabrik regional links not available for some areas

Description
We get our OpenStreetMap geography data from here. Unfortunately, this source does not appear to cover all of England because the links available do not cover all regions. For example, Bristol and areas around Bedford, Lincolnshire and the Northeast seem to be missing data. See gaps below as an example.

This information does appear to exist here but it is contained in a 1.1 GB file which may cause issues. Note: there is also an "England osm.pbf" which is slightly smaller.

Update: Contacted Geofabrik enquiring about access to missing sub-regional dowloads.

@sassalley any update on this? Have we include all so far?


Load LLM GTPQ safetensor file from folder

I see that you can load individual GGUF files from \models\LLavacheckpoints, however how do you add GPTQ models like https://huggingface.co/TheBloke/U-Amethyst-20B-GPTQ.
GTPQ is much much faster than GGUF. I'm currently loading them with https://github.com/Zuellni/ComfyUI-ExLlama-Nodes but would love to switch to VLM Nodes, since there are alot more features with this node pack.
VLM Nodes supports Auto GPTQ when loading https://huggingface.co/internlm/internlm-xcomposer2-vl-7b-4bit, so I assume that it could load other GPTQ models as well. I just have no idea what the directory structure should look like and/or if I have to rename the safetensors to be a specific filename.
Any help would be awesome!

i think this is an llm, not vlm, i need to make a node for this. i may or may not add this functionality. im not sure.

@gokayfem but you have an LLMLoader already loading GGUFs which works great btw, it just doesn't load GPTQs :P

Just be aware that this will probably require a specially compiled version of llama-cpp-python in order to utilize the GPU. It's doable, but a massive headache, at least on windows.


GDPR

There needs to be a privacy policy for the user.

A privacy policy that meets GDPR standards was added that the user can read.


Adding Elestio as deployment option

Describe your use-case which is not covered by existing documentation.
Hey team,
I am Kaiwalya, Developer Advocate at Elestio. Elestio has been providing options of fully deploying and managing Jenkins application as shown here. I think it would be a great idea if we can add it to official readme/documentation here.
🔔 In addition to this, if you are interested we provide partnership opportunities with tools we support by revenue share upon addition of this method in docs. If you would like to collaborate, just shoot me an email at<EMAIL_ADDRESS>:)
Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

https://elest.io/open-source/jenkins

Are you interested in contributing to the documentation?

Won't be done in this repository.  The downloads page on www.jenkins.io is the correct location for the proposed change.


Failure to rename the "Java Spring Example" project file

This issue is unique.

[X] I have used the search tool and did not find an issue describing my bug.

Operating System of DocumentServer
Linux (RPM package)
Version information
8.1
Expected Behavior
The file is renamed normally or an exception occurs
Actual Behavior
In the official "Java Spring Example" project, the "/rename" interface is called when the file is renamed. Unfortunately, the interface returns "result ok" and the file is not renamed. My documentserver is onlyoffice-documentserver:8.1
Reproduction Steps
Connect to the document server, start the "Java Spring Example" project, create a new file, open it and rename it. At this time, it is found that the interface returns success, and the file name does not change
Additional information
No response

Hi,
In this case, the goal of the integration example is not to rename the physical file in storage but to demonstrate how the editor and the system it's integrated with communicate. Renaming the document in the editor calls a command to rename it for all the users who are co-editing it, but the name of the actual file is left unchanged.
Here's the part of the code where this is implemented: https://github.com/ONLYOFFICE/document-server-integration/blob/develop/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/controllers/FileController.java#L480-L499


is it project is abandoned?

Is it project is abandoned?

Hi
I have no time at this time, but if I receive a pull request I can try check.
best regard


edgectl adds some installation info as labels in the Deployment

Description
Add some installation info as labels in the Deployment. For example:
apiVersion: apps/v1
kind: Deployment
  ...
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ambassador
        app.kubernetes.io/managed-by: edgectl
        app.kubernetes.io/name: ambassador
        app.kubernetes.io/part-of: ambassador
        getambassador.io/install-cluster-type: K3D
        getambassador.io/install-date: 2020-04-10.23-09-21
        getambassador.io/installer-arch: amd64
        getambassador.io/installer-os: linux
        getambassador.io/installer-version: 1.4.0a-11-g4e4877715-dirty
        product: aes

Closing in favor of some other metrics.


Add libogc support

For Wii and GameCube development using devkitPPC

Would you mind squashing the two commits together?

Done that.


feat: custom trigger events that update the code window

Fixes #51.

1c1c46c fixed a small issue that occurred when adding config.events that did not occur before WinScrolled. E.g: I have config.events = { "BufWritePost" }, however if I paste something at the bottom of a file and then try G or :# to go to any of the lines of the thing(s) I pasted without having saved, Codewindow threw an error because those lines did not exist in minimap, and so it failed to update the highlights. This commit implements a simple pcall.

Thank you for putting this in, really appreciate it


Not able to get username / password from source

I am getting "iLogin Error:Unable to connect to database. Please check your iLogin MySQL server, username and password configuration options." from the provided link for credentials: http://www.fki.inf.unibe.ch/DBs/iamDB/iLogin/index.php
Any other place I could get it?

Hi,
I am getting the similar error "iLogin Error:Unable to connect to database. Please check your iLogin MySQL server, username and password configuration options.". I need the dataset asap, any solutions for that??

Unfortunately it's an error on the dataset provider website side. Until they fix they registration page the dataset will not be available for download under their licensing terms.

Hi, I downloaded the dataset recently it is available on my drive.
here is a sharable link for that

Hi, I downloaded the dataset recently it is available on my drive. here is a sharable link for that

can you share the drive url again???


Update examples with new codegen

The examples which changed in 9.0-3 have been updated with newly generated artifacts.
However, there are examples with no feature-level updates.  These too should have new code generation, even though functionality will not be changed.

I've created one commit that fixes issues with example-person related to namespaces and TDE.  Also moved things around a little bit to align with ml-gradle.

updating races example is somewhat laborious, but I've made some progress this afternoon.

Updated PR #347 yesterday with issues encountered in person and races example. Some more fix required to this issue. Sending back.

Probably this is OK to ship now.

Yes it is. Shipping it now.


Update nix-action to latest version of the new template.

Thanks to your use of the new Nix setup in this project, I have realized that already being packaged in nixpkgs isn't actually a requirement for using this setup, as long as the project builds with the standard mechanism (coq_makefile with a _CoqProject) and has no extra dependencies. That being said, this means that only the Coq part of the project is built, not the OCaml part.

Ah, this explains a few things (and answers my question in the manifesto repo).
For this project, it's perfectly fine to only build the Coq part, since it proved to be such a pain to build the OCaml part with coq_makefile that I switched to only Dune.


feat: Built-in Jetstream source implementation (Closes #1695)

Closes #1695

run make codegen?

ignore kafka-e2e and idle-source-e2e, its failing because of https://github.com/numaproj/numaflow/issues/1724

On my laptop, make codegen fails. Execution with trace enabled:
➜  make codegen
./hack/generate-proto.sh
+ set -o errexit
+ set -o nounset
+ set -o pipefail
++ dirname ./hack/generate-proto.sh
+ source ./hack/library.sh
+++ git rev-parse --show-toplevel
++ readonly REPO_ROOT=/Users/spr01/Documents/GIT/numaflow
++ REPO_ROOT=/Users/spr01/Documents/GIT/numaflow
+ header 'generating proto files'
++ echo generating proto files
++ tr a-z A-Z
+ local 'upper=GENERATING PROTO FILES'
+ make_banner + 'GENERATING PROTO FILES'
+ local 'msg=++++ GENERATING PROTO FILES ++++'
+ local border=++++++++++++++++++++++++++++++++
+ echo -e '++++++++++++++++++++++++++++++++\n++++ GENERATING PROTO FILES ++++\n++++++++++++++++++++++++++++++++'
++++++++++++++++++++++++++++++++
++++ GENERATING PROTO FILES ++++
++++++++++++++++++++++++++++++++
+ ensure_protobuf
++ command -v protoc
+ '[' /opt/homebrew/bin/protoc = '' ']'
+ ensure_vendor
+ go mod vendor
++ command -v protoc-gen-gogo
+ '[' /Users/spr01/go/bin/protoc-gen-gogo = '' ']'
++ command -v protoc-gen-gogofast
+ '[' /Users/spr01/go/bin/protoc-gen-gogofast = '' ']'
++ command -v gogoproto
+ '[' '' = '' ']'
+ go install -mod=vendor ./vendor/github.com/gogo/protobuf/gogoproto
++ command -v protoc-gen-grpc-gateway
+ '[' /Users/spr01/go/bin/protoc-gen-grpc-gateway = '' ']'
++ command -v goimports
+ '[' '' = '' ']'
+ export GO111MODULE=off
+ GO111MODULE=off
+ go get golang.org/x/tools/cmd/goimports
go: modules disabled by GO111MODULE=off; see 'go help modules'
make: *** [codegen] Error 1

Moved golang.org/x/tools/cmd/goimports to tools.go to fix this.

Moved golang.org/x/tools/cmd/goimports to tools.go to fix this.

Read this thread https://intuit-teams.slack.com/archives/C02P1NKMBHQ/p1712074641682409?thread_ts=1712010787.475059&cid=C02P1NKMBHQ

@BulkBeing - please also enable jetstream-e2e at https://github.com/numaproj/numaflow/blob/main/.github/workflows/ci.yaml#L142.

@BulkBeing - please also enable jetstream-e2e at https://github.com/numaproj/numaflow/blob/main/.github/workflows/ci.yaml#L142.

Added


charge(someObj, "obj", EventEmitters, Stream)

Ability to test true for all checker.  Determined by an options obj or something.


Still no result..

It's quite strange...it works from my phone network (as a hotspot), but it doesn't work anymore with my home internet connection....why?
It always works fine, but from today I get this one if I try tu use my internet connection, which had always worked fine:
INFO: Querying trump since:2010-01-28 until:2010-01-29
INFO: Querying trump since:2010-01-29 until:2010-01-31
INFO: Querying trump since:2010-02-01 until:2010-02-03
INFO: Querying trump since:2010-02-03 until:2010-02-04
INFO: Querying trump since:2010-02-04 until:2010-02-06
INFO: Querying trump since:2010-01-31 until:2010-02-01
INFO: Querying trump since:2010-02-06 until:2010-02-07
INFO: Querying trump since:2010-02-07 until:2010-02-09
INFO: Querying trump since:2010-02-09 until:2010-02-10
INFO: Querying trump since:2010-02-10 until:2010-02-12
INFO: Querying trump since:2010-02-12 until:2010-02-14
INFO: Querying trump since:2010-02-14 until:2010-02-15
INFO: Querying trump since:2010-02-15 until:2010-02-17
INFO: Querying trump since:2010-02-17 until:2010-02-18
INFO: Querying trump since:2010-02-18 until:2010-02-20
INFO: Querying trump since:2010-02-21 until:2010-02-23
INFO: Querying trump since:2010-02-23 until:2010-02-24
INFO: Querying trump since:2010-02-20 until:2010-02-21
INFO: Querying trump since:2010-02-24 until:2010-02-26
INFO: Querying trump since:2010-02-26 until:2010-02-28
INFO: Got 0 tweets for trump%20since%3A2010-01-28%20until%3A2010-01-29.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-10%20until%3A2010-02-12.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-12%20until%3A2010-02-14.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-01-29%20until%3A2010-01-31.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-14%20until%3A2010-02-15.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-09%20until%3A2010-02-10.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-07%20until%3A2010-02-09.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-06%20until%3A2010-02-07.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-21%20until%3A2010-02-23.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-01-31%20until%3A2010-02-01.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-01%20until%3A2010-02-03.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-18%20until%3A2010-02-20.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-03%20until%3A2010-02-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-04%20until%3A2010-02-06.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-20%20until%3A2010-02-21.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-17%20until%3A2010-02-18.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-23%20until%3A2010-02-24.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-26%20until%3A2010-02-28.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-24%20until%3A2010-02-26.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2010-02-15%20until%3A2010-02-17.
INFO: Got 0 tweets (0 new).
Anyone else?

Same for me, works from the phone hotspot, but not from other networks. It was fine until very recently. Any ideas why?

I've got the same problem. Is twitter blocking IPs or something?
INFO: Got 20 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-01-31%20until%3A2017-02-07.
INFO: Got 40 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-02-22%20until%3A2017-03-02.
INFO: Got 60 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-01-08%20until%3A2017-01-16.
INFO: Got 80 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-01-01%20until%3A2017-01-08.
INFO: Got 100 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-01-23%20until%3A2017-01-31.
INFO: Got 120 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-01-16%20until%3A2017-01-23.
INFO: Got 140 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-04-01%20until%3A2017-04-09.
INFO: Got 160 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-04-16%20until%3A2017-04-24.
INFO: Got 180 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-04-24%20until%3A2017-05-01.
INFO: Got 20 tweets for Trump%20since%3A2017-03-25%20until%3A2017-04-01.
INFO: Got 200 tweets (20 new).
INFO: Got 220 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-05-01%20until%3A2017-05-09.
INFO: Got 240 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-05-24%20until%3A2017-06-01.
INFO: Got 260 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-03-17%20until%3A2017-03-25.
INFO: Got 280 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-05-16%20until%3A2017-05-24.
INFO: Got 300 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-02-07%20until%3A2017-02-15.
INFO: Got 320 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-05-09%20until%3A2017-05-16.
INFO: Got 20 tweets for Trump%20since%3A2017-03-09%20until%3A2017-03-17.
INFO: Got 340 tweets (20 new).
INFO: Got 360 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-04-09%20until%3A2017-04-16.
INFO: Got 380 tweets (20 new).
INFO: Got 20 tweets for Trump%20since%3A2017-03-02%20until%3A2017-03-09.
INFO: Got 400 tweets (20 new).

try for more tweets ,like 100000

What's the word on this? I still can't get any results using twitterscraper. I'm assuming that twitter has shut it down?

in my experiment, i found that the twitter may block the search results if you search using the same User-Agent for many times, changing the User-Agent header will get the correct results.
here is the screenshot, left: edge, right: chrome (got nothing, the User-Agent is used to run my own crawler for a period of time)

Twitter will block the same UA once a certain amount of times the same UA is used in a day.
Generate a random UA (By appending or generating some garbage strings) it will work without any problems.
Please respect the data crawler and thus throttle the speed of crawling to prevent this workaround to get patched by twitter.

I have the same problem I suspect IP black listing from tweeter I am working on this to be sure, but what I am sure from, that i am getting more results using vpn.
yesterday for this request I had 40K result :
twitterscraper "réfugiés" -bd 2014-05-01 -ed 2014-05-10 -o réfugiés_tweexts.json --lang fr
today 0 with my isp
80 with VPN

@jianmingyong You are my hero. I love you :1st_place_medal: :heart_eyes:

How do I change the User-Agent on every request? I'm having problems after a couple of thousand tweets fetched ...


Secure microservices with JWT

Minimal version (API Gateway secured) has been created with issue https://github.com/asc-lab/micronaut-microservices-poc/issues/3
In this issue we should secure all microservices.

http://guides.micronaut.io/micronaut-token-propagation/guide/index.html


Does the news that WCF might make it to core mean that the extended client might too?

Thank you for your feedback!
The issues in this repo are for documentation feedback.
If you are submitting your documentation feedback issue directly through GitHub, please provide the URL of the article so we can route the feedback to the correct author.
Please report Azure DevOps or TFS software bugs, feedback, or questions in the Azure DevOps Developer Community.

You state the following in your documentation:
"The Microsoft.TeamFoundationServer.ExtendedClient currently doesn't support a NetStandard compliant version. This package includes our older SOAP object model, which has been replaced by our newer REST object model. At this point, we're no longer investing in the older SOAP object model, and have no plans to create a NetStandard version of it."
does the news that WCF is being ported to .netcore change this any?
https://dotnetfoundation.org/blog/2019/06/07/welcoming-core-wcf-to-the-net-foundation
Or will I have to knuckle down and rewrite all the code that is using it for sure?

Hi @AlexisColes, Thanks for reaching out. I'm following up on this and will get back to you soon!

Hi @AlexisColes, The guidance within the article you referenced still stands, as of today.
I welcome you to submit a suggestion to our engineers, however, by going here, and then select Suggest a feature, and then Azure DevOps. Thanks and do let us know if you have any further questions.


Updated: altair-graphql <IP_ADDRESS>0

Newer version of altair-graphql (<IP_ADDRESS>3) is now available in master.


fixed profile icon bug

 Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 6

See the complete overview on Codacy


chore: fix go mod, cleanup unused fields, minor simplifications

This change is

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Naman Jain seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Double-Clicking on TStyledButton in design time does not behave correctly

Standard behavior when double-clicking on a TButton or similar component is to When Double-clicking on a TButton (or similar) component is to connect or create and connect to the OnClick event so that code can be entered into the OnClick event.
Behavior of double-clicking on the TStyledButton brings up the StyledButton Editor and should not.  Right-clicking on the TStyledButton and selecting the editor behaves correct and should be the standard pathway to editing the button styling.
Test was the StyledButtonsVCLStyled demo and opening the FAboutForm form and double-clicking on the OK button.

Yes Lance, the standard and absurd way is to open OnClick event, but I hate using direct OnClick event instead of using Actions... I want to discourage developers from this nonsensical approach... Do you agree with me?
I made some small choices to "break" backwards compatibility, one is this, the other is the "crHandPoint" cursor by default ;-)

Can I close this issue?


Cannot choose an alternate name in google signup if only google is used

Context
Similar to #11236
When using google signup and only this signup method is enabled, there is now way to choose an alternate username if it fails. This only affects org signups (Central works).
Steps to Reproduce

Create an organization with only google auth enabled
Try to sign in with a google account that will conflict with an existing username (but not email)

Current Result
No way to choose alternative username:

Expected result
Display username field to be able to change it

I'd consider this an enhancement.

Moving back to development due to a bunch of things that should be reviewed https://github.com/CartoDB/cartodb/pull/11256#issuecomment-272889881

👍


There should be more specialized alternatives to DateTime

The DateTime class covers a number of responsibilities (mostly because it copied the JavaScript Date type doing the same thing):

An "instant"/"timestamp" (number of milliseconds since epoch)
A calendar date (in the proleptic Gregorian calendar, year-month-date), and calendar date arithmetic (like adding four days to a calendar date).
A wall-time (hours:minutes:seconds.fractionalSeconds)
A time zone (-ish, "local time" or UTC only), and knowledge about daylight saving and other local time zone features.

It's quite easy to make mistakes, especially around local time DateTime objects. There is no way to protect against local times when everything is a DateTime object.
We've tried introducing a "date" concept, which is really just a UTC DateTime with zero wall-time, but again it's not easy to use, and the type system cannot help you when everything is a DateTime.
Some possible options:

Introduce Date and Time classes for (proleptic Gregorian) calendar date (year, month, day, possibly weekDay) and wall-time (hours, minutes, seconds, milliseconds, microseconds), and make DateTime implement both.
Maybe introduce a "calendar difference" type which is plus/minus a number of years, months and days. It's not entirely well-defined since a "month" is not a fixed size, so there'd have to be a canonical way to add/subtract it from a Date. (The current Duration as a DateTime difference doesn't handle calendar dates well, it's entirely milliseconds and interacts badly with local time).
Maybe introduce CalendarTime which is Date+Time without a time zone.
Introduce Instant class with only microsecondsSinceEpoch/millisecondsSinceEpoch, make DateTime implement that too.  (This is really just a Duration-since-epoch, since Duration is just a millisecond).
Introduce UtcDateTime and LocalDateTime subclasses of DateTime and have the constructors generate the appropriate one, so you can type your way to ensuring you're only getting UtcDateTime instance.

There will then be conversions to/from DateTime for all the types.
All this can be done in a separate package too, but then DateTime won't be able to implement the types (which can be seen as a boon or a curse depending on what you prefer), and UtcDateTime and LocalDateTime won't make sense.
It would still be possible to add conversions on DateTime using extension methods, so dateTime.toDate().
We should be careful that whatever we do is also efficiently implementable in dart2js, without adding too much unavoidable overhead.

If this is something the Dart team would consider doing in 2021, I work with Dart and datetimes at Google and would be happy to contribute.  Additional datetime types would make my job easier (I believe this issue originated from a request from one of my team's clients).
One point of reference is google.type, which has separate types for Date, TimeOfDay, and DateTime (which can include a time zone or UTC offset).

@lrhn I want to help with this task, as it is relevant to me.
I'm thinking of starting with Instant as it's not as complicated as it seems, do you have an interface view for this class or wishes?

This issue is just listing problems, and trying to see if there is interest in doing something. It's not proposing a concrete design for a solution - more just listing possible options.
If we do decide to make a change, we'll need to do a thorough design first. We are not there yet.
(And interest has not been massive, which is why it has not been high on our list of priorities so far.)

Okay. I would have a wish to add DayOfWeek and MonthOfYear when you design this :)
It may also be related to this: https://github.com/dart-lang/sdk/issues/4195

It's probably worth following along with the related additions coming soon to JavaScript and RFC 3339: https://tc39.es/proposal-temporal/docs/index.html


TypeMappings usage

Given the following simple example.
Input
packages:
  - path: "types/src/test"
    output_path: "src/types.ts"
    type_mappings:
      types.TestType: "number"

package types

type TestType string

Output
// Code generated by tygo. DO NOT EDIT.

//////////
// source: types.go

export type TestType = string;

Any help with the TypeMappings feature would be appreciated.

Does  the following work?
    type_mappings:
     TestType: "number"

The main idea behind the type mappings is to allow for specifying types that are from a different package, not to override types.
If it doesn't work, what you could do is exclude the file that contains type TestType string, and rather use frontmatter to manually add the Typescript type you want to see.


Wasmjs upgrade

Describe your change
I have added the wasmjs target to the project.
What problem is this fixing?
Supports the new wasmjs target.

No worries, it shouldn't be too long till it's released.
The dependancy is needed due to wasm


Support None from training_step in LRFinder

Lightning modules may return None in the training_step, in order to skip the current batch when using automatic optimization. However, the learning rate finder failed in that case.
What does this PR do?
This fix

modifies the _LRCallback.on_train_batch_end method to support None from the training step by also handling an empty dict (since _AutomaticOptimization.run turns None STEP_OUTPUT into an empty dict)
makes sure, that the list of losses and lrs have the same length as otherwise the selected learning rate would not be correct. If the lightning module returns None in the training step, nan is added to list of losses. because they are ignored when computing the suggestion.

Fixes https://github.com/Lightning-AI/lightning/issues/17992

Before submitting

Was this discussed/agreed via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
Did you make sure to update the documentation with your changes? (if necessary)
Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
Did you list all the breaking changes introduced by this pull request?
Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist

[ ] Is this pull request ready for review? (if not, please submit in draft mode)
[ ] Check that all items from Before submitting are resolved
[ ] Make sure the title is self-explanatory and the description concisely explains the PR
[ ] Add labels and milestones (and optionally projects) to the PR so it can be classified

In the last build pl-cpu (macOS-11, lightning, 3.10, 2.0), pl-cpu (ubuntu-20.04, lightning, 3.10, 2.0) and probot failed all simply with Error: . Not sure what to make of that :thinking:


Default cargo output should prioritize warnings over "Compiling foo" line spam

Problem
It's very easy to miss some warnings because they are printed before a deluge of "Compiling foo" lines that quickly fill the terminal buffer.
This is not a problem when using the -q flag, but this is not the default. -q also doesn't provide a progress bar.
Proposed Solution
The default cargo output should exclude spam, while ensuring that warnings and progress are visible.
If users still want the spam, they should use -v.
Notes
No response

As an example of what you are referring to, on a small scale
$ cargo check
    Checking utf8parse v0.2.2
    Checking is_terminal_polyfill v1.70.0
    Checking anstyle-query v1.1.0
    Checking colorchoice v1.0.1
    Checking anstyle v1.0.8
warning: type `foo` should have an upper camel case name
   --> clap_lex/src/lib.rs:127:8
    |
127 | struct foo;
    |        ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Foo`
    |
    = note: `#[warn(non_camel_case_types)]` on by default

warning: struct `foo` is never constructed
   --> clap_lex/src/lib.rs:127:8
    |
127 | struct foo;
    |        ^^^
    |
    = note: `#[warn(dead_code)]` on by default

    Checking strsim v0.11.1
warning: `clap_lex` (lib) generated 2 warnings
    Checking anstyle-parse v0.2.4
    Checking anstream v0.6.14
    Checking clap_builder v4.5.18 (/home/epage/src/personal/clap/clap_builder)
    Checking clap v4.5.18 (/home/epage/src/personal/clap)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.05s

We currently printing events as they happen, rather than buffering them.
#8749 has the same root problem but only focuses the solution discussion on a subset of the problem (handling of summaries).  In #8889, we are discussing a more generalized improvement to our compilation output.  #8743 is about having quiet output while seeing progress indicators.  I'd recommend we consolidate the conversation to those issues and am closing in favor of them.


[Duplicate] How kerckhoffs principle is applied in cryptography

Article checklist
Attention
Our Peer Reviewer and Content Moderator teams do NOT provide any revisions services. All revisions and edits should be completed on your own forked repo (as to not take up room in the queue) in order for our team to review them all in a timely manner.
ANY ARTICLE SUBMITTED WITH GLARING ERRORS WILL BE IMMEDIATELY CLOSED.

As a rule of thumb - please be sure to only submit articles (pull requests) that are fully polished and ready to be published. Be sure to go through our resources documents for extra and 3rd party (vetted) resources to help improve overall technical writing.

Pre-submission checks

Please ensure that you have only one open topic suggestion (issue) + in-review article (linked pull request) at a time. This will ensure that we complete the review process in a timely manner from inception to publishing

If you have not already, please go over our Resources Page for more tips and tricks on how to improve your overall technical writing so reviews are swifter, increase the chance of a payout and provide more value to our readers.

For first-time contributors and for more details on our submission guidelines, see our Contributing Guidelines.

Formatting and structure checks

[x] Have you used the correct folder and file structure? - see Contribution Guidelines

[x] Is your article properly formatted in Markdown? - see Github Markdown guide

[x] Have you used our preferred heading structure? - H3 (###) and up

[x] Does your article follow any of the suggested structure formats? - see example formats

[x] Is your article over 750 words? - Tool: Wordcounter.net

[x] Is the article you are submitting an in-depth and unique article? Does it go beyond what is in the official docs and what is covered in other blog sites. See these articles as examples.

[x] Does your article provide enough value and detail about your topic? - Articles should be clear, accurate, and fully explained.

[x] Can your article be understood by beginners? - Assume the audience is smart but has no prior exposure to the common terminology in your article.

[x] Have you included a hero image that is 600x400 pixels, under 300KB in size, and have the copyright to use it? - Tools: Pixlr Image Editor for resizing and Unsplash for Creative Commons images

Grammar & plagiarism checks

[x] Have you spellchecked and grammar checked your article? - Tools: Write&Improve - ProWritingAid - Grammarly
[x] Please place your article through a 3rd party plagiarism checker. We suggest using Quetext, this tool is free and has a daily limit. We typically accept articles with 10% or less.
[x] Have you checked your article for readability? - Tool: Hemmingway
[x] Have you added sources for quotes and images that aren't yours?

Technical checks

[x] Are your code snippets properly formatted for syntax highlighting - see Syntax guide
[x] Have you checked your code runs correctly and you've highlighted all necessary dependencies for installation?
[x] Are the software programs and packages you're highlighting in your article up to date, using current versions and not deprecated?

Topic suggestion this closes

Remove the backticks and add the issue number below to link and close your Topic Suggestion (issue) when your article has been published (PR has been merged). See this video for more details.

This closes #4247

Finally, delete the article checklist notes in blockquotes and submit your PR. We look forward to reviewing your article.

Hello @WanjaMIKE have made the necessary changes and opened an new pr which is a duplicate of this  #5074

@WanjaMIKE Are you still reviewing this article?

@geoffrey45 you can take it up. Thanks

plagiarism check done ✔

Hello @leence00
After reading your article, it looks like a direct copy of the WikiPedia article: Kerckhoffs's principle.
We don't accept copied content, so I'll be closing this article.


seata2.0.0疑似SEATA_IP环境变量失效

[ ] I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description
使用docker部署seata-server2.0.0注册到nacos（2.2.3）时，为了注册到nacos的地址不是docker地址，所以使用SEATA_IP作为环境变量，但是在使用时无效（seata-server1.7.2有效）
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
以下分别是seata-server2.0所在docker环境变量和nacos的截图

Which mirror are you using?
https://hub.docker.com/r/seataio/seata-server/tags

I used the 2.0.0 image for testing, but both the IP and port can be registered to Nacos as expect.


HBASE-23780 Edit of test classifications

These classifications come of running at various fork counts.. A test
may complete quick if low fork count but if it is accessing disk, it
will run much slower if fork count is high. This edit accommodates
some of this phenomenon.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 39s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  4s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 183 new or modified test files.

_ branch-2 Compile Tests _

+0 :ok:
mvndep
0m 18s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
5m 58s
branch-2 passed

+1 :green_heart:
compile
3m 49s
branch-2 passed

+1 :green_heart:
checkstyle
4m  1s
branch-2 passed

+1 :green_heart:
shadedjars
4m 52s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
2m 53s
branch-2 passed

+0 :ok:
spotbugs
0m 43s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
9m 52s
branch-2 passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
5m 30s
the patch passed

+1 :green_heart:
compile
3m 43s
the patch passed

+1 :green_heart:
javac
3m 43s
the patch passed

+1 :green_heart:
checkstyle
0m 27s
The patch passed checkstyle in hbase-common

+1 :green_heart:
checkstyle
0m 37s
The patch passed checkstyle in hbase-client

+1 :green_heart:
checkstyle
0m 15s
The patch passed checkstyle in hbase-zookeeper

+1 :green_heart:
checkstyle
0m 16s
The patch passed checkstyle in hbase-http

+1 :green_heart:
checkstyle
0m 17s
The patch passed checkstyle in hbase-procedure

+1 :green_heart:
checkstyle
1m 32s
hbase-server: The patch generated 0 new + 658 unchanged - 170 fixed = 658 total (was 828)

+1 :green_heart:
checkstyle
0m 24s
The patch passed checkstyle in hbase-mapreduce

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
shadedjars
4m 50s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
17m 38s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1 :green_heart:
javadoc
2m 48s
the patch passed

+1 :green_heart:
findbugs
10m 34s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
3m  5s
hbase-common in the patch passed.

+1 :green_heart:
unit
4m 11s
hbase-client in the patch passed.

+1 :green_heart:
unit
0m 57s
hbase-zookeeper in the patch passed.

+1 :green_heart:
unit
1m 27s
hbase-http in the patch passed.

+1 :green_heart:
unit
3m 21s
hbase-procedure in the patch passed.

-1 :x:
unit
169m 48s
hbase-server in the patch failed.

-1 :x:
unit
22m  8s
hbase-mapreduce in the patch failed.

+1 :green_heart:
asflicense
4m 42s
The patch does not generate ASF License warnings.

300m 49s

Reason
Tests

Failed junit tests
hadoop.hbase.replication.TestNamespaceReplicationWithBulkLoadedData

hadoop.hbase.mapred.TestMultiTableSnapshotInputFormat

Subsystem
Report/Notes

Docker
Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/4/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/1109

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux 3de164bc9884 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1109/out/precommit/personality/provided.sh

git revision
branch-2 / bf924ccdaa

Default Java
1.8.0_181

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/4/artifact/out/patch-unit-hbase-server.txt

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/4/artifact/out/patch-unit-hbase-mapreduce.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/4/testReport/

Max. process+thread count
5558 (vs. ulimit of 10000)

modules
C: hbase-common hbase-client hbase-zookeeper hbase-http hbase-procedure hbase-server hbase-mapreduce U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/4/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Rerun build. Tests pass locally.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 38s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  4s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 183 new or modified test files.

_ branch-2 Compile Tests _

+0 :ok:
mvndep
0m 14s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
5m 16s
branch-2 passed

+1 :green_heart:
compile
3m 15s
branch-2 passed

+1 :green_heart:
checkstyle
3m 34s
branch-2 passed

+1 :green_heart:
shadedjars
4m 17s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
2m 32s
branch-2 passed

+0 :ok:
spotbugs
0m 35s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
7m 36s
branch-2 passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 49s
the patch passed

+1 :green_heart:
compile
3m 16s
the patch passed

+1 :green_heart:
javac
3m 16s
the patch passed

+1 :green_heart:
checkstyle
0m 25s
The patch passed checkstyle in hbase-common

+1 :green_heart:
checkstyle
0m 33s
The patch passed checkstyle in hbase-client

+1 :green_heart:
checkstyle
0m 15s
The patch passed checkstyle in hbase-zookeeper

+1 :green_heart:
checkstyle
0m 15s
The patch passed checkstyle in hbase-http

+1 :green_heart:
checkstyle
0m 15s
The patch passed checkstyle in hbase-procedure

+1 :green_heart:
checkstyle
1m 26s
hbase-server: The patch generated 0 new + 658 unchanged - 170 fixed = 658 total (was 828)

+1 :green_heart:
checkstyle
0m 20s
The patch passed checkstyle in hbase-mapreduce

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
shadedjars
4m 19s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
15m 26s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1 :green_heart:
javadoc
2m 32s
the patch passed

+1 :green_heart:
findbugs
8m 37s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
2m 52s
hbase-common in the patch passed.

+1 :green_heart:
unit
3m 53s
hbase-client in the patch passed.

+1 :green_heart:
unit
0m 52s
hbase-zookeeper in the patch passed.

+1 :green_heart:
unit
1m 14s
hbase-http in the patch passed.

+1 :green_heart:
unit
3m 11s
hbase-procedure in the patch passed.

-1 :x:
unit
150m 46s
hbase-server in the patch failed.

-1 :x:
unit
17m 27s
hbase-mapreduce in the patch failed.

+1 :green_heart:
asflicense
4m 33s
The patch does not generate ASF License warnings.

263m 16s

Reason
Tests

Failed junit tests
hadoop.hbase.quotas.TestClusterScopeQuotaThrottle

hadoop.hbase.snapshot.TestExportSnapshotNoCluster

Subsystem
Report/Notes

Docker
Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/5/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/1109

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux cea03dd2e225 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1109/out/precommit/personality/provided.sh

git revision
branch-2 / 7b4b90aef5

Default Java
1.8.0_181

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/5/artifact/out/patch-unit-hbase-server.txt

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/5/artifact/out/patch-unit-hbase-mapreduce.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/5/testReport/

Max. process+thread count
5620 (vs. ulimit of 10000)

modules
C: hbase-common hbase-client hbase-zookeeper hbase-http hbase-procedure hbase-server hbase-mapreduce U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/5/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

A different two failed. Retry.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 59s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  4s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 183 new or modified test files.

_ branch-2 Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
5m 17s
branch-2 passed

+1 :green_heart:
compile
3m 17s
branch-2 passed

+1 :green_heart:
checkstyle
3m 35s
branch-2 passed

+1 :green_heart:
shadedjars
4m 17s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
2m 33s
branch-2 passed

+0 :ok:
spotbugs
0m 34s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
7m 44s
branch-2 passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 54s
the patch passed

+1 :green_heart:
compile
3m 19s
the patch passed

+1 :green_heart:
javac
3m 19s
the patch passed

+1 :green_heart:
checkstyle
0m 24s
The patch passed checkstyle in hbase-common

+1 :green_heart:
checkstyle
0m 33s
The patch passed checkstyle in hbase-client

+1 :green_heart:
checkstyle
0m 12s
The patch passed checkstyle in hbase-zookeeper

+1 :green_heart:
checkstyle
0m 14s
The patch passed checkstyle in hbase-http

+1 :green_heart:
checkstyle
0m 16s
The patch passed checkstyle in hbase-procedure

+1 :green_heart:
checkstyle
1m 27s
hbase-server: The patch generated 0 new + 658 unchanged - 170 fixed = 658 total (was 828)

+1 :green_heart:
checkstyle
0m 21s
The patch passed checkstyle in hbase-mapreduce

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
shadedjars
4m 17s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
15m 26s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1 :green_heart:
javadoc
2m 30s
the patch passed

+1 :green_heart:
findbugs
9m  3s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
2m 54s
hbase-common in the patch passed.

+1 :green_heart:
unit
3m 55s
hbase-client in the patch passed.

+1 :green_heart:
unit
0m 52s
hbase-zookeeper in the patch passed.

+1 :green_heart:
unit
1m 15s
hbase-http in the patch passed.

+1 :green_heart:
unit
3m 10s
hbase-procedure in the patch passed.

+1 :green_heart:
unit
148m 38s
hbase-server in the patch passed.

-1 :x:
unit
17m 41s
hbase-mapreduce in the patch failed.

+1 :green_heart:
asflicense
4m 32s
The patch does not generate ASF License warnings.

263m 31s

Reason
Tests

Failed junit tests
hadoop.hbase.snapshot.TestExportSnapshotNoCluster

Subsystem
Report/Notes

Docker
Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/6/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/1109

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux dec8824dd984 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1109/out/precommit/personality/provided.sh

git revision
branch-2 / 7b4b90aef5

Default Java
1.8.0_181

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/6/artifact/out/patch-unit-hbase-mapreduce.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/6/testReport/

Max. process+thread count
5579 (vs. ulimit of 10000)

modules
C: hbase-common hbase-client hbase-zookeeper hbase-http hbase-procedure hbase-server hbase-mapreduce U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1109/6/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Merged. This patch doesn't touch failing test and can't repro locally. Will address in another issue if it persists.
Thanks for the reviews all.


Feature: reject promises if they are removed from the queue

Currently if promises are removed because the queue becomes too full they aren't rejected.
var limiter = new Bottleneck(1, 100, 3);

limiter.schedule(test).then(console.log).catch(onRejected);
limiter.schedule(test).then(console.log).catch(onRejected);
limiter.schedule(test).then(console.log).catch(onRejected);
limiter.schedule(test).then(console.log).catch(onRejected);
limiter.schedule(test).then(console.log).catch(onRejected);
limiter.schedule(test).then(console.log).catch(onRejected);

function onRejected() {
	console.log("rejected");
}

function test() {
	console.log("starting");
	return new Promise((resolve) => {
		setTimeout(() => {
			resolve("resolved!");
		}, 1000);
	});
}

Here "rejected" is never printed to the console but 4 of the promises are resolved. Might have a look at submitting a PR with this functionality tomorrow.

Very good idea! Right now you can achieve the same effect using the 'dropped' event but I like the idea of automatically rejecting them (and possibly also callbacks).
However, this breaks a lot of people's current code, so it can't just be added directly. The "best fix" here is maybe be to document the behavior in the Readme and add an example of how to achieve this using the existing 'dropped' Event. Or maybe the best approach is to add a method to enable this feature and keep it disabled by default. Let's find a solution before writing code. 😄

Sounds good to me. I'm going to write some code now which uses the dropped event then maybe add a feature/update the readme.

Having thought about it some more, I think it's a common enough use case to be worth adding it as an optional feature, turned off by default. It's not too hard for me to add, but you seem pretty enthusiastic about writing it, so feel free to do it if you'd like.

@SGrondin I've got it outside of the library just with
limiter.on("dropped", (dropped) => {
	dropped.cb(new Error("Dropped!"));
});

I like how you translate the promises back to callbacks in the library it makes things like this really simple :)

I've submitted a few PR's :)

Very nice PRs, I'm pleasantly surprised! There's a few changes I want to discuss before merging, I should have some time for this tomorrow.

I like how you translate the promises back to callbacks in the library it makes things like this really simple :)

I'm glad you appreciate it. This library is an ongoing exercise in minimalism for me. I'm aiming to keep the code as short and straightforward as possible. I joke that the number of lines of code shouldn't get above the number of stars. The first "production quality" version had 32 lines of code and I've worked really hard to balance features, complexity, lines of code, performance and maintainability.


Fixes Multipart_params to work with json/javascript

Multipart_params is expected to be a json-string/object, putting it in "" does not work, same if you want to place a functioncall there which returns the needed data.
Same will probably be true for headers and some other fields, if I have time to test/use them in a real app I will create more patches.

Awesome, thanks, I use this in an app I made but haven't had time to fix a lot of issues.


Add skeleton for a metadata verifier

This is PR adds the skeleton for a metadata verifier for Amber provenances (AmberProvenanceMetadataVerifier) and calls it in ProvenanceBuildWrapper. This does not give a complete implementation for a metadata verifier, and is mainly intended to solve the problem of slow builds.
I have added a few TODO to identify the remaining work. In particular, we have to decide which fields need to be verified in the metadata verifier. The expected values should then be provided as input both to the verify command line tool, and to ProvenanceBuildWrapper, as well as the choice of the verifier (see #69).

This looks OK. I am wondering if after this change the ProvenanceBuildWrapper is still useful, and perhaps it is best to just deprecate it. It seems like what it checks is similar to what the ProvenanceWrapper checks, so we might not need both of these.
Probably, the ProvenanceBuildWrapper should eventually be replaced with something that gets the hash from github, at which point it really would have a distinct job from ProvenanceWrapper.
We could just deprecate the current slow ProvenanceBuildWrapper until we have the github one, but the change here does solve the CI slowdown issue, so what you have here is also fine.


identify code and make it in different color

as a software engineer, search a code questions are oftenly.
make it in different color then nomal text color will be more readable.
Since openai api respond code in begin ''' and end with '''.
i think its pretty easy to implement and i am willing to do it. let me know if its a possible feature.

Already implemented, you must either:

Use the non-streaming mode
Use the /chat command to reprint the conversation

I don't think it's practical to perform syntax highlighting during streaming, not in the shell.


[sqlserver] adds custom instance tags to storedproc metrics

What does this PR do?
adds the (custom) instance tags set in sqlserver.d/conf.yaml file in addition to the tags retrieved via StoredProcedure.
Motivation
feature request: 777-sql-server-different-ways-of-tagging-stored-procedures
Additional Notes
Depends on https://github.com/DataDog/integrations-core/pull/3236 for tests to work
Review checklist (to be filled by reviewers)

[x] PR title must be written as a CHANGELOG entry (see why)
[x] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[x] PR must have changelog/ and integration/ labels attached
[ ] Feature or bugfix must have tests
[ ] Git history must be clean
[ ] If PR adds a configuration option, it must be added to the configuration file.

rebased and pushed


Distance Embedding

Could you please kindly explain why the distance embedding should be like this?
array([[19, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13],
       [ 1, 19, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13],
       [ 2,  1, 19, 10, 11, 11, 12, 12, 12, 12, 13, 13],
       [ 2,  2,  1, 19, 10, 11, 11, 12, 12, 12, 12, 13],
       [ 3,  2,  2,  1, 19, 10, 11, 11, 12, 12, 12, 12],
       [ 3,  3,  2,  2,  1, 19, 10, 11, 11, 12, 12, 12],
       [ 3,  3,  3,  2,  2,  1, 19, 10, 11, 11, 12, 12],
       [ 3,  3,  3,  3,  2,  2,  1, 19, 10, 11, 11, 12],
       [ 4,  3,  3,  3,  3,  2,  2,  1, 19, 10, 11, 11],
       [ 4,  4,  3,  3,  3,  3,  2,  2,  1, 19, 10, 11],
       [ 4,  4,  4,  3,  3,  3,  3,  2,  2,  1, 19, 10],
       [ 4,  4,  4,  4,  3,  3,  3,  3,  2,  2,  1, 19]])

Thank you.

This is a distance index matrix, instead of the embedding. Each index is used to obtain the corresponding distance embedding.

Oh yes sorry for the mistake. But why it's organized as the power of 2 and why the number in the middle is 19?

The distance index organized as the power of 2 is to avoid the data sparse problem. The token pair with long distance usually has a low frequency. The number 0 is used for padding, so I use 19 to replace it.

The distance index organized as the power of 2 is to avoid the data sparse problem. The token pair with long distance usually has a low frequency. The number 0 is used for padding, so I use 19 to replace it.

Thank you!


Cant build restangular with  browserify

Initially thought it was due to lodash not being included, but tries with a script tag and still no joy.

Adding CommonJS/RequireJS support would be interesting. Something similar to what ui-router is doing along with publishing Restangular @ npm.

Now that all the angular libraries are on NPM, it would be nice to add this little export. :+1:

I agree. Many angular-libs and angular itself is npm-installable by now.
Please add snippet as suggeted by @ludicast
var _ = window._ || require("lodash");

This should do the trick.

+1, would be nice to load restangular with
angular.module('myApp', [require('restangular')])

You you guys are using webpack, you can expose lodash this way:
require('expose?_!lodash')

+1

Could you detail why you are trying to do so?

@pauldijou: I'm somewhat new to angular, but my understanding is that the angular way expects you to include each module separately in a different script tag via index.html.  Preferably there would exist a single script tag with your concatenated/minified scripts (assuming it is reasonable in size).

Coming from #1012 and wondering when Restangular will officially support requirejs.
Meanwhile is there any workaround?
Thanks!

@nolazybits - newtriks' solution is the correct way to go about it

Thanks @olsonpm, but I still can't figure it out...
This is my requirejs config
require.config({
    baseUrl: './',
    paths: {
        'angular': '<angular path>',
        'lowdash' : '<lowdas path>',
        'restangular': '<restangular path>'
    },
    shim: {
        'angular': {
            deps: ['jquery'],
            exports: 'angular'
        },
        'lowdash': {
            exports: '_'
        },
        'restangular': {
            deps: ['angular', 'lowdash']
        }
    }
})

and my main.js file is like this
define(['angular', 'restangular'], function(angular, restangular) {
    var app = angular.module('app', [
        'restangular'
    ]);

    //  this will fail, with 'Restangular: Error: Unknown provider'
    app.factory('test', ['Restangular', function (Restangular) {
        console.log(Restangular);
    }]);
}

Any idea... or better link to working examples?
Thanks!

If your problem is related to requirejs, then your best bet is to find help via stackoverflow.  The solution I gave is only relevant to browserify which I thought was what you were asking about.
I haven't messed with require.js in some time since I haven't come across any problems since using commonjs.

Personally I am switching from requirejs to browserify. It is a painful process, but it seems to be where things are heading.

@episodeyang - Depending on how far along you are in the migration process, you may find less friction using webpack.

Please fix NPM package by adding correct imports and exports.
Import lodash and export angular module's name as all official angular modules do.

I love Restangular so I really wish it wasn't such a mess in Browserify and Webpack.
Unless I'm mistaken the lodash dependency in the Restangular package.json is pointless because the source code does not use it.
For consistency this needs to go. Or better yet be utilised per @ludicast's suggestion, or some similar solution..

+1
I'm using Webpack and Angular and have spent hours trying to figure out how to include restangular using ES6 import.

+1

+1 in 2016.

If it helps someone, here's how you can use Restangular with Webpack:
angular.module('app', [
    require('imports?angular=angular&_=lodash!exports?"restangular"!restangular')
]);

Same with ES2015 imports:
import restangular from 'imports?angular=angular&_=lodash!exports?"restangular"!restangular';
angular.module('app', [restangular]);

Exports loader loader is optional in second case.

Definitely #1284 is the way to go.
UMD is pretty much the 'everything to everyone' fix.

Since this talk is over a year old, and PR 3 months old with no clear direction of if it's going to land, I took some time today and made this https://github.com/joshmanders/restangular-umd
It takes the official release source file, removes the first and last lines, and wraps it in UMD support, I am using this without issues in Webpack.

@joshmanders I've done same thing - thanks for publishing on NPM!
I also asked @mgonto about pull request state:
https://github.com/mgonto/restangular/pull/1284#issuecomment-194801698


StrongBuilder framework, plus StrongConnectionBuilder for HURL

This pull request integrates the core classes for the HTTP stacks integration (notably the StrongBuilder interface and StrongBuilderBase abstract implementation). It also integrates StrongConnectionBuilder, which implements the integration for HttpURLConnection. Future pull requests will add counterparts for HttpClient, Volley, and OkHttp3.
I have been running into a problem in testing, where some Orbot installations support SOCKS and others do not. On my Nexus 5, which has had Orbot for a few months, SOCKS works fine. On my Galaxy Nexus, which has had Orbot for a bit less time and used to handle SOCKS fine, SOCKS does not work. Likewise, on a Nexus 4 with a fresh install of Orbot off of the Play Store, SOCKS does not work. By "does not work", I mean attempts to use the SOCKS proxy result in java.io.IOException: Failure to connect to SOCKS server, as if the SOCKS proxy is not running on <IP_ADDRESS>/9050, even though the status Intent does not give me an alternate port to use. I do not see any settings changes that I might have made on the Galaxy Nexus installation of Orbot, and I know I have not changed any settings on the Nexus 4 install. The HTTP proxy works fine on those devices, and so Orbot itself is otherwise happy.
Is there something an Orbot user needs to do to enable SOCKS support from an out-of-the-box Orbot install? Or, any other ideas why I can't seem to connect to SOCKS on some devices?
For the moment at least, I have changed StrongBuilderBase, having supportsSocksProxy() return false, to route everything through the HTTP proxy, since that seems to be working across the board. Ideally, supportsSocksProxy() would return true, then have that overridden as needed (e.g., OkHttp3 does not support SOCKS).
Note that this pull request adds a new test case class for StrongConnectionBuilder.

With regards to the failing CI server tests, AFAICT I am never getting a connection, and so I am timing out. I will try to beef up the tests to get a better handle on what's going on. That being said, is there anything written up about the CI server environment that I am testing in here? I have not used TravisCI. Am I correct in assuming that there's a copy of Orbot installed?

The SOCKS port is handled directly by the tor process itself, so if that is running then it should be active. The Intent result should give you the correct port if for some reason the app has been forced to find a new port due to a conflict with the default 9050 port. This happens on Samsung devices due to their being a default Samsung bloatware app that uses port 9050 (since 9050 was the internal model number for the Galaxy class devices... what a wacky port collision reason eh?).

Is there any difference on these devices about being on Wifi vs 3g/4g?

Also if you enable "debug" mode in Orbot settings, there should be some more useful output to logcat and within the app's left drawer log output. You might see something in there about ports changing.

@n8fr8 My apologies for my delayed response -- I'm in NYC this evening, fresh off of delivering a presentation.
All three devices are on WiFi; none have SIM cards.
I will fire up the debugging options and see what that tells me tomorrow when I return to my Secret Mountain Lair™. Thanks!

@n8fr8 I turned on "Debug Log" in Orbot. What I get when trying to connect via SOCKS is:
05-11 15:33:48.366 3640-5110/? D/Orbot: Waiting for control port...
05-11 15:33:48.368 3640-5110/? D/Orbot: SUCCESS connected to Tor control port.
05-11 15:33:48.371 3640-5110/? D/Orbot: SUCCESS - authenticated to control port.
05-11 15:33:48.374 3640-5110/? D/Orbot: adding control port event handler
05-11 15:33:48.376 3640-5110/? D/Orbot: SUCCESS added control port event handler
05-11 15:33:52.052 5091-5109/info.guardianproject.onionkit.test I/TestRunner: java.io.IOException: Failure to connect to SOCKS server
  at java.net.PlainSocketImpl.socksRequestConnection(PlainSocketImpl.java:342)
  at java.net.PlainSocketImpl.socksConnect(PlainSocketImpl.java:326)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:181)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
  at java.net.Socket.connect(Socket.java:882)
  at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174)
  at com.android.okhttp.Connection.connect(Connection.java:152)
  at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
  at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
  at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:332)
  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:199)
  at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
  at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
  at info.guardianproject.netcipher.StrongConnectionBuilderTest$1.loadResult(StrongConnectionBuilderTest.java:67)
  at info.guardianproject.netcipher.StrongConnectionBuilderTest$1.loadResult(StrongConnectionBuilderTest.java:62)
  at info.guardianproject.netcipher.StrongConnectionBuilderTest$TestBuilderCallback.onConnected(StrongConnectionBuilderTest.java:129)
  at info.guardianproject.netcipher.client.StrongBuilderBase$1.onEnabled(StrongBuilderBase.java:205)
  at info.guardianproject.netcipher.proxy.OrbotHelper.addStatusCallback(OrbotHelper.java:414)
  at info.guardianproject.netcipher.client.StrongBuilderBase.build(StrongBuilderBase.java:198)
  at info.guardianproject.netcipher.StrongConnectionBuilderTest.testStrongBuilder(StrongConnectionBuilderTest.java:109)
  at info.guardianproject.netcipher.StrongConnectionBuilderTest.testStrongConnectionBuilder(StrongConnectionBuilderTest.java:61)
  at java.lang.reflect.Method.invoke(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at junit.framework.TestCase.runTest(TestCase.java:168)
  at junit.framework.TestCase.runBare(TestCase.java:134)
  at junit.framework.TestResult$1.protect(TestResult.java:115)
  at junit.framework.TestResult.runProtected(TestResult.java:133)
  at junit.framework.TestResult.run(TestResult.java:118)
  at junit.framework.TestCase.run(TestCase.java:124)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)

That stack trace is from the test. I do not know if the "control" stuff has anything to do with the SOCKS proxy, and those messages were from four seconds before my test case crashed.
If I go into "Tor SOCKS" in the settings and change the port to 9999, Orbot still reports 9050 in the status Intent that NetCipher relies upon, at least until I exit and restart Orbot. Once I start getting the 9999 port value, the test still fails to connect.
Both devices have Orbot 15.1.2.

I will check the issue with the Intent value not changing... otherwise, the fact that setting it to 9999 still doesn't work is interesting.
Can you install SockStat to see what sockets/ports are open for Orbot?

Ooooo... SockStat is much nicer for this than is Net Swiss Tool.
Orbot is reported as listening on 9050 and 8118 (the two proxy ports), as well as 46155, 9040, and 5400. Note that I changed Orbot back to 9050 after 9999 did not help.
My Proxy instance is showing as SOCKS@/<IP_ADDRESS>:9050 as expected, with the port . Yet, on this device, it fails to connect. Using the HTTP proxy on 8118 works fine, and SOCKS works fine on the Nexus 5.

I think this is a tor issue related with port binding... perhaps some subtle difference in the kernel on those devices. It could be whether we bind to <IP_ADDRESS>, <IP_ADDRESS> or to the actual public IP, as well. Will see if I can reproduce your issue.

@n8fr8 I ran tests on more devices from my fleet.
These devices fail SOCKS:

ASUS ZenFone Zoom ZX550/ZX551ML (Android 5.0)
Galaxy Nexus (Android 4.4)
Nexus 4 (Android 5.1)
Wileyfox Swift (Android 5.1.1 by way of Cyanogen OS 12.1.1)

These devices support SOCKS:

Nexus 5 (Android 6.0)
Nexus 5X (Android 6.0)
Nexus 6 (Android N Developer Preview 2)
Nexus 6P (Android 6.0)
Nexus 9 (Android 6.0)
Samsung Galaxy S7 (Android 6.0)

All are Orbot 15.1.2, manually started and 100% bootstrapped. Most are fresh Orbot installs.
There seems to be a strong correlation between Android version and SOCKS availability.
One outlier is the Galaxy S6, which fails, complaining about a NetworkOnMainThreadException, which means that Samsung f*cked around with the Android framework testing classes, as test methods are supposed to be run on background threads.

tor should bind only to <IP_ADDRESS>, otherwise there will be a lot more security and privacy considerations.  I can't see a use case that we support where <IP_ADDRESS> wouldn't work.

to connect to Orbot in the CI tests, Orbot will have to be downloaded and installed in the .travis.yml.  I try my hand at getting that working

The test case now fails better in the face of a no-Orbot environment.

Yes, agreed on <IP_ADDRESS>, but just curious if binding differently would produce different results.

the travis-ci build now installs orbot before running the tests.  Should the tests be run before and after Orbot is installed?

@eighthave I do not know much about TravisCI. If there is some facility to say "run this test, then do this configuration work, then run this other test", I could create a separate test that confirms that we correctly handle the no-Orbot case. Right now, the tests assume an existing Orbot installation; my most recent commit just provides a more explicit failure for the no-Orbot scenario.

travis-ci gives you a VM instance and a script, and we do the rest.  So I'm thinking something like this:
adb uninstall org.torproject.android
gradle connectedCheck
adb install Orbot.apk
gradle connectedCheck

@eighthave Only if we can run separate pre-Orbot-install and post-Orbot-install tests will this make sense, IMHO. If we try running a test that requires Orbot, before Orbot is installed, the test will fail. If we try running a test to confirm that we correctly handle a missing Orbot, when Orbot is not missing, the test will fail.

it should be possible to make the test suite handle both cases.  Like start with detecting if orbot is installed, then enable/disable tests accordingly

@eighthave Um, if that's what you want, I'll do it. I'm not a fan of this approach. IMHO, the environmental conditions should be a known quantity before the tests run.

we want to test both conditions as part of the standard tests, and it is easy to detect.  How would you handle it?

we want to test both conditions as part of the standard tests

Agreed.

and it is easy to detect

Agreed.
Suppose we go with your approach: one test suite that dynamically determines whether it is supposed to be testing the no-Orbot case or the has-Orbot case.
So, TravisCI starts up. It invokes our test suite. We run, determine that there is no Orbot, confirm that NetCipher realized that there is no Orbot, and cause all other test methods to succeed as a no-op.
Then, in one parallel universe, TravisCI installs Orbot, then runs our test suite again. We run, determine that Orbot exists, confirm that NetCipher detected Orbot, and then have the other test methods behave as intended, confirming that we can successfully communicate over Orbot. Life is good.
However, in another parallel universe, TravisCI fails to install Orbot. Maybe the TravisCI folk changed their Android images and Orbot isn't happy. Maybe Orbot's package got corrupt. Maybe the Android tools are having a bad day and adb hiccuped. Whatever.
If we are guaranteed that TravisCI will fail at this point and raise an error that gets reported. In this case, life is still good, as we know that our CI environment has issues.
However, if we are not guaranteed that TravisCI will fail at this point, TravisCI will run our test suite again. We will detect that Orbot is not installed, confirm that NetCipher realizes that NetCipher is not installed, and report that the test succeeded... when, in reality, the test should have failed, because Orbot was supposed to be installed, and it wasn't.
IOW, you and I have knowledge (the second test run requires Orbot) that is not encoded in the tests.

How would you handle it?

Well, there are two major possibilities. One is to do something in the TravisCI recipe to ensure that come hell or high water, TravisCI will fail the build if Orbot is not installed successfully by the recipe. Since I know both diddly and squat about TravisCI, I haven't the foggiest notion if this is possible and will be reliable.
Otherwise, we encode the knowledge in the tests themselves, having two separate test paths: one for the no-Orbot scenario and one for the has-Orbot scenario. This would require either two separate test projects or running only some of the tests at a time. The docs indicate that adb shell am instrument supports the latter, but I haven't tried this in ages, and I don't know how well that works with TravisCI either.
I am close to committing a change that implements the tests the way that you want (dynamically determine whether we're testing the no-Orbot or has-Orbot scenario). It is your decision as to whether handling the TravisCI-fails-to-install-Orbot scenario is worth worrying about. I worry about these things, because my last name is Murphy, which makes software testing extra fun. :-)

OK, this latest change attempts to address the no-Orbot and has-Orbot cases. It handles the no-Orbot case nicely. It also works if Orbot has been installed and manually set up. It does not work for a fresh install of Orbot that has never been used, and AFAICT that is a bug in Orbot.
Part of what OrbotHelper does is it registers for the status broadcasts from Orbot itself. When I run my tests after a fresh install of Orbot, I get the following sequence of status broadcasts:

OFF
STARTING
STOPPING
OFF

And that's it. The second time you run the tests, everything is fine.
I am up for suggestions.

travis-ci just runs a script, its a shell script in YAML form.  As far as I understand adb install orbot.apk, it will have an error return value if it fails to install the file for any reason.  travis-ci keeps track of the return values of all the lines in the script.  It will mark the job as failed if just one line has an error return value.  So in the case of orbot failing to install, it is true that it will run the non-orbot tests twice, once for each call of gradle connectedCheck but the job will be marked a failure because adb install orbot.apk failed.

about the failure on fresh install, are you sure that Orbot actually receives the intent?

@eighthave I am sending the broadcast to Orbot to request status broadcasts back. On the first run after a fresh install, I am receiving four status broadcasts back: OFF, STARTING, STOPPING, OFF. None of those are ON, and I do not receive an ON within 60 seconds.

that indeed sounds like a bug in Orbot :)

I'm going to merge this, then merge the travis-ci updates that do the orbot install.  Then if we're lucky, it all will magically work. Otherwise, we can revisit in another pull request.

Ok, there was a build failure on the new Orbot tests: https://travis-ci.org/guardianproject/NetCipher/jobs/129806372

@eighthave The NetCipher code fails fast if it cannot find a valid Orbot. junit.framework.AssertionFailedError: setup timeout would occur if Orbot is installed, but for some reason NetCipher did not receive an ON status from Orbot within 60 seconds of requesting status broadcasts. I get this same result when I run the tests for the first time after a fresh Orbot install, per my earlier comment.
So, on the plus side, Orbot is getting installed properly.
If you just want to get the tests to succeed, add the following to your YAML, after the Orbot install command and before running the tests again:
adb shell am broadcast -a org.torproject.android.intent.action.START -n org.torproject.android/.service.StartTorReceiver
sleep 5s

That's a manual invocation of the Orbot start Intent, plus a five-second delay.
In manual testing, broadcasting the start Intent once is insufficient to get Orbot really up and rolling after a fresh install, as you get the symptoms that I mentioned in my earlier comment. The second broadcast of the start Intent behaves normally. So, this hack automates the first broadcast outside of the tests.
I'll argue that this is a bug in Orbot. If you eventually conclude that it's not a solvable problem in Orbot itself, the NetCipher code could be adjusted to try two broadcasts, if we do not get a response from the first broadcast within X period of time.