How to upload image to field in a row in a collection?

Hi, thanks for the awesome work on this.
This works: rows[0].set_property("screenshot", "https://neurosphere.io/images/Produkt_komplett.png")
But how can I upload an image from my local files directly to this field?

Perhaps you could make a new ImageBlock, do upload_file, and then use the source and display_source from that? Then delete the ImageBlock when you're done?

@Cobertos good suggestion!
I tried it but it didn't work
# random page
randompage = client.get_block("https://www.notion.so/drowzee/random-98571d5817804919bba64f04b08960cf")

# add image block at random page
newchild = randompage.children.add_new(ImageBlock)
newchild.upload_file("Bilde1.png")

rows[0].set_property("img", newchild.source)
print(newchild.source)
print(newchild.display_source)

Both setting img to newchild.source and newchild.display_source gives this result:

I had the same issue with setting the source and display_source
property, https://github.com/jamalex/notion-py/issues/74
But I had success with using the .upload_file() method alone on a new
ImageBlock and doing nothing else to it when done. Specifically line 22-36
of this file was working for me
https://github.com/Cobertos/md2notion/blob/master/md2notion/upload.py
On Tue, Dec 17, 2019, 11:44 AM Lars Karbo<EMAIL_ADDRESS>wrote:

@Cobertos https://github.com/Cobertos good suggestion!
I tried it but it didn't work
random page
randompage = client.get_block("https://www.notion.so/drowzee/random-98571d5817804919bba64f04b08960cf")
add image block at random page
newchild = randompage.children.add_new(ImageBlock)
newchild.upload_file("Bilde1.png")
rows[0].set_property("img", newchild.source)
print(newchild.source)
print(newchild.display_source)
Both setting img to newchild.source and newchild.display_source gives
this result:
[image: image]
https://user-images.githubusercontent.com/10865165/71016035-d708ab00-20f4-11ea-8cd4-eeab257c5478.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jamalex/notion-py/issues/75?email_source=notifications&email_token=ABTSGCGOEUE5HMYMBSWE5U3QZD6W3A5CNFSM4JVL7VL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHDFPIQ#issuecomment-566646690,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABTSGCCLNOYWNSS6LGG4PALQZD6W3ANCNFSM4JVL7VLQ
.

Yep, I managed to upload the image. The newblock block in my code is working.
What I can't do is add this image to a row in the collection

I also have a similar problem. I have a row in a table with a field named "Word". I would like to upload a word file but it does not work for me:
ub = EmbedOrUploadBlock(client, str(uuid.uuid4()))
ub.upload_file("myfile.docx")

I get this error:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/federico/repos/proposal-generator/venv/lib/python3.7/site-packages/notion/block.py", line 623, in upload_file
    self.display_source = data["url"]
  File "/Users/federico/repos/proposal-generator/venv/lib/python3.7/site-packages/notion/maps.py", line 46, in fset
    self.set(path, python_to_api(value), **kwargs)
  File "/Users/federico/repos/proposal-generator/venv/lib/python3.7/site-packages/notion/records.py", line 116, in set
    build_operation(id=self.id, path=path, args=value, table=self._table)
  File "/Users/federico/repos/proposal-generator/venv/lib/python3.7/site-packages/notion/client.py", line 186, in submit_transaction
    self.post("submitTransaction", data).json()
  File "/Users/federico/repos/proposal-generator/venv/lib/python3.7/site-packages/notion/client.py", line 158, in post
    "message", "There was an error (400) submitting the request."
requests.exceptions.HTTPError: Null value found in type column of block table.

I also tried assigning the block before upload the file with proposals_page.collection.get_rows()[0].word.append(ub) but it did not change the result

Now I managed to upload a File inside a page, but I cannot add it as field in a collection. I can get the URL of the File when added inside the page, and copy that url in the field, however if I do this a get an error when accessing it in Notion:
{"errorId":"64980b97-4c3b-4d9d-a838-0cc7b66a4d6d","name":"ValidationError","message":"User does not have access."}

This is what I do:
            fb = proposal_line.children.add_new(FileBlock)
            fb.upload_file(docx_filename)
            proposal_line.word = [fb.display_source]

As a result, I cannot open the file here:

But I can open it here:

My solutions was this:
def upload_file_to_row_property(client, row, path, property_name):
    mimetype = mimetypes.guess_type(path)[0] or "text/plain"
    filename = os.path.split(path)[-1]
    data = client.post("getUploadFileUrl", {"bucket": "secure", "name": filename, "contentType": mimetype}, ).json()
    # Return url, signedGetUrl, signedPutUrl
    mangled_property_name = [e["id"] for e in row.schema if e["name"] == property_name][0]

    with open(path, "rb") as f:
        response = requests.put(data["signedPutUrl"], data=f, headers={"Content-type": mimetype})
        response.raise_for_status()
    simpleurl = data['signedGetUrl'].split('?')[0]
    op1 = build_operation(id=row.id, path=["properties", mangled_property_name], args=[[filename, [["a", simpleurl]]]], table="block", command="set")
    file_id = simpleurl.split("/")[-2]
    op2 = build_operation(id=row.id, path=["file_ids"], args={"id": file_id}, table="block", command="listAfter")
    client.submit_transaction([op1, op2])

My solutions was this:
def upload_file_to_row_property(client, row, path, property_name):
    mimetype = mimetypes.guess_type(path)[0] or "text/plain"
    filename = os.path.split(path)[-1]
    data = client.post("getUploadFileUrl", {"bucket": "secure", "name": filename, "contentType": mimetype}, ).json()
    # Return url, signedGetUrl, signedPutUrl
    mangled_property_name = [e["id"] for e in row.schema if e["name"] == property_name][0]

    with open(path, "rb") as f:
        response = requests.put(data["signedPutUrl"], data=f, headers={"Content-type": mimetype})
        response.raise_for_status()
    simpleurl = data['signedGetUrl'].split('?')[0]
    op1 = build_operation(id=row.id, path=["properties", mangled_property_name], args=[[filename, [["a", simpleurl]]]], table="block", command="set")
    file_id = simpleurl.split("/")[-2]
    op2 = build_operation(id=row.id, path=["file_ids"], args={"id": file_id}, table="block", command="listAfter")
    client.submit_transaction([op1, op2])

Thank you very much. It helps me resolve a big problem.

Hey there!
Thanks a lot @ftomassetti for the code above!
But one problem still exists: I can't upload multiple files in one row in the same property this way. The "old" file will always be overwritten. Has anyone an idea to solve this problem? I tried to figure it out myself, but wasn't able to find the right operations...

@Foaly333 I've faced the same issue. I added some code to store previous files in the list

def upload_file_to_row_property(client, row, path, property_name):
    mimetype = mimetypes.guess_type(path)[0] or "text/plain"
    filename = os.path.split(path)[-1]
    data = client.post("getUploadFileUrl", {"bucket": "secure", "name": filename, "contentType": mimetype}, ).json()
    # Return url, signedGetUrl, signedPutUrl
    mangled_property_name = [e["id"] for e in row.schema if e["name"] == property_name][0]
    with open(path, "rb") as f:
        response = requests.put(data["signedPutUrl"], data=f, headers={"Content-type": mimetype})
        response.raise_for_status()
    simpleurl = data['signedGetUrl'].split('?')[0]

    filelist = row.get('properties')[mangled_property_name] # Let's get information that was stored there
    filelist.append([filename, [["a", simpleurl]]]) #append new file

    op1 = build_operation(id=row.id, path=["properties", mangled_property_name], args=filelist, table="block", command="set")
    file_id = simpleurl.split("/")[-2]
    op2 = build_operation(id=row.id, path=["file_ids"], args={"id": file_id}, table="block", command="listAfter")
    client.submit_transaction([op1, op2])

@markobabych That's perfect, thanks a lot!

Great work, thank you guys. This is brilliant!

Great work, thank you guys. This is brilliant!

Thank you very much. It helps me resolve a big problem.

Hi Linpean, I'm quite new to Python so I'm having a hard time understanding which parameter and module to use. Do you mind sharing the "upload code" you showed in the video? Thanks in advance.


NullPointerException when writing report

Please delete any un-needed section from the following issue template:
Reporting Bugs/Errors
We get a NullPointerException when running org.owasp:dependency-check-maven:3.3.0:aggregate
Log
https://gist.github.com/Jidehem/e9b89cb7bd61d2a1973a2f3ec38cb6dc
Log summary
Failed to execute goal org.owasp:dependency-check-maven:3.3.0:aggregate (default-cli) on project shared-parent
[...]
Caused by: java.lang.NullPointerException                 at org.owasp.dependencycheck.Engine.writeReports(Engine.java:1115)                 at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.runCheck(BaseDependencyCheckMojo.java:1135)                 at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.execute(BaseDependencyCheckMojo.java:697)                 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
We have the same issue using version 3.2.1.
Main candidates:

