Recent Questions - Stack Overflow |
- Storing numeric values in star schema dimension
- The number of primary key values passed must match number of primary key values defined on the entity ASP.NET
- How to Pass the data given in UITextField to another variable on another class
- Hangfire in asp.net core webapi problem with DI
- Python how to draw gear wheel (Numpy & Matplotlib)
- Making a graph after Pymetis
- NOT GROUP By issue
- Bracket Sequence (Open Closed)
- How to use transform instead of pipe?
- Outside context error when working from blueprint flask python
- How to check if a variable is a boolean type
- Understanding Glubort() handling of logical vector vs character vector in creating confidence interval
- Postgres, check query type if it returns data or not
- Using parcel, how do I deploy my project?
- JS destructing based on a condition
- E2153 ';' not allowed before 'ELSE' [duplicate]
- Rmd file won't output file (LaTeX formatting error?)
- Add a column with default value as a constant in Postgres
- How would paginate a json response in my GET request without the use of models/databases?
- Include a module as a dependency into a KMM project's shared module
- Is there a way you can produce an output like this in T-SQL
- Finding spots in a numpy matrix
- Spark coalesce changing the order of unionAll
- MongoDB query to find text in third level array of objects
- unzip -j -o not working through Ansible, but working directly on host
- why the original web page did not show the google chrome extension inserted html image
- why the active tabs was undefined when send message from backend to content script in google chrome extension v3
- what is the right way to create a component instance in vue 3 in google chrome extension v3
- is it possible to append vue 3 component after the html body in google chrome extension
- How do I add 1 day to an NSDate?
Storing numeric values in star schema dimension Posted: 10 Feb 2022 11:56 AM PST I am in the process of designing a data warehouse star schema, which contains interest rate curves (aka. term structures, yield curves etc.). For simplicity let's assume that the star schema contains only 1 fact table and 1 dimension table, as illustrated in attached. The grain of the fact table is defined as an interest rate with a specific maturity. 15 interest rates (15 rows in the fact table) comprises 1 interest rate curve, defined by the foreign key "CurveId" which links to the primary key "Id" of the dimension. Currently the attributes in the dimension is stored as numeric values. The reason being that they will be included in various calculations. For example the end user might want to multiply each interest rate of a curve in the fact table by the corresponding "parameter1" from the dimension. The parameters are not applicable for curve 2, and thus set to null. But as far as I know it is not recommended to have null values in a dimension, since it is not clear to the end user what rows will be returned from a query. It might not be obvious that a select statement where Parameter1 != 0.54 will return zero results. I have considered storing them in the Dimension as strings, which would allow me to specify N/A values for curve 2, but then the parameters would have to be casted to numeric in all queries by the end user. I have considered putting them in the fact table, but then the same parameter would be repeated 15 times and would result in null values in the fact instead. I have also considered creating a second fact table to store the parameters in, but that would require the end user to join two fact tables together rather often. Is there a better way to store these parameters? |
Posted: 10 Feb 2022 11:56 AM PST I'm trying to remove one or more rows from db but i get the error mentioned in the title. I put all primery keys that are required in the table but not work. This is the code. And also i tried to remove using where clause but it throws the error "Store update, insert, or delete statement affected an unexpected number of rows (0)" And also i tried to specific which are my primary keys in the context but not work. |
How to Pass the data given in UITextField to another variable on another class Posted: 10 Feb 2022 11:55 AM PST So i have a UITextField named apiTextField and a function of the saveButton : func saveButton(_ sender: Any) { } I want when the user writes to the UITextField and press the saveButton that text the user wrote be passed to a variable which is called var baseURL:String? in another class. I didn't find anything related to UITextField so i decided to make this question, another similar one is 10 years old!. |
Hangfire in asp.net core webapi problem with DI Posted: 10 Feb 2022 11:55 AM PST When I execute background job, and i try to resolve all dependencies, i get the exception error:
My code: in ConfigureServices(IServiceCollection services) in Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceProvider provider) and |
Python how to draw gear wheel (Numpy & Matplotlib) Posted: 10 Feb 2022 11:55 AM PST I'm supposed to draw this gear wheel using loops: enter image description here I'm totally lost on what to do. |
Posted: 10 Feb 2022 11:55 AM PST This is a tutorial for pymetis that I found: https://github.com/inducer/pymetis In this tutorial, based on an adjacency list, a graph is partitioned into n partitions. Word for word, here is the code: As you can see, this graph is partitioned into 2 sets. My question is, given this information, how can I represent the partitions in a visual graph? My hope is that every partition would have different colors, for better visualization. So for instance, the 1st set of nodes would be colored red and the 2nd set of nodes would be colored blue. Of course, with increasing partitions, the number of colors would increase as well. Thanks! Umesh |
Posted: 10 Feb 2022 11:54 AM PST I try to make a sum in this formula but I have one issue, not group by expression ? WHo is the problem ? SELECT ROUND(SUM(FACT_WLT_AGENT.WLT_LHV_PO_FNGF + FACT_WLT_AGENT.WLT_LHV_PO_ENA + FACT_WLT_AGENT.WLT_LHV_PO_EEIND + FACT_WLT_AGENT.WLT_LHV_PO_PAQ)/ 3600 * 10 ) FROM FACT_WLT_AGENT, dim_reorganization reorg WHERE FACT_WLT_AGENT.reorg_id = reorg.reorg_id AND is_last_master_reorg = 'Y' HAVING FACT_WLT_AGENT.WLT_LHV_PO_FNGF + FACT_WLT_AGENT.WLT_LHV_PO_ENA + FACT_WLT_AGENT.WLT_LHV_PO_EEIND + FACT_WLT_AGENT.WLT_LHV_PO_PAQ / 3600 > 0 |
Bracket Sequence (Open Closed) Posted: 10 Feb 2022 11:54 AM PST A finite sequence consisting of left and right brackets of various specified types like: ( { [ ] } ). It is necessary to determine whether it is possible to add numbers and signs of arithmetic operations to it so that the correct arithmetic expression is obtained |
How to use transform instead of pipe? Posted: 10 Feb 2022 11:54 AM PST Let's say I have a dataframe like this Now I want to calculate linear regressions for each group in column A potential implementation could look like this based on and then I can use which gives the desired outcome What I don't like is that I have to loop through the groups, use and question is how to define but that - of course - crashes with a
How could one implement |
Outside context error when working from blueprint flask python Posted: 10 Feb 2022 11:54 AM PST I have this simple webapp written in python (Flask) models.py app.py
When create a request to but when trying to create a database object for example Note this is the bare minimum example and there are other files that require access to the models.py folder (to add orders to the data base created by the bot ) |
How to check if a variable is a boolean type Posted: 10 Feb 2022 11:55 AM PST Is this the correct way to check if something is of a boolean value|?? |
Posted: 10 Feb 2022 11:56 AM PST I'm using a custom styling function to cap odds ratios and confidence intervals if they are below or above a certain number for ease of printing in a final table. All of the variables in my dataset work except for one, which is not unique in it's composition, as far as I can tell. Created on 2022-02-10 by the reprex package (v2.0.1) I understand the warnings around data fitting, and will likely discard this predictor downstream in data analysis, but I don't understand what's happening with the error in mutate_cols() section. Does anyone have insight into how I could update my formatting call to handle this error? |
Postgres, check query type if it returns data or not Posted: 10 Feb 2022 11:55 AM PST I have an application where I can run any kind of query against Postgres. I would like to use pagination for queries which return results. What is the fastest way to check if the query returns data or not (e.g. COPY, INSERT, CREATE etc.)? |
Using parcel, how do I deploy my project? Posted: 10 Feb 2022 11:55 AM PST Forkify (my github link) is a tutorial project I'm working on. To build the dist files, I use When I use What can I do to fix it?
|
JS destructing based on a condition Posted: 10 Feb 2022 11:54 AM PST I'm following this example for dependent fields https://formik.org/docs/examples/dependent-fields At this point I want to destructure values based on a certain condition like this for example Of course, this throws an error. Is this even possible? |
E2153 ';' not allowed before 'ELSE' [duplicate] Posted: 10 Feb 2022 11:54 AM PST When I compile my schedule: It gives me this error:
on this line: |
Rmd file won't output file (LaTeX formatting error?) Posted: 10 Feb 2022 11:55 AM PST I am taking an intro to bayesian statistics class this semester and I decided to take notes with Rmd this last class, not the best idea. After class when I was trying to convert to a pdf, I received the following error messages. I have no idea what the problem is in the coding that I have done or what this error is trying to tell me what to do. Here is my Rmd code that is relevant to the problem (the rest of my rmd should be good): Yeah, I realize it would be much easier to write this stuff down, but my laptop pen is dead and I don't own any notebooks, sooo this is my best option right now. I realize it is a ton of stuff, but, any help would be much appreciated especially help with understanding this error message and what it is trying to tell me to do. If needed, here are my other LaTeX notations that I've used in the document. |
Add a column with default value as a constant in Postgres Posted: 10 Feb 2022 11:54 AM PST I'd like to alter an existing table to add a column which defines a large string as default in Postgres DB. I have tried the following: Another way I found is the following: However, I am getting errors in both attempts related to the variable not recognized. Do you know if this is possible in Postgres? Thanks a lot |
How would paginate a json response in my GET request without the use of models/databases? Posted: 10 Feb 2022 11:56 AM PST I'd like to know how I can paginate multiples of 10 with the given response in my GET request when it's not using databases/models. I've searched around but I'm mostly seeing examples of database/model paginations and not json response paginations. Below's what I've tried (along with so many other ways but I've ran out of options and hit a wall) but to no avail. I know there's a way to do this simply but I just can't seem to wrap my head around it. Any feedback would be appreciated :). |
Include a module as a dependency into a KMM project's shared module Posted: 10 Feb 2022 11:55 AM PST I have a working KMM application, and I have a java module, The module exists at the top level beside I want to use And the error is Things I've tried
How can I include a modules into KMM's shared module as a dependency? |
Is there a way you can produce an output like this in T-SQL Posted: 10 Feb 2022 11:56 AM PST I have a column which I translate the values using a case statements and I get numbers like this below. There are multiple columns I need to produce the result like this and this is just one column. How do you produce the output as a whole like this below. The 12 is the total numbers counting from top to bottom 49 is the Average. 4.08 is the division 49/12. 1 is how many 1's are there in the output list above. As you can see there is only one 1 in the output above 8.33% is the division and percentage comes from 1/12 * 100 and so on. Is there a way to produce this output below? |
Finding spots in a numpy matrix Posted: 10 Feb 2022 11:55 AM PST I have the following Matrix made of 0s and 1s which I want to identify its spots(elements with the value 1 and connected to eachothers). In the matrix there are four spots. an example of my output should seem the following Does anyone know how can I identify each spot with the number of its elements and top_left element, using numpy functions ? Thanks |
Spark coalesce changing the order of unionAll Posted: 10 Feb 2022 11:54 AM PST I have 2 data frames that I try to perform unionAll on. DF3=DF1.unionAll(DF2) DF3.coalesce(1).write.csv("/location") DF1 always is placed under DF2 after coalesce and I see the reason is because the smaller partitions comes last as per this: https://stackoverflow.com/a/59838761/3357735 . Is there any way that we can have the same order as my union? is DF1 comes first and DF2 after coalesce. |
MongoDB query to find text in third level array of objects Posted: 10 Feb 2022 11:56 AM PST I have a Mongo collection that contains data on saved searches in a Vue/Laravel app, and it contains records like the following: The problem is the in particular the decimal. Because of a UI error, the user was allowed to enter a decimal value, and so this needs to be fixed to remove the decimal like so. My problem is writing a Mongo query to identify these records (I'm a Mongo noob). What I need is to identify records in this collection that have an item in the Piece of cake, right? Here's as far as I've gotten. but I'm not sure where to go from here. UPDATE: After running the regex provided by @R2D2, I found that it also brings up records with a valid date string , e.g. so what I need to do is filter out cases where the period has a double 0 on either side (i.e. is excluding characters, so I would want something like but running this query still returns the same records, even though it works as expected in a regex tester. What am I missing? |
unzip -j -o not working through Ansible, but working directly on host Posted: 10 Feb 2022 11:55 AM PST I am trying to grab one file from app.war called test.properties, this command works perfectly on a RHEL host when I run it directly on it: But, when I run the same thing in Ansible, it does not work, it does not extract anything, there is no change: Am I doing anything wrong Ansible side? Maybe I am missing something extra like sudo or quotes? |
why the original web page did not show the google chrome extension inserted html image Posted: 10 Feb 2022 11:56 AM PST I am tried to insert a vue 3 component into the original web from google chrome extension v3 script, now the css and html was insert successfully. What make me confusing is that the inserted html did not show the images from google chrome extension, this is the css define the image path in the vue 3 componnet: and this is the output of the css when showing in the original web: to my surprise, the original web did not show the google chrome extension insert html background image which was specify in the inserted html css. I could successfully open the image in google chrome browser from the css background image link, means that the css specified image path was right, why did not shows the image specified by the inserted html css? I have already add the image resource path config like this in the google chrome extension manifest v3 json config: what should I do to fix this problem? Am I missing something? this is the view: I tried to set the background color, it works. |
Posted: 10 Feb 2022 11:56 AM PST I am tried to send message from background in google chrome extension v3, this is the background message send code looks like: when I get the current active tab, the tabs was return undefined, why did this happen? I am sure there contains active tabs in google chrome broswer, what should I do to fix this problem? This is the debug view: |
what is the right way to create a component instance in vue 3 in google chrome extension v3 Posted: 10 Feb 2022 11:55 AM PST I want to create a component instance and append to the web page body with vue 3 in google chrome extension v3. This is my vue 3 component define: the next step I tried to create an instance and tried to append the vue 3 component to the original web page body in google chrome extension content script. this is the code looks like: when run this app, shows error like this: Am I missing something? what should I do to avoid this problem? I tried to do it like this: the app tell me error: |
is it possible to append vue 3 component after the html body in google chrome extension Posted: 10 Feb 2022 11:56 AM PST I am developing a google chrome extension v3, now I want to append a Vue 3 component after the original web page body. First, I am tried to capture the user selection event in the content script index like this: the next step, I want to insert a popup component into the original web page that I could show to user some custom content. what I am tried to do like this right now: I want to append the vue 3 component content after the original web html page body element. Seems did not work as expect.Show the error like this: what should I do to append the Vue 3 component to the original web page? is it possible? or any better way to do this? And this is the vue 3 component define: I have tried to define element like this and append the element: it works. seems the vue 3 Tried 1: I tried to new the component like this: still did not work. Tried 2: I also tried like this: but the compiler shows error like this: Tried 3: I also tried like this: this compile success, but shows error like this when run the app: tried 4: I tried to use ref to get the dom: seems did not work. |
How do I add 1 day to an NSDate? Posted: 10 Feb 2022 11:56 AM PST Basically, as the title says. I'm wondering how I could add 1 day to an So if it were: It would become: Or if it were: It would become: |
You are subscribed to email updates from Recent Questions - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment