qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
47,627,458
I'm trying to initialize and declare variable in if-else condition in JAVA, but it is not executing, can someone please help me in below code? This is the method, which I'm calling from main method. But it's not executing the initialization under if condition and failing. ``` public static void getData(String fu...
2017/12/04
[ "https://Stackoverflow.com/questions/47627458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2574954/" ]
Declare sql1 outside if-else as below, ``` String sql1= ""; if ("lob".equals(funct)) { sql1= String.format("select distinct lob_name from BPUSH_lobs order by lob_name"); } else { sql1= String.format("select distinct env_type from BPUSH_environments order by env_type"); } ```
If you declare a variable inside of block, you cannot access that from outside. Declare `String sql1` outside if statement and change the value.
47,627,458
I'm trying to initialize and declare variable in if-else condition in JAVA, but it is not executing, can someone please help me in below code? This is the method, which I'm calling from main method. But it's not executing the initialization under if condition and failing. ``` public static void getData(String fu...
2017/12/04
[ "https://Stackoverflow.com/questions/47627458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2574954/" ]
Declare sql1 outside if-else as below, ``` String sql1= ""; if ("lob".equals(funct)) { sql1= String.format("select distinct lob_name from BPUSH_lobs order by lob_name"); } else { sql1= String.format("select distinct env_type from BPUSH_environments order by env_type"); } ```
Define the variable "**String sql1**" out side the try block and initialize it with null "**String sql1=null;**" This must solve your problem.
47,627,458
I'm trying to initialize and declare variable in if-else condition in JAVA, but it is not executing, can someone please help me in below code? This is the method, which I'm calling from main method. But it's not executing the initialization under if condition and failing. ``` public static void getData(String fu...
2017/12/04
[ "https://Stackoverflow.com/questions/47627458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2574954/" ]
Declare sql1 outside if-else as below, ``` String sql1= ""; if ("lob".equals(funct)) { sql1= String.format("select distinct lob_name from BPUSH_lobs order by lob_name"); } else { sql1= String.format("select distinct env_type from BPUSH_environments order by env_type"); } ```
Santosh's Answer is correct. Adding an explanation, as to WHY? It is in fact initializing the variable **sql1** (that too 2 variables), but you are unable to see that for the simple reason that, the variable is available only in the scope where it is declared. You have declared two different variables both named **sq...
70,050,594
Regardless of the server, I get ClosedReceiveChannelException about 1 minute after startup for unknown reason. What am i doing wrong? Code: ```kt val client = HttpClient(CIO) { install(WebSockets) } // Coroutine Scope client.webSocket(host = "ws.ifelse.io") { try { while (true) { val rawPayload = incomi...
2021/11/20
[ "https://Stackoverflow.com/questions/70050594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17467353/" ]
Yes, just use `@RequestParam`: ```java @PostMapping("/test") public boolean test(@RequestParam String username, @RequestBody String data) { //code and stuff } ``` In the [reference documentation](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestParam...
You can use the `@RequestParam` annotation. ``` @PostMapping("/test") public boolean test(@RequestBody String data, @RequestParam String username) { //code and stuff } ``` If you need to call it something else you can also specify that ``` @RequestParam("username") String whatever ```
70,050,594
Regardless of the server, I get ClosedReceiveChannelException about 1 minute after startup for unknown reason. What am i doing wrong? Code: ```kt val client = HttpClient(CIO) { install(WebSockets) } // Coroutine Scope client.webSocket(host = "ws.ifelse.io") { try { while (true) { val rawPayload = incomi...
2021/11/20
[ "https://Stackoverflow.com/questions/70050594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17467353/" ]
Yes, just use `@RequestParam`: ```java @PostMapping("/test") public boolean test(@RequestParam String username, @RequestBody String data) { //code and stuff } ``` In the [reference documentation](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestParam...
You can mix request body and request params. In your example, you can read the username request param this way: ``` @PostMapping("/test") public boolean test(@RequestBody String data, @RequestParam String username) { //code and stuff } ```
12,999,695
[jsfiddle](http://jsfiddle.net/mvNCz/11/) I am trying to style my "current" navigation tabs. I also have a hover script in jQuery which is causing difficulties doing this: ``` <ul class="nav"> <li class="nav1" id="current"><a href="#">Images</a></li> <li><span>.</span></li> <li class="nav2"><a href="#">Ar...
2012/10/21
[ "https://Stackoverflow.com/questions/12999695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Better way is to add extra class `current`on selected item -- `class="nav1 current"` ``` $(".nav li a").click(function(){ $(this).parent().parent().find('li').removeClass('current'); $(this).parent().addClass('current'); }); ``` Should be like that ... have to check it. EDIT: Yes it works.
You don't swap IDs or names in html, only classes and other transient attributes. Otherwise you'd cause side effects when code expects an Id to be on a specific item. Think of it as changing your social security number because you had a blue shirt on for the weekend. Add a current class to your CSS and toggle it on an...
12,999,695
[jsfiddle](http://jsfiddle.net/mvNCz/11/) I am trying to style my "current" navigation tabs. I also have a hover script in jQuery which is causing difficulties doing this: ``` <ul class="nav"> <li class="nav1" id="current"><a href="#">Images</a></li> <li><span>.</span></li> <li class="nav2"><a href="#">Ar...
2012/10/21
[ "https://Stackoverflow.com/questions/12999695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Better way is to add extra class `current`on selected item -- `class="nav1 current"` ``` $(".nav li a").click(function(){ $(this).parent().parent().find('li').removeClass('current'); $(this).parent().addClass('current'); }); ``` Should be like that ... have to check it. EDIT: Yes it works.
Updated your fiddle: <http://jsfiddle.net/mvNCz/17/> Basically you reversed the logic - you should swap classes and not id. ``` $(".nav li a").hover(function(){ var other = $("#" + $(this).parent().attr('id') + "x"); other.addClass("hovered"); $(this).mouseout(function(){ other.removeClass("hovered...
69,461,948
Consider the dataframe df at the end of the post. I simply would like to swap the elements of columns *x* and *y* whenever *x>y*. There may be other columns in the dataframe which I do not want to touch. In a sense, I would like to sort row wise the columns *x* and *y*. ```r library(dplyr) #> #> Attaching package: ...
2021/10/06
[ "https://Stackoverflow.com/questions/69461948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2952838/" ]
Thanks everyone! I wrote a small function which does what I need and generalizes to the case of multiple variables. See the reprex ```r library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:ba...
This looks like sorting for me: ```r library(tidyverse) df <- tibble(x=1:10, y=10:1, extra=LETTERS[1:10]) df #> # A tibble: 10 x 3 #> x y extra #> <int> <int> <chr> #> 1 1 10 A #> 2 2 9 B #> 3 3 8 C #> 4 4 7 D #> 5 5 6 E #> 6 6 5 F ...
69,461,948
Consider the dataframe df at the end of the post. I simply would like to swap the elements of columns *x* and *y* whenever *x>y*. There may be other columns in the dataframe which I do not want to touch. In a sense, I would like to sort row wise the columns *x* and *y*. ```r library(dplyr) #> #> Attaching package: ...
2021/10/06
[ "https://Stackoverflow.com/questions/69461948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2952838/" ]
`base` solution: use `which(df$x > df$y)` to determine row numbers you want to change, then use `rev` to swap values for these: ``` df[which(df$x > df$y), c("x", "y")] <- rev(df[which(df$x > df$y), c("x", "y")]) df # x y extra # <int> <int> <chr> # 1 1 10 A # 2 2 9 B # 3 3 ...
This looks like sorting for me: ```r library(tidyverse) df <- tibble(x=1:10, y=10:1, extra=LETTERS[1:10]) df #> # A tibble: 10 x 3 #> x y extra #> <int> <int> <chr> #> 1 1 10 A #> 2 2 9 B #> 3 3 8 C #> 4 4 7 D #> 5 5 6 E #> 6 6 5 F ...
69,461,948
Consider the dataframe df at the end of the post. I simply would like to swap the elements of columns *x* and *y* whenever *x>y*. There may be other columns in the dataframe which I do not want to touch. In a sense, I would like to sort row wise the columns *x* and *y*. ```r library(dplyr) #> #> Attaching package: ...
2021/10/06
[ "https://Stackoverflow.com/questions/69461948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2952838/" ]
Thanks everyone! I wrote a small function which does what I need and generalizes to the case of multiple variables. See the reprex ```r library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:ba...
Try using `apply` on axis 1 and transpose it with `t`, then use `as_tibble` to convert it to a tibble. Then finally change the column names: ``` > df <- as_tibble(t(apply(df, 1, sort))) > names(df) <- c('x', 'y') > df # A tibble: 10 x 2 x y <int> <int> 1 1 10 2 2 9 3 3 8 4 ...
69,461,948
Consider the dataframe df at the end of the post. I simply would like to swap the elements of columns *x* and *y* whenever *x>y*. There may be other columns in the dataframe which I do not want to touch. In a sense, I would like to sort row wise the columns *x* and *y*. ```r library(dplyr) #> #> Attaching package: ...
2021/10/06
[ "https://Stackoverflow.com/questions/69461948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2952838/" ]
`base` solution: use `which(df$x > df$y)` to determine row numbers you want to change, then use `rev` to swap values for these: ``` df[which(df$x > df$y), c("x", "y")] <- rev(df[which(df$x > df$y), c("x", "y")]) df # x y extra # <int> <int> <chr> # 1 1 10 A # 2 2 9 B # 3 3 ...
Try using `apply` on axis 1 and transpose it with `t`, then use `as_tibble` to convert it to a tibble. Then finally change the column names: ``` > df <- as_tibble(t(apply(df, 1, sort))) > names(df) <- c('x', 'y') > df # A tibble: 10 x 2 x y <int> <int> 1 1 10 2 2 9 3 3 8 4 ...
69,461,948
Consider the dataframe df at the end of the post. I simply would like to swap the elements of columns *x* and *y* whenever *x>y*. There may be other columns in the dataframe which I do not want to touch. In a sense, I would like to sort row wise the columns *x* and *y*. ```r library(dplyr) #> #> Attaching package: ...
2021/10/06
[ "https://Stackoverflow.com/questions/69461948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2952838/" ]
`base` solution: use `which(df$x > df$y)` to determine row numbers you want to change, then use `rev` to swap values for these: ``` df[which(df$x > df$y), c("x", "y")] <- rev(df[which(df$x > df$y), c("x", "y")]) df # x y extra # <int> <int> <chr> # 1 1 10 A # 2 2 9 B # 3 3 ...
Thanks everyone! I wrote a small function which does what I need and generalizes to the case of multiple variables. See the reprex ```r library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:ba...
228,830
In order to know more about product over primes ,I would like to know how do I show that :$$\prod\frac{p^2+1}{p^2-1}=\frac{5}{2}$$ without using properties of Riemann zeta function ? **Note01** : it is well known that $$\prod\frac{p^2+1}{p^2-1}=\frac{{\zeta}^2(2)}{\zeta(4)}=\frac{5}{2}$$ but is there other method to s...
2016/01/19
[ "https://mathoverflow.net/questions/228830", "https://mathoverflow.net", "https://mathoverflow.net/users/74330/" ]
This is a well-known problem, attributed to Sam Wagstaff in Richard Guy's *Unsolved Problems in Number Theory*. Section B48 "Products taken over primes" includes a paragraph > > Wagstaff asked for an elementary proof (e.g., without using properties of the Riemann zeta-function that $$\prod\_p \frac{p^2+1}{p^2-1} = \f...
Yes, as has been noted several times in comments, this has come up before, with a beautiful answer by David Speyer: [Computing $\prod\_p(\frac{p^2-1}{p^2+1})$ without the zeta function?](https://mathoverflow.net/questions/164092/computing-prod-p-fracp2-1p21-without-the-zeta-function/168650#168650) It seems to me this...
26,098,929
I have created a model 'MyModel' and related view, controller and migration for DB. Now when I am trying to add some data to it from rails console I get following error. ``` myrailsapp>> m = MyModel.new() (pry) output error: #<NoMethodError: undefined method 'mymodel' for #<MyModel:0x000000009d863>> ``` Please help....
2014/09/29
[ "https://Stackoverflow.com/questions/26098929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369383/" ]
Try using xpath like this: ``` //android.widget.DatePicker[@index='0']//android.widget.LinearLayout[@index='1']/android.widget.EditText[@text='example'] ``` If you add proper indexes or other properties, it should work.
I use java, the code maybe different. instead of "send key", I use javascript for input. working in my test. ``` ((JavascriptExecutor)driver).executeScript("arguments[0].value=arguments[1]", driver.findElement(By.id("date")), Date); ``` ...
13,114,778
I'm trying to follow the example at <http://dba-oracle.com/t_pl_sql_plsql_select_into_clause.htm> But when i however do ``` create or replace PROCEDURE age is declare info movie%rowtype; BEGIN dbms_output.enable(); select * into info from movie where mo_id=1; dbms_output.put_line('The name of the product is ' || in...
2012/10/29
[ "https://Stackoverflow.com/questions/13114778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1160952/" ]
Try with the following, you do not need to have declare inside a procedure. ``` create or replace PROCEDURE age is info movie%rowtype; BEGIN --dbms_output.enable(); select * into info from movie where mo_id=1; dbms_output.put_line('The name of the product is ' || info.mo_id); END age; / ``` and to execute the proc...
There are a couple of things in your code to take a look at: First. As @Polppan has already mentioned, remove `DECLARE` keyword from your stored procedure. There is no need of it. You will need it however when you write anonymous PL/SQL block. Second. If you use `dbms_output.enable()` in your procedure then to display ...
10,452
Following through with <http://meta.askubuntu.com/q/10307/169736> we agreed that extension tags are far from useful in most cases, since you will always be referring to something that "creates, plays, views, edits, converts, and etc to/from that file type", so media-player, media-editor, media-converter, etc. but we st...
2014/07/03
[ "https://meta.askubuntu.com/questions/10452", "https://meta.askubuntu.com", "https://meta.askubuntu.com/users/169736/" ]
For clarity's sake, I don't think [debian-packages](https://askubuntu.com/questions/tagged/debian-packages "show questions tagged 'debian-packages'") is a good choice of name. It sounds like you're talking about packages *in* Debian to me, not the "Debian binary package format". If this *must* be explicit, [deb-packag...
The [deb](https://askubuntu.com/questions/tagged/deb "show questions tagged 'deb'") Tag: ======================================================================================== Overview: --------- [deb](https://askubuntu.com/questions/tagged/deb "show questions tagged 'deb'") is an file type tag. Questions that use ...
13,514,838
I am using GWT. if any server side exception is generated, we are sending an email with error details(have used log4j SMTPAppender). Based on the line number, we can fix the issue.. My scenario is, if any exception is generated in the client package code, as of now, we are giving generic message saying "Some Exception...
2012/11/22
[ "https://Stackoverflow.com/questions/13514838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1016403/" ]
Most of what you want/do can be accomplished with `awk`. But for the minimum you want: ``` for i in `ls -1 file.txt | sort`; do echo $i` grep datetime $i | wc -l `` grep abc $i | wc -l `` grep def $i | wc -l `` grep ghi $i | wc -l `` grep jkl $i | wc -l ` ; done | cut -c9-500 | awk '{print substr($0,1,11) substr($0,15...
Pipe to sed: ``` echo "20121121001100 18 0 16 2 18" | sed -r 's/^([0-9]+)[0-9][0-9][0-9] (.*)$/\1 \2/' ``` gives ``` 20121121001 18 0 16 2 18 ```
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
The issue is most likely due to the fact that you have two modules in src/app. So when you try to generate the component, the angular cli does not know where to register this new component. And that is why the `--skip-import` option was a workaround for the issue. However the proper way to handle this would be specify...
I want to leave my testimony because I had the same problem. the error occurred to me when I tried to better organize the code, in detail I moved the app.component files to a folder (and I updated the dependencies). [these are the files that have undergone a change between the last commit in which I don't have the pro...
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
Yesterday i had the same problems. I still don`t know why this happen. But when I use --skip-import as parameter the command is running without any errors. example: ``` ng g c modules/bla/component/test --skip-import ``` This will create a new component with the name test in the folder modules/bla/component (relat...
I want to leave my testimony because I had the same problem. the error occurred to me when I tried to better organize the code, in detail I moved the app.component files to a folder (and I updated the dependencies). [these are the files that have undergone a change between the last commit in which I don't have the pro...
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
I had the same issue. I found that if the file is named with dots it gives error, for example: src/app/application.material.module.ts or src/app/application-material.module.ts If you change the name to src/app/application-material-module.ts it works. Regards!
I tried your command it's working for me. Please check your path where you fire this command: `ng g c my-component` ![](https://i.stack.imgur.com/d71m1.png)
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
The issue is most likely due to the fact that you have two modules in src/app. So when you try to generate the component, the angular cli does not know where to register this new component. And that is why the `--skip-import` option was a workaround for the issue. However the proper way to handle this would be specify...
Yesterday i had the same problems. I still don`t know why this happen. But when I use --skip-import as parameter the command is running without any errors. example: ``` ng g c modules/bla/component/test --skip-import ``` This will create a new component with the name test in the folder modules/bla/component (relat...
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
Yesterday i had the same problems. I still don`t know why this happen. But when I use --skip-import as parameter the command is running without any errors. example: ``` ng g c modules/bla/component/test --skip-import ``` This will create a new component with the name test in the folder modules/bla/component (relat...
**ADD THE MODULE FLAG (--module=app) TO THE COMMAND** ``` ng g c test2 --module=app ```
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
I had the same issue. I found that if the file is named with dots it gives error, for example: src/app/application.material.module.ts or src/app/application-material.module.ts If you change the name to src/app/application-material-module.ts it works. Regards!
**ADD THE MODULE FLAG (--module=app) TO THE COMMAND** ``` ng g c test2 --module=app ```
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
The issue is most likely due to the fact that you have two modules in src/app. So when you try to generate the component, the angular cli does not know where to register this new component. And that is why the `--skip-import` option was a workaround for the issue. However the proper way to handle this would be specify...
I had the same issue. I found that if the file is named with dots it gives error, for example: src/app/application.material.module.ts or src/app/application-material.module.ts If you change the name to src/app/application-material-module.ts it works. Regards!
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
The issue is most likely due to the fact that you have two modules in src/app. So when you try to generate the component, the angular cli does not know where to register this new component. And that is why the `--skip-import` option was a workaround for the issue. However the proper way to handle this would be specify...
**ADD THE MODULE FLAG (--module=app) TO THE COMMAND** ``` ng g c test2 --module=app ```
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
The issue is most likely due to the fact that you have two modules in src/app. So when you try to generate the component, the angular cli does not know where to register this new component. And that is why the `--skip-import` option was a workaround for the issue. However the proper way to handle this would be specify...
I tried your command it's working for me. Please check your path where you fire this command: `ng g c my-component` ![](https://i.stack.imgur.com/d71m1.png)
73,110,924
Getting below error while creating component using ng g c my-component '**An unhandled exception occurred: catch clause variable is not an Error instance** See "path-to-file\angular-errors.log" for further details.' And file contains below stack trace: **[error] AssertionError [ERR\_ASSERTION]: catch clause variable ...
2022/07/25
[ "https://Stackoverflow.com/questions/73110924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9201848/" ]
Yesterday i had the same problems. I still don`t know why this happen. But when I use --skip-import as parameter the command is running without any errors. example: ``` ng g c modules/bla/component/test --skip-import ``` This will create a new component with the name test in the folder modules/bla/component (relat...
I tried your command it's working for me. Please check your path where you fire this command: `ng g c my-component` ![](https://i.stack.imgur.com/d71m1.png)
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
I got this error when I tried to run an sql file via the command line with `sqlcmd`: `sqlcmd -i myfile.sql` By default `QUOTED_IDENTIFIER` is set to OFF when using this command line tool and you will get the same error (no matter that in the SSMS it may be set to ON and the same script will pass). So indeed the solu...
got the same error, had to add a couple of settings to get it resolved SET ANSI\_NULLS ON; SET ANSI\_PADDING ON; SET ANSI\_WARNINGS ON; SET ARITHABORT ON; SET CONCAT\_NULL\_YIELDS\_NULL ON; SET NUMERIC\_ROUNDABORT OFF; SET QUOTED\_IDENTIFIER OFF; SET NOCOUNT ON;
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
I got this error when I run SQL Agent Job, which has 3 steps `T-sql` scripts. > > Msg 1934, Sev 16, State 1, Line 15 : UPDATE failed because the > following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. > Verify that SET options are correct for use with indexed views and/or > indexes on computed columns ...
I got the same error running this query in the Job Scheduler `SQL Server Agent` ``` UPDATE [Order] SET OrderStatusID = 100 WHERE OrderStatusID = 200 AND OrderID IN ( [...] ) ``` I solved removing the `[` `]` characters from `[Order]`: ``` UPDATE Order SET OrderStatusID = 100 WHERE OrderStatusID = 200 AN...
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
To avoid that error, I needed to add ``` SET ANSI_NULLS, QUOTED_IDENTIFIER ON; ``` for all my stored procs editing a table with a computed column. You don't need to add the `SET` **inside** the proc, just use it during creation, like this: ``` SET ANSI_NULLS, QUOTED_IDENTIFIER ON; GO CREATE PROCEDURE dbo.proc_myp...
I got this error today running a stored procedure in SSMS. Disconnecting from the server and reconnecting with a new session solved the problem for me. The SP I was running had never had this problem before.
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
I got this error when I tried to run an sql file via the command line with `sqlcmd`: `sqlcmd -i myfile.sql` By default `QUOTED_IDENTIFIER` is set to OFF when using this command line tool and you will get the same error (no matter that in the SSMS it may be set to ON and the same script will pass). So indeed the solu...
I'm late to this party but had this error and wanted to share it. Our problem was recurrent but random so we knew it wasn't an object that had been created incorrectly. We finally tracked it down to an ODBC connection on one of the servers in our Citrix farm. On that server, the ODBC in question had had its QUOTED\...
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
To avoid that error, I needed to add ``` SET ANSI_NULLS, QUOTED_IDENTIFIER ON; ``` for all my stored procs editing a table with a computed column. You don't need to add the `SET` **inside** the proc, just use it during creation, like this: ``` SET ANSI_NULLS, QUOTED_IDENTIFIER ON; GO CREATE PROCEDURE dbo.proc_myp...
I got this error when I run SQL Agent Job, which has 3 steps `T-sql` scripts. > > Msg 1934, Sev 16, State 1, Line 15 : UPDATE failed because the > following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. > Verify that SET options are correct for use with indexed views and/or > indexes on computed columns ...
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
We cannot create a indexed view by setting the quoted identifier off. I just tried it and SQL 2005 throws an error straight away if it is turned off: > > Cannot create index. Object 'SmartListVW' was created with the following SET options off: 'QUOTED\_IDENTIFIER'. > > > As gbn said, rebuilding the indexes must b...
I got the same error running this query in the Job Scheduler `SQL Server Agent` ``` UPDATE [Order] SET OrderStatusID = 100 WHERE OrderStatusID = 200 AND OrderID IN ( [...] ) ``` I solved removing the `[` `]` characters from `[Order]`: ``` UPDATE Order SET OrderStatusID = 100 WHERE OrderStatusID = 200 AN...
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
We cannot create a indexed view by setting the quoted identifier off. I just tried it and SQL 2005 throws an error straight away if it is turned off: > > Cannot create index. Object 'SmartListVW' was created with the following SET options off: 'QUOTED\_IDENTIFIER'. > > > As gbn said, rebuilding the indexes must b...
got the same error, had to add a couple of settings to get it resolved SET ANSI\_NULLS ON; SET ANSI\_PADDING ON; SET ANSI\_WARNINGS ON; SET ARITHABORT ON; SET CONCAT\_NULL\_YIELDS\_NULL ON; SET NUMERIC\_ROUNDABORT OFF; SET QUOTED\_IDENTIFIER OFF; SET NOCOUNT ON;
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
I got this error when I tried to run an sql file via the command line with `sqlcmd`: `sqlcmd -i myfile.sql` By default `QUOTED_IDENTIFIER` is set to OFF when using this command line tool and you will get the same error (no matter that in the SSMS it may be set to ON and the same script will pass). So indeed the solu...
``` SELECT OBJECT_NAME (sm.object_id) AS [Name], sm.uses_ansi_nulls, sm.uses_quoted_identifier, N'SET ANSI_NULLS, QUOTED_IDENTIFIER ON; --change the below CREATE to an ALTER. GO ' + sm.definition AS PossibleFixingStatement FROM sys.sql_modules AS sm WHERE 1 = 1 AND ( sm.uses_ansi_nulls <> 1 ...
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
I got this error when I tried to run an sql file via the command line with `sqlcmd`: `sqlcmd -i myfile.sql` By default `QUOTED_IDENTIFIER` is set to OFF when using this command line tool and you will get the same error (no matter that in the SSMS it may be set to ON and the same script will pass). So indeed the solu...
I got the same error running this query in the Job Scheduler `SQL Server Agent` ``` UPDATE [Order] SET OrderStatusID = 100 WHERE OrderStatusID = 200 AND OrderID IN ( [...] ) ``` I solved removing the `[` `]` characters from `[Order]`: ``` UPDATE Order SET OrderStatusID = 100 WHERE OrderStatusID = 200 AN...
1,243,991
I am having a problem with an update stored procedure. The error is: > > UPDATE failed because the following SET options have incorrect settings: 'QUOTED\_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type meth...
2009/08/07
[ "https://Stackoverflow.com/questions/1243991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94494/" ]
We cannot create a indexed view by setting the quoted identifier off. I just tried it and SQL 2005 throws an error straight away if it is turned off: > > Cannot create index. Object 'SmartListVW' was created with the following SET options off: 'QUOTED\_IDENTIFIER'. > > > As gbn said, rebuilding the indexes must b...
I got this error today running a stored procedure in SSMS. Disconnecting from the server and reconnecting with a new session solved the problem for me. The SP I was running had never had this problem before.
43,939,703
I have a summary sheet in a workbook that allows a user to enter in a 3 digit ID and some summary data and a chart populates. In the source data, the ID for the totals row is blank. So, when the lookup value is blank (no 3 digit ID is entered) I expected the Index Match formula to return the values corresponding to a b...
2017/05/12
[ "https://Stackoverflow.com/questions/43939703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7746001/" ]
Say we have data like: [![enter image description here](https://i.stack.imgur.com/T5M9Z.png)](https://i.stack.imgur.com/T5M9Z.png) and we want to enter the name in **A1** and retrieve the age in **B1** and also accommodate the blank in column **E**. In **B1** enter: ``` =IF(A1="",INDEX(F:F,MATCH(TRUE,INDEX(ISBLANK(...
You cannot lookup a blank cell. Use IFERROR to find the first blank with AGGREGATE in the target if you receive an #N/A. ``` =INDEX(B9:B12, iferror(MATCH(A1,A9:A12,0), aggregate(15, 6, row($1:$4)/not(len(A9:A12)), 1))) ``` row($1:$4) is the **position within** B9:B12 that you are returning to the INDEX.
36,899,145
I am able to add static images to a `ListView` cell just fine (see code below), but how do I change the icon image dynamically? From [React Native Docs](https://facebook.github.io/react-native/docs/images.html) ``` <Image source={require('./img/check.png')} /> ``` is the recommended way to reference image files for...
2016/04/27
[ "https://Stackoverflow.com/questions/36899145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1102948/" ]
The images have to be known during packaging. There's a section about it in the [docs](https://facebook.github.io/react-native/docs/images.html#static-image-resources). Put this at the top of the file you define ExpandingCell in: ``` const MAGNIFYING_GLASS_ICON = require('./CellIcons/MagnifyingGlassIcon.png'); ``` ...
How to conditionally display either "require" or "uri" images in React Native Component 2022? ============================================================================================= ``` /** Displays Conditional Image Mapped from API */ const randomFunction= () => allData.map((fetchedData) => ( <View ...
14,825,151
I'm having trouble figuring out the cause for a seg fault. I've debugged in GDB and it tells me the line that is giving me trouble, but I still can't figure it out. ``` Employee* readfile(FILE* file) { Employee* newemployee; char* tempsalary; int salary; char* name; char* dept; char line[128]; while(file...
2013/02/12
[ "https://Stackoverflow.com/questions/14825151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1991483/" ]
Seems you have a typo, Did you mean: ``` fgets(name, sizeof(line), file); ``` to be: ``` fgets(line, sizeof(line), file); ``` --- Also, ``` Employee* newemployee; newemployee->name = strdup(name); ``` You just dereferenced a uninitialized pointer resulting in **Undefined Behavior**. `newemployee` needs to ...
You are declaring "newemployee" as a pointer to an instance of the Employee class, but you never actually allocate a new Employee. In C++, the following two calls are usually equivalent (unless you are using operator overloading, which in this case you're not): ``` newemployee->name = "hello"; (*newemployee).name = "h...
14,825,151
I'm having trouble figuring out the cause for a seg fault. I've debugged in GDB and it tells me the line that is giving me trouble, but I still can't figure it out. ``` Employee* readfile(FILE* file) { Employee* newemployee; char* tempsalary; int salary; char* name; char* dept; char line[128]; while(file...
2013/02/12
[ "https://Stackoverflow.com/questions/14825151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1991483/" ]
No memory has been allocated for `name`. So ``` fgets(name, sizeof(line), file); ``` is likely to be the issue that manifests later. Allocate memory for `name` before reading lines into it.
You are declaring "newemployee" as a pointer to an instance of the Employee class, but you never actually allocate a new Employee. In C++, the following two calls are usually equivalent (unless you are using operator overloading, which in this case you're not): ``` newemployee->name = "hello"; (*newemployee).name = "h...
14,825,151
I'm having trouble figuring out the cause for a seg fault. I've debugged in GDB and it tells me the line that is giving me trouble, but I still can't figure it out. ``` Employee* readfile(FILE* file) { Employee* newemployee; char* tempsalary; int salary; char* name; char* dept; char line[128]; while(file...
2013/02/12
[ "https://Stackoverflow.com/questions/14825151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1991483/" ]
None of your pointers appear to have allocated memory. NewEmployee, Dept, name, tmpsalary.
You are declaring "newemployee" as a pointer to an instance of the Employee class, but you never actually allocate a new Employee. In C++, the following two calls are usually equivalent (unless you are using operator overloading, which in this case you're not): ``` newemployee->name = "hello"; (*newemployee).name = "h...
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
``` while True: try: # do some stuff break # we didn't hit the exception, exit the loop except APIError: # handle the exception... ```
You could put the content from Try: to a separate function. if that function throws an error it will be automatically catch in your except: block. there you can recall the said function.
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
It shouldn't repeat the item in this case. When you iterate with for loop, once the item is picked, it won't be picked again. You can add a while loop that will try infinitely to update unless the update succeeded: ``` for row, cpf in enumerate(cpfs): nome, idade, beneficio, concessao, salario, bancos, bancocard...
You could put the content from Try: to a separate function. if that function throws an error it will be automatically catch in your except: block. there you can recall the said function.
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
It shouldn't repeat the item in this case. When you iterate with for loop, once the item is picked, it won't be picked again. You can add a while loop that will try infinitely to update unless the update succeeded: ``` for row, cpf in enumerate(cpfs): nome, idade, beneficio, concessao, salario, bancos, bancocard...
``` while True: try: # do some stuff break # we didn't hit the exception, exit the loop except APIError: # handle the exception... ```
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
``` while True: try: # do some stuff break # we didn't hit the exception, exit the loop except APIError: # handle the exception... ```
why don't you just use a `while`-loop? ``` for row, cpf in enumerate(cpfs): nome, idade, beneficio, concessao, salario, bancos, bancocard, consig, card = bot_url.search_cpfs(cpf) # UPDATE THE SHEET print("Atualizando...") while True: try: row = row + 2 self.sheet.update...
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
``` while True: try: # do some stuff break # we didn't hit the exception, exit the loop except APIError: # handle the exception... ```
Another option is to use the [retrying](https://pypi.org/project/retrying/) library which handles retrys for you at the method level. A benefit here is getting access to a lot of tested functionality like exponential back-offs/retrying N times only etc... without having to write it yourself. A drawback is that you...
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
It shouldn't repeat the item in this case. When you iterate with for loop, once the item is picked, it won't be picked again. You can add a while loop that will try infinitely to update unless the update succeeded: ``` for row, cpf in enumerate(cpfs): nome, idade, beneficio, concessao, salario, bancos, bancocard...
why don't you just use a `while`-loop? ``` for row, cpf in enumerate(cpfs): nome, idade, beneficio, concessao, salario, bancos, bancocard, consig, card = bot_url.search_cpfs(cpf) # UPDATE THE SHEET print("Atualizando...") while True: try: row = row + 2 self.sheet.update...
61,210,291
I'm coding a **scraper** that uses gspread to read and write In Google Sheets. In the "writting" part of the code I had to add a `try-except` because of an `APIError` caused by the quota limit of writting, so when the except Is executed It have wait 100 seconds and then continue. The problem is that It ignores the ite...
2020/04/14
[ "https://Stackoverflow.com/questions/61210291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13274766/" ]
It shouldn't repeat the item in this case. When you iterate with for loop, once the item is picked, it won't be picked again. You can add a while loop that will try infinitely to update unless the update succeeded: ``` for row, cpf in enumerate(cpfs): nome, idade, beneficio, concessao, salario, bancos, bancocard...
Another option is to use the [retrying](https://pypi.org/project/retrying/) library which handles retrys for you at the method level. A benefit here is getting access to a lot of tested functionality like exponential back-offs/retrying N times only etc... without having to write it yourself. A drawback is that you...
29,650,034
I'm trying to make a visual representation of a file I'm extracting as a csv. But I seem to be hitting a wall with the structure that d3 Tree expects. My code: ``` <script src="http://d3js.org/d3.v3.min.js"></script> <script src="mydata.csv"></script> <script> var margin = {top: 20, right: 120, bottom: 20, left: 12...
2015/04/15
[ "https://Stackoverflow.com/questions/29650034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1291773/" ]
First, you don't need your `reSortFlare` function. That can be accomplished by changing the [children accessor function](https://github.com/mbostock/d3/wiki/Tree-Layout#children). ``` var tree = d3.layout.tree() .size([height, width]) .children(function(d){ return d.values; }); ``` Second, I believe yo...
```js var pre_data = d3.csv.parse(d3.select("pre#data").text()); //document.getElementsByTagName("BODY")[0].innerHTML = data; var margin = { top: 20, right: 120, bottom: 20, left: 120 }, width = 1000 - margin.right - margin.left, height = 500 - margin.top - margin.bottom; var canvas = d...
32,591,081
I'm trying to make a select with specific tables in the database. Here the "Funcionario" model: ``` class Funcionario extends Model { /** * The database table used by the model. * * @var string */ protected $table = 'funcionarios'; /** * The attributes that are mass assignable. ...
2015/09/15
[ "https://Stackoverflow.com/questions/32591081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3943220/" ]
You need to add "id" to your select(), as eloquent need it for comparison. I think you are better off not using eloquent in this case, since you just want to return a string for the cargo key. ``` DB::table('funcionarios') ->join('cargos', 'cargos.id', '=', 'funcionarios.cargo_id') ->get(['funcionarios.*', 'ca...
As I wanted to avoid DB class facade, I decided to use a **foreach loop** to put a new value in "cargo". It will be like: ``` public function showMyEmployees(){ $data = Funcionario::where('supervisor_id', $user->id) ->orderBy('nome') ->get(); $funcionarios = array(); foreach($data as $fu...
27,107,313
I have developed SSRS report where in When Text inside textbox is longer than length of the textbox, it is shifting to next line.But while shifting, it is missing the alignment. For E.g. : Queue Modification Number Queue Modification Number I have already tried alignment option in textbox properties. There is one...
2014/11/24
[ "https://Stackoverflow.com/questions/27107313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1392434/" ]
You could try to add a counter variable, which is increased everytime the loop is called. Use the [modulus operator](http://php.net/manual/en/language.operators.arithmetic.php) then to close the current row and open a new one after the loop was called twice: ``` <div class="row"> <?php $query = "SELECT * FROM recipe...
Quickest/dirtiest: ``` while($row1 = mysql_fetch_assoc(...)) { $row2 = mysql_fetch_assoc(...); ... output $row1 data ... output $row2 data } ``` This will work fine if you only ever get an even number of rows in the result set. Otherwise, the inner fetch will fail on the very last row because the while() fe...
27,107,313
I have developed SSRS report where in When Text inside textbox is longer than length of the textbox, it is shifting to next line.But while shifting, it is missing the alignment. For E.g. : Queue Modification Number Queue Modification Number I have already tried alignment option in textbox properties. There is one...
2014/11/24
[ "https://Stackoverflow.com/questions/27107313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1392434/" ]
You could try to add a counter variable, which is increased everytime the loop is called. Use the [modulus operator](http://php.net/manual/en/language.operators.arithmetic.php) then to close the current row and open a new one after the loop was called twice: ``` <div class="row"> <?php $query = "SELECT * FROM recipe...
``` <?php $query = "SELECT * FROM recipe"; $result = mysql_query($query); $i = 0 while($row = mysql_fetch_array($result)) { if ($i % 2 === 0) { echo '<div class="row">'; } ?> <div class="large-6 columns"> <h4><?php echo $row['recipe_title'] ?></h4> <p><?php echo $row['recipe_descript...
2,185,915
I need to implement a webform (JSP, struts) featuring loads of checkboxes and textfields. Basically I have a tree made of checkboxes which has to be extendable (like adding a new node). On another page the same data is used, but refined. So you add again child nodes to the mentioned data structure using textboxes etc. ...
2010/02/02
[ "https://Stackoverflow.com/questions/2185915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/240749/" ]
Sounds like you want to [dynamically create the report](http://bytes.com/topic/access/insights/696050-create-dynamic-report-using-vba) and avoid all the dummy text boxes.
In regard to: > > I can't find a way to create new pages > in the report with VBA, and thus I'm > limited only to the first page. > > > Your solution #1 seems to assume an unbound report. I think what I'd do is have the form the crosstab as the rowsource, so you'd have records to generate the pages, and then d...
14,599,217
I am facing the problem in `awk` command. Actually I used a variable `DELETION_COMMAND` and value of that variable is `rm -rf`. After that I am trying to execute the below line then it gives an error. While if am using the `rm` as a value of same variable `DELETION_COMMAND`. then it works fine. ``` awk '{print "'${DEL...
2013/01/30
[ "https://Stackoverflow.com/questions/14599217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1758932/" ]
The highlighing already indicates your error. You put the awk expression between single quotes and then uses single quotes in the expression. Awk thinks your expression is this: ``` awk '{print "' ``` To solve this, escape the single quotes using a backslash.
Use the `-v` flag to pass shell vars to `awk`, and don't forget the quoting: ``` awk -v com="${DELETION_COMMAND}" -v path="${COMPLETE_PATH}" '{ print com, path, "/", $1, "/" }' "${DB_FEED_FILE}" > "${TEMP_FEED_FILE}" ```
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
I would match up the components with your modules/artifacts/jars, so each issue can be owned by a particular module (though it might have dependencies/relationships with others as well). If you can make a strong case to have finer grained issue management than the module level, consider why you wouldn't also separate...
We use a 2 level component hierarchy (thanks to greenhopper ...) - Themes and Epics. The build in Greenhopper Themes and Epics don't let us aggregate and report the way we want, and this does the trick pretty well.
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
I would match up the components with your modules/artifacts/jars, so each issue can be owned by a particular module (though it might have dependencies/relationships with others as well). If you can make a strong case to have finer grained issue management than the module level, consider why you wouldn't also separate...
JIRA designed to have every component of project to have same set of version numbers, so if you want you components to have independent version numbers you either need to set up a different project for each component or use a plugin developed by me that allows component specific version numbers and at the same time all...
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
As of 4.2.4 it is not possible to version components, only projects. Keep that in mind if you like to use the road map feature. There's a long-standing (7+ years) request to add versioning for components: <http://jira.atlassian.com/browse/JRA-3501>
We use a 2 level component hierarchy (thanks to greenhopper ...) - Themes and Epics. The build in Greenhopper Themes and Epics don't let us aggregate and report the way we want, and this does the trick pretty well.
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
As of 4.2.4 it is not possible to version components, only projects. Keep that in mind if you like to use the road map feature. There's a long-standing (7+ years) request to add versioning for components: <http://jira.atlassian.com/browse/JRA-3501>
Create a component for each major module, or maybe even system tier (eg Backend, Frontend). I wouldn't go below-module-level granularity. You may add components for supporting activities, such as BA, Testing (agreeing with mdoar)... Components are orthogonal to versions/releases
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
I would match up the components with your modules/artifacts/jars, so each issue can be owned by a particular module (though it might have dependencies/relationships with others as well). If you can make a strong case to have finer grained issue management than the module level, consider why you wouldn't also separate...
I've got another take on components now. With customers I refer to the Components field as: `A multiselect field that's useful for automatically assigning issues. Each of the things in this field has a potential assignee associated with it.` and then I say: `If you don't care about automatic assignment, just trea...
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
Components are like little sub-projects. Projects seem to be most useful when they group people together. I recommend to my clients that JIRA projects reflect the social organization to some degree, at least until the number of projects becomes very large. Also, avoid the use of a component named "Misc" or "Other". Th...
Create a component for each major module, or maybe even system tier (eg Backend, Frontend). I wouldn't go below-module-level granularity. You may add components for supporting activities, such as BA, Testing (agreeing with mdoar)... Components are orthogonal to versions/releases
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
Create a component for each major module, or maybe even system tier (eg Backend, Frontend). I wouldn't go below-module-level granularity. You may add components for supporting activities, such as BA, Testing (agreeing with mdoar)... Components are orthogonal to versions/releases
JIRA designed to have every component of project to have same set of version numbers, so if you want you components to have independent version numbers you either need to set up a different project for each component or use a plugin developed by me that allows component specific version numbers and at the same time all...
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
Most important about components is to be unambiguous and not too many. In our team now, we are migrating to 3 level hierarchy (in GreenHopper sense): * on the top level you have the BA components which are few and delineated by team (infra, backend, GUI) - this helps BA guys route the request to the correct DEV-team m...
Create a component for each major module, or maybe even system tier (eg Backend, Frontend). I wouldn't go below-module-level granularity. You may add components for supporting activities, such as BA, Testing (agreeing with mdoar)... Components are orthogonal to versions/releases
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
Components are like little sub-projects. Projects seem to be most useful when they group people together. I recommend to my clients that JIRA projects reflect the social organization to some degree, at least until the number of projects becomes very large. Also, avoid the use of a component named "Misc" or "Other". Th...
I would match up the components with your modules/artifacts/jars, so each issue can be owned by a particular module (though it might have dependencies/relationships with others as well). If you can make a strong case to have finer grained issue management than the module level, consider why you wouldn't also separate...
1,219,150
I have around a few thousand rows with which contain 3 digit numbers starting with 100 and ranging to 199 which i need to prefix with 0. There are also thousands of other numbers 4 digit numbers as well which i don't want to change. I need find all the 3 digit numbers in the range and prefix only those ranging from 10...
2009/08/02
[ "https://Stackoverflow.com/questions/1219150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/513369/" ]
Most important about components is to be unambiguous and not too many. In our team now, we are migrating to 3 level hierarchy (in GreenHopper sense): * on the top level you have the BA components which are few and delineated by team (infra, backend, GUI) - this helps BA guys route the request to the correct DEV-team m...
I've got another take on components now. With customers I refer to the Components field as: `A multiselect field that's useful for automatically assigning issues. Each of the things in this field has a potential assignee associated with it.` and then I say: `If you don't care about automatic assignment, just trea...
52,820,518
ERROR Error: ngIfElse must be a TemplateRef, but received 'true' HTML File ```html <select class="form-control"> <option selected value="0">Select Manufacturer</option> <option *ngFor="let brand of allMakes"> {{ brand.brand }} </option> </select> ``` ts file ```js this.allMakes = [{ id: '1', brand: ...
2018/10/15
[ "https://Stackoverflow.com/questions/52820518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6103665/" ]
Issues solved, the cause was a redundant property(Bool) that was attached to the "ng-template" ``` noData: boolean = true; <ng-template #noData>...Blah blah...</ng-template> ```
There is no error found while build using --prod option with your code. I've created a editor for you to playaround with your issue, if any. I've copied your code and its working fine. > > <https://stackblitz.com/edit/angular-p4ctul> > > > or try changing this line of code with below one. ``` platformBrowserDyna...
52,820,518
ERROR Error: ngIfElse must be a TemplateRef, but received 'true' HTML File ```html <select class="form-control"> <option selected value="0">Select Manufacturer</option> <option *ngFor="let brand of allMakes"> {{ brand.brand }} </option> </select> ``` ts file ```js this.allMakes = [{ id: '1', brand: ...
2018/10/15
[ "https://Stackoverflow.com/questions/52820518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6103665/" ]
For `ngIf` with else block you need to use `<ng-template>` block as a else in your `.html` file. Here is the sample code: `<div *ngIf="condition; else elseBlock">Content to render when condition is true.</div> <ng-template #elseBlock>Content to render when condition is false.</ng-template>`
There is no error found while build using --prod option with your code. I've created a editor for you to playaround with your issue, if any. I've copied your code and its working fine. > > <https://stackblitz.com/edit/angular-p4ctul> > > > or try changing this line of code with below one. ``` platformBrowserDyna...
52,820,518
ERROR Error: ngIfElse must be a TemplateRef, but received 'true' HTML File ```html <select class="form-control"> <option selected value="0">Select Manufacturer</option> <option *ngFor="let brand of allMakes"> {{ brand.brand }} </option> </select> ``` ts file ```js this.allMakes = [{ id: '1', brand: ...
2018/10/15
[ "https://Stackoverflow.com/questions/52820518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6103665/" ]
For `ngIf` with else block you need to use `<ng-template>` block as a else in your `.html` file. Here is the sample code: `<div *ngIf="condition; else elseBlock">Content to render when condition is true.</div> <ng-template #elseBlock>Content to render when condition is false.</ng-template>`
Issues solved, the cause was a redundant property(Bool) that was attached to the "ng-template" ``` noData: boolean = true; <ng-template #noData>...Blah blah...</ng-template> ```
56,604,724
On Python, there is this option `errors='ignore'` for the [`open`](https://docs.python.org/3/library/functions.html#open) Python function: ```py open( '/filepath.txt', 'r', encoding='UTF-8', errors='ignore' ) ``` With this, reading a file with invalid UTF8 characters will replace them with nothing, i.e., they are ig...
2019/06/14
[ "https://Stackoverflow.com/questions/56604724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4934640/" ]
You are confusing what you see with what is really going on. The `getline` function does not do any replacement of characters. [Note 1] You are seeing a replacement character (U+FFFD) because your console outputs that character when it is asked to render an invalid UTF-8 code. Most consoles will do that if they are in...
As @rici well explains in his answer, there can be several invalid UTF-8 sequences in a byte sequence. Possibly iconv(3) could be worth a look, e.g. see <https://linux.die.net/man/3/iconv_open>. > > When the string "//IGNORE" is appended to *tocode*, characters that cannot be represented in the target character set ...
56,604,724
On Python, there is this option `errors='ignore'` for the [`open`](https://docs.python.org/3/library/functions.html#open) Python function: ```py open( '/filepath.txt', 'r', encoding='UTF-8', errors='ignore' ) ``` With this, reading a file with invalid UTF8 characters will replace them with nothing, i.e., they are ig...
2019/06/14
[ "https://Stackoverflow.com/questions/56604724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4934640/" ]
You are confusing what you see with what is really going on. The `getline` function does not do any replacement of characters. [Note 1] You are seeing a replacement character (U+FFFD) because your console outputs that character when it is asked to render an invalid UTF-8 code. Most consoles will do that if they are in...
I also managed to fix it by trailing/cutting down all Non-ASCII characters. This one takes about `2.6` seconds to parse 319MB: ``` #include <stdlib.h> #include <iostream> int main(int argc, char const *argv[]) { FILE* cfilestream = fopen( "./test.txt", "r" ); size_t linebuffersize = 131072; if( cfilestr...
21,794,149
This is my sample record in a Text format with comma delimited ``` 901,BLL,,,BQ,ARCTICA,,,, ``` i need to replace `,,, to ,,` The Regular expression that i tried ``` With regex .MultiLine = False .Global = True .IgnoreCase = False .Pattern="^(?=[A-Z]{3})\\,{3,}",",,"))$ -- error ``` Now i wa...
2014/02/15
[ "https://Stackoverflow.com/questions/21794149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2797727/" ]
Looking at your original pattern I tried using `.Pattern = "^\d{3},\D{3},,,"` which works on the sample record as with the 3 number characters , 3 letters,,, In the answer I have used a more generalised pattern `.Pattern = "^\w*,\w*,\w*,,"` This also works on the sample and mathces 3 commas each preceded with 0 or mor...
Try this ``` Sub test() Dim str As String str = "901,BLL,,,BQ,ARCTICA,,,," str = strConv(str) MsgBox str End Sub Function strConv(ByVal str As String) As String Dim objRegEx As Object, allMatches As Object Set objRegEx = CreateObject("VBScript.RegExp") With objRegEx .MultiLine...
38,822,758
In below example I have tried creating a generic ref `hm` referring to newly created `HashMap` having type `<Integer,Integer>`. But even if I add string values through `hm` reference it is allowing. If ref have eg. `hm1` below it is throwing error at compile time only. ``` HashMap hm = new HashMap<Integer,Integer>(); ...
2016/08/08
[ "https://Stackoverflow.com/questions/38822758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4818005/" ]
Here you go: ``` <?php define("SITENAME","Page TITLE"); echo "My website title: ".SITENAME; ?> ``` output : `My website title: Page TITLE`
You can echo the value of constant as below ``` define("SITENAME","Page TITLE"); echo SITENAME.': My New Content Here'; ``` This gives : `Page TITLE: My New Content Here` For more reference: ``` define("CONSTANT", "Hello world."); echo CONSTANT; // outputs "Hello world." echo Constant; // outputs "Constant" and is...
28,097,222
I'm surely missing something simple here. Trying to merge two dataframes in pandas that have mostly the same column names, but the right dataframe has some columns that the left doesn't have, and vice versa. ``` >df_may id quantity attr_1 attr_2 0 1 20 0 1 1 2 23 1 1 2 3 ...
2015/01/22
[ "https://Stackoverflow.com/questions/28097222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3902926/" ]
I think in this case [`concat`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.concat.html#pandas.concat) is what you want: ``` In [12]: pd.concat([df,df1], axis=0, ignore_index=True) Out[12]: attr_1 attr_2 attr_3 id quantity 0 0 1 NaN 1 20 1 1 1 NaN 2 ...
I had this problem today using any of concat, append or merge, and I got around it by adding a helper column sequentially numbered and then doing an outer join ``` helper=1 for i in df1.index: df1.loc[i,'helper']=helper helper=helper+1 for i in df2.index: df2.loc[i,'helper']=helper helper=helper+1 df1....
28,097,222
I'm surely missing something simple here. Trying to merge two dataframes in pandas that have mostly the same column names, but the right dataframe has some columns that the left doesn't have, and vice versa. ``` >df_may id quantity attr_1 attr_2 0 1 20 0 1 1 2 23 1 1 2 3 ...
2015/01/22
[ "https://Stackoverflow.com/questions/28097222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3902926/" ]
I think in this case [`concat`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.concat.html#pandas.concat) is what you want: ``` In [12]: pd.concat([df,df1], axis=0, ignore_index=True) Out[12]: attr_1 attr_2 attr_3 id quantity 0 0 1 NaN 1 20 1 1 1 NaN 2 ...
The accepted answer will break [if there are duplicate headers](https://stackoverflow.com/a/70099826/13138364): > > InvalidIndexError: Reindexing only valid with uniquely valued Index objects. > > > For example, here `A` has 3x `trial` columns, which prevents [`concat`](https://pandas.pydata.org/docs/reference/ap...
28,097,222
I'm surely missing something simple here. Trying to merge two dataframes in pandas that have mostly the same column names, but the right dataframe has some columns that the left doesn't have, and vice versa. ``` >df_may id quantity attr_1 attr_2 0 1 20 0 1 1 2 23 1 1 2 3 ...
2015/01/22
[ "https://Stackoverflow.com/questions/28097222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3902926/" ]
The accepted answer will break [if there are duplicate headers](https://stackoverflow.com/a/70099826/13138364): > > InvalidIndexError: Reindexing only valid with uniquely valued Index objects. > > > For example, here `A` has 3x `trial` columns, which prevents [`concat`](https://pandas.pydata.org/docs/reference/ap...
I had this problem today using any of concat, append or merge, and I got around it by adding a helper column sequentially numbered and then doing an outer join ``` helper=1 for i in df1.index: df1.loc[i,'helper']=helper helper=helper+1 for i in df2.index: df2.loc[i,'helper']=helper helper=helper+1 df1....
22,622,309
I do not see how adding something like L to a number makes a difference. For example if I took the number 23.54 and made it 23.54L what difference does that actually make and when should I use the L and not use the L or other add ons like that? Doesn't objective-c already know 23.54 is a long so why would I make it 23....
2014/03/24
[ "https://Stackoverflow.com/questions/22622309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3177239/" ]
Actually, when a number has a decimal point like 23.54 the default interpretation is that it's a double, and it's encoded as a 64-bit floating point number. If you put an `f` at the end `23.54f`, then it's encoded as a 32-bit floating pointer number. Putting an `L` at the end declares that the number is a long double, ...
It's a way to force the compiler to treat a constant with a specific type. `23.45` is double, `23.54L` is long double, and `23.54f` is float. Use a suffix when you need to specify the type of a constant. Or, create a variable of a specific type: `float foo = 23.54;`. Most of the time you don't need a suffix. This is...
42,017,047
I have semicolon-separated columns, and I would like to add some characters to a specific column. ``` aaa;111;bbb ccc;222;ddd eee;333;fff ``` to the second column I want to add '@', so the output should be; ``` aaa;@111;bbb ccc;@222;ddd eee;@333;fff ``` I tried ``` awk -F';' -OFS=';' '{ $2 = "@" $2}1' file ```...
2017/02/03
[ "https://Stackoverflow.com/questions/42017047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The `text` property of `UILabel` is optional. `UILabel` is smart enough to check if the `text` property's value is set to `nil` or a non-nil value. If it's not `nil`, then it shows the properly unwrapped (and now non-optional) value. Internally, I imagine the `drawRect` method of `UILabel` has code along the lines of ...
I knew I've seen optionals printed in UILabel, UITextView, UITextField. Rmaddy's answer wasn't convincing. It's very likely that there is an internal `if let else` so if the optional has a value then it will unwrap it and show. If not then it would show nothing. However there's a catch! ``` let optionalString : St...
48,897,117
I'm trying to parse a file format, using the excellent [parboiled2](http://parboiled2.org/) library, in which the presence of some fields is dependent upon the value of one or more fields already processed. For example, say I have two fields, the first of which is a flag indicating whether the second is present. That ...
2018/02/21
[ "https://Stackoverflow.com/questions/48897117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2593574/" ]
Yes, you can implement such a function with the help of `test` parser action: ``` def conditional[U](bool: Boolean, parse: () => Rule1[U]): Rule1[Option[U]] = rule { test(bool) ~ parse() ~> (Some(_)) | push(None) } ``` According to the [Meta-Rules section](https://github.com/sirthias/parboiled2#meta-rules) of the ...
I would do something like this: ``` extends Parser { def dependentFields: Rule1[(Boolean, Option[Int], String)] = rule { ("true" ~ ws ~ trueBranch | "false" ~ ws ~ falseBranch) } def trueBranch = rule { intField ~ ws ~ stringField ~> { (i, s) => (true, Some(i), s) } } def falseBranch = rule { ...
171,338
I made a custom js script for a little calculator. I want to use this in only 1 node (article or page) so I do not want to load it via tpl files etc because I do not need it sitewide. And also: if every custom script (that I use only in 1 node) has to be loaded sitewide I would get an immense head section after some ti...
2015/08/28
[ "https://drupal.stackexchange.com/questions/171338", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/50535/" ]
In the `template.php` you will write this small piece of code: ``` function MYTHEME_preprocess_node($vars) { if (drupal_get_path_alias("node/{$vars['#node']->nid}") == 'yournid') { drupal_add_js(drupal_get_path('theme', 'MYTHEME') . "/script/js"); } } ``` Replace foo with values related to your need.
you need to use php filter or need to create tpl file for single node to accomplish this. With php filter or tpl you need to put only this code. ``` <?php drupal_add_js('jQuery(document).ready(function () { jQuery("p").hide(); jQuery("p").fadeIn("slow"); });', 'inline'); ?> ```
171,338
I made a custom js script for a little calculator. I want to use this in only 1 node (article or page) so I do not want to load it via tpl files etc because I do not need it sitewide. And also: if every custom script (that I use only in 1 node) has to be loaded sitewide I would get an immense head section after some ti...
2015/08/28
[ "https://drupal.stackexchange.com/questions/171338", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/50535/" ]
code for adding JS to particular path: ``` if ($_SERVER['REQUEST_URI'] == '/path/to/node') { drupal_add_js('somefile.js'); } ``` to attach js to node: ``` function my_module_node_view($node, $viewmode, $langcode) { $node->content['#attached']['js'][] = array('type' => 'file','data' => drupal_get_path('module', ...
you need to use php filter or need to create tpl file for single node to accomplish this. With php filter or tpl you need to put only this code. ``` <?php drupal_add_js('jQuery(document).ready(function () { jQuery("p").hide(); jQuery("p").fadeIn("slow"); });', 'inline'); ?> ```
171,338
I made a custom js script for a little calculator. I want to use this in only 1 node (article or page) so I do not want to load it via tpl files etc because I do not need it sitewide. And also: if every custom script (that I use only in 1 node) has to be loaded sitewide I would get an immense head section after some ti...
2015/08/28
[ "https://drupal.stackexchange.com/questions/171338", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/50535/" ]
Another option is [JS Injector](https://www.drupal.org/project/js_injector). Though I haven't used this module. This requires no programming as it provides user interface to administrators.
you need to use php filter or need to create tpl file for single node to accomplish this. With php filter or tpl you need to put only this code. ``` <?php drupal_add_js('jQuery(document).ready(function () { jQuery("p").hide(); jQuery("p").fadeIn("slow"); });', 'inline'); ?> ```
171,338
I made a custom js script for a little calculator. I want to use this in only 1 node (article or page) so I do not want to load it via tpl files etc because I do not need it sitewide. And also: if every custom script (that I use only in 1 node) has to be loaded sitewide I would get an immense head section after some ti...
2015/08/28
[ "https://drupal.stackexchange.com/questions/171338", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/50535/" ]
In the `template.php` you will write this small piece of code: ``` function MYTHEME_preprocess_node($vars) { if (drupal_get_path_alias("node/{$vars['#node']->nid}") == 'yournid') { drupal_add_js(drupal_get_path('theme', 'MYTHEME') . "/script/js"); } } ``` Replace foo with values related to your need.
code for adding JS to particular path: ``` if ($_SERVER['REQUEST_URI'] == '/path/to/node') { drupal_add_js('somefile.js'); } ``` to attach js to node: ``` function my_module_node_view($node, $viewmode, $langcode) { $node->content['#attached']['js'][] = array('type' => 'file','data' => drupal_get_path('module', ...
171,338
I made a custom js script for a little calculator. I want to use this in only 1 node (article or page) so I do not want to load it via tpl files etc because I do not need it sitewide. And also: if every custom script (that I use only in 1 node) has to be loaded sitewide I would get an immense head section after some ti...
2015/08/28
[ "https://drupal.stackexchange.com/questions/171338", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/50535/" ]
In the `template.php` you will write this small piece of code: ``` function MYTHEME_preprocess_node($vars) { if (drupal_get_path_alias("node/{$vars['#node']->nid}") == 'yournid') { drupal_add_js(drupal_get_path('theme', 'MYTHEME') . "/script/js"); } } ``` Replace foo with values related to your need.
Another option is [JS Injector](https://www.drupal.org/project/js_injector). Though I haven't used this module. This requires no programming as it provides user interface to administrators.
8,153
How would you name a male pet, Monkey? Since 'scimmia' is female it doesn't seem right. Scimmio, or is that slang for something else?
2017/04/04
[ "https://italian.stackexchange.com/questions/8153", "https://italian.stackexchange.com", "https://italian.stackexchange.com/users/3425/" ]
Maybe call it *scimmiotto*. The suffix *-otto* sounds cute in Italian, so it fits to a pet, regardless of age or size.
"Scimmia" is for both genders. In Italian there are many animals with female name for both genders, for instance: zebra, vipera, marmotta, balena, ...
8,153
How would you name a male pet, Monkey? Since 'scimmia' is female it doesn't seem right. Scimmio, or is that slang for something else?
2017/04/04
[ "https://italian.stackexchange.com/questions/8153", "https://italian.stackexchange.com", "https://italian.stackexchange.com/users/3425/" ]
Maybe call it *scimmiotto*. The suffix *-otto* sounds cute in Italian, so it fits to a pet, regardless of age or size.
**Monketto** * It's neither English or Italian. * Has connotations of *monkey*, *small* and *cute*. * The masculine suffix suits a male pet. * Can be abbreviated to *ketto*.
8,153
How would you name a male pet, Monkey? Since 'scimmia' is female it doesn't seem right. Scimmio, or is that slang for something else?
2017/04/04
[ "https://italian.stackexchange.com/questions/8153", "https://italian.stackexchange.com", "https://italian.stackexchange.com/users/3425/" ]
"Scimmia" is for both genders. In Italian there are many animals with female name for both genders, for instance: zebra, vipera, marmotta, balena, ...
**Monketto** * It's neither English or Italian. * Has connotations of *monkey*, *small* and *cute*. * The masculine suffix suits a male pet. * Can be abbreviated to *ketto*.
17,489,120
I have java application server (JBoss). I deployed servlet which address is: `http://localhost:8080/Generate/Pdf`. How can I run it from bash? How can I pass parameters to run?
2013/07/05
[ "https://Stackoverflow.com/questions/17489120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2094783/" ]
Use `curl`: ``` $ curl http://localhost:8080/GeneratePdf ``` If you want to pass parameters, we must know more about what the servlet accepts.
use curl to execute http requests from command line
17,489,120
I have java application server (JBoss). I deployed servlet which address is: `http://localhost:8080/Generate/Pdf`. How can I run it from bash? How can I pass parameters to run?
2013/07/05
[ "https://Stackoverflow.com/questions/17489120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2094783/" ]
Use `curl`: ``` $ curl http://localhost:8080/GeneratePdf ``` If you want to pass parameters, we must know more about what the servlet accepts.
Or you can simply use `wget`: ``` wget http://localhost:8080/GeneratePdf -O path/to/output-file.pdf ```
456,611
Input: file with sorted lines Output: file with 'unique' lines that match adjacent lines if we are to remove all digits Example Input ``` abbylove2007 abbylove2008 abbylove2012 AbbyLove2014 abby1994lover abby2007lover abbylovesaal2018 abbylovesbsb2003 ``` Output ``` abbylove2007 abby1994lover ``` Here abbylove...
2018/07/16
[ "https://unix.stackexchange.com/questions/456611", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/183393/" ]
``` $ awk '{ curr=$0; gsub("[0-9]","",curr) } curr != prev { prev=curr; prevfull=$0; flag=0; next } !flag { print prevfull; flag=1 }' test abbylove2007 abby1994lover ``` First, remove digits from the current line. If the result of this is different from the previous line with digits removed, then update the previous ...
That would be a modified sed equivalent of `uniq -d`: ``` sed '$!N; s/^\([^0-9]*\)\(.*\)\n\1[0-9].*$/\1\2/; t; D' ```
5,498,355
I need to chance spring bean property values on runtime. Currently I'm doing it this way ``` Object bean = context.getBean(beanName); BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(bean); wrapper.setPropertyValue(propertyName, newValue); ``` But some beans are configured as abstract ``` <bean ...
2011/03/31
[ "https://Stackoverflow.com/questions/5498355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223610/" ]
Spring application context contains *bean definitions*, and Spring instantiates bean objects defined by these definitions. Your current code obtains an object that was created from the named bean definition, and changes its property. However, `abstract` beans are never instantiated as objects, they exist only in the f...
Disclaimer: this is untested; off the top of my head. Not sure if it will work after the init phase. You need to get in instance of a `ConfigurableListableBeanFactory`. Your appcontext probably is one, so you can probably cast it. From there, get the bean definition and change the property. ``` ConfigurableListab...
3,548,797
My target module is an executable to be built from `X.cpp` and `Y.cpp`, both these two files need a common `.h` file: ``` extern HANDLE hPipe; extern IMediaSample *pSave = NULL; ``` But when I build the module, I got an error saying : ``` Y.obj : error LNK2005: "struct IMediaSample * pSave" (?pSave@@3PAUIMediaSampl...
2010/08/23
[ "https://Stackoverflow.com/questions/3548797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/417798/" ]
``` extern IMediaSample *pSave = NULL; ``` This is not just a declaration. This will define `pSave` to `NULL`. Since both `.cpp` include the `.h`, this variable will be defined in 2 translation units, which causes the conflict. You should just rewrite it as ``` extern IMediaSample *pSave; ``` in the `.h`, then ad...
try using ifndef statement. define a variable unique to each header file you create then while including use something like: ``` #ifndef commonh include common.h #endif ```
209,713
Setting up Postfix and Apache/PHP on an Ubuntu server. Mail's now going out ok with the proper domain name, but the local part display name is always "www-data" as I'm assuming Postfix uses the name of the user by default. In the php.ini file, I was able to change the `sendmail_path` to `sendmail_path = "/usr/sbin/sen...
2010/12/06
[ "https://serverfault.com/questions/209713", "https://serverfault.com", "https://serverfault.com/users/43041/" ]
Add in your main.cf ``` smtp_generic_maps = hash:/etc/postfix/generic ``` And create a file named /etc/postfix/generic with : ``` www-data support@example.com ``` run `postmap /etc/postfix/generic` to compile and reload postfix. Your send name is now support@example.com
You should do one last thing to complete process which is @Dom has forgetten. Run the following command : `$ postmap /etc/postfix/generic` This command will be create `generic.db` file inside the /postfix directory. If you don't do this, you can face of the following error output : `fatal: open database /etc/postfi...
209,713
Setting up Postfix and Apache/PHP on an Ubuntu server. Mail's now going out ok with the proper domain name, but the local part display name is always "www-data" as I'm assuming Postfix uses the name of the user by default. In the php.ini file, I was able to change the `sendmail_path` to `sendmail_path = "/usr/sbin/sen...
2010/12/06
[ "https://serverfault.com/questions/209713", "https://serverfault.com", "https://serverfault.com/users/43041/" ]
Add in your main.cf ``` smtp_generic_maps = hash:/etc/postfix/generic ``` And create a file named /etc/postfix/generic with : ``` www-data support@example.com ``` run `postmap /etc/postfix/generic` to compile and reload postfix. Your send name is now support@example.com
try this /etc/apache2/envvars User ${APACHE\_RUN\_USER} Group ${APACHE\_RUN\_GROUP}
209,713
Setting up Postfix and Apache/PHP on an Ubuntu server. Mail's now going out ok with the proper domain name, but the local part display name is always "www-data" as I'm assuming Postfix uses the name of the user by default. In the php.ini file, I was able to change the `sendmail_path` to `sendmail_path = "/usr/sbin/sen...
2010/12/06
[ "https://serverfault.com/questions/209713", "https://serverfault.com", "https://serverfault.com/users/43041/" ]
As I understand the question, you're trying to set the full name of the sender, not the address (or, in addition to the address). In general, Postfix doesn't care what that is, and you set it when your MUA (in this case, some php script) generates the message headers. I'm not familiar with coding in php, but it looks l...
You should do one last thing to complete process which is @Dom has forgetten. Run the following command : `$ postmap /etc/postfix/generic` This command will be create `generic.db` file inside the /postfix directory. If you don't do this, you can face of the following error output : `fatal: open database /etc/postfi...
209,713
Setting up Postfix and Apache/PHP on an Ubuntu server. Mail's now going out ok with the proper domain name, but the local part display name is always "www-data" as I'm assuming Postfix uses the name of the user by default. In the php.ini file, I was able to change the `sendmail_path` to `sendmail_path = "/usr/sbin/sen...
2010/12/06
[ "https://serverfault.com/questions/209713", "https://serverfault.com", "https://serverfault.com/users/43041/" ]
As I understand the question, you're trying to set the full name of the sender, not the address (or, in addition to the address). In general, Postfix doesn't care what that is, and you set it when your MUA (in this case, some php script) generates the message headers. I'm not familiar with coding in php, but it looks l...
try this /etc/apache2/envvars User ${APACHE\_RUN\_USER} Group ${APACHE\_RUN\_GROUP}
209,713
Setting up Postfix and Apache/PHP on an Ubuntu server. Mail's now going out ok with the proper domain name, but the local part display name is always "www-data" as I'm assuming Postfix uses the name of the user by default. In the php.ini file, I was able to change the `sendmail_path` to `sendmail_path = "/usr/sbin/sen...
2010/12/06
[ "https://serverfault.com/questions/209713", "https://serverfault.com", "https://serverfault.com/users/43041/" ]
You should do one last thing to complete process which is @Dom has forgetten. Run the following command : `$ postmap /etc/postfix/generic` This command will be create `generic.db` file inside the /postfix directory. If you don't do this, you can face of the following error output : `fatal: open database /etc/postfi...
try this /etc/apache2/envvars User ${APACHE\_RUN\_USER} Group ${APACHE\_RUN\_GROUP}
21,682,314
I'm using Windsor with `ASP.NET MVC4` and I've written a custom `RoleProvider` around a legacy security framework. I need to inject a connection string and file path into the provider so I can provide these to the legacy framework, but when I come to use the `AuthorizeAttribute`, I realise that I have no idea how to in...
2014/02/10
[ "https://Stackoverflow.com/questions/21682314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232172/" ]
The results of my research : * `Windsor` (unlike `StructureMap`) does *not* have a way of injecting properties into existing objects * The `AuthorizeAttribute` does not call into the RoleProvider implementation directly, it calls into `Thread.CurrentPrincipal` which returns an `IPrincipal` implementation... * Basicall...
Old question, but this works well for me in an Asp.Net RoleProvider in 2019. In your DI Container Configuration ``` { ... Type registrations GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container); } ``` in your RoleProvider... ``` private IYourType _yourT...
73,664,724
I am trying to implement a light mode/dark mode toggle on a website. The toggle itself is working as expected, but I can't figure out how to also make it switch between style sheets. I am new to JS so the CSS/HTML is there, but I can't get the script right. So this is what I have so far that works on its own before tr...
2022/09/09
[ "https://Stackoverflow.com/questions/73664724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19871483/" ]
[Abraham Zinala](https://learn.microsoft.com/en-us/exchange/whatif-confirm-and-validateonly-switches-exchange-2013-help) has provided the crucial pointer: * **The [`-WhatIf` common parameter](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters#whatif) in the comma...
Remove **-WhatIf** from the last line. Your code should like this below: ``` $Path = "C:\01Source\" write-host $Path $curDateTime = Get-Date -Format yyyyMMdd Get-ChildItem $Path -Recurse | Rename-Item -NewName {$_.Basename + '_' + $curDateTime + $_.Extension } ```
72,318,957
``` from django.db import models from datetime import datetime from django.contrib.auth import get_user_model User = get_user_model() class Blog(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) headline = models.CharField(max_length=250) content = mo...
2022/05/20
[ "https://Stackoverflow.com/questions/72318957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16574267/" ]
It seems as a vector valued function the vector values must be in the 0th dimension, and the integration arguments (in your case `z`) must come last (that what they mean with `(..., len(x))`, their `x` is your `z`), I think this comes from the broadcasting rules. Following example worked fine for me - the key here is t...
After the (incomplete) answer by *flawr* and reading about `numpy` broadcasting, I found a solution. I'd be happy to learn whether this can still be improved and/or if this is really correct, i.e. works for any valid input (it does for my tests sofar). The important point is to adapt the shapes of `x` and `y` such tha...
5,751,040
Could someone provide a list of html attributes that are allowed in a table? Not the normal ones like id, style, and class, but attributes that are specifically for tables like border, bgcolor (if it exists), and cellspacing.
2011/04/21
[ "https://Stackoverflow.com/questions/5751040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552067/" ]
<http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1>
Have a look at <http://www.w3.org/TR/html4/struct/tables.html>