breaking change in newer version
switch to using an oracle database instead of downloading files
Enable artifactory analyser
I'll test with earlier versions and check why it worked before. And test only one of the change above if I am allowed to...

Configuration
Maven plugin configuration can be seen here: https://gist.github.com/Jidehem/e9b89cb7bd61d2a1973a2f3ec38cb6dc#file-maven-properties
StackTrace Analysis
According to code https://github.com/jeremylong/DependencyCheck/blob/master/core/src/main/java/org/owasp/dependencycheck/Engine.java, the "database" field is null.
Any idea why this field may be null ?

Maybe related to #959 ?

Any chance you could provide the full debug log?  My guess is there is an issue connecting to the Oracle database and I've made the error reporting vague enough it is hard to figure out what is going on...

Your guess is correct: I found an issue in the database configuration and now it's working fine.
The error reporting should indeed be less cryptic. I'll try to provide the debug output when back from holidays if you still need it.

If you can provide the log - it may help me fix the error reporting.

Here is one of the debug output that gives the error.
I'm not sure it's the exact same cause, because I don't remember exactly what I fixed. But I remember that it was a missing or misconfigured property used to connect to the DB (I simply removed the connection string to generate the current log).
This should help locate the problem / improve error reporting.

We have now encountered the same issue on 4.0.2 gradle plugin. We are using local embedded database for the data.

We generally resolve it by invalidating local data in Gradle cache

@malejpavouk - any chance when you've run into this issue you've had the database open via a front-end client (IDE connection to the DB, the h2 command line tool, etc.)?  I just ran into a similar error when I had the database open in my IDE as I was querying the data, etc.  Then I tried to run ODC and it failed at the write-reports section (and yes - it should fail sooner and the error message should be more helpful).

@jeremylong Nope, this happened this time to one of my colleague and he was not familiar with inner workings of the plugin.
It also happened once to me and there I am sure that I was not looking to the DB file.

My personal guess (from my experience) is that the file was somehow corrupted when index update took long for whatever reason and I killed the process in the middle.

I found the spot where the exception message was being hidden. This will be resolved in the 5.0.0 release.

I am also getting the below error:

I am running mvn clean install and its throwing me the above error.


Retraining Custom Object Detection Model

I have been able to create my own custom object detection that is designed to detect various objects and converted the model to .onnx so that I can use my raspberry pi camera. After working on detecting various objects, I am trying to add new objects for the model to recognize and know that I would need to train another model. I was wondering how I would go about retraining the existing model I have to recognize new objects? I heard about transfer learning but do not fully understand how to set it up.

Bump.

Bump.

Hi @naimulhq, have you added the new object(s) to your previous dataset?   All the objects you want to recognize would need to be in the same dataset.   Otherwise, it will only train the model on the new objects only.
You should be able to use the --pretrained argument to train_ssd.py and point it to your previous model.  Or if you have trouble, just train it again from the beginning on your completed dataset (the dataset with both the old objects and new objects)

Hi @naimulhq, have you added the new object(s) to your previous dataset?   All the objects you want to recognize would need to be in the same dataset.   Otherwise, it will only train the model on the new objects only.
You should be able to use the --pretrained argument to train_ssd.py and point it to your previous model.  Or if you have trouble, just train it again from the beginning on your completed dataset (the dataset with both the old objects and new objects)

Hi @dusty-nv , No I haven't. Just to be clear, let say as an example I have trained a model which is able to detect cars but now, I would like to make that same model be able to detect an airplane. I would have to add the images and annotations for the airplane in the existing dataset for cars?

Hi @dusty-nv , No I haven't. Just to be clear, let say as an example I have trained a model which is able to detect cars but now, I would like to make that same model be able to detect an airplane. I would have to add the images and annotations for the airplane in the existing dataset for cars?

I would have to add the images and annotations for the airplane in the existing dataset for cars?

Yes that is correct, otherwise the model would only detect cars.

I would have to add the images and annotations for the airplane in the existing dataset for cars?

Yes that is correct, otherwise the model would only detect cars.

@dusty-nv Lastly, when I use the --pretrained argument, do I point it to the .onnx file or .pth?

@dusty-nv Lastly, when I use the --pretrained argument, do I point it to the .onnx file or .pth?

Lastly, when I use the --pretrained argument, do I point it to the .onnx file or .pth?

The .pth - the last pth that was output

Lastly, when I use the --pretrained argument, do I point it to the .onnx file or .pth?

The .pth - the last pth that was output

@dusty-nv Thank you very much!

@dusty-nv Thank you very much!


Opening Multiple Files

Hi,
Love the project!
I've been messing and using this in my day to day, and its made my Windows Dev experience much better, and very close to how I edit in Linux with pure neovim.
One thing I wonder is how to open multiple files?
I expected that I would be able to use the tab or split open from the menu and select multiple files to have them all open at once, but that doesn't seem to be the case.
Normally I'd use some form of fuzzy file opener to just open up more tabs/splits, but I'm also having an issue where that isn't opening the current directory...I can open a separate issue for that though.
This occurs with 0.25 and 0.26rc in Windows 10.
I've identified the relevant bit in Menu.js that deals with this, so I guess I could submit a PR?
It looks like the dialog.showOpenDialog just needs the multiSelections property added, and a bit of logic to deal with how the first file is dealt with.
If there is no file open should a new tab be made anyway and leave an empty tab, or should we open the first file in the first tab, assuming no changes have been made in that tab?
Wasn't sure if I was missing something that would let me already do this, or there was a reason it didn't work as (I) expected.
Cheers!

There isn't really a good way to open multiple files yet, although I did
recently add drag-n-drop support for multiple files.  So you can give that
a try in the short term.
On Wed, Jun 28, 2017, 1:25 PM Ryan C<EMAIL_ADDRESS>wrote:

Hi,
Love the project!
I've been messing and using this in my day to day, and its made my Windows
Dev experience much better, and very close to how I edit in Linux with pure
neovim.
One thing I wonder is how to open multiple files?
I expected that I would be able to use the tab or split open from the menu
and select multiple files to have them all open at once, but that doesn't
seem to be the case.
Normally I'd use some form of fuzzy file opener to just open up more
tabs/splits, but I'm also having an issue where that isn't opening the
current directory...I can open a separate issue for that though.
This occurs with 0.25 and 0.26rc in Windows 10.
I've identified the relevant bit in Menu.js that deals with this, so I
guess I could submit a PR?
It looks like the dialog.showOpenDialog just needs the multiSelections
property added, and a bit of logic to deal with how the first file is dealt
with.
If there is no file open should a new tab be made anyway and leave an
empty tab, or should we open the first file in the first tab, assuming no
changes have been made in that tab?
Wasn't sure if I was missing something that would let me already do this,
or there was a reason it didn't work as (I) expected.
Cheers!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/extr0py/oni/issues/503, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAx5ZW3krizpCJWA2qKcppmkQP2M-kLVks5sIqizgaJpZM4OIaix
.

The main issue with opening multiple files is behavior. We can't know for sure how you'd like to open your files, and even if we can we don't know that others will.
As for your fuzzy finder issue, is it loading forever or is it just empty?

Yeah that's true, after I posted the comment I tried to work out what is the most sensible behavior, but there is arguments for a bunch of different ways.
It's not empty, it's just regardless of where my file is open, it only shows files relative to oni in some fashion, I think the electron folder. If I swap the search command to the suggested windows one in Config.ts, It swaps to the program files folder that oni is installed in.
Just looks like on my machines it's unable to open the current folder, so always opens the oni relative ones.

@CrossR , Glad to hear Oni is making your Windows Neovim experience better, that's great 👍 👍  Thanks for trying it out and for the feedback! Really appreciate you opening up the issue.
It sounds like you dug in and have a PR for opening multiple files. It's definitely a scenario we'd like to support and is really common in workflows. I don't think there are any technical blockers, since as you mentioned there is the multiSelections property available on the electron dialogs.

If there is no file open should a new tab be made anyway and leave an empty tab, or should we open the first file in the first tab, assuming no changes have been made in that tab?

Good question. As you mentioned you could make arguments for either behavior.  As an aside, I'm working on adding a visible tab list / buffer list in Oni:

I think that the first behavior - opening file in the first tab - is more natural in that context (otherwise you get an empty tab).

Wasn't sure if I was missing something that would let me already do this, or there was a reason it didn't work as (I) expected.

Thanks for checking - in general, we've been very incremental about adding features, and need help filling them out completely - so if something isn't working the way you expect, it's probably Oni missing something and not you 😄 . Glad you logged an issue - probably other people had the same question!
And if you have a PR, that's even better - I'm very open to accepting PRs and happy to help you get it in.
Oh and I opened #506 to track the discussion around the Fuzzy Finder / QuickOpen - I figured we can keep this issue for a fix for the multi-selection, and then #506 to track the fuzzy finder problems. Likely they will be different code changes anyway.
Thanks again for trying Oni & logging the issue!

All sounds good to me!
I've add the 2 line change to make Split and Tab open multiple files, I just need to swap it now so it will check if the current tab is empty and has no edits in. Any suggestions on how to do that?
I did get it working to test how it felt by comparing against the Oni title, ie by checking the current Title wasn't "[No Name] - ONI" but thats hardly a good solution since the moment the title bar changes it will fail. I figure I'll either want to try and hook into and get the state of the current window/neovim instance, or possibly just call a vim command and get a response from that if possible.

I've add the 2 line change to make Split and Tab open multiple files, I just need to swap it now so it will check if the current tab is empty and has no edits in. Any suggestions on how to do that?

Thanks for looking at this change! I'm assuming you're modifying Menu.js to handle multiple files coming back, specifically the callbacks from dialog.showOpenDialog:
                click: (item, focusedWindow) => {
                    dialog.showOpenDialog(mainWindow, ['openFile'], (files) => {
                        executeVimCommandForFiles(":e", files)
                    })
                }

The Menu.js file is in the main process, which doesn't know about Neovim - all of that action happens in the renderer process. So unfortunately we can't make that more robust check to see if the current tab is empty / has no edits - but if you look at those definitions, like executeVimCommand, we actually pass a message to the renderer process like:
    const executeVimCommand = (command) => mainWindow.webContents.send("menu-item-click", command)

This message - menu-item-click gets sent to the renderer process, over in NeovimEditor.tsx, which can talk directly to Neovim to get this more robust check:
        ipcRenderer.on("menu-item-click", (_evt: any, message: string) => {
            if (message.startsWith(":")) {
                this._neovimInstance.command("exec \"" + message + "\"")
            } else {
                this._neovimInstance.command("exec \":normal! " + message + "\"")
            }
        })

The _neovimInstance over here lets us do a bunch of things - we can ask about the current window, you can evaluate a VimL block, etc. Check out NeovimInstance.ts (specifically, the INeovimInstance interface to see the capabilities / examples).
So in this case, what we might want to do, is create a new message type - like open-files that passes an array from Menu.js to NeovimInstance.tsx (main process -> renderer process). We could hook it up much like the menu-item-click event. Then we could use the _neovimInstance in the handler for our new open-files event to execute our more robust check to see whether we have a buffer open, and branch based on that.
Hope that helps! 😄 It's a lot of moving parts, so please let me know if you need any more details.

I've almost got this working now.
It works for all cases except opening multiple splits whilst having no file open, and no modifications made.
I've got some VimL that I'm evaluating that says "If the file is modified, or the file is not called [No Name], then the first file in a new split/tab. If the file has no modifications and is called [No Name] then we can instead open the first file in the current window. The rest are then just iterated over in a loop and we call tab or split on them.
That works fine for tabs. For splits, I think the changing of the buffer or the async nature of using Promises with _neovimInstance.command( ) causes splits to fail after the first file.
I've done some poking around, but was wondering if anyone had any ideas?

It works for all cases except opening multiple splits whilst having no file open, and no modifications made.

Awesome, sounds like great progress!

For splits, I think the changing of the buffer or the async nature of using Promises with _neovimInstance.command( ) causes splits to fail after the first file.

What's the VimL you are using here? If you need to do major chaining / branching, you can potentially create a VimL function that we call directly from the UI layer to do the work. There's a few examples in oni/vim/core/oni-core-interop/plugin/init.vim. The OniApiInfo and OniUpdateWindowDisplayMap are good examples of ones that have sort of extended logic that were easier to implement directly in VimL. I hope to keep this layer relatively thin, though.
Hope that helps. Feel free to open up a PR, I'm happy to help take a look at it further if that still didn't solve the issue.

I believe this issue was resolved with #526 so I'll go ahead and close it.


Feature/slash checks

Summary

This PR adds application command checks, similar to the existing prefix command checks.
Changes:

adds global, cog, and local checks to the application command, along with all the premade ones such as checks.guild_only()
implements before and after invoke hooks
new client event, on_application_error, similar to on_command_error
adds on_error error handlers to application commands
adds attached of type InteractionAttached (more on that in the next line), application_command, client, and bot attributes to the Interaction class
adds InteractionAttached class, added to each instance of Interaction. Used to store any data within the interaction itself.
moves _get_overridden_method from commands.Cog to application_commands.ClientCog
moves owner_id, owner_ids, and is_owner method from commands.Bot to nextcord.Client

(The documentation and type hinting may need some review, not too sure if I did those correctly)
Checklist

[x] If code changes were made then they have been tested.

[ ] I have updated the documentation to reflect the changes.

