qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
19,339,464
Trying to create a table with a foreign key. I keep getting `ORA-00904` error. What am I doing wrong. Is it because table of the foreign key is not yet created ? ``` CREATE TABLE ingredients( ingredient_id number(2,0), ingredient VARCHAR2(55) NOT NULL, quantity_required VARCHAR2(15) NOT NULL...
2013/10/12
[ "https://Stackoverflow.com/questions/19339464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2199351/" ]
Take a look at the following line: ``` CONSTRAINT fk_ingredient_list FOREIGN KEY(id) REFERENCES ingredient_list(id) ``` Your table has no column named "id". I assume you meant to write ``` CONSTRAINT fk_ingredient_list FOREIGN KEY(ingredient_id) REFERENCES ingredient_list(id) ``` EDIT: Additionally, as you sus...
In my case I had used quotes in the table creation like below: ``` CREATE TABLE MY_TABLE ( "ID" NUMBER(19, 0) NOT NULL ENABLE, "OPT_LOCK_VERSION" NUMBER(19, 0), -- etc. ``` And then tried creating similar constraint as in the question. That resulted to the same ORA-00904 error. When I modified ...
19,339,464
Trying to create a table with a foreign key. I keep getting `ORA-00904` error. What am I doing wrong. Is it because table of the foreign key is not yet created ? ``` CREATE TABLE ingredients( ingredient_id number(2,0), ingredient VARCHAR2(55) NOT NULL, quantity_required VARCHAR2(15) NOT NULL...
2013/10/12
[ "https://Stackoverflow.com/questions/19339464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2199351/" ]
In my case I had used quotes in the table creation like below: ``` CREATE TABLE MY_TABLE ( "ID" NUMBER(19, 0) NOT NULL ENABLE, "OPT_LOCK_VERSION" NUMBER(19, 0), -- etc. ``` And then tried creating similar constraint as in the question. That resulted to the same ORA-00904 error. When I modified ...
We never know but in my case I had this exception no matter what name I gave my column. I had a library with EF which pointed on the proper database. The entities were correct. But on the client part (a web application), the connection string pointed to another database! A stupid mistake, it was hard to pinpoint this ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
You look like you are an expert on a field that your supervisor isn't, and that expertise is necessary for a collaborator to make progress on his thesis. Therefore, I would expect that your supervisor would motivate both of you to work together, so that the other PhD student can benefit from your expertise, and you cou...
I have a bi-weekly meeting with my MSc and Ph.D. students that some time is 6 hours long. We discuss ideas and brainstorming solutions; they work on different subjects. When I was doing my Ph.D, I designed an algorithm from A-Z gave it to an MSc student to implement, he published a paper I did not co-author it and did ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
Actually, I think you should relax and take your advisor's advice. Collaboration is a good thing, and it is a two-way street. You give a bit and you get a bit. I assume you got an acknowledgement in the paper for your help. I don't think it would be appropriate if you weren't. But authorship is a different thing. You...
There are plenty of answers already, so there will naturally be some overlap between mine and what's already said, but I hope to be able to give some food for thought anyways. First of all, judging by the way you express yourself, both on the OP and the comments, you seem to be quite agitated by the situation. Before ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
> > When the PhD student started to write a paper about it, I asked him to be on the paper, since I felt I contributed directly to his research. But he said I just gave him suggestions and he could add me in the acknowledgments, not as co-author. And he said I should ask my supervisor if I deserve to be on the paper. ...
The other answers cover most of the points but I’d just like to add that submission doesn’t necessarily equate with acceptance. They may have rushed this paper slightly to meet a conference deadline and neglected you in the rush to submit. They may be planning a journal submission after the conference and would like to...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
Actually, I think you should relax and take your advisor's advice. Collaboration is a good thing, and it is a two-way street. You give a bit and you get a bit. I assume you got an acknowledgement in the paper for your help. I don't think it would be appropriate if you weren't. But authorship is a different thing. You...
You have numerous replies. I will simply say "no, by my and what I believe are reasonable standards, you are not qualified to be a co-author" and "no you would be very unwise to involve the department head/chairperson." If one of my Ph.D. students felt the way you do, I would counsel them appropriately. If they subsequ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
> > I am planing in taking it to the head of department. > > > Let me assure you that this is a bad idea. 99 times out of 100 the department head will not intervene in these matters. Moreover even if they do (again, super unlikely), and you get things your way with this paper, I assure you that this will forever m...
It's possible that your supervisor and your cuckoo think that you don't deserve co-authorship because they didn't let you edit the paper before submitting it. But the amount of time you spent providing needed advice and guidance in my opinion deserves more than a mere acknowledgement. That said, raising a stink about ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
There are plenty of answers already, so there will naturally be some overlap between mine and what's already said, but I hope to be able to give some food for thought anyways. First of all, judging by the way you express yourself, both on the OP and the comments, you seem to be quite agitated by the situation. Before ...
There are some formal rules around academic ethics in relation to authorship. [Vancouver Protocol](http://storage.googleapis.com/wzukusers/user-17415557/documents/56640b2c61339C4KMzWo/Vancouver%20Protocol.pdf) states that authorship credit should be based only on substantial contributions to: 1. conception and design...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
> > I am planing in taking it to the head of department. > > > Let me assure you that this is a bad idea. 99 times out of 100 the department head will not intervene in these matters. Moreover even if they do (again, super unlikely), and you get things your way with this paper, I assure you that this will forever m...
There are some formal rules around academic ethics in relation to authorship. [Vancouver Protocol](http://storage.googleapis.com/wzukusers/user-17415557/documents/56640b2c61339C4KMzWo/Vancouver%20Protocol.pdf) states that authorship credit should be based only on substantial contributions to: 1. conception and design...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
> > I am planing in taking it to the head of department. > > > Let me assure you that this is a bad idea. 99 times out of 100 the department head will not intervene in these matters. Moreover even if they do (again, super unlikely), and you get things your way with this paper, I assure you that this will forever m...
You have numerous replies. I will simply say "no, by my and what I believe are reasonable standards, you are not qualified to be a co-author" and "no you would be very unwise to involve the department head/chairperson." If one of my Ph.D. students felt the way you do, I would counsel them appropriately. If they subsequ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
Actually, I think you should relax and take your advisor's advice. Collaboration is a good thing, and it is a two-way street. You give a bit and you get a bit. I assume you got an acknowledgement in the paper for your help. I don't think it would be appropriate if you weren't. But authorship is a different thing. You...
In the future I’d suggest being clearer about whether a project is joint work earlier in the process. It doesn’t sound to me from your description that you deserve coauthorship, but I do see why you feel shortchanged. The earlier on that you have this conversation the less chance there is for miscommunication and hurt ...
137,554
My PhD supervisor (in the field of artificial intelligence) invited me to several meetings with another PhD student. Since I have more knowledge than my supervisor in some topics, I made many suggestions about how this student could improve his methodology. In total, I went to 5 meetings of 3–4 hours each. I could have...
2019/09/24
[ "https://academia.stackexchange.com/questions/137554", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114370/" ]
The other answers cover most of the points but I’d just like to add that submission doesn’t necessarily equate with acceptance. They may have rushed this paper slightly to meet a conference deadline and neglected you in the rush to submit. They may be planning a journal submission after the conference and would like to...
It's possible that your supervisor and your cuckoo think that you don't deserve co-authorship because they didn't let you edit the paper before submitting it. But the amount of time you spent providing needed advice and guidance in my opinion deserves more than a mere acknowledgement. That said, raising a stink about ...
1,325,606
We are given the graphs of f and g below. Find (g o f)'(1) , i.e. the derivative of (g o f) at 1. ![enter image description here](https://i.stack.imgur.com/uHfjE.png) my work is let $$g(x) = x^2 + 2$$ $$f(x) = \sqrt{x+2}$$ i'm stuck , is my work correct and f and g is correct to get (g o f) and (g o f)' please l...
2015/06/15
[ "https://math.stackexchange.com/questions/1325606", "https://math.stackexchange.com", "https://math.stackexchange.com/users/155971/" ]
Your functions (as written now) are incorrect. Observe that $g(x)$ is the translation of $x^2$ two units to the right, i.e. $g(x) = (x-2)^2 = x^2 - 4x + 4$. Though it is slightly unclear, $f(x)$ is most likely $e^x$ (a quick check on Mathematica shows this). Now we can apply the chain rule. Since $g$ is differentiable ...
The composition $f \circ g$, of functions $f$ and $g$, is defined by the operation $ (f\circ g)(x) = f(g(x))$ for all $x$ in your domain. Since $g(x)= x^2+2$, and $f(x)=\sqrt{x+2}$, then $(f \circ g)(x) = f(g(x))=f(x^2+2)=\sqrt{(x^2+2)+2}=\sqrt{x^2+4}$ Then take the derivative to find $(f \circ g)'$ and substitute x=1...
1,325,606
We are given the graphs of f and g below. Find (g o f)'(1) , i.e. the derivative of (g o f) at 1. ![enter image description here](https://i.stack.imgur.com/uHfjE.png) my work is let $$g(x) = x^2 + 2$$ $$f(x) = \sqrt{x+2}$$ i'm stuck , is my work correct and f and g is correct to get (g o f) and (g o f)' please l...
2015/06/15
[ "https://math.stackexchange.com/questions/1325606", "https://math.stackexchange.com", "https://math.stackexchange.com/users/155971/" ]
Your functions (as written now) are incorrect. Observe that $g(x)$ is the translation of $x^2$ two units to the right, i.e. $g(x) = (x-2)^2 = x^2 - 4x + 4$. Though it is slightly unclear, $f(x)$ is most likely $e^x$ (a quick check on Mathematica shows this). Now we can apply the chain rule. Since $g$ is differentiable ...
Your equations are incorrect. where you have $g(x) = x^2 + 2$ that isnt correct because that is saying you take the graph of $x^2$ and move it up two but clearly we move it to the right two so it should be $g(x) = (x-2)^2$. Now for $f(x) = \sqrt{x+2}$ That is incorrect because when $x < -2$ we get a negative value und...
40,129,759
I used this code to cancel all `Alamofire` requests: ``` func stopAllSessions() { Alamofire.Manager.sharedInstance.session.getAllTasksWithCompletionHandler { tasks in tasks.forEach { $0.cancel() } } } ``` After swift 3 migration, this doesn't work, and I can't find `getAllTasksWithCompletionHandler` ...
2016/10/19
[ "https://Stackoverflow.com/questions/40129759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6019245/" ]
Found: ``` Alamofire.SessionManager.default.session.getTasksWithCompletionHandler { (sessionDataTask, uploadData, downloadData) in sessionDataTask.forEach { $0.cancel() } uploadData.forEach { $0.cancel() } downloadData.forEach { $0.cancel() } } ```
The method you are searching for has changed to `getAllTasks(completionHandler:)`. ``` Alamofire.SessionManager.default.session.getAllTasks { task in task.forEach { $0.cancel() } } ```
48,709,430
I have data with three columns `[Date|Name|Comment]` ranging from 2018 to 2014 and I want to isolate the entries that were made in 2017. I'm using the datascience library (documentation: <http://data8.org/datascience/index.html>) and I've been able to sort it simply just by applying ``` .sort('Date received', descen...
2018/02/09
[ "https://Stackoverflow.com/questions/48709430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9339009/" ]
It looks to me like the measure is averaging the task per row level. I believe you want to average them at the day level. Take the sum of tasks and divide by number days to get the average count per day.
The use of the AVERAGE function runs in the whole column visible in the current filter context, meaning that it returns the average based on each row, you need to use an iterator function like AVERAGEX to get your desired result
48,709,430
I have data with three columns `[Date|Name|Comment]` ranging from 2018 to 2014 and I want to isolate the entries that were made in 2017. I'm using the datascience library (documentation: <http://data8.org/datascience/index.html>) and I've been able to sort it simply just by applying ``` .sort('Date received', descen...
2018/02/09
[ "https://Stackoverflow.com/questions/48709430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9339009/" ]
It looks to me like the measure is averaging the task per row level. I believe you want to average them at the day level. Take the sum of tasks and divide by number days to get the average count per day.
I found that if I went into my data set and created a column Called KPI Trend and just made it = 1, then use that as my Trend axis I got expected results for my averages.
48,709,430
I have data with three columns `[Date|Name|Comment]` ranging from 2018 to 2014 and I want to isolate the entries that were made in 2017. I'm using the datascience library (documentation: <http://data8.org/datascience/index.html>) and I've been able to sort it simply just by applying ``` .sort('Date received', descen...
2018/02/09
[ "https://Stackoverflow.com/questions/48709430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9339009/" ]
The use of the AVERAGE function runs in the whole column visible in the current filter context, meaning that it returns the average based on each row, you need to use an iterator function like AVERAGEX to get your desired result
I found that if I went into my data set and created a column Called KPI Trend and just made it = 1, then use that as my Trend axis I got expected results for my averages.
33,870,484
I am trying to pass a parameter to a function with `Smarty`. Like this: ``` $('#buttonClose').click(function(){ var name = document.getElementById('nameSpan').value; {$person->addName(name)} }); ``` but it pass the value "name" instead of the real value of the variable `name`. How can I do that to get the ...
2015/11/23
[ "https://Stackoverflow.com/questions/33870484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4565367/" ]
Using `gnu-awk` you can do this easily: ``` awk -v FPAT='"[^"]*"|[^[:blank:]]+' -v OFS='\t' '{$1=$1} 1' file foo bar "foobar baz qux" foo "bar foobar baz" qux "foo bar foobar" baz qux ```
I would use the following command: ``` awk '{$1=$1}1' OFS='\t' FPAT='"[^"]+"|[^ ]+' ``` I define two kind of possible field trough the `FPAT` variable: * a string enclosed in double quotes `"[^"]+"` * a sequence of non whitespace characters `[^ ]+` Because the enclosed string comes first, it has a higher precedenc...
26,348,955
I am using fullcalendar in the agendaWeek view. I noticed that events that are in a single slot, lets say 30 min, do not display the endtime. The endtime only apears on events that cover more than one slot. All the options that I've found did not add that to the event title. Is that possible and I just didn't see it?...
2014/10/13
[ "https://Stackoverflow.com/questions/26348955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3396334/" ]
In the function `renderEventTable` there is a condition that adds a css class if the event is smaller than 30px. ``` if (seg.bottom - seg.top < 30) { seg.el.addClass('fc-short'); } ``` So basicly you can just edit the CSS style for `.fc-short`. ``` fc-time-grid-event.fc-short .fc-time span { display: none; ...
An easy and better solution that worked around was to simply add css. which will show [start time] - [end time] [title] ``` .fc-time-grid-event.fc-short .fc-time:before { content: attr(data-full); /* ...instead, display only the start time */ } ```
26,348,955
I am using fullcalendar in the agendaWeek view. I noticed that events that are in a single slot, lets say 30 min, do not display the endtime. The endtime only apears on events that cover more than one slot. All the options that I've found did not add that to the event title. Is that possible and I just didn't see it?...
2014/10/13
[ "https://Stackoverflow.com/questions/26348955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3396334/" ]
In the function `renderEventTable` there is a condition that adds a css class if the event is smaller than 30px. ``` if (seg.bottom - seg.top < 30) { seg.el.addClass('fc-short'); } ``` So basicly you can just edit the CSS style for `.fc-short`. ``` fc-time-grid-event.fc-short .fc-time span { display: none; ...
I agree that just modifing the style where you need it makes more sense but @Abdullah provided only half the solution. Don't forget to clear the trailing - in the :after section of .fc-time ``` .fc-time-grid-event.fc-short .fc-time:before { /* in short mode, only data-start and data-full are available */ conte...
26,348,955
I am using fullcalendar in the agendaWeek view. I noticed that events that are in a single slot, lets say 30 min, do not display the endtime. The endtime only apears on events that cover more than one slot. All the options that I've found did not add that to the event title. Is that possible and I just didn't see it?...
2014/10/13
[ "https://Stackoverflow.com/questions/26348955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3396334/" ]
I agree that just modifing the style where you need it makes more sense but @Abdullah provided only half the solution. Don't forget to clear the trailing - in the :after section of .fc-time ``` .fc-time-grid-event.fc-short .fc-time:before { /* in short mode, only data-start and data-full are available */ conte...
An easy and better solution that worked around was to simply add css. which will show [start time] - [end time] [title] ``` .fc-time-grid-event.fc-short .fc-time:before { content: attr(data-full); /* ...instead, display only the start time */ } ```
39,762,960
I don't know how to describe the goal I want to achieve with a good title. I have a list of objects where each have a boolean member. I want to filter this list to get at the end the first objects from the list which all have this boolean member set to true. This is how I would do it without streams, add every object ...
2016/09/29
[ "https://Stackoverflow.com/questions/39762960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5430811/" ]
Maybe something like this would work: ``` ArrayList<YourClass> newList = new ArrayList<>( list.stream() .filter(obj -> obj.isMemberTrue()) .collect(Collectors.toList()) ); ``` remember to import java.util.stream.Collectors if you want to return it as a list.
You can achieve the solution with streams. Just remember the predecessor in the list. ``` public class ListTest { @Test public void test() { List<Foo> list = new ArrayList<>(); list.add(new Foo(true)); list.add(new Foo(true)); list.add(new Foo(true)); list.add(new ...
39,762,960
I don't know how to describe the goal I want to achieve with a good title. I have a list of objects where each have a boolean member. I want to filter this list to get at the end the first objects from the list which all have this boolean member set to true. This is how I would do it without streams, add every object ...
2016/09/29
[ "https://Stackoverflow.com/questions/39762960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5430811/" ]
you can use this code to get list ``` list.subList(0,list.indexOf(list.stream() .filter(member->!member::isMemberTrue) .findFirst() .orElse(list.size())) ``` or you can use it as ``` int endIndex=list.indexOf(list.stream() .filter(membe...
You can achieve the solution with streams. Just remember the predecessor in the list. ``` public class ListTest { @Test public void test() { List<Foo> list = new ArrayList<>(); list.add(new Foo(true)); list.add(new Foo(true)); list.add(new Foo(true)); list.add(new ...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
Your resume is your sales brochure. While you shouldn't tell any untruths, there is no need for it to give every piece of information you have. If you don't think listing something you did would help you, then don't put it on. If that leaves a gap in your employment record, you are going to have to account for that at...
I think that you should have an "additional work experience" section in your CV, where you can list additional positions and smaller jobs that contributed to your professional development. Warehouses, fast foods, call center... everything will contribute to showing that you worked hard to get where you are and that mak...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
I think that you should have an "additional work experience" section in your CV, where you can list additional positions and smaller jobs that contributed to your professional development. Warehouses, fast foods, call center... everything will contribute to showing that you worked hard to get where you are and that mak...
Leave the graduation year off your CV. That will solve the problem of the possibility of HR extrapolating your age from your experience. Once you've done that, just put the relevant work experience in. That is, excise all the stuff you did that is in a different field Note that it is not "dishonest" to keep a CV shor...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
Your resume is your sales brochure. While you shouldn't tell any untruths, there is no need for it to give every piece of information you have. If you don't think listing something you did would help you, then don't put it on. If that leaves a gap in your employment record, you are going to have to account for that at...
If you have a degree, your status as a "high school dropout" is irrelevant, just as nobody begrudges the former CEO of Microsoft for being a university dropout. And many people start careers late because it is a second career, or that it took them a while to find the first career. And when I was a hiring manager for a ...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
You should be proud of these jobs. they represent an indicator that you are militant, combatant and defying all difficulties to reach your goal. you dont have to list these jobs in detail. just saying "Handicraft Job while studying" is a good point and indicator that you are self-motivated, hard-worker and eager to ...
I strongly recommend that your CV includes your complete work and educational history. The old stuff can be very short but it should be there. Otherwise it looks like you have something to hide. If I see any gap in a CV I always ask about it. "I took two years off trying to bike around the world" is a perfectly good ga...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
I think that you should have an "additional work experience" section in your CV, where you can list additional positions and smaller jobs that contributed to your professional development. Warehouses, fast foods, call center... everything will contribute to showing that you worked hard to get where you are and that mak...
I strongly recommend that your CV includes your complete work and educational history. The old stuff can be very short but it should be there. Otherwise it looks like you have something to hide. If I see any gap in a CV I always ask about it. "I took two years off trying to bike around the world" is a perfectly good ga...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
If you have a degree, your status as a "high school dropout" is irrelevant, just as nobody begrudges the former CEO of Microsoft for being a university dropout. And many people start careers late because it is a second career, or that it took them a while to find the first career. And when I was a hiring manager for a ...
Leave the graduation year off your CV. That will solve the problem of the possibility of HR extrapolating your age from your experience. Once you've done that, just put the relevant work experience in. That is, excise all the stuff you did that is in a different field Note that it is not "dishonest" to keep a CV shor...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
I think that you should have an "additional work experience" section in your CV, where you can list additional positions and smaller jobs that contributed to your professional development. Warehouses, fast foods, call center... everything will contribute to showing that you worked hard to get where you are and that mak...
You should be proud of these jobs. they represent an indicator that you are militant, combatant and defying all difficulties to reach your goal. you dont have to list these jobs in detail. just saying "Handicraft Job while studying" is a good point and indicator that you are self-motivated, hard-worker and eager to ...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
If you have a degree, your status as a "high school dropout" is irrelevant, just as nobody begrudges the former CEO of Microsoft for being a university dropout. And many people start careers late because it is a second career, or that it took them a while to find the first career. And when I was a hiring manager for a ...
I strongly recommend that your CV includes your complete work and educational history. The old stuff can be very short but it should be there. Otherwise it looks like you have something to hide. If I see any gap in a CV I always ask about it. "I took two years off trying to bike around the world" is a perfectly good ga...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
Your resume is your sales brochure. While you shouldn't tell any untruths, there is no need for it to give every piece of information you have. If you don't think listing something you did would help you, then don't put it on. If that leaves a gap in your employment record, you are going to have to account for that at...
Leave the graduation year off your CV. That will solve the problem of the possibility of HR extrapolating your age from your experience. Once you've done that, just put the relevant work experience in. That is, excise all the stuff you did that is in a different field Note that it is not "dishonest" to keep a CV shor...
41,784
A coworker and I started within a week of each other. We both interviewed for the same position and he is at a different level since he is a fresh graduate. We never had a good working chemistry and I did not report his faux pas to my manager in the past. Fortunately, we no longer work on the same projects. Recently,...
2015/02/22
[ "https://workplace.stackexchange.com/questions/41784", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/32804/" ]
Your resume is your sales brochure. While you shouldn't tell any untruths, there is no need for it to give every piece of information you have. If you don't think listing something you did would help you, then don't put it on. If that leaves a gap in your employment record, you are going to have to account for that at...
You should be proud of these jobs. they represent an indicator that you are militant, combatant and defying all difficulties to reach your goal. you dont have to list these jobs in detail. just saying "Handicraft Job while studying" is a good point and indicator that you are self-motivated, hard-worker and eager to ...
60,756,084
I need a timer that executes every minute but i have trouble getting the timer to run at all with code that i used before. so i guess i am doing sth fundamentally wrong that is not code related but even in a just newly created Console project in visual studio community 2017 it doesn't execute the `_timer_elapsed` metho...
2020/03/19
[ "https://Stackoverflow.com/questions/60756084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10955803/" ]
You need your program to stay alive, rather than return from `Main`. An quick and easy way to do this is to wait for some input at the end: ``` public static void Main(string[] args) { var timer = new Timer(60000); timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed); timer.Enabled = true; _timer =...
There is no such thing as a bad question. (Though some questions show more affinity with programming, and some show less.) If you look at your code, your main sets up a timer and then proceeds to terminate. So, of course your program exits immediately and the timer is never fired. In order to see your timer firing, y...
447,174
> > В картине «Боярыня Морозова» Суриков запечатлел трагический эпизод русской истории () и несокрушимой духовной силе национального характера он придал осязаемые черты. > > > Увидела данное предложение и не до конца поняла, почему запятая ставится, ведь есть общий второстепенный член.
2018/12/23
[ "https://rus.stackexchange.com/questions/447174", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/190235/" ]
*В картине « Боярыня Морозова» Суриков запечатлел трагический эпизод русской истории, и несокрушимой духовной силе национального характера он придал осязаемые черты.* Обстоятельство "в картине" **не является общим** для двух предложений, так как на картине можно что-то изобразить, а вторая часть сложного предложения ―...
Трудно говорить о корректности постановки запятой в некорректно составленном предложении. Во-первых, формально местоимение *он* замещает ближайшее к нему существительное *эпизод*, а должно бы относиться к Сурикову. Более того, оно тут лишнее, так как оба действия (запечатлел и придал) относятся к Сурикову. Во-вторых...
171,136
I have an Ubuntu 10.04.1 LTS linux server which is experiencing some weird issues... I just tried to download a 440 MB `tgz` archive over HTTP using wget, and when expanding it with `tar -xzf filename.tgz` I received: ``` gzip: stdin: invalid compressed data--crc error ``` Finding this odd I renamed the file `filena...
2010/08/02
[ "https://superuser.com/questions/171136", "https://superuser.com", "https://superuser.com/users/11945/" ]
Did the two files have the same size? If not, one of the files was probably truncated. If you used FTP to transfer files, some clients assume text files by default, and must be told to go into binary mode or they'll mangle `^M` and `^J`. This was once a major source of corrupted files, but is a rarity nowadays. TCP p...
If you are transferring using FTP use binary mode transfer. Otherwise, any line terminations in the file get mangled. Windows doesn't need to mangle line terminators in text mode.
171,136
I have an Ubuntu 10.04.1 LTS linux server which is experiencing some weird issues... I just tried to download a 440 MB `tgz` archive over HTTP using wget, and when expanding it with `tar -xzf filename.tgz` I received: ``` gzip: stdin: invalid compressed data--crc error ``` Finding this odd I renamed the file `filena...
2010/08/02
[ "https://superuser.com/questions/171136", "https://superuser.com", "https://superuser.com/users/11945/" ]
Did the two files have the same size? If not, one of the files was probably truncated. If you used FTP to transfer files, some clients assume text files by default, and must be told to go into binary mode or they'll mangle `^M` and `^J`. This was once a major source of corrupted files, but is a rarity nowadays. TCP p...
As a quick check, if you transfer the file using sneakernet (i.e., put it on a flash drive and walk it over), does it work fine?
27,094,571
I'm trying to create a portal/dashboard using jQuery & Bootstrap. I need the ability to display gadgets with fixed dimensions that can be displayed on the same page together. I am giving the user the ability to define a template for each page, which defines the dimensions of gadgets that can be displayed on the page an...
2014/11/23
[ "https://Stackoverflow.com/questions/27094571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360557/" ]
You can check out DefaultRetryPolicy class of Volley.
[As it says in one of the links you quoted](http://www.coderanch.com/t/490463/sockets/java/Timeout-retry-URLHTTPRequest), you need to set `sun.net.http.retryPost` to `false`. Or, don't use fixed-length or chunked transfer mode: see [this bug report](http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6672144).
27,094,571
I'm trying to create a portal/dashboard using jQuery & Bootstrap. I need the ability to display gadgets with fixed dimensions that can be displayed on the same page together. I am giving the user the ability to define a template for each page, which defines the dimensions of gadgets that can be displayed on the page an...
2014/11/23
[ "https://Stackoverflow.com/questions/27094571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360557/" ]
Well, lot of time passed so I figured I will answer with my current (not perfect) solution for other people to easily see it (also written inside the question). Just set the readTimeout to 0 (no timeout) or at least the connection timeout value. This will make sure connection timeout will be raised before the read tim...
You can check out DefaultRetryPolicy class of Volley.
27,094,571
I'm trying to create a portal/dashboard using jQuery & Bootstrap. I need the ability to display gadgets with fixed dimensions that can be displayed on the same page together. I am giving the user the ability to define a template for each page, which defines the dimensions of gadgets that can be displayed on the page an...
2014/11/23
[ "https://Stackoverflow.com/questions/27094571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360557/" ]
This bad decision was made by a developer in the year 2006. Here is a nice citation from someone that explains the whole situation from java perspective: > > "As you probably guessed by now it's a bug (<http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6382788>). Not the retry mechanism, of course, that's just crap...
You can check out DefaultRetryPolicy class of Volley.
27,094,571
I'm trying to create a portal/dashboard using jQuery & Bootstrap. I need the ability to display gadgets with fixed dimensions that can be displayed on the same page together. I am giving the user the ability to define a template for each page, which defines the dimensions of gadgets that can be displayed on the page an...
2014/11/23
[ "https://Stackoverflow.com/questions/27094571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360557/" ]
Well, lot of time passed so I figured I will answer with my current (not perfect) solution for other people to easily see it (also written inside the question). Just set the readTimeout to 0 (no timeout) or at least the connection timeout value. This will make sure connection timeout will be raised before the read tim...
[As it says in one of the links you quoted](http://www.coderanch.com/t/490463/sockets/java/Timeout-retry-URLHTTPRequest), you need to set `sun.net.http.retryPost` to `false`. Or, don't use fixed-length or chunked transfer mode: see [this bug report](http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6672144).
27,094,571
I'm trying to create a portal/dashboard using jQuery & Bootstrap. I need the ability to display gadgets with fixed dimensions that can be displayed on the same page together. I am giving the user the ability to define a template for each page, which defines the dimensions of gadgets that can be displayed on the page an...
2014/11/23
[ "https://Stackoverflow.com/questions/27094571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360557/" ]
This bad decision was made by a developer in the year 2006. Here is a nice citation from someone that explains the whole situation from java perspective: > > "As you probably guessed by now it's a bug (<http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6382788>). Not the retry mechanism, of course, that's just crap...
[As it says in one of the links you quoted](http://www.coderanch.com/t/490463/sockets/java/Timeout-retry-URLHTTPRequest), you need to set `sun.net.http.retryPost` to `false`. Or, don't use fixed-length or chunked transfer mode: see [this bug report](http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6672144).
27,094,571
I'm trying to create a portal/dashboard using jQuery & Bootstrap. I need the ability to display gadgets with fixed dimensions that can be displayed on the same page together. I am giving the user the ability to define a template for each page, which defines the dimensions of gadgets that can be displayed on the page an...
2014/11/23
[ "https://Stackoverflow.com/questions/27094571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360557/" ]
This bad decision was made by a developer in the year 2006. Here is a nice citation from someone that explains the whole situation from java perspective: > > "As you probably guessed by now it's a bug (<http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6382788>). Not the retry mechanism, of course, that's just crap...
Well, lot of time passed so I figured I will answer with my current (not perfect) solution for other people to easily see it (also written inside the question). Just set the readTimeout to 0 (no timeout) or at least the connection timeout value. This will make sure connection timeout will be raised before the read tim...
143,713
I'm trying to learn how to make select queries with Drupal, so I made a form, and when I submit the form I try to query the database and get some results, but instead I'm redirected to an error page, here's how I select nodes from DB : ``` function my_module_form_submit($form, &$form_state) { $query = db_select('n...
2015/01/09
[ "https://drupal.stackexchange.com/questions/143713", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/41844/" ]
You have missed fields() & fetch type -- fetchAll(). Below is the working example. You can find more details here [(db\_select API)](https://api.drupal.org/api/drupal/includes!database!database.inc/function/db_select/7) ``` $query = db_select('node', 'n')->extend('PagerDefault'); $query->fields('n'); // This is like...
I don't know exactly what was the issue with the code I used before, but using a more advanced query resolved the problem ( being redirected to an error page ) : ``` $query = db_select("node", "n"); $query->fields("n", array("nid")); $query->fields("n", array("created")); $query->fields("n", array("type")); $query->f...
159,240
I have just aquired a new hat as a part of the [Winter Bash](http://winterba.sh/) celebrations. I was wondering, what can be done with my hat? I have worked out I can wear it, take it off, admire it in my collection of hats, and feel smug about having a hat. * Are there any other things that this hat can be used fo...
2012/12/19
[ "https://meta.stackexchange.com/questions/159240", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/201437/" ]
What about: * Bragging about it * Complimenting other users for their hats * Try to collect them all * Find a suitable gravatar to fit with the hat * Thank the developers for including a piece of joy into our life Remember, the christmas thought, it is not about the food and the presents, it is about caring for each ...
No, it's just a decoration to your gravatar. Nothing more, nothing less. Other users might admire you for having a nice or secret hat. You might attract more women this way if you choose the proper hat. :-)
159,240
I have just aquired a new hat as a part of the [Winter Bash](http://winterba.sh/) celebrations. I was wondering, what can be done with my hat? I have worked out I can wear it, take it off, admire it in my collection of hats, and feel smug about having a hat. * Are there any other things that this hat can be used fo...
2012/12/19
[ "https://meta.stackexchange.com/questions/159240", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/201437/" ]
What about: * Bragging about it * Complimenting other users for their hats * Try to collect them all * Find a suitable gravatar to fit with the hat * Thank the developers for including a piece of joy into our life Remember, the christmas thought, it is not about the food and the presents, it is about caring for each ...
Read [Winter Bash FAQ](http://winterba.sh/faq) and you will know what you can do.
42,677
How can I take a screenshot in X.org? I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.
2012/06/16
[ "https://unix.stackexchange.com/questions/42677", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20861/" ]
The most commonly used Linux application for taking screen-shots is called `scrot` You can install it with for Debian: `sudo apt-get install scrot` Or for Arch: `sudo pacman -S scrot` A screenshot is taken by typing: `scrot output-file.png` If you want to bind `scrot` to the `print screen` key then that will nee...
I found a great answer to this question [here](https://stackoverflow.com/a/10609516/252223), it is worth repeating. > > This can be achieved with ImageMagick. Install by running the command > > > > ``` > sudo apt-get install imagemagick > > ``` > > To grab all desktop just type > > > > ``` > import -window r...
42,677
How can I take a screenshot in X.org? I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.
2012/06/16
[ "https://unix.stackexchange.com/questions/42677", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20861/" ]
I found a great answer to this question [here](https://stackoverflow.com/a/10609516/252223), it is worth repeating. > > This can be achieved with ImageMagick. Install by running the command > > > > ``` > sudo apt-get install imagemagick > > ``` > > To grab all desktop just type > > > > ``` > import -window r...
I use 'xwd'. For example, one I just did: `xwd | xwdtopnm > dw.ppm` The only downside I know of with xwd is that you need some other utility to convert its output to something understood by anything other than 'xwud'.
42,677
How can I take a screenshot in X.org? I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.
2012/06/16
[ "https://unix.stackexchange.com/questions/42677", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20861/" ]
I found a great answer to this question [here](https://stackoverflow.com/a/10609516/252223), it is worth repeating. > > This can be achieved with ImageMagick. Install by running the command > > > > ``` > sudo apt-get install imagemagick > > ``` > > To grab all desktop just type > > > > ``` > import -window r...
This is the perl6 script I use to take ***root area window*** or ***delay*** ScreenShots using import: ``` #!/usr/bin/env perl6 use v6; sub message(Str $file) { run <xmessage -nearmouse -timeout 3>, "Screenshot saved in $file"; } sub print_window(Str $file) { qx{xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"} ...
42,677
How can I take a screenshot in X.org? I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.
2012/06/16
[ "https://unix.stackexchange.com/questions/42677", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20861/" ]
The most commonly used Linux application for taking screen-shots is called `scrot` You can install it with for Debian: `sudo apt-get install scrot` Or for Arch: `sudo pacman -S scrot` A screenshot is taken by typing: `scrot output-file.png` If you want to bind `scrot` to the `print screen` key then that will nee...
I use 'xwd'. For example, one I just did: `xwd | xwdtopnm > dw.ppm` The only downside I know of with xwd is that you need some other utility to convert its output to something understood by anything other than 'xwud'.
42,677
How can I take a screenshot in X.org? I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.
2012/06/16
[ "https://unix.stackexchange.com/questions/42677", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20861/" ]
The most commonly used Linux application for taking screen-shots is called `scrot` You can install it with for Debian: `sudo apt-get install scrot` Or for Arch: `sudo pacman -S scrot` A screenshot is taken by typing: `scrot output-file.png` If you want to bind `scrot` to the `print screen` key then that will nee...
This is the perl6 script I use to take ***root area window*** or ***delay*** ScreenShots using import: ``` #!/usr/bin/env perl6 use v6; sub message(Str $file) { run <xmessage -nearmouse -timeout 3>, "Screenshot saved in $file"; } sub print_window(Str $file) { qx{xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"} ...
4,254,258
MYSQL and apache server are already installed on my server. But still I encountered these problem. I dont understand the terms to compile php with --with-mysql Where should i compile? i am using window server. or how to install the mysql.so module?? > > Checking environment... > > > Please include all of the lines ...
2010/11/23
[ "https://Stackoverflow.com/questions/4254258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510555/" ]
Look in /php\_install\_dir/extensions. There should be a file named "php\_mysql.dll". If so, enable it in php.ini. If not, download the dll, copy it to the extension dir and enable in php.ini. Remember to restart Apache. See [this page](http://php.net/manual/en/install.windows.extensions.php) for more info (make sure ...
Changed this in php.ini. Shouldn't the installer have done this for a Windows installation? ``` ; enable_dl = Off ; CHANGED - This is necessary to enable dynamic loading of Windows .dll modules ; The immediate problem was that PHP could not find a database driver for MySQL enable_dl = On ```
4,254,258
MYSQL and apache server are already installed on my server. But still I encountered these problem. I dont understand the terms to compile php with --with-mysql Where should i compile? i am using window server. or how to install the mysql.so module?? > > Checking environment... > > > Please include all of the lines ...
2010/11/23
[ "https://Stackoverflow.com/questions/4254258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510555/" ]
Look in /php\_install\_dir/extensions. There should be a file named "php\_mysql.dll". If so, enable it in php.ini. If not, download the dll, copy it to the extension dir and enable in php.ini. Remember to restart Apache. See [this page](http://php.net/manual/en/install.windows.extensions.php) for more info (make sure ...
For PHP: 5.6.10 and MySQL: 5.0.24a 1. Go to the root folder of PHP installation 2. Find a file called php.ini-production 3. Save the file as php.ini 4. Edit the file and uncomment the following contents ;extension=php\_mysqli.dll ;extension\_dir = "ext" and replace it with, extension= php\_mysqli.dll extens...
10,740,704
If I add a table like this in MySQL: ``` CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` float NOT NULL, PRIMARY KEY (`id`) ); ``` and add an entry: ``` INSERT INTO `test` (`value`) VALUES ('123.45'); ``` and do a SUM on it like this: ``` SELECT SUM( value ) FROM `test` ``` why does ...
2012/05/24
[ "https://Stackoverflow.com/questions/10740704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1126207/" ]
This is because of floating point inaccuracy. Use [DECIMAL](http://dev.mysql.com/doc/refman/5.5/en/fixed-point-types.html) data type instead. ``` CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` decimal(8,2) NOT NULL, PRIMARY KEY (`id`) ); ``` See this example: [SQLFiddle](http://sqlfiddle.c...
Because a floating point number has some precision "problems" about: 1. precision of your machine (limited number of digit that you can store) 2. representation error 3. so on...
10,740,704
If I add a table like this in MySQL: ``` CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` float NOT NULL, PRIMARY KEY (`id`) ); ``` and add an entry: ``` INSERT INTO `test` (`value`) VALUES ('123.45'); ``` and do a SUM on it like this: ``` SELECT SUM( value ) FROM `test` ``` why does ...
2012/05/24
[ "https://Stackoverflow.com/questions/10740704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1126207/" ]
This is because of floating point inaccuracy. Use [DECIMAL](http://dev.mysql.com/doc/refman/5.5/en/fixed-point-types.html) data type instead. ``` CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` decimal(8,2) NOT NULL, PRIMARY KEY (`id`) ); ``` See this example: [SQLFiddle](http://sqlfiddle.c...
Have you tried ``` SELECT ROUND( SUM(value), 2) FROM `test` ```
58,489
I have a `view` which takes a `DataPresenterStrategy` instance to retrieve the proper text out of some data: ``` public interface DataPresenterStrategy { String getDisplayString(Data data); String getUnit(); } public class DistanceStrategy implements DataPresenterStrategy { @Override public String ...
2014/07/30
[ "https://codereview.stackexchange.com/questions/58489", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28389/" ]
``` enum DataPresenterStrategyType { DISTANCE, POWER } DataPresenterStrategy toStrategy(StrategyType type) { switch(type) { case DISTANCE: return new DistanceStrategy(); case POWER: return new PowerStrategy(); } } ``` What I think you are looking for here is an [EnumMa...
Another way to do the instance creation would be to give each type a constructor reference for the strategy it corresponds to. ``` enum DataPresenterStrategyType { DISTANCE(DistanceStrategy::new), POWER(PowerStrategy::new); private final Supplier<DataPresenterStrategy> constructor; DataPresenterStrategyT...
3,267,899
i have drawn two semitransparent circles which intersect each other. I have found that the intersection region is deeper in color than other regions. is there any way to make the whole shape as one semitransparent color (color shouldn't be deeper in one area than others)? is it possible to send me any sample code to s...
2010/07/16
[ "https://Stackoverflow.com/questions/3267899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394215/" ]
Try this. It should find the "MarkerA" (etc.) portion of the url of the background-image and if it finds it, add the class using the character code of the capital letter to calculate your 1, 2, 3, etc. on your "marker" class (I have not tested it): ``` $('.markersHolder > div').each(function(){ var mark = $(this)....
I would have the browser `alert()` the `$(this).css('background-image')` - my bet is different browsers return this in different ways, e.g. quoted: ``` 'url("http://www.axtsweapons.com/gmarkers/red_MarkerJ.png")' ``` it could be that you'll have to *search* for the image name in the URL string rather than making an...
3,267,899
i have drawn two semitransparent circles which intersect each other. I have found that the intersection region is deeper in color than other regions. is there any way to make the whole shape as one semitransparent color (color shouldn't be deeper in one area than others)? is it possible to send me any sample code to s...
2010/07/16
[ "https://Stackoverflow.com/questions/3267899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394215/" ]
I would have the browser `alert()` the `$(this).css('background-image')` - my bet is different browsers return this in different ways, e.g. quoted: ``` 'url("http://www.axtsweapons.com/gmarkers/red_MarkerJ.png")' ``` it could be that you'll have to *search* for the image name in the URL string rather than making an...
If it's just this repetitive code, you should be able to use a regex ``` $(".markersHolder > div").each( function() { var r = new RegExp("^url\\(.{0,1}http://www.axtsweapons.com/gmarkers/red_Marker([A-Z]).png.{0,1}\\)"); var s = $(this).css('background-image'); var x = s.match(r); if (x...
3,267,899
i have drawn two semitransparent circles which intersect each other. I have found that the intersection region is deeper in color than other regions. is there any way to make the whole shape as one semitransparent color (color shouldn't be deeper in one area than others)? is it possible to send me any sample code to s...
2010/07/16
[ "https://Stackoverflow.com/questions/3267899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394215/" ]
Try this. It should find the "MarkerA" (etc.) portion of the url of the background-image and if it finds it, add the class using the character code of the capital letter to calculate your 1, 2, 3, etc. on your "marker" class (I have not tested it): ``` $('.markersHolder > div').each(function(){ var mark = $(this)....
If it's just this repetitive code, you should be able to use a regex ``` $(".markersHolder > div").each( function() { var r = new RegExp("^url\\(.{0,1}http://www.axtsweapons.com/gmarkers/red_Marker([A-Z]).png.{0,1}\\)"); var s = $(this).css('background-image'); var x = s.match(r); if (x...
43,638
Is there a way to set up my android device so that when the lock screen unlocked, the phone app always is open by default? In other words: I swipe to unlock the screen and I always automatically see the phone keypad first and the device is ready to make a call. I am trying to set up a new Samsung Galaxy Note for my gr...
2013/04/13
[ "https://android.stackexchange.com/questions/43638", "https://android.stackexchange.com", "https://android.stackexchange.com/users/32170/" ]
> > Install this [***Easy Phone App***](https://play.google.com/store/apps/details?id=com.orange.labs.easyphone&feature=also_installed#?t=W251bGwsMSwyLDEwNCwiY29tLm9yYW5nZS5sYWJzLmVhc3lwaG9uZSJd) into your grandmother's cell and place its shortcut on the screen or the desktop of that android device. > > > And tell h...
To do exactly what you want, you can install [Tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=en). You can try tasker from its [website](http://tasker.dinglisch.net/download.html) rather than from Google Play store and this allows you to test it for free for 7 days in a device. W...
56,420,825
I want to design a widget of shape of a chat bubble where one corner is pinned and its height should adjust to the lines of the text? For now I'm using ClipRRect widget with some borderRadius. But I want one corner pinned. Any suggestions ? [![Chat bubble shape](https://i.stack.imgur.com/sfSuW.png)](https://i.stack.im...
2019/06/03
[ "https://Stackoverflow.com/questions/56420825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7865296/" ]
For someone who want this get done with library. You can add `bubble: ^1.1.9+1` (Take latest) package from pub.dev and wrap your message with Bubble. ``` Bubble( style: right ? styleMe : styleSomebody, //Your message content child here... ) ``` Here `right` is boolean which tells the bubble is at right or left, Writ...
Sorry I am not able to show you the code for it but I can present an idea that might work if you implement it correctly. Suppose the Widget you made with `ClipRect` is called `MyChatBubbleRect`. Now, make another widget that draws a triangle using [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-...
56,420,825
I want to design a widget of shape of a chat bubble where one corner is pinned and its height should adjust to the lines of the text? For now I'm using ClipRRect widget with some borderRadius. But I want one corner pinned. Any suggestions ? [![Chat bubble shape](https://i.stack.imgur.com/sfSuW.png)](https://i.stack.im...
2019/06/03
[ "https://Stackoverflow.com/questions/56420825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7865296/" ]
For someone who want this get done with library. You can add `bubble: ^1.1.9+1` (Take latest) package from pub.dev and wrap your message with Bubble. ``` Bubble( style: right ? styleMe : styleSomebody, //Your message content child here... ) ``` Here `right` is boolean which tells the bubble is at right or left, Writ...
Chat Body ``` DecoratedBox( decoration: BoxDecoration( color: Colors.blue, borderRadius: BorderRadius.circular(8.0), ), child: Text("your message goes here"), ); ``` Make a custom Triangle ``` class ChatBubbleTriangle extends CustomPainter { @override void paint(Canvas canvas, Size size) { ...
56,420,825
I want to design a widget of shape of a chat bubble where one corner is pinned and its height should adjust to the lines of the text? For now I'm using ClipRRect widget with some borderRadius. But I want one corner pinned. Any suggestions ? [![Chat bubble shape](https://i.stack.imgur.com/sfSuW.png)](https://i.stack.im...
2019/06/03
[ "https://Stackoverflow.com/questions/56420825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7865296/" ]
For someone who want this get done with library. You can add `bubble: ^1.1.9+1` (Take latest) package from pub.dev and wrap your message with Bubble. ``` Bubble( style: right ? styleMe : styleSomebody, //Your message content child here... ) ``` Here `right` is boolean which tells the bubble is at right or left, Writ...
Hi im also searching for a chat bubble shaped widget finally i made one. I have made this in custom Painter and i'm not good at it. [![enter image description here](https://i.stack.imgur.com/cRGEH.jpg)](https://i.stack.imgur.com/cRGEH.jpg) ``` import 'package:flutter/material.dart'; class ChatBubble extends CustomPai...
699,113
In Excel it is possible to write a function looking like that: ``` =SUM(A1:INDEX(...)) ``` Where the end of the range of the data to sum is dynamically defined by the result of the `INDEX` function. The same function in Numbers gives an invalid reference error (the `INDEX` function is working well by itself). Is t...
2014/01/09
[ "https://superuser.com/questions/699113", "https://superuser.com", "https://superuser.com/users/28320/" ]
No, because `index` doesn't return a **cell address**. You'll need to use a modifier to return the address of your selection. Try using a `match` nested in an `=address` rather than an index. I can't provide an answer with an example because you haven't described your data set.
You could also use something like ``` =SUM(OFFSET(A1,0,0,n)) ``` Where *n* is the height of the columnar range to sum starting at `A1`. `OFFSET` is a volatile function, so avoid if that bothers you.
36,630,059
Is there no easy way to change my deployment target when instant run is enabled? For example, I have two emulators running at the same time on my mac, one is genymotion API 22 and one which is genymotion API 16. I have already unchecked this box as I would like to deploy my build to my api 16 emulator: [![enter image...
2016/04/14
[ "https://Stackoverflow.com/questions/36630059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3178944/" ]
Clicking on `stop "app"` button works for me - you get to choose a different target device, but at the cost of application being killed on the current device. The button looks like this: [![stop app button](https://i.stack.imgur.com/LNunU.png)](https://i.stack.imgur.com/LNunU.png) Another option is to switch to `debu...
Vasily's answer didn't work for me. What I found is disconnecting the device your working with. When it's a real mobile device disconnect the usb cable, when working with the emulator quit the emulator.
55,478,454
I'm trying to create a form that dynamically maps fields based on a JSON response. I currently have a dummy object that I'm setting in state, but the final stage will receive the data from an external API call. The dataset may change over time with key/values being added or deleted based on business needs. In lieu of ...
2019/04/02
[ "https://Stackoverflow.com/questions/55478454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5257353/" ]
Take Amir's comment seriously. And once you do, you'd probably restructure your data so it would be more handy (and readable): *I don't know why `opportunityDetails` has to be an array, I adjusted to that anyway. Though it will add complexity as you would see* 1.) This is how you want your data to look like (you will...
``` <Row type="flex" justify="space-around"> <Col span={10}> {opportunityDetails.map(detail=>{ return detail.forEach(([key,value])=>( <Form.Item label={key}> <Input placeholder={value} /> </Form.Item> ) ) })} </Col> </Row> ...
38,664,743
I have two classes, A and B. ClassA calls a method in classB which iterates through a large loop. ClassA also prints to a Qt message box. What I would like is to be able to print the % complete to the message box from classA. Is there any way to do that in C++? ``` ClassA calls ClassB.method(); ClassA <-- 10% -- Clas...
2016/07/29
[ "https://Stackoverflow.com/questions/38664743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4035677/" ]
Since you are using Qt, emit a signal in `B` when progress changes. Connect that signal to a slot in `A` that updates the progress display. That's all you need.
//Above your loop int IterationsToDo = #; int IterationsDone = 0; double Progress = 0; //At the end of your loop { ``` //Loop logic here IterationsDone++; Progress = IterationsDone / IterationsToDo; MessageFunctionHere(std::to_string(Progress)); ``` }
29,424,095
I have a function that takes optional arguments in pairs: firstRange\_1, secondRange\_2; firstRange\_2, secondRange\_2; etc. For each optional argument I need to execute a series of statements if the argument is passed to the function. For example ``` dim firstRange_1 as range dim secondRange_1 as range dim firstRan...
2015/04/02
[ "https://Stackoverflow.com/questions/29424095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4744475/" ]
Bouncy Castle doesn't support XML formats at all. Unless your use-case strictly requires it, you'll find it much easier going just to use Base64 encodings, with certificates (X.509) and private keys (PKCS#8) stored in PEM format. These are all string formats, so should be usable with JSON directly. There are other pro...
Thanks to Petters answer I wanted to add code to verify the signature with RSA algorithm. ``` public bool VerifySignature(AsymmetricKeyParameter pubKey, string signature, string msg) { try { byte[] msgBytes = Encoding.UTF8.GetBytes(msg); byte[] sigBytes = Convert.FromBase64String(signature); ...
21,137,883
I am working on an asp.net MVC-5 web project where i have to send daily email to all users. And i know there are 2 ways to achieve this: 1. Windows service 2. Sql server agent job. I have decided to use *Windows service*. I am working on Express Version of Visual Studio 2013 for Web, so Windows service template is no...
2014/01/15
[ "https://Stackoverflow.com/questions/21137883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1740381/" ]
Let me suggest two more options: 1. Create a console application and use Task Scheduler to invoke it at a given time. This option is really simple. 2. Use [Quartz.net](http://www.quartz-scheduler.net/). This option may be valid in case you are using a shared host environment. I don´t understand what you mean by integ...
1. You can invoke a controller action using HTTPWebRequest / WebClient class, the controller action will send the mails to users. 2 & 3 : You need to follow the same steps as you did in the local development system. Hope it helps
1,018
In connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Due to the submission count, we have selected all provided questions as...
2014/04/28
[ "https://graphicdesign.meta.stackexchange.com/questions/1018", "https://graphicdesign.meta.stackexchange.com", "https://graphicdesign.meta.stackexchange.com/users/2117/" ]
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > Our unique positi...
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > I see us as havin...
1,018
In connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Due to the submission count, we have selected all provided questions as...
2014/04/28
[ "https://graphicdesign.meta.stackexchange.com/questions/1018", "https://graphicdesign.meta.stackexchange.com", "https://graphicdesign.meta.stackexchange.com/users/2117/" ]
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > Our unique positi...
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > A professional si...
1,018
In connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Due to the submission count, we have selected all provided questions as...
2014/04/28
[ "https://graphicdesign.meta.stackexchange.com/questions/1018", "https://graphicdesign.meta.stackexchange.com", "https://graphicdesign.meta.stackexchange.com/users/2117/" ]
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > I think what diff...
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > I see us as havin...
1,018
In connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Due to the submission count, we have selected all provided questions as...
2014/04/28
[ "https://graphicdesign.meta.stackexchange.com/questions/1018", "https://graphicdesign.meta.stackexchange.com", "https://graphicdesign.meta.stackexchange.com/users/2117/" ]
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > **Expertise**: Be...
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > I see us as havin...
1,018
In connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Due to the submission count, we have selected all provided questions as...
2014/04/28
[ "https://graphicdesign.meta.stackexchange.com/questions/1018", "https://graphicdesign.meta.stackexchange.com", "https://graphicdesign.meta.stackexchange.com/users/2117/" ]
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > I think what diff...
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > A professional si...
1,018
In connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Due to the submission count, we have selected all provided questions as...
2014/04/28
[ "https://graphicdesign.meta.stackexchange.com/questions/1018", "https://graphicdesign.meta.stackexchange.com", "https://graphicdesign.meta.stackexchange.com/users/2117/" ]
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > **Expertise**: Be...
> > What do you see as being GD.SE's unique position or role in the design world? How do you intend to strengthen that? Or to put it another way, how would/do you 'sell' this site to designers who've never heard of it? What do you see as our USP (Unique Selling Proposition) or key strength? > > > A professional si...
44,102,645
I have been trying this for hours(I am new to web development). I need to access a table which contains many columns one of which contains rows of people's names, and put them in a data structure. In each row the id for the text which holds the person's name is setup like this: ``` <span class="myClass" id = "first"> ...
2017/05/21
[ "https://Stackoverflow.com/questions/44102645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7842200/" ]
This ``` n = $(".PSLONGEDITBOX"); ``` should work. but it won't return the text, it returns the SPAN element as an object. to get the text you need ``` n = $(".PSLONGEDITBOX").text(); ```
I don't think it depends on the structure of your HTML. Do you use $(document).ready? Or maybe you should include your js file near closing body on your page.
44,102,645
I have been trying this for hours(I am new to web development). I need to access a table which contains many columns one of which contains rows of people's names, and put them in a data structure. In each row the id for the text which holds the person's name is setup like this: ``` <span class="myClass" id = "first"> ...
2017/05/21
[ "https://Stackoverflow.com/questions/44102645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7842200/" ]
Update ====== There's a possibility that `.PSLONGEDITBOX` is created dynamically and that it doesn't exist in the DOM when script is invoked. The updated demo will invoke the script `onDOMReady` and then a second time at `onload` which is the latest load event possible. **Details are commented in demo** --- Demo --...
This ``` n = $(".PSLONGEDITBOX"); ``` should work. but it won't return the text, it returns the SPAN element as an object. to get the text you need ``` n = $(".PSLONGEDITBOX").text(); ```
44,102,645
I have been trying this for hours(I am new to web development). I need to access a table which contains many columns one of which contains rows of people's names, and put them in a data structure. In each row the id for the text which holds the person's name is setup like this: ``` <span class="myClass" id = "first"> ...
2017/05/21
[ "https://Stackoverflow.com/questions/44102645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7842200/" ]
Update ====== There's a possibility that `.PSLONGEDITBOX` is created dynamically and that it doesn't exist in the DOM when script is invoked. The updated demo will invoke the script `onDOMReady` and then a second time at `onload` which is the latest load event possible. **Details are commented in demo** --- Demo --...
I don't think it depends on the structure of your HTML. Do you use $(document).ready? Or maybe you should include your js file near closing body on your page.
13,315,958
I really hate using if's inside my app and I thought this is a pretty straightforward pattern so is there any way to turn the below code into a 1 line formula just for better readability inside my app? This is the code: ``` int duration = 0; if (score < 100) { duration = 2; } else if (score >= 100 && ...
2012/11/09
[ "https://Stackoverflow.com/questions/13315958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394736/" ]
Looks like we can rewrite this as follows: ``` int duration = MIN(2 + (score / 100), 7); ``` Am I missing anything? :-/ **EDIT** if score might be negative, we have to add one more cap: ``` int duration = MAX(MIN(2 + (score / 100), 7), 2); ``` **EDIT 2** to symmetrically handle negatives, you can use the followi...
It's something close to (aka this is untested): ``` -(int) duration:(int) score { score = (score > 500) ? 500 : score; // over 600 == 600 return (score+100)/100 + 1 } ```
13,315,958
I really hate using if's inside my app and I thought this is a pretty straightforward pattern so is there any way to turn the below code into a 1 line formula just for better readability inside my app? This is the code: ``` int duration = 0; if (score < 100) { duration = 2; } else if (score >= 100 && ...
2012/11/09
[ "https://Stackoverflow.com/questions/13315958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394736/" ]
Looks like we can rewrite this as follows: ``` int duration = MIN(2 + (score / 100), 7); ``` Am I missing anything? :-/ **EDIT** if score might be negative, we have to add one more cap: ``` int duration = MAX(MIN(2 + (score / 100), 7), 2); ``` **EDIT 2** to symmetrically handle negatives, you can use the followi...
``` duration= 2+ (int)(score-100)/100 + score<100? 1:0 ; ```
423,247
I would like to be able to do somthing like the following: ``` //non-generic var MyTable = new Table(); string name = MyTable.Name; IEnumerable<String> rows = MyTable.Rows; //generic var MyTableGeneric = new Table<MyType>(); string name = MyTableGeneric.Name; IEnumerable<MyType> rows = MyTableGeneric .Rows; ``` Wou...
2009/01/08
[ "https://Stackoverflow.com/questions/423247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6335/" ]
I'd say the second design is better. Less items and easier inheritance path. The first design has unnecessary interfaces, which you don't really need unless you're implementing something else which implements the interface, but doesn't inherit from the base class.
What's the difference betweeen a `Table` and a `Table<string>`? In other words, can you not just use `Table<string>` as your nongeneric form? If you *do* go for the second option, I'd suggest renaming one of your `Rows` properties - you may be able to get away with having two properties of different types through hidi...
423,247
I would like to be able to do somthing like the following: ``` //non-generic var MyTable = new Table(); string name = MyTable.Name; IEnumerable<String> rows = MyTable.Rows; //generic var MyTableGeneric = new Table<MyType>(); string name = MyTableGeneric.Name; IEnumerable<MyType> rows = MyTableGeneric .Rows; ``` Wou...
2009/01/08
[ "https://Stackoverflow.com/questions/423247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6335/" ]
I'd say the second design is better. Less items and easier inheritance path. The first design has unnecessary interfaces, which you don't really need unless you're implementing something else which implements the interface, but doesn't inherit from the base class.
I would use generics in the rows, without involving string in the base class, and have the non generic inherit the Table class. Consider not using the abstract class. ``` Table<T> -> Table:Table<string> ```
423,247
I would like to be able to do somthing like the following: ``` //non-generic var MyTable = new Table(); string name = MyTable.Name; IEnumerable<String> rows = MyTable.Rows; //generic var MyTableGeneric = new Table<MyType>(); string name = MyTableGeneric.Name; IEnumerable<MyType> rows = MyTableGeneric .Rows; ``` Wou...
2009/01/08
[ "https://Stackoverflow.com/questions/423247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6335/" ]
What's the difference betweeen a `Table` and a `Table<string>`? In other words, can you not just use `Table<string>` as your nongeneric form? If you *do* go for the second option, I'd suggest renaming one of your `Rows` properties - you may be able to get away with having two properties of different types through hidi...
I would use generics in the rows, without involving string in the base class, and have the non generic inherit the Table class. Consider not using the abstract class. ``` Table<T> -> Table:Table<string> ```
17,049,345
Guys i'm using select where query using vb access code, i have no problem with checking if records match, i'm having problems with if sTextbox does not match the value in the data base... it should print "No Record Match" only once, but in this statement it prints out MsgBox("No Record Match") the numerous times until ...
2013/06/11
[ "https://Stackoverflow.com/questions/17049345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2474851/" ]
The expression `(=1)?` *will* give precedence to one occurrence over zero, but the regular expression engine will always attempt to match as early in the string as possible. So starting at the first character in the string, first it will try to match `=1` and fail, and then because of the `?` it will match the empty st...
`(=1)*` will match `=1=1=1=1=1=1=1=1` If you're looking to match all digits after the `=` then use `abcde=(\d+)` This will place all the digits into capture group 1.
17,049,345
Guys i'm using select where query using vb access code, i have no problem with checking if records match, i'm having problems with if sTextbox does not match the value in the data base... it should print "No Record Match" only once, but in this statement it prints out MsgBox("No Record Match") the numerous times until ...
2013/06/11
[ "https://Stackoverflow.com/questions/17049345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2474851/" ]
By defaut `?` is greedy in javascript. Your problem is somewhere else. aside note: to have `?` lazy you must write `??` (like other quantifiers)
`(=1)*` will match `=1=1=1=1=1=1=1=1` If you're looking to match all digits after the `=` then use `abcde=(\d+)` This will place all the digits into capture group 1.
17,049,345
Guys i'm using select where query using vb access code, i have no problem with checking if records match, i'm having problems with if sTextbox does not match the value in the data base... it should print "No Record Match" only once, but in this statement it prints out MsgBox("No Record Match") the numerous times until ...
2013/06/11
[ "https://Stackoverflow.com/questions/17049345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2474851/" ]
The expression `(=1)?` *will* give precedence to one occurrence over zero, but the regular expression engine will always attempt to match as early in the string as possible. So starting at the first character in the string, first it will try to match `=1` and fail, and then because of the `?` it will match the empty st...
By defaut `?` is greedy in javascript. Your problem is somewhere else. aside note: to have `?` lazy you must write `??` (like other quantifiers)
63,749,795
My onActivityResult code ``` @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == GalleryPick && resultCode == RESULT_OK && data!= null) { Uri imageUri = data.getData(); Cr...
2020/09/05
[ "https://Stackoverflow.com/questions/63749795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13082231/" ]
Check for permission, I had this type of issue once, For API > 29 we need this code below in the in the manifest file. ``` android: requestLegacyExternalStorage = true ``` This code is necessary for getting storage permission. Also, go to permission manager in setting in your phone and check the toggle button there.
The error tells you why it's happening `have you declared this activity in your AndroidManifest.xml?` Have you?
41,089,891
I am new to Angular and I am going through this [tutorial](http://www.tutorials.kode-blog.com/angularjs-debug "tutorial") and I have problem with parsing the given json which looks like this: ``` { "records": [ { "Name" : "Alfreds Futterkiste", "City" : "Berlin", "Country" : "Germany" ...
2016/12/11
[ "https://Stackoverflow.com/questions/41089891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6866110/" ]
Angular's `$http` object returns a promise which supports the standard `.then()` function, and a **deprecated** `.success()` function. The `.then()` returns a standard `response` object; the deprecated `.success()` function returns a `data` object. You (correctly) changed your code to the updated `.then()` function, r...
**Some of the code changes you have to made in your code :** * Why use **`ng-controller="HelloController"`** multiple times for the same view ? `-->` You have to initialize one controller only once when working on the same view.So, put the **`ng-controller="HelloController"`** in the root element of the view and re...
8,531,032
I have faced OutOfMemory error in my application. But the thing is my application keeps on running though it has thrown OutOfMemeory. After some two minutes later, JVM has quit and pid file got genearted throwing ``` java.lang.OutOfMemoryError: requested 746 bytes for jbyte in /BUILD_AREA/jdk6_21/hotspot/src/sha...
2011/12/16
[ "https://Stackoverflow.com/questions/8531032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101440/" ]
> > Is it possible for JVM to continue running even after throwing OutOfMemory error ? > > > Sure. The OutOfMemory error can be caught, and even if not, it just kills the current thread. Any other threads can continue to run. > > Also can you give me some direction to investigate on this further? > > > Accor...
As others said [OutOfMemoryError](http://docs.oracle.com/javase/6/docs/api/java/lang/OutOfMemoryError.html) is an Error that can be caught and handled. To investigate the error further you will need to use [VisualVM](http://visualvm.java.net/index.html) either to * look at memory consumption on a live application * ...
8,531,032
I have faced OutOfMemory error in my application. But the thing is my application keeps on running though it has thrown OutOfMemeory. After some two minutes later, JVM has quit and pid file got genearted throwing ``` java.lang.OutOfMemoryError: requested 746 bytes for jbyte in /BUILD_AREA/jdk6_21/hotspot/src/sha...
2011/12/16
[ "https://Stackoverflow.com/questions/8531032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101440/" ]
> > 1) Is it possible for JVM to continue running even after throwing OutOfMemory error ? > > > Yes, after a fashion, depending on what the application is and what it is doing. The lifecycle of an OOME is a follows: * The application attempts to allocate some memory (a new object or array, a new thread stack, a...
As others said [OutOfMemoryError](http://docs.oracle.com/javase/6/docs/api/java/lang/OutOfMemoryError.html) is an Error that can be caught and handled. To investigate the error further you will need to use [VisualVM](http://visualvm.java.net/index.html) either to * look at memory consumption on a live application * ...
38,989,663
I have created drawer with navigation view. I have Navigation item's on which I am calling other activities. The issue is when I click on navigation item, the other activity launches,and if I come back to main activity and open a drawer the clicked navigation item's title is disappeared only I can see the icon of the ...
2016/08/17
[ "https://Stackoverflow.com/questions/38989663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Got the solution.. Just tried to change the color of navigation item's text and it worked. Don't know why and how.. navigationView.setItemTextColor(ColorStateList.valueOf(Color.BLACK));
That may appear if you changed style of your layout in manifest. Check if you have defined all items from default style such as color especially.
13,684,259
I wish to write a Windows Batch script that first tests to see if any of the command line arguments are equal to `/?`. If so, it displays the help message and terminates, otherwise it executes the rest of the script code. I have tried the following: ``` @echo off FOR %%A IN (%*) DO ( IF "%%A" == "/?" ( ECHO This...
2012/12/03
[ "https://Stackoverflow.com/questions/13684259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/660896/" ]
Something like this should do the trick: ``` @echo off IF [%1]==[/?] GOTO :help echo %* |find "/?" > nul IF errorlevel 1 GOTO :main :help ECHO You need help my friend GOTO :end :main ECHO Lets do some work :end ``` Thanks to @jeb for pointing out the error if only /? arg provided
Do not use a FOR loop, but use the following instead: ``` @ECHO OFF :Loop IF "%1"=="" GOTO Continue IF "%1" == "/?" ( ECHO This is the help message GOTO:EOF ) SHIFT GOTO Loop :Continue ECHO This is the rest of the script :EOF ```
63,689,926
I recently switch the base URL of my Wordpress site. My images are all working, but a lot of the thumbnails don't show up in gallery view. I checked the file paths, and they're correct, but when I enter the url straight into the browser, it goes to the 404 page, and the console is full of 404 errors. There doesn't se...
2020/09/01
[ "https://Stackoverflow.com/questions/63689926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12131974/" ]
Assuming your directory tree is something like that: ``` SRC │ script.py │ chromedriver.exe ``` In your `script.py`, you can: ``` import os script_dir = os.path.dirname(os.path.realpath(__file__)) executable_path = os.path.join(script_dir, "chromedriver.exe") ```
Use Webdriver manager here <https://pypi.org/project/webdriver-manager/> no need to worry about maintaining required chromedriver.exe file in the path. This will download the required driver specified in the code.
261,472
This is my code: ``` RevolutionPlot3D[x^2, {x, 0, 1}, RevolutionAxis -> "X", MeshFunctions -> {Boole[#2 == #^2] &}, Mesh -> {{1}}, MeshStyle -> Directive[Red, Thickness[0.03]], PlotPoints -> 200, Boxed -> False, Axes -> True, AxesOrigin -> {0, 0, 0}, AxesStyle -> {Red, Green, Blue}] ``` [![enter image descri...
2022/01/02
[ "https://mathematica.stackexchange.com/questions/261472", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/21532/" ]
You can *hide* the unwanted ring using a combination of options `Exclusions`, `ExclusionsStyle` and the `Method` sub-option `"BoundaryOffset" -> False`: ``` RevolutionPlot3D[x^2, {x, 0, 1}, RevolutionAxis -> "X", PlotPoints -> 100, ImageSize -> 600, ViewPoint -> {0.75, -1.5, 3}, Boxed -> False, Axes -> True, Ax...
This is a hack, but a working hack: ``` rp = RevolutionPlot3D[x^2, {x, 0, 1}, RevolutionAxis -> "X", PlotPoints -> 200, MeshStyle -> None, Boxed -> False, Axes -> True, AxesOrigin -> {0, 0, 0}, AxesStyle -> {Red, Green, Blue}] Show[rp, Graphics3D[ {Red, Tube[BSplineCurve[{#, 0, #^2} & /@ Range[0, 1, .1]]], ...
44,061,404
tried to display the name of the department that has the least student count.
2017/05/19
[ "https://Stackoverflow.com/questions/44061404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6669001/" ]
I found the answer of my question. sure after lot and lots of google. By default POST, PUT methods are not allowed in webAPI. You either need to use CORS package for that or another solution is (I used to fix my issue)... Add below config in web.config ``` <system.webServer> <httpProtocol> <customHeaders>...
remove one `$http` from the $inject ``` UpdateEnvironmentController.$inject = ['$scope', '$http', '$rootScope']; ``` Also, add an empty square bracket to the module ``` var webadmin = angular.module('PcPortal',[]); ```
44,061,404
tried to display the name of the department that has the least student count.
2017/05/19
[ "https://Stackoverflow.com/questions/44061404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6669001/" ]
I found the answer of my question. sure after lot and lots of google. By default POST, PUT methods are not allowed in webAPI. You either need to use CORS package for that or another solution is (I used to fix my issue)... Add below config in web.config ``` <system.webServer> <httpProtocol> <customHeaders>...
The best way is to use CORS package. Simply install package Owin.Cors at the Nuget package Console ``` Install-Package Microsoft.Owin.Cors ``` After this, you need to add the configuration at your startup.cs. It will look something similar like below. ``` public void Configuration(IAppBuilder app) { ...
156,586
When I download a large map within R (using the `OpenStreetMap` package) and I reproject the map (ideally to `+proj=longlat`), the map will always turn out distorted, making country labels etc. near the poles illegible. **Q1: Is there a way to obtain such a map (ideally still in R) in such a way that you can still re...
2015/07/31
[ "https://gis.stackexchange.com/questions/156586", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/20561/" ]
``` select (ST_Azimuth(h.vec) - ST_Azimuth(h.seg)) from ( select ST_MakeLine(cp.p, point.geom) vec, ST_MakeLine(cp.p, ST_LineInterpolatePoint( line.geom, ST_LineLocatePoint(line.geom, cp.p) * 1.01) ) seg from ( select ...
An alternative method if you are using version 2.5.0 or later of PostGIS, you can supply a "side" argument to `ST_Buffer`. So an alternative method to the `ST_LineInterpolatePoint` with an scaled projection value is to use ``` ST_Contains(ST_Buffer(line.geom, 100, 'side=left'), point.geom) ``` One downside of this i...
51,181,843
If I have a website that contains **paid** videos and I want to prevent authorized / unauthorized users from downloading the video, we can make it ***as difficult as we can*** but we still cannot 100% prevent stealing videos. A user still can record screen using many existing apps, I thought about it too much and look...
2018/07/04
[ "https://Stackoverflow.com/questions/51181843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9958328/" ]
You cannot determine what another program is doing, so you cannot detect that a program is recording the screen. You can, however, determine what programs are currently running. So at best you can tell that “`RecordLive!.exe`” is running, or “`VidCapture.exe`” is running, and refuse to play your video if either are ru...
If website security is of utmost importance, one possible way to block screen recorders is to package your website inside a desktop app which takes care of security. One such tool that does that is [Website Kiosker](https://websitekiosker.com/). For external camcorders, the tool can show user specific watermark (like ...
16,196,588
Is it a reasonable/responsible idea to store a database result set in the user's session, as opposed to loading it fresh from the database on every page load? I am aware of the availability of caching the generated HTML code in a cache file on the server but that has too many convenience issues in my opinion. For exam...
2013/04/24
[ "https://Stackoverflow.com/questions/16196588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/330098/" ]
Is there any reason you can't use a conventional cache like [Memcached](http://memcached.org/) for this instead of trying to jam it into the session? The problem with using the session cache in this manner is it creates clutter. Session data should be kept as lean as possible since it's loaded on every request. Dumpin...
Others adviced to use Memcached. It adds complexity and requires RAM (so it makes MySQL MUCH MUCH MUCH slower if they run on the same server). It's possible that it's the best solution for you, but since I don't know any solution which is "good for everyone", and since I don't know your workload, I just suggest alterna...