fix: wrong parentheses in vitePluginSilenceDirectiveBuildWarning

Fixing a weird typo

#650  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @hi-ogawa and the rest of your teammates on  Graphite

Merge activity

Sep 25, 2:05 AM EDT: @hi-ogawa started a stack merge that includes this pull request via Graphite.


ERROR : safeCall() Runtime API error in file </home/kk/Documents/CudaSift-Maxwell/cudaSiftH.cu>, line 42 : invalid device symbol.

Following is the  output when the object file is executed.
`[kk@localhost CudaSift-Maxwell]$ ./cudasift
Image size = (1280,960)
Initializing data...
Device Number: 0
Device name: GeForce 210
Memory Clock Rate (MHz): 600
Memory Bus Width (bits): 64
Peak Memory Bandwidth (GB/s): 9.6
Download time =               0.92 ms
Download time =               0.89 ms
safeCall() Runtime API error in file </home/pict/Documents/CudaSift-Maxwell/cudaSiftH.cu>, line 42 : invalid device symbol.
[kk@localhost CudaSift-Maxwell]$ C
`
What is the problem?

Same problem here


Docker Container

First of all: Great project!
I've spent the last evening to play arround and set up the application.
Doing that I thought about a docker container to run everything.
I never built a container by myself, but I want to try that with the KptnCook Integration.
If someone already created a container or push me in the right directon I would really appricatiate.
If not I will update this issue/enhancemant when I got a working container

i build a super basic container that fetches from kptncook everyday and syncs it with mealie, its not perfect but I'm not motivated to put more work into it lol.
I can provide you the Dockerfile.
To build the container you need the following folder structure:
-Dockerfile (remove .txt)
-.env
-kptncook
--checked out repo
Dockerfile.txt
You have to build the image and then run it. Dont forget to set credentials and api stuff in the environment


Mode7 exception in Emscripten builds

In screen_to_world :
float distance = ((far - near) / float(s.y - viewport.y)) + near; is inf for the first line. Which results in nan getting returned. That eventually gets converted to a uint16_t in mipmap_texture_span, resulting in RuntimeError: invalid conversion to integer.
Example: https://cupboard.daftgames.net/32blit/shell.html?app=flight

Mode7 is currently horribly broken, so I've assigned this to Jon for consideration when he gets it back up and running.

Doesn't throw an exception any more, but the first line is still broken.


Add optional UINT_VECT or std::vector argument to Chirality::assignStereochemistry and ::findPotentialStereoBonds

I would like to suggest adding optional INT_VECT type arguments to these two methods to return a list of the atom indices of those possible chiral centres (i.e those with the '_chiralityPossible' property set by the call to Chirality::assignAtomChiralCodes) and bond indices of potential stereobonds (i.e. those marked Bond::STEREOANY).
The reason for this suggestion is that in my code at least, many calls to these methods are followed by iterating through all atoms or bonds to find those flagged by the call - a process which could be sped up considerably for large datasets by being able to access a list of the atom / bond IDs directly.
I think this also relates to #1202 which looks to be trying to head towards a similar outcome

@sroughley : would it be more useful if the list contained indices of all possible chiral centers (=specified and unspecified) or just the ones that were not specified? I'm leaning towards the first, because then you really do only need to do one loop to find everything (if you want just the unspecified, you can do the same loop but check to see that the individual atoms aren't specified).

My  use case only requires the unspecified, but I can see that all would also be useful and more general.... unless an optional boolean parameter was also available...


is possible to have AUTO_INCREMENT id to data stored with this mechanism?

Im using LocalForage latest for mobile application with ionic 4 and angular 7.
Is there any way to have AUTO_INCREMENT id to data stored with this mechanism just like SQL data type we have.
Or any other mechanism we can get the unique id for each record we store.

Sorry, no. localForage is a very basic key/value store (think like Redis or something similar on a server). You have to manage IDs/keys yourself; we don't have any plans to introduce something like that as it would greatly complicate the database.


[Event Hub] Review the usage of DefaultDataTransformer

from #1910.
Also it might be better to do this together with https://github.com/Azure/azure-sdk-for-js/issues/1742 as the most of the work will likely to be the same.

Closing in favor of #1742 which is updated to be under the epic for Event Hubs


createStyles not working properly after release 0.9.0

What package has an issue
@svelteuidev/core
A clear and concise description of what the bug is
After release 0.9.0 it looks like now using the createStyles is not working properly. I have been using classes to style my pages.
Issue: Lost the nested styling around {getStyles()} being set and then accessing the nested styles like "headerLogo" or any other css style wrapped by the {getStyles()}. I now only see that the "&.headerContainer" works
Example HTML code below.

        <Grid>
            <Grid.Col md={4} lg={4}>

Exampl CSS Styles code:
const useStyles = createStyles((theme) => {
		return {
			root: {
				[`${theme.dark} &`]: {

                },

			},

            '&.headerContainer': {
                backgroundImage:'url(/impression-header.png)',
                backgroundSize: '100%, 100%, contain',
                color: theme.colors.white.value,
                minHeight:'7rem',
                position:'fixed',
                top:'0',
                left:'0',
                width:'100%',
                boxShadow:'0px 2px 4px -1px rgba(0 0 0 /20%), 0px 4px 5px 0px rgba(0 0 0 /14%), 0px 1px 10px 0px rgba(0 0 0 /12%)',
                zIndex:'2000',
                padding:'.5rem',

                '.headerControls': {
                    marginTop:'1rem',
                    float:'right',
                    marginRight:'1.5rem',
                    svg: {
                        width:'1.5rem',
                        height: '1.5rem',
                    },
                },
                '.headerHelp': {
                    display: 'inline-flex',
                    marginRight: '.5rem',
                },
                '.selectLocatization': {
                    width:'100%',
                },
                '.itemLabel': {
                    width:'100%',
                },
                '.mainNav': {
                    fontSize: '1.5rem',
                    marginLeft: '.5rem',
                    li: {
                        marginRight: '1.5rem',
                        display:'flex',
                        alignItems: 'center',
                        '&.navItemMenu': {
                            marginRight: '.5rem',
                        },
                    },
                    a: {
                        textDecoration: 'none',
                        '&.menuLinkItem': {
                            color: theme.colors.black.value,
                        },
                    },
                    'a:hover':{
                        color: '#cecece',
                        textDecoration: 'none',
                        '&.menuLinkItem': {
                            color: theme.colors.black.value,
                        },
                    },
                    '.menulink': {
                        fontSize: '1.5rem',
                        alignItems:'center',
                        padding:'.5rem',
                        color: theme.colors.white.value,
                        '&:hover': {
                            backgroundColor: 'transparent',
                            color: '#cecece',
                        },
                        svg: {
                            width:'1.5rem',
                            height: '1.5rem',
                        },

                    },

                },

            },

            '&.headerLogo': {
                    marginLeft: '.5rem',
                    marginTop: '.5rem',
                '.logoLink': {
                    textDecoration: 'none',
                    display: 'inline-flex',
                },
                '.logoImg': {
                    verticalAlign: 'middle',
                },
                '.siteTitle': {
                    verticalAlign: 'middle',
                    marginLeft:'.5rem',
                    marginTop:'.7rem',
                    fontSize: '1.5rem',
                },
                img: {
                    width: '3rem',
                },
            },

		};
	});

	$: ({ classes, getStyles } = useStyles());

In which browser(s) did the problem occur?
No response
Steps To Reproduce
1 - Create a new page
2 -import { createStyles } from '@sevltedev/core'
3 - Create a new useStyles based on the theme per the create-styles page
const useStyles = createStyles((theme) => {
		return {
			root: {
				[`${theme.dark} &`]: {

                        },
                       **Note : Add your CSS Styles  here**

		},
        }

4 - Create a header tag and set the class to contain {getStyles()} and some other classes. Example below

5 - Next create some HTML elements inside the header tag and add some class names that you can style. Example below

                            Title

6 - Set some css styles on some of the elements to see the issue.
Do you know how to fix the issue
Yes
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Relevant Assets
No response

Edited your comment since the highlighting was broken. I'll investigate this week

I don't think this is a bug. In the places where you want to override headerLogo and it's other children, you should use & .headerLogo instead of &.headerLogo (notice the space between & and .headerLogo).
So, in this case &.headerContainer is correct, since you want to style the root (which also contains the class headerContainer), but the other needs to contain the space so that it's descendants and not the same element.
You can see the way to do this in the stitches docs here - https://stitches.dev/docs/styling#descendant-selector.

You are correct this is not a bug. I didn't look at the stiches document. Once I added the space between the & and the class it work. Thanks for your help!


Error opening a TypeScript file that is intentionally not included in the glob

I'm working on grunt-ts today.  I've set up the tsconfig.json with this filesGlob:
    "filesGlob": [
        "./defs/**/*.ts",
        "./tasks/**/*.ts",
        "./test/*.ts"
    ],

If I open one of the TypeScript files in the tasks-internal folder (which is intentionally NOT included in the glob), I get this big red error:
Error: Could not find file: 'C:/Users/Steve/Documents/GitHub/grunt-ts/tasks-internal/modules/amdLoader.ts'.
    at getValidSourceFile (evalmachine.<anonymous>:41795:23)
    at Object.getSyntacticDiagnostics (evalmachine.<anonymous>:41947:52)
    at getDiagnositcsByFilePath (C:\Users\Steve\Documents\GitHub\atom-typescript\dist\main\lang\projectService.js:251:47)
    at errorsForFile (C:\Users\Steve\Documents\GitHub\atom-typescript\dist\main\lang\projectService.js:268:34)
    at Object.errorsForFile (C:\Users\Steve\Documents\GitHub\atom-typescript\dist\worker\parent.js:37:34)
    at Object.exports.provider.lint (C:\Users\Steve\Documents\GitHub\atom-typescript\dist\linter.js:16:23)
    at C:\Users\Steve\.atom\packages\linter\lib\editor-linter.coffee:110:37
    at currentLinter (C:\Users\Steve\.atom\packages\linter\lib\editor-linter.coffee:109:20)
    at C:\Users\Steve\.atom\packages\linter\lib\editor-linter.coffee:132:34
    at Set.forEach (native)

I'm assuming this has something to do with the language service not being aware of this file - which makes sense and is intentional - but I don't think I should get an error just by opening it.  I think it's fine if atom-typescript doesn't actually compile it or even provide code completion.

Duplicate of https://github.com/TypeStrong/atom-typescript/issues/368

Indeed.  My apologies.  Thanks.


Add support for other features in doas.conf

There's still a few features not supported by doas in the config:

[ ] escaping characters
[ ] quotes
[ ] : too apply rule to groups
[ ] - to remove a variable using setenv.

For 100% compatibility these should also be added at some point.

Escaping characters, and quotes are to some degree already fixed in the new lexer branch. As of yet we still need to remove them after running the lexer over the data, however after that both escaping characters and quote support should be added.

#7 has been merged - escaping characters and quotes should be fairly simple to do now.


How to implement i18n for JPA entities?

My question is how can I add internationalization functionality to a specific column without any foreign keys and by using JSON structure?
For example I would like to define a JPA entity like this:
@Entity
class Book {

    @Id
    private int id;

    private Author author;

    @I18n  //<- this annotation is something that I am looking for
    private String title;

}

and then the data in title column would be stored like the following for en and de locales:
{"en":"Cologne","de":"Köln"}

And then when the current locale is de the Köln and when the en is set as locale then Cologne fetch in the time of reading data!
Also when we store the data, the passed string is stored in the relevant property in the JSON format. For example if the locale is set to es and user passes Kolne then we have to have the following data in the DB:
{"en":"Cologne","de":"Köln","es":"Kolne"}

It is interesting for me that most of the solutions in the web for hibernate and JPA is based on an old method that we have languages and translations tables. Something like here or here.
However what I am looking for is some solutions like this one which is suggested for Laravel and store the translations exactly in the way that I explained (i.e. in a JSON object and in the same column)!
The only solution that I found and could be somehow relevant (Not 100%) is this one, however it does not working when I tried to test it and it seems does not supported anymore!

The question had been asked here too

Here is my suggestion for implementing internationalization beside of Olingo JPA.
Assume we have a BasicModel.java like this:
import java.io.Serializable;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.JsonProcessingException;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.i18n.LocaleContextHolder;

import java.io.IOException;

public abstract class BaseModel implements Serializable {
	private static final long serialVersionUID = 1L;
	private static ObjectMapper mapper = new ObjectMapper();

	@SuppressWarnings("unchecked")
	protected static Map<String, String> jsonToMap(String json) {
		Map<String, String> map = new HashMap<>();
		try {
			// convert JSON string to Map
			if (json != null) {
				map = (Map<String, String>) mapper.readValue(json, Map.class);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return map;
	}

	protected static String mapToJson(Map<String, String> map) {
		String json = "";
		try {
			// convert map to JSON string
			json = mapper.writeValueAsString(map);
		} catch (JsonProcessingException e) {
			e.printStackTrace();
		}
		return json;
	}

	protected static String getLang() {
		Locale currentLocale = LocaleContextHolder.getLocale();
		String[] localeStrings = (currentLocale.getLanguage().split("[-_]+"));
		return localeStrings.length > 0 ? localeStrings[0] : "en";
	}
}

This class provides a mechanism for us to convert JSON strings to Map and vice versa.
The code for converters had been adapted from here. For using this snippet of code we need to add this maven dependency:
  <!-- Convert JSON string to Map -->
  <dependency>
     <groupId>com.fasterxml.jackson.core</groupId>
     <artifactId>jackson-databind</artifactId>
  </dependency>

Finally, whenever in a JPA entity model we want to have i18n for a string property we only need to modify setter and getter methods slightly. For example:

import javax.persistence.*;

import java.util.Map;
import java.util.Set;

/**
 * The persistent class for the actions database table.
 *
 */
@Entity
@Table(name = "actions")
@NamedQuery(name = "Action.findAll", query = "SELECT a FROM Action a")
public class Action extends BaseModel {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "id", unique = true, nullable = false, length = 255)
	private String id;

	@Column(nullable = false, length = 255)
	private String name;

	public Action() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		Map<String, String> map = jsonToMap(this.name);
		return map.get(getLang());
	}

	public void setName(String name) {
		Map<String, String> map = jsonToMap(this.name);
		map.put(getLang(), name);
		this.name = mapToJson(map);
	}

}


ngtools/webpack does not emit ngmodule decorator information.

Resubmitting from https://github.com/angular/angular/issues/18591:

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
I am trying to integrate AOT compilation into an existing Angular component library. This library has always been packaged using webpack, so I integrated ngtools/webpack into my configuration. After resolving the problem of ngtools/webpack not inlining / requireing external templates and styles, I was still not able to use the resulting JS module. Whenever I try to run an app using this, I would get an error stating that the module class is missing its NgModule decorator.
When examining the generated code, I noticed that ngtools/webpack has stripped all decorators from the code.
Expected behavior
ngtools/webpack should keep angular-specific decorators.
Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment

Angular version: 4.3.3

Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: XX
- Platform:

Others:

If you use AOT code, you don’t need the decorators anymore, and they only get the bundles larger so we remove them.
Would you have a reproduction repository we could look at?

That is true for applications, and it works fine there. But what if you are making a package of reusable components?

We don't support building libraries with ngtools/webpack. You need to use ngc in a separate step. There are tutorials about how to build libraries.

Closing as this issue seems answered.


Release 4.8.0 ceph change

Changes asked by Somvit is compared to 4.3.0 and changed in 4.8.0-ceph-change

Additional code changes were done
So closing the PR


Evaluate performance of O(N) insertion

https://github.com/celluloid/timers/blob/8854e191d3b36df0602245d6f9523c3ef004c0fc/lib/timers/events.rb#L61
I found this was generally acceptable because insert is fast for small arrays. For HUGE numbers of timers, this might be a bottleneck. Perhaps a segmented array or deque might be more appropriate. However, anything implemented in pure ruby is likely to be slower.

@digitalextremist @takiy33 if you want to tackle some performance issues here is a good one to review.
Step one is to profile the code in question using the performance benchmarks and perhaps make other benchmarks to see if and when it becomes a problem. Step two is to see if there is any decent way to improve performance. Technically, some kind of tree (i.e. a min-heap) might be appropriate, but pure ruby for this data structure is slow compared to insert from my tests about a year ago..

Timers::Group
Serviced 192065 events in 8.354132437 seconds, 22990.44130157285 e/s.

So here is the interesting data. If you look at Array#insert, it's actually relatively minor. The elephant in the room is bisect_left, which while significantly faster than the previous implementation, is now simply the slowest part and thus warrants the most attention. Personally, I don't know if it's possible to write a better implementation in pure Ruby. It's something I did spend some time considering, but the next step might be writing it in C.

I believe performance is good enough in practice.


[Bug]: 325 vulnerabilities found in chromadb docker image

What happened?
I scanned the docker image of chromadb via trivy and found that there are 325 vulnerabilties. scan-result.json
Almost all vulnerabilities are due to the base image python:3.10-slim-bookworm . I think fixing this CVEs would make chroma deployable in complaince heavy env and would boost adoption in general.
I would like to work on  a PR to fix this by switching to something like https://www.chainguard.dev/chainguard-images or something similar.
Versions
image sha: sha256:8e449ce63cc4e7a61106ba21f0a6bbb4c1524dad472505fb5c0b9a27fa9875b1
Relevant log output
No response

hey @sbs2001, thanks for reporting this. We are aware that our upstreams will have vulnerabilities, as you mentioned. That said, I don't think we'll be changing from our default Debian bookworm base image, but we are in the process of shifting left on security, so we will provide a vulnerability report, SBOM and sigstore signed images in the coming Chroma releases.
As far as deployment in a compliance-heavy environment, the number of CVEs is not as relevant as the actual impact of vulnerabilities, and experience shows that each enterprise has different tolerance levels for vulnerabilities.
Looking at trivy results, I can tell that most vulnerabilities come from packages we install in our build process. Python bookworm image only accounts for 1/3:
python:3.10-slim-bookworm (debian 12.2)
Total: 73 (UNKNOWN: 0, LOW: 64, MEDIUM: 7, HIGH: 1, CRITICAL: 1)

@tazarov  thanks for the info. Great to know the team is shift left-ing .
I understand 99% vulnerabilities are coming due to the base image and not due to chroma's code.


ButtplugClientDevice linearAttributes issue

Describe the bug

Using buttplug-js v3.1.1 with Intiface central v2.3.0 and a device configuration with a Linear axis.
ButtplugClientDevice::linearAttributes getter not returning data when messageAttributes.LinearCmd has data.

See https://github.com/buttplugio/buttplug-js/blob/3.1.1/src/client/ButtplugClientDevice.ts#L211-L213
Potential fix to rename line 212 from this.messageAttributes.RotateCmd to this.messageAttributes.LinearCmd .

Fixed in v3.2, finally.