[ ] This PR fixes an issue.
[x] This PR adds something new (e.g. new method or parameters).
[ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
[ ] This PR is not a code change (e.g. documentation, README, ...)

@VincentRPS or @ooliver1  can you update the docs for this?

A ton of this is out of scope of what the library is supposed to do?

What part of it is out of scope? Slash checks are a feature I as well as many others have been requesting...

What part of it is out of scope? Slash checks are a feature I as well as many others have been requesting...
I'd also say it's kind of important since many want to easily migrate their prefix commands to slash commands

Agreed, checks are needed for a well-made bot with different features. I, for example, currently define a slash_command_check function in every Cog made and then put the following line in every single slash command function, which for obvious reason is not optimal. And since not everybody should be able to reload a Cog or use moderation features, the bot needs to check if the person doing it, is the owner, or other things.
if await self.slash_command_check(interaction):

I've moved checks.py along with some errors to its own .ext module
Some changes will still have to remain within application_commands.py and client.py in order for the checks to be functional.

@alentoghostflame Resolved every issue you mentioned. However I'm not sure if moving the checks and before/after invokes to state or moving the code to run the hooks from the client to ApplicationSubcommand was the best move. I originally made it the way it was before because it mimicked the way ext.commands was structured.

Fixed everything. Tbh I don't even remember removing all of those newlines.
All that's left is the cog error handler, however, I'm not sure if I should be the one doing that part.

Merged.

Merged.

?

Any updates?

please edit setup.py, i am unable to install and test this as it will not load that package

Done

Note: this is waiting on my docs pr to okay's fork too

netlify broken - https://ooliver-nextcord.readthedocs.io/en/ooliver1-feat-ext-checks-docs/ext/application_checks/index.html


Ports worth blocking for incoming connection? (Firewall)

Any thoughts on adding some common ports worth blocking via firewall? such as this list:

CharGEN (UDP/19)
DNS (UDP/53) (Open Resolver Project)
Kad (UDP/6429)
MS-SQL (UDP/1434)
NetBIOS (UDP 137 to 139)
NTP Mode 6 (UDP/123) (Open NTP Project)
NTP Mode 7 (UDP/123)
QOTD (UDP/17)
Quake Network Protocol (UDP/26000 and UDP/27960)
SNMPv2 (UDP/161) (Open SNMP Project)
SSDP (UDP/1900) (Open SSDP Project)
Steam Protocol (Many – UDP/27015)
Botnet Protocols:
Conficker (TCP/445)
Gameover Zeus (Takedown by the FBI on 2014-05-30)
Sality
Zeroaccess
Protocols That Should not be Exposed:
CWMP (TCP/7547)
DB2 (UDP/523)
Elastic Search (TCP/9200)
HDFS (TCP/50070, TCP/50075, TCP/50090, TCP/50105, TCP/50030, TCP/50060)
IPMI (UDP/623)
LDAP (UDP/389)
mDNS (UDP/5353)
MemCached (TCP/11211)
MongoDB (TCP/27017, TCP/27018, TCP/27019, TCP/28017)
NAT-PMP (UDP/5351)
NetBIOS (TCP/137 to 139)
Portmapper (UDP/111)
RDP (TCP/3389 and UDP/3389)
REDIS (TCP/6379)
rlogin (TCP/513)
SSDP (TCP/1900)
TFTP (UDP/69)
Telnet (TCP/23)
Telnet, Alternative (TCP/2323)
VNC (TCP/5900)
XDMCP (UDP/177)
Protocols That are Vulnerable:
ISAKMP (UDP/500)
Netcore/Netis Router (UDP/53413)
SSL/FREAK (TCP/443)
SSLv3 (TCP/443)
Synful Knock (TCP/80)

Better to allow the things you want than to block everything you don't want.
28 maj 2017 kl. 06:46 skrev Nadav Appel<EMAIL_ADDRESS>
Any thoughts on adding some common ports worth blocking via firewall? such as this list:
`CharGEN (UDP/19)
DNS (UDP/53) (Open Resolver Project)
Kad (UDP/6429)
MS-SQL (UDP/1434)
NetBIOS (UDP 137 to 139)
NTP Mode 6 (UDP/123) (Open NTP Project)
NTP Mode 7 (UDP/123)
QOTD (UDP/17)
Quake Network Protocol (UDP/26000 and UDP/27960)
SNMPv2 (UDP/161) (Open SNMP Project)
SSDP (UDP/1900) (Open SSDP Project)
Steam Protocol (Many – UDP/27015)
Botnet Protocols:
Conficker (TCP/445)
Gameover Zeus (Takedown by the FBI on 2014-05-30)
Sality
Zeroaccess
Protocols That Should not be Exposed:
CWMP (TCP/7547)
DB2 (UDP/523)
Elastic Search (TCP/9200)
HDFS (TCP/50070, TCP/50075, TCP/50090, TCP/50105, TCP/50030, TCP/50060)
IPMI (UDP/623)
LDAP (UDP/389)
mDNS (UDP/5353)
MemCached (TCP/11211)
MongoDB (TCP/27017, TCP/27018, TCP/27019, TCP/28017)
NAT-PMP (UDP/5351)
NetBIOS (TCP/137 to 139)
Portmapper (UDP/111)
RDP (TCP/3389 and UDP/3389)
REDIS (TCP/6379)
rlogin (TCP/513)
SSDP (TCP/1900)
TFTP (UDP/69)
Telnet (TCP/23)
Telnet, Alternative (TCP/2323)
VNC (TCP/5900)
XDMCP (UDP/177)
Protocols That are Vulnerable:
ISAKMP (UDP/500)
Netcore/Netis Router (UDP/53413)
SSL/FREAK (TCP/443)
SSLv3 (TCP/443)
Synful Knock (TCP/80)`
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

There's no need to block ports for two reasons: a) most Macs are already behind a NAT and thus not exposed to the whole Internet, and b) one would have to do something explicit to enable services listening on those ports and thus assumed to know what one is doing. Better yet, block all ports you don't need and go by the whitelisting model rawtaz@ alluded to; this is possible with Little Snitch.

@nadavP3
If you enable the Software Firewall built in to Mac, then default operation is to BLOCK EVERYTHING (incoming), unless an exception has been specifically setup (which is not uncommon for specific apps).
Additionally as DrDuh responded, most client computers are behind a NAT router, and thus it's impossible for internet scans to reach you - unless you have both (a) a Mac Software Firewall exception for that port, AND (b) that port routed through to your specific IP address, either manually setup in your router (which you would only do deliberately) or via Mac's NATPMP.
That link you referenced is primarily aimed at 'servers' that typically have a network i/f directly connected to the internet.

The entire notion of a firewall that allows all traffic except that which you manually choose to block (in the context of a domestic & small-business networks) was a quaint idea that died 20 years ago.

Ahh, I see, thanks for the detailed explanation :)


getResourceAsync Race condition returning a still loading resource

While I was working on #75 I needed a way to recursively get the parents of a resource.
I tried to create a new hook backed by recursive calls to getResourceAsync.
I noticed that getResourceAsync in store.ts suffers from a race condition happening when resource x is called by getResourceLoading(x) and, while it's still loading, you call getResourceAsync(x) it will return a unready resource.
I suppose this is not the intended behaviour.
Opening a pull request with the fix

Fixed by @adileo! Thanks :)


Shell Script and Bash Commands Highlight

After 5 years using Sublime, I am migrating to VS Code, however I have noticed a big problem in HighLight of Shell (Bash) language, variables are not colored correctly, bash commands, etc. Is there any forecast or any way to fix this?

/findDuplicates

@agenciah1code, is this what you mean?

Where file is not colored?
It looks like this is a problem with the grammar we use from atom/language-shellscript.

This issue was moved to atom/language-shellscript#130

If there is another shell script grammar that will classify variables better then we could look into moving to it 😊


Platform e2e playwright test

Issue:

bcgov/entity/issues/25050

Description of changes:
https://github.com/user-attachments/assets/7e00084e-ed67-4735-85cc-5a1f90574c01
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).

Temporary Url for review: https://strr-platform-dev--pr-414-rfh9zig0.web.app

Temporary Url for review: https://strr-platform-dev--pr-414-rfh9zig0.web.app

Temporary Url for review: https://strr-examiner-dev--pr-414-zpg1hgax.web.app

Temporary Url for review: https://strr-examiner-dev--pr-414-zpg1hgax.web.app


feat(datetime): return value in the format display & picker

Sorry that this is a simple PR without registration

Pull request checklist
Please check if your PR fulfills the following requirements:

[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[x ] Build (npm run build) was run locally and any changes were pushed
[x ] Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Issue Number: N/A
What is the new behavior?

Does this introduce a breaking change?

[ ] Yes
[x ] No

Other information

Hi there,
It looks like your build is failing. Can you please fix this? Also please fill out the template including current behavior and new behavior.
Thanks!

Thank you for the PR! While we appreciate you taking the time to submit a PR, this is not something we are going to merge in. If datetime values need to be parsed from a certain format, or manipulated (such as adding 5 days to a date, subtracting 30 minutes, etc.), or even formatting data to a specific locale, then we highly recommend using date-fns to work with dates in JavaScript. Other options include using momentjs or converting to a Date object to use its formatting methods. I put together an example Codepen using the last way: https://codepen.io/brandyscarney/pen/zYvVdJo?editors=1010


Add x-ms-format mappings for DataFactoryExpression

Description
Add your description here!
Checklist
To ensure a quick review and merge, please ensure:

[ ] The PR has a understandable title and description explaining the why and what.
[ ] The PR is opened in draft if not ready for review yet.

If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review

[ ] The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

[ ] Build is completely green

Submissions with test failures require tracking issue and approval of a CODEOWNER

[ ] At least one +1 review by a CODEOWNER
[ ] All -1 reviews are confirmed resolved by the reviewer

Override/Marking reviews stale must be discussed with CODEOWNERS first

Created https://github.com/Azure/autorest.csharp/issues/2871 and https://github.com/Azure/autorest.csharp/issues/2870 as follow ups.

I've generated against azure-sdk-for-net with these changes and confirmed there is no diff.

This is no longer the case with the GetRawText change.

Diff - https://github.com/Azure/azure-sdk-for-net/pull/32822


market id is returned in result from onSent, use that to store the ma…

…rket liquidity
Surprisingly marketId is returned in result of onSent method call.
https://app.clubhouse.io/augur/story/16123/fix-edge-case-in-creating-market-liquidity
Not totally sure why the race condition. In testing on 45s private chain code functions correctly. There could be a weird issue with log-handler createMarket comes in before the submit create market onSuccess is called.
by moving the create liquidity to the onSent we handle the case where the user closes the browser after submitting create market tx.

Coverage remained the same at 63.805% when pulling 3722870c2266d0e1bcb21fbc736470fdd2410bc3 on tomhaile/ch16123/fix-edge-case-in-creating-market-liquidity into 924544f6c206b669a41fb13d4d43bac8996a1e4a on master.


feat(radio-group): add fds-radio-group component

:tada: This issue has been resolved in version 0.16.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Use jinja templates for multivehicle simulations

Describe problem solved by this pull request
Multivehicle simulations in gazebo was run using xacro macros to generate sdf files in the /tmp directory with the necessary port assignments to enable it.
However, there are several problem with this infrastructure

xacros do not support some of the syntaxes that were added in recent sdf versions (e.g. nested models)
PX4 uses xacro.py, which is deprecated
xacro based macros were not on the same path with the models that they represent, therefore got outdated whenever the models were updated. (see below for the current state of standard_vtol)

Describe your solution
jina2 templates are now used to generate sdf files at build time. This PR moves the multivehicle script to use jinja templates instead of xacro files. After this is merged, xacro macros will be completely removed from sitl_gazebo
Test data / coverage
Tested in Gazebo SITL:

Additional context

This requires the following changes in the `PX4/sitl_gazebo submodule: https://github.com/PX4/sitl_gazebo/pull/609 https://github.com/PX4/sitl_gazebo/pull/612
Fixes: https://github.com/PX4/Firmware/issues/15609

The required changes in the submodule has been merged and is included in https://github.com/PX4/Firmware/pull/15797/checks?check_run_id=1182118748


Skip Chapter button

Describe your suggested feature
Since duplicate chapters can occur relatively frequently (different groups), it would be handy to have a skip chapter button while in reading mode. Currently you have to back out and hold to mark chapter as read (or rapid tap through the chapter). This way when you see a duplicate you can fast travel to the next non-duplicate chapter. Should mark the skipped chapter as read and delete it if you have it set to delete as you read (might need a confirmation dialogue).
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] If this is an issue with an official extension, I should be opening an issue in the extensions repository.
[X] I have updated the app to version 0.16.1.
[X] I will fill out all of the requested information in this form.

@Void2258
Settings>Reader>skip duplicate chapters option
Also the Scanlator filter from filters of chapter list
Could these be it?

This requires the chapter follow proper formatting to register as the same chapter. This is often not the case, especially is one group releases "chapter 6" while another releases 6.1, 6.2, etc. So we need a manual switch for when the automatic can't catch it.

Almost created another issue until I found this.
the current Skip duplicate chapters would mistakenly hides chapters if entry has volumes/seasons in it
A lot of entries have chapters named in form: Volume - Chapter or Season - Chapter
When reading, chapters would be skipped and hidden, causing wrongly jump to next chapter. For example reading Season 2 Chapter 03 will jump to next chapter Season 1 Chapter 03/04.
Since the toggle for Skip duplicate chapters is in Settings, it is very inconvenient to switch the setting on/off while reading. We don't really know how each source organizes their entries so don't think a fixed setting is no way.
Possible solution:

Make the Skip duplicate chapters feature smarter to recognize also volume/season number. This would also close #213
Or if it detects any abnormal in chapter number, it disables itself for that entry.
Or make a per-entry setting for this Skip duplicate feature.

Or else the Skip duplicate feature would be meaningless.

the current Skip duplicate chapters would mistakenly hides chapters if entry has volumes/seasons in it

Mihon only works with chapters, it is oblivious to the concept of Volumes/Seasons, always has been

A lot of responses here are about automation. I am not even suggesting this. I just think there should be a manual button to let you jump to the next chapter with one press without having to rapid-tap through. If group one did chapter 12, then group 2 does chapter 12.1, I should just be able to fast skip until I hit a chapter 13, not have to rapidly page flip.

But, there is a Next Chapter button on the progress bar o_0

Since you guys un-necro'd the request, I'll just finally close it (like I've had written in my list for a while)

As BrutuZ mentioned, the reader already has a Previous & Next chapter button to the left & right of the Page Slider, use that

Plus, you can also just skip duplicate chapters entirely if you want:

(Per-series) Filtering scanlators for the title (Manga entry > Filter button/three lines button)
Then go to Mihon Settings > Reader, and turn on "Skip filtered chapters" and/or "Skip duplicate chapters"


Building a design system on top of existing framework like Vuetify

Our team had certain requirements requiring us to utilize some individual components from Vuetify. I am struggling trying to get elements which are extending vuetify components to render properly in the Vue Design System. I have followed a similar thread on vue-styleguidist here: https://github.com/vue-styleguidist/vue-styleguidist/issues/92
Does anyone have a method they have successfully used with Vue Design System?
Thanks 🙇

@jaylandro Did you ever manage to get this working?

I have traction, last missing part is wrapping the generated react style guide markup in v-app.
I tried adding in to the body template in docs.config.js like this:
	/**
	 * Custom wrapper template for the documentation.
	 */
	template: {
		title: 'Example — Vue Design System',
		lang: 'en',
		trimWhitespace: true,
		head: {
			meta: [
				{
					name: 'viewport',
					content: 'width=device-width,initial-scale=1.0',
				},
				{
					name: 'format-detection',
					content: 'telephone=no',
				},
			],
		},
		body: {
			raw: '<v-app data-app></v-app>'
		}
	},

But that appears after the rsg root component, not wrapping it.

Also my system.js looks like this:
import instance from '@/utils/vueInstance'
import Vuetify from 'vuetify/es5/components/Vuetify'
import VApp from 'vuetify/es5/components/VApp'
import transitions from 'vuetify/es5/components/transitions'
import directives from 'vuetify/es5/directives'

Vue.use(Vuetify, {
	components: {
		VApp,
		transitions,
	},
	directives,
})

// Defines contexts to require
// (you should remove templates from this if not used in production)
const contexts = [require.context('@/elements/', true, /\.vue$/), require.context('@/patterns/', true, /\.vue$/)]

const components = [Vuetify, VApp]
contexts.forEach(context => {
	context.keys().forEach(key => components.push(context(key).default))
})

export default {
	install(Vue) {
		components.forEach(c => Vue.component(c.name, c))
	},
}

@jaylandro This is definitely possible, I tested earlier and got everything working. Did you check out Styleguidist’s demo for Vuetify: https://github.com/vue-styleguidist/vue-styleguidist/tree/master/examples/vuetify ? I think what’s missing is that you need to separately import vuetify and everything related to styleguidist. Checkout the config files here: https://github.com/vue-styleguidist/vue-styleguidist/blob/master/examples/vuetify/config/global.requires.js

I have written up a mini as to how to implement Vuetify into the Vue Design System, with a request for documentation raised in this issue: https://github.com/viljamis/vue-design-system/issues/187


GH-34104: [Python] update deduplicate_objects default in docs to match implementation

Closes: #34104

I confirmed that the default behavior does indeed deduplicate:
>>> x = pa.array(['one', 'one'])
>>> y = x.to_pandas()
>>> id(y[0]) == id(y[1])
True
>>> z = x.to_pandas(deduplicate_objects=False)
>>> id(z[0]) == id(z[1])
False

I was a bit surprised by this default, but indeed it has been True as default from the start: https://github.com/apache/arrow/pull/3257 (the PR mentions some rationale for the default; the default is only False on the C++ side)
But be careful with a test like that, because Python itself also does some small string interning. If you create such a list in Python:
>>> l = ["one", "one"]
>>>  id(l[0]) == id(l[1])
True

But it seems that with the Python C API we use when creating those strings in the to_pandas conversion, this string interning is not used.


Additional SecretTransforms in ServiceBinding (add key w/ JSONPath template, remove key, merge another secret)

This is an extension of the new credentials remapping feature, which allows users to add additional entries to the credentials Secret on top of simply renaming existing entries.
The main purpose of the credentials remapping feature is to allow users to transform the credentials returned by the broker into what the service consumer expects (without having to modify the consumer). In some cases, the consumer requires additional parameters to consume a service (parameters that the broker does not return  - e.g. the connection pool size, the JNDI name for the datasource, etc.).
Yes, these additional parameters could be injected into the consumer completely separately, but in a way, it does make sense for everything that's necessary for a consumer to consume a service, to be specified in one place (initially in the ServiceBinding and then in the Secret).

At the face to face we discussed being able to transform binding response bodies that didn't fit the assumed structure of
{
  "credentials": { }
}

It was suggested that instead of a string representing the field under credentials that should be renamed, we could use a jsonpath instead so that non-standard brokers could be dealt with too.
So for example database.name could be mapped to "database" and database.ip to "host", etc
{
 "database" : {
    "name" : "mydb",
    "ip": "<IP_ADDRESS>"
  }
}

I can't quite tell if this would do that?

@carolynvs Well, this PR does allow users to remap nested credentials, but the root of the transformation is the credentials field, not the whole response. I don't remember us agreeing that the whole response should be the root. @pmorie's argument against that is that service catalog users don't care about the structure of the broker's response - they only care about the resulting Secret.
I do agree with him, but I also feel like @n3wscott has a good point that we may want to set the root at the response level. IMHO, it depends mostly on what the direction of OSB API spec will be. If the OSB spec ends up adding one or more sibling fields to credentials (e.g. an additional field for non-secret data) instead of allowing you to annotate some fields under credentials as non-secret, we could leave the root at credentials, and later introduce something like a ConfigMapTransform (I'm assuming we'd put the contents of the other field into a ConfigMap).
Anyway, here's the test case that shows how non-flat credentials can be remapped: https://github.com/luksa/service-catalog/blob/fb21c794aa4b3af82439ab3fe3fcbff38fbc9712/pkg/controller/controller_binding_test.go#L3884-L3903

Ah okay I see now, it adds another key to the secret using the value found from following the jsonpath and keeps the existing values as well. 👍

@carolynvs Yup. It needs to be an AddKeyTransform instead of a RenameKeyTransform or similar, because the JSONPath may refer to multiple existing keys and we probably don't want the transform to remove all those keys automatically, right? We probably want the user to explicitly remove keys with the RemoveKeyTransform.

BTW, can someone please review the naming of the fields/structs?

Yeah I noticed it was singular when I started using it. I'm all either fixing it here or as a follow-on.
This is really great BTW, thanks for adding this! ✨

@luksa I gave you a second LGTM, but held off on merging in case you wanted to do any additional changes in this PR. Everything I commented on is fine as follow ups if necessary.

I'm renaming secretTransforms right now. Let's get it in as soon as possible, before a large number of people start using them.


can not receive message

Hi,I run this demo but it seems that can not receive messages.I run parity v1.8.7

(I encountered this, and got it to work)
Double check if the public key used has a trailing space.
If so, remove it.


How to specify a jshint configuration file?

How do I specify the path and name of the configuration file I'd like to use for JSHint, if it's not the default path and file name?

Put this in the docs, took me an hour to find this

@ddietzel this is mentiond in the paragraph underneath the code samples here: https://github.com/spalger/gulp-jshint/blob/master/README.md#options
Happy to consider a pull request improving this

you give what looks like a complete list of the available options: "loopup, linter" and then add some additional verbose text below explaining that, no, those aren't all the options, if you want the complete list you have to read this bit too.
if you're going to give a list, at least make it complete.
and, no. no PR from me.


Nearley integration

That's an initial attempt at replacing our current parser with Nearley. Just trying it out and seeing what kind of problems arise.
Discovered several problems:

[x] Case-sensitivity: Nearley matches against token.text field, which in our case (and in Moo) is the original text in source file. We should change it around, so that token.text would be the canonical/clean value to match against while some other field would store the original string.
[x] Semicolons: Currently semicolon is just another operator, should turn it into a separate token type, which would simplify distinguishing it from other operators.
[x] Ambiguity: our current parser simply goes with first rule that matches, while Nearley tries to match all possible rules, leading to ambiguity.

The first two are simple to fix, but the ambiquity problem is a major one.
For example I'd like to parse both function calls and plain blocks of parenthesis. If I write a grammar like this:
main -> expression:*

expression -> function_call | parenthesis | plain_token

function_call -> %IDENT parenthesis

parenthesis -> "(" expression:* ")"

plain_token -> %IDENT | %NUMBER | %STRING | %OPERATOR

and try to parse a string foo(), then Nearley will return two parse results:

a function_call
a plain_token followed by parenthesis

To solve this problem we would need to write a more complex grammar that only allows IDENT followed by ( inside a function call.

Finally replaced our old parser with Nearley-based parser.
All tests are passing, except for one which will get fixed by merging #400
Some general thoughts about the Nearley-based parser v/s our current one:

The grammar.ne file (221 lines) is about the same size as our current manually written Parser.ts (212 lines).
There are gotchas when writing it either manually or using Nearley syntax.
Nearly will more likely throw an error to your face when you don't get your grammar right, while the manual parser will more likely so something silently wrong - so you'll more likely end up with incorrectly formatted code for unclear reasons, while with Nearley you more likely end up with an error message and no formatting happening at all.
We no more support obviously broken syntax like SELECT ( - no closing parenthesis.
There are currently some hacks involved to distinguish between func_name(...) and separate func_name or (...). Same with square brackets. The way to avoid these hacks would be to write a full grammar which is... yeah... a huge task. Luckily these hacks are at least neatly separated in disambiguateTokens.ts file.
In general though, I think using Nearley is a better approach overall. It won't quickly solve all our problems, but it's more likely a better foundation for moving forward.

I've marked this PR as ready for review, though there are still some tasks to do:

[ ] Removal of the old Parser implementation.
[ ] Performance measurements and optimizations (if needed).

Would like to propose moving the grammar.me back to its own grammar dir to serve as a base point for when we expand the grammar / split the singular ne file into multiple component files and have the parser dir only for parser typescript files

Would like to propose moving the grammar.me back to its own grammar dir

I think this can always be done later when the need arises. I don't see it as a certainty that we would split it up. Having looked at various other grammars in other projects, they always seem to be in a single file. We might end up needing multiple grammars for multiple sql dialects, but I wouldn't bet on it either.

Ran the initial performance test with jsben.ch, using my good old code:
sqlFormatter.format(
  "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
  + "select supplier_name,city from (select * from suppliers join addresses on suppliers.address_id=addresses.id) as suppliers where supplier_id>500 order by supplier_name asc,city desc; ALTER TABLE `Album` ADD CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION; CREATE TABLE `Customer` ( `CustomerId` INT NOT NULL AUTO_INCREMENT, `FirstName` NVARCHAR(40) NOT NULL, `LastName` NVARCHAR(20) NOT NULL, `Company` NVARCHAR(80), `Address` NVARCHAR(70), `City` NVARCHAR(40), `State` NVARCHAR(40), `Country` NVARCHAR(40), `PostalCode` NVARCHAR(10), `Phone` NVARCHAR(24), `Fax` NVARCHAR(24), `Email` NVARCHAR(60) NOT NULL, `SupportRepId` INT, CONSTRAINT `PK_Customer` PRIMARY KEY  (`CustomerId`)); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Jump Around', 258, 1, 17, N'E. Schrody/L. Muggerud', 217835, 8715653, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Salutations', 258, 1, 17, N'E. Schrody/L. Dimant', 69120, 2767047, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Put Your Head Out', 258, 1, 17, N'E. Schrody/L. Freese/L. Muggerud', 182230, 7291473, 0.99); INSERT INTO `Track` (`Name`, `AlbumId`, `MediaTypeId`, `GenreId`, `Composer`, `Milliseconds`, `Bytes`, `UnitPrice`) VALUES (N'Top O'' The Morning To Ya', 258, 1, 17, N'E. Schrody/L. Dimant', 216633, 8667599, 0.99); INSERT INTO `Invoice` (`CustomerId`, `InvoiceDate`, `BillingAddress`, `BillingCity`, `BillingState`, `BillingCountry`, `BillingPostalCode`, `Total`) VALUES (48, '2013/8/2', N'Lijnbaansgracht 120bg', N'Amsterdam', N'VV', N'Netherlands', N'1016', 1.98);"
, {
  language: "mysql",
});

The result is that Nearley branch is:

10 x slower in Firefox
4 x slower in Safari
10 x slower in Chrome

I have a small optimization in mind... will see whether this helps.

I tried caching the creation of Nearley parser, but this had zero effect on performance :(

Also checked that the performance degrades further as the size of SQL to be parsed increases. Like when I increased the size of SQL 4 times, the performance dropped from 9.8% to 6.8%.
But I'd say it's still acceptable. It's far from the old times when the formatter would just choke for that amount of SQL.

Ran another performance test, this time with NodeJS using a local large SQL file (271KB). Here the difference was pretty staggering: The old version took just 450 ms, while the Nearley version took 20 seconds. That's about 40 x difference.
Looked into different phases of the formatter and everything else seemed to perform about the same as before, just that the parsing in old version took about 20ms (with tokenizing being the slowest part - about 200ms spent there), while with Nearley pretty much the entire 20 seconds was spent parsing.
It really shouldn't be that slow. The parsing should really happen in near linear time. 20 seconds to parse less than a megabyte of code is definitely very slow. I think I've done something wrong with how I've written the grammar, that makes the parsing process so slow.

Found a question about performance in Nearly issues list, where three possible culprits for performance issues are listed:

not using a tokenizer
an ambiguos grammar
a right-recursive grammar

The first two can't really be a problem in our case. But it seems there are at least some right-recursive rules, like:
commaless_expression -> simple_expression | asterisk

simple_expression -> array_subscript | between_predicate | ...

between_predicate -> %BETWEEN commaless_expression %AND commaless_expression # <- right recursion here

Discovered the culprit. Currently the grammar has this:
main -> statement (%DELIMITER statement):*

statement -> expressions_or_clauses

When I instead write this as:
main -> statement:*

statement -> expressions_or_clauses %DELIMITER

The processing of the same SQL that took 20 seconds will happen in just 1.3 seconds.
Will need to figure out how to rewrite this so that the delimiter would still be optional at the end. Too late today already...

So, the major performance culprit is now eliminated. But the parser still gets slower as the input size increases:

with 271KB file: old 450ms v/s new 1300ms - 2.8 x difference
with 1.6MB file: old 1.6s v/s new 26s = 16 x difference

Discovered another reason for performance problems. For the main rule we had essentially this:
main -> statement:* {% flatten %}

I assumed that this post-processor function gets called once, when all the statements have been matched. But instead it gets called at every step:

with 0 statements
with 1 statement
with 2 statements
...

And as the flatten() loops through the whole array, we end up with O(n2) complexity.
I fixed (or at least alleviated) the problem in main rule. This brought the parsing time from 26 seconds to 8 seconds.
Similar problems are likely also present elsewhere where we currently use rule:* syntax and call flatten(). I'll see what can be done to improve this further.

Additionally, the README on nearley mentions how the earley algorithm it uses performs best when grammar rules are written left-recursively so I'd assume optimising for that would have additional gains in performance

Nice job with the bottlenecks with the performance testing, thanks for finding these

I eliminated all uses of the flatten() function in the grammar file. This didn't bring any performance improvements, but at least it gets rid of one potential culprit, which is better to be avoided. It should mostly be possible to write all post-processors without the aid of this function.
We have several grammar rules that end with rule:*, like:
other_clause -> %RESERVED_COMMAND expression:*

While the post-processors of these rules are now relatively cheap, they still end up being called a lot of times, which is a possible cause for the performance loss. There's no such problem with rules like:
square_brackets -> "[" expression:* "]"

Here the final square bracket needs to be matched, for the rule to be considered fully matched and the post-processor to be called.

I tested with a simplified grammar that only matches simple INSERT statements:
main -> statement:* %EOF

statement -> insert_clause values_clause %DELIMITER

insert_clause -> "INSERT INTO" identifier parenthesis

values_clause -> "VALUES" parenthesis

There's no partial-matching problem with this grammar, but it still took 6 seconds for it to format 1.6MB file full of insert statements.
But at least with this grammar the performance seems to be linear O(n). I went back and tested once more with the full grammar and this too seems to be performing linearly now. Though that might depend on the specific SQL used for testing. Some quick measurements:

2000 lines of SQL: 943ms
4000 lines of SQL: 2.15s (2.2x slower)
8000 lines of SQL: 3.84s (1.7x slower)
1600 lines of SQL: 7.48s (1.9x slower)

So at least it's a constant overhead and therefore more scalable. I guess the overhead is now purely the inherent overhead of using Nearley - one can always get more performance out of a manually written parser, but the question is whether the performance gains are worth the added complexity of writing it manually. Probably not.
With this I'm now finally satisfied with the performance.


Cannot find package

I tried installing with every command suggestion, without being connected to a VPN, and I got this same error every time:
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/next/-/next-13.5.0.tgz - Not found npm ERR! 404 npm ERR! 404  'next@https://registry.npmjs.org/next/-/next-13.5.0.tgz' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
I am running node version 18.17.1 on Windows 10.

Closing as duplicate of #167.


Make consul auto configuration conditional

In some cases it's desirable to disable Consul auto configuration. For example, when running a service that uses spring-cloud-consul-config, you currently have to have a Consul server running or the application context fails to load. It would be nice to be able to disable the Consul auto configuration in these cases.
This PR uses @ConditionalOnProperty(name = "spring.cloud.consul.enabled", matchIfMissing = true) to trigger creation of the various Consul components.
Replaces PR #5

I've been thinking about this some more. This PR was created to handle the case where consul isn't running and you don't want startup to fail (eg integration tests). My recent thoughts have me wondering: should spring-cloud-consul silently proceed (and not fail startup) if it can't find a consul instance at the consul url instead of using a property to turn it off? What do the other spring-cloud providers do when the thing they want to communicate with is not there?

Hi, Zach. I think, you should use profiles to rule needed behavior.

Imagine that consul is unreachable in production environment.   Eureka (from netflix), does registration in a background thread.  If consul fails to connect, there should be an option for the service to either continue to run, or retry a certain number of times (we have that for config server).


Migrate clean, download workflows to new Azure storage containers

Close #152

I'm going to switch this PR to a draft because we might shift things to work with outside collaborators interested in the raw data.

Smart. Sounds good to me.

We might need to make more radical changes to how we store raw data but for now I'm going to keep this PR focused just on moving to the new raw-cmip6, raw-era5, clean-cmip6, clean-era5 storage containers.
Merging.


Add wiki page

It will be extremely useful if we include a wiki page with examples:

How to add a third party library to the seed:

Installing the module
Adding the type definitions (external via tsd and distributed with the package)
Referencing the module inside of any of the project files

Extending the build with a custom task (for instance adding SASS support, which is almost completely described by https://github.com/mgechev/angular2-seed#adding-custom-gulp-task and in https://github.com/mgechev/angular2-seed/issues/391)

Help will be greatly appreciated!

great idea +1 ... I'll help soon!

Done! Here's the basic wiki page.


Creating a section for Concurrency

-Moved the Async section there
-Added a section for using the language worker process count

@anirudhgarg : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@anirudhgarg I'm going to move your commit into our private repo so that I can see how it stages and validates.

@anirudhgarg please take a look at my edits/updates to your additions on the internal staging site.

Looks great to me.

@anirudhgarg @ggailey777 - if the commits are in the private repo and this PR can be closed, can you enter #please-close in a comment? thanks.

#please-close


Fix direct run with open_basedir configured

@keradus the order is important so so upper directory is not accessed if not needed - otherwise open_basedir emit php warning

I leaning toward closing this PR without merging.
looks like PR opener is the only affected person, and I don't want to mess with bootstrap file without having the change covered with automated test, which is still missing

I appreciate the effort in this PR, yet I decided to close it due to reasoning shared above. Thank you for understanding.
I'm happy to reconsider the decision when we have more ppl affected or automated test showing issue without this change.

please advise how to test easily or let's merge as is

@keradus please help with the test, where can I set open_basedir php.ini value?

ref https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5634#discussion_r681783065
unfortunately, I am not aware of this, I was never in need of that.
I would suggest this as starting point (, but I cannot assist due to lack of experience with open_basedir): https://www.php.net/manual/en/ini.core.php#ini.open-basedir

@keradus ref https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5634/files#r679982065
if we add @ operator before the file_get_contents, would that be ok solution /wo test for you?

My constant complaint is about lack of test behind proposed change.
Changing code to use silence operator not only make the code worse (damn, we even escalate bunch of non-breaking errors to breaking errors!), but also doesn't solve complaint of missing tests.

@keradus please reopen and I will look for some solution with a test

simply raise a new PR when the test is ready

You know it cannot be tested https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5634#discussion_r681783065
You cannot change PHP ini values like the one needed for the test @ run time for security reasons, that is the whole point of that ini value.
Not sure what the issue is here, we want to test if a file exists and PHP triggers an error/warning if that file is in a directory that you are not allowed to access.

Not sure what the issue is here, we want to test if a file exists and PHP triggers an error/warning if that file is in a directory that you are not allowed to access.

@SpacePossum the open_basedir restrict the FS to a subspace/subpath which is allowed to be accessed. If a file operation is done outside that configuration, an warning is emitted. This clearly reasons https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5634/files#diff-375c36cd1ed77ff74277c5cef2521d0832604dd0cc05e56e29255a4b53ff038fR86 to test the more specific path first. This PR is valid, I only do not know how to write a test for it.

My question was, what is the issue this get keeping closed? The fix to suppress the open_dir seems good to me and would help me out, but somehow there is an impossible requirement that there must be a test.


add backup subcommand

create
download
delete
list

Please remove the upload method from this pull request. We need to wait for an approval of the httmultiparty rubygem by legal before we can integrate it. Please create another pull request based on the changes from https://github.com/crowbar/crowbar-client/pull/48.

+1

:+1:


Convert to JavaScript?

I realize this is not urgent and the package works as is, but I think the recommended way to create atom packages now is to use JavaScript/ES6 instead of CoffeeScript. Having the code in JS instead of CS has the advantage that many more people are familiar with JS than with CS (my case), besides the other network effects of using a more popular language. Also ES6 incorporated many of the improvements brought by CS.
As a way to familiarize myself with the code I'm willing to convert it to JS and send PRs, but only if the maintainers are interested in this conversion.

Gah, javascript is so much less fun than coffeescript... 😝
This seems inevitable, but right now is not a great time, as I have a fairly busy branch implementing isearch right now (feel free to try it!). Perhaps after that's merged?

Fair enough, I will try to test the search branch.

AltLayer Airdrop Season One Update

🚀 Exciting Announcement! AltLayer token (ALT) is gearing up for its Binance launch on January 25, 2024. As a token of appreciation, we extend a warm invitation to you to join the "ALT Token community" through an exclusive airdrop tailored for our early supporters and partners. Here's a quick overview:

Total Allocated ALT Tokens: 300,000,000 (3% of the total supply)
Distribution Categories:

Ethereum Mainnet
Binance Mainnet

For a comprehensive breakdown of criteria and further details, refer to the complete announcement Oficial Website.
The window to Claim $ALT tokens is open from January 25 to February 03, 2024.
Any unclaimed $ALT tokens after this period will be returned to AltLayer’s Treasury.
We deeply appreciate your contribution to AltLayer's success! Stay tuned for more exciting developments in Season One.
Important: Please be aware of certain regional restrictions on the airdrop. Review the disclaimer before participating.
Kaonashi913, @slai-fi, @usametov, @johnpatrickroach, @Almustafa-cloud, @shadow-of-a-soul, @datawire1337, @s1korrrr, @pgonday, @ercanburak, @Tacosheel, @j3st489, @runsonmypc, @tuanductran, @valyriamu, @SavageSyntax, @Horla74, @dramasea, @eliashuehne, @posquit0

AltLayer Airdrop Season One Update

🚀 Exciting Announcement! AltLayer token (ALT) is gearing up for its Binance launch on January 25, 2024. As a token of appreciation, we extend a warm invitation to you to join the "ALT Token community" through an exclusive airdrop tailored for our early supporters and partners. Here's a quick overview:

Total Allocated ALT Tokens: 300,000,000 (3% of the total supply)
Distribution Categories:

Ethereum Mainnet
Binance Mainnet

For a comprehensive breakdown of criteria and further details, refer to the complete announcement Oficial Website.
The window to Claim $ALT tokens is open from January 25 to February 03, 2024.
Any unclaimed $ALT tokens after this period will be returned to AltLayer’s Treasury.
We deeply appreciate your contribution to AltLayer's success! Stay tuned for more exciting developments in Season One.
Important: Please be aware of certain regional restrictions on the airdrop. Review the disclaimer before participating.
b-heilman, @dataman-py, @xiaojiujiuY9, @bduron, @jalexand3r, @frostRed, @velvet-valdes, @pompel123, @yuyu82, @phamphihungbk, @FatemehFathi, @ewright28, @micle-snicle, @handlemyfinance, @junaexp, @bibinvargheset, @SnibliUchiha, @FredMichel, @sofiat-capital, @fingeg


Issue#2 (Adding GUI)

Made changes to Recommendation_system.py
Added entry box and displayed data on tkinter window

!bounty 70


feat: api for blueprints to manage ab player sessions with partInstance awareness

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature

What is the current behavior? (You can also link to an open issue here)

Blueprints are left to manage ab playback sessions themselves.
This is not possible to do well for partInstances, as more knowledge about the partInstances needs to be known than we are exposing to the blueprints

What is the new behavior (if this is a feature change)?

This adds an a couple of methods available to onTimelineGenerate to help with ensuring ab-session ids are unique.
With this api, unique session ids will be used for each instance of a part. The sessionName is used as an identifier for sessions, and multiple pieces using the same sessionName will be treated as the same session, even across parts. This lets a part continue a clip from the previous part. The exception here is that if the playhead moves backwards, then the session is split (this allows for having the same part as current and next).

Other information:

Blueprints-integration changes: https://github.com/nrkno/tv-automation-sofie-blueprints-integration/pull/82
Blueprints changes: https://github.com/nrkno/tv-automation-sofie-blueprints/pull/73
Status

[x] The functionality has been tested by the PR author
[ ] The functionality has been tested by NRK

@sparkpunkd for your assumptions:

I havent tested this implementation, but there is no reason it shouldnt work. This code in core doesn't have any context of time or assign anything to a player, so it is completely agnostic.
The primary aim of persisting is to be consistent with assignments during normal playback. But yes, it will work equally well around a restart


WM_CLASS is unavailable

On linux you can use WM_CLASS name of an application to bind launch and running application icons to one by adding WM_CLASS name to .desktop file, so there isn't a duplicate of it in the tool bar. Messenger hasn't got any WM_CLASS assigned to it and so there are always two icons in the tool bar.

Done in the beta, please use it


[Feature Request] - Renaming and Search feature

One of the good features can be renaming your bins and searching it later on. Most of the times I do experimentation on jsbin and often struggle to find out my previous bins.

Agreed that this would very helpful for organizing the code.

This is two features. Renaming requires a UI, and currently I'm
prioritising ui-less work.
Search is a complex and large topic. I plan to use elastic search, but
what's a good search? What if I search for "body"? What kinds of things are
you thinking you would search on? This would help understand the problem
better.
On Sun, 12 Jul 2015 04:23 Ben Creasy<EMAIL_ADDRESS>wrote:

Agreed that this would very helpful for organizing the code.
—
Reply to this email directly or view it on GitHub
https://github.com/jsbin/jsbin/issues/868#issuecomment-120683032.

OK, I'm mostly interested in the renaming or at least titling, and even further folders or tags to organize - so UI stuff. The use case is to organize scripts which demonstrate simplified core concepts for myself, kind of like snippets, versus my current practice of storing such things in Sublime projects.
As far as search, I'm not sure I'd use that much. I would prioritize Codepen-style portfolio displays (may have that to some degree with your vanity pages, I'm not sure) as that seems to be one of the main things drawing people to Codepen.
I'd like to try hacking around on it a little bit, but I have not got it to run locally due to some sqlite node-gyp and libzmq dependency (though I think the latter is fixed - will post an update).

Remy,
I understand this is two issues technically but from user point of view I
feel this in one feature.
Things I always wanted are:

Provide Name and Description to your bin
Search your bin later (Search runs on Name and description fields only)

Currently, I do not know any way to manage my bins. Is there anything which
I am not aware of ?
On Mon, Jul 13, 2015 at 3:49 AM, Ben Creasy<EMAIL_ADDRESS>wrote:

OK, I'm mostly interested in the renaming or at least titling, and even
further folders or tags to organize - so UI stuff. The use case is to
organize scripts which demonstrate simplified core concepts for myself,
kind of like snippets, versus my current practice of storing such things in
Sublime projects.
As far as search, I'm not sure I'd use that much. I would prioritize
Codepen-style portfolio displays (may have that to some degree with your
vanity pages, I'm not sure) as that seems to be one of the main things
drawing people to Codepen.
I'd like to try hacking around on it a little bit, but I have not got it
to run locally due to some sqlite node-gyp and libzmq dependency (though I
think the latter is fixed - will post an update).
—
Reply to this email directly or view it on GitHub
https://github.com/jsbin/jsbin/issues/868#issuecomment-120768394.

@blunderboy search and organise are two distinct features.
You've said you don't know of any way to organise your bins, you can delete and archive, that's one way, but it's not what I think you want to do.
@jcrben tagging is fairly low hanging fruit, and there's a table already in place that can help with this (I've been using it privately to "star" other bins): owner_bookmarks - but you're right, there's UI work here, both to allow the user to tag and to show the tags.
I don't use codepen, partly because I don't want to "borrow" features from them, but also because I'm not the audience. JS Bin is very much focused around teaching and learning, a quiet practise. CodePen (to me at least) is mainly for the designer community to show off their work. JS Bin is less about showing off and more about helping others.
The vanity page is one way that a user could replicate this functionality, and there's an API for listing all your bins so that it could be managed in a portfolio manner or even snippets.
Perhaps snippet + API support is the initial way to go?
Re: search - this is a large chunk of work, and given that it's just me, it's unlikely to rise to the top for quite a long time. If someone else comes in with a fully prepared ES solution and UX work, then I'd be happy to accept it.

can't find how to rename (if it's already implemented)

Search is almost a required feature to use JSBin as code storage. I wouldn't care if it is added for PRO users. In fact I would became a PRO user only for that feature.
Rename? You can change the meta description and that changes the name:
<meta name="description" content="Vue 2.0 Testing and Learning syntax - Renaming Bin">

I love jsbin. I wish there was a better way to store and organize the code for searching later.


Maintenance before v1.6.1

Minor updates to unit tests and catching exception when webdriver quits. Most of the changes are streamlining Github Action workflows
Not yet tagging it as v1.6.1 until #395 is also done.

Failures are only transient. Merging.


chore: bdd-sbhg-1587012322 to 0.0.1

chore: Promote bdd-sbhg-1587012322 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment