qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
148,118
I am trying to make a little wireless-connected gizmo to attach to my grandfather's walking cane. The idea is that when it senses the cane has fallen down, it would alert/call one of us so that we can rush to him if we're not nearby. The question is: What sensor or combination of sensors could I use to reliably differ...
2015/01/08
[ "https://electronics.stackexchange.com/questions/148118", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/11636/" ]
The most reliable way would be a gyro+accel combo (like the mpu6050 from invensense). You can just use their DMP stuff to get a roll/pitch/yaw angle for the sensor, or do the work yourself by running the data through a kalman filter. You don't need a vibration sensor, as you can get that from the accelerometer data too...
Seems like an accelerometer and a small microcontroller (a PIC for example) could do this quite easily. You could then set the angle at which the alarm goes off in the code. With the light sensor approach you'd need to be careful that the area stayed clean. Otherwise if he covers the sensor with crud it will always in...
148,118
I am trying to make a little wireless-connected gizmo to attach to my grandfather's walking cane. The idea is that when it senses the cane has fallen down, it would alert/call one of us so that we can rush to him if we're not nearby. The question is: What sensor or combination of sensors could I use to reliably differ...
2015/01/08
[ "https://electronics.stackexchange.com/questions/148118", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/11636/" ]
I agree with one of the above replies in that you need something (probably two accelerometers) to detect the angle at which the cane stands (calibrated at the factory if you are industrializing this). This way you have a continuum of what angle the cane is at, relative to upright. This gives a distinct advantage over...
A very simple solution is a tilt sensor such as the AT-407 from Sparkfun. It consists of 2 steel balls inside a small tube and 2 leads. When the tube is tilted, the balls separate and continuity is lost between the 2 leads. It costs only $1.95.
148,118
I am trying to make a little wireless-connected gizmo to attach to my grandfather's walking cane. The idea is that when it senses the cane has fallen down, it would alert/call one of us so that we can rush to him if we're not nearby. The question is: What sensor or combination of sensors could I use to reliably differ...
2015/01/08
[ "https://electronics.stackexchange.com/questions/148118", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/11636/" ]
I agree with one of the above replies in that you need something (probably two accelerometers) to detect the angle at which the cane stands (calibrated at the factory if you are industrializing this). This way you have a continuum of what angle the cane is at, relative to upright. This gives a distinct advantage over...
The most reliable way would be a gyro+accel combo (like the mpu6050 from invensense). You can just use their DMP stuff to get a roll/pitch/yaw angle for the sensor, or do the work yourself by running the data through a kalman filter. You don't need a vibration sensor, as you can get that from the accelerometer data too...
12,744,622
I want to know index of current scrolled page in UIScrollView. I have searched through many sites by none helps. Any suggestions are welcome.
2012/10/05
[ "https://Stackoverflow.com/questions/12744622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1564754/" ]
Try this ``` //Horizontal NSInteger pagenumber = scrollView.contentOffset.x / scrollView.bounds.size.width; //Vertical NSInteger pagenumber = scrollView.contentOffset.y / scrollView.bounds.size.height; ```
Use the `contentOffset` property, which returns a `CGSize` that is the offset of the content in the `UIScrollView`.
12,744,622
I want to know index of current scrolled page in UIScrollView. I have searched through many sites by none helps. Any suggestions are welcome.
2012/10/05
[ "https://Stackoverflow.com/questions/12744622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1564754/" ]
For those needing code (swift) , the UIScrollViewDelegate provides the method, this uses the horizontal example from above ``` func scrollViewDidEndDecelerating(scrollView: UIScrollView) { print("END Scrolling \(scrollView.contentOffset.x / scrollView.bounds.size.width)") index = Int(scrollView.contentOffset.x...
Use the `contentOffset` property, which returns a `CGSize` that is the offset of the content in the `UIScrollView`.
12,744,622
I want to know index of current scrolled page in UIScrollView. I have searched through many sites by none helps. Any suggestions are welcome.
2012/10/05
[ "https://Stackoverflow.com/questions/12744622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1564754/" ]
Try this ``` //Horizontal NSInteger pagenumber = scrollView.contentOffset.x / scrollView.bounds.size.width; //Vertical NSInteger pagenumber = scrollView.contentOffset.y / scrollView.bounds.size.height; ```
with the help of some mathematical calculation you can get index number of page I am sending code for reference only . I have done. ``` -(void)KinarafindingSelectedCategory:(UIScrollView*)scrollView{ for (UIView *v in scrollView.subviews) { if ([v isKindOfClass:[UIButton class]]) { ...
12,744,622
I want to know index of current scrolled page in UIScrollView. I have searched through many sites by none helps. Any suggestions are welcome.
2012/10/05
[ "https://Stackoverflow.com/questions/12744622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1564754/" ]
For those needing code (swift) , the UIScrollViewDelegate provides the method, this uses the horizontal example from above ``` func scrollViewDidEndDecelerating(scrollView: UIScrollView) { print("END Scrolling \(scrollView.contentOffset.x / scrollView.bounds.size.width)") index = Int(scrollView.contentOffset.x...
with the help of some mathematical calculation you can get index number of page I am sending code for reference only . I have done. ``` -(void)KinarafindingSelectedCategory:(UIScrollView*)scrollView{ for (UIView *v in scrollView.subviews) { if ([v isKindOfClass:[UIButton class]]) { ...
37,155,592
I'm interacting with a legacy system that takes a lot of input on the bit level. It requires me to pass in octets (bytes really) with specific bits set. To keep this readable, I declare some flags like this: ``` private static final byte FLAG_A = 0b00010000; private static final byte FLAG_B = 0b00100000; private ...
2016/05/11
[ "https://Stackoverflow.com/questions/37155592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396618/" ]
0bxxxx notation is for bit-wise representation of integers, which can be cast to byte if they fit, but this is not special byte-only notation. 0b1000000 is positive +128, which is more than can fit into byte. You would need to do something like -0b111111 (-127) to achieve byte pattern 0b1000000, but it is probably bett...
You may want to declare your flag as ``` private static final unsigned byte ``` I guess the compiler thinks the 255 is not fitting in to an signed byte (which only holdes -128 to 127)
37,155,592
I'm interacting with a legacy system that takes a lot of input on the bit level. It requires me to pass in octets (bytes really) with specific bits set. To keep this readable, I declare some flags like this: ``` private static final byte FLAG_A = 0b00010000; private static final byte FLAG_B = 0b00100000; private ...
2016/05/11
[ "https://Stackoverflow.com/questions/37155592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396618/" ]
Taking it from where [@Artur Biesiadowski](https://stackoverflow.com/users/4210615/artur-biesiadowski) left off, you are in essence attempting to store more than a byte can handle. ``` 1 0 0 0 0 0 0 0 7th 6th 5th 4th 3rd 2nd 1st 0th ``` This value is +128; Java byte range is -128 to +127...
You may want to declare your flag as ``` private static final unsigned byte ``` I guess the compiler thinks the 255 is not fitting in to an signed byte (which only holdes -128 to 127)
37,155,592
I'm interacting with a legacy system that takes a lot of input on the bit level. It requires me to pass in octets (bytes really) with specific bits set. To keep this readable, I declare some flags like this: ``` private static final byte FLAG_A = 0b00010000; private static final byte FLAG_B = 0b00100000; private ...
2016/05/11
[ "https://Stackoverflow.com/questions/37155592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396618/" ]
An alternative solution is to use a `BitSet` with its more human readable methods. You can still use flags for the individual bits, but they'd be indexes instead of bitmasks. Then you can just retrieve the resulting byte with `BitSet.toByteArray()[0]`.
You may want to declare your flag as ``` private static final unsigned byte ``` I guess the compiler thinks the 255 is not fitting in to an signed byte (which only holdes -128 to 127)
37,155,592
I'm interacting with a legacy system that takes a lot of input on the bit level. It requires me to pass in octets (bytes really) with specific bits set. To keep this readable, I declare some flags like this: ``` private static final byte FLAG_A = 0b00010000; private static final byte FLAG_B = 0b00100000; private ...
2016/05/11
[ "https://Stackoverflow.com/questions/37155592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396618/" ]
0bxxxx notation is for bit-wise representation of integers, which can be cast to byte if they fit, but this is not special byte-only notation. 0b1000000 is positive +128, which is more than can fit into byte. You would need to do something like -0b111111 (-127) to achieve byte pattern 0b1000000, but it is probably bett...
Taking it from where [@Artur Biesiadowski](https://stackoverflow.com/users/4210615/artur-biesiadowski) left off, you are in essence attempting to store more than a byte can handle. ``` 1 0 0 0 0 0 0 0 7th 6th 5th 4th 3rd 2nd 1st 0th ``` This value is +128; Java byte range is -128 to +127...
37,155,592
I'm interacting with a legacy system that takes a lot of input on the bit level. It requires me to pass in octets (bytes really) with specific bits set. To keep this readable, I declare some flags like this: ``` private static final byte FLAG_A = 0b00010000; private static final byte FLAG_B = 0b00100000; private ...
2016/05/11
[ "https://Stackoverflow.com/questions/37155592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396618/" ]
0bxxxx notation is for bit-wise representation of integers, which can be cast to byte if they fit, but this is not special byte-only notation. 0b1000000 is positive +128, which is more than can fit into byte. You would need to do something like -0b111111 (-127) to achieve byte pattern 0b1000000, but it is probably bett...
An alternative solution is to use a `BitSet` with its more human readable methods. You can still use flags for the individual bits, but they'd be indexes instead of bitmasks. Then you can just retrieve the resulting byte with `BitSet.toByteArray()[0]`.
37,155,592
I'm interacting with a legacy system that takes a lot of input on the bit level. It requires me to pass in octets (bytes really) with specific bits set. To keep this readable, I declare some flags like this: ``` private static final byte FLAG_A = 0b00010000; private static final byte FLAG_B = 0b00100000; private ...
2016/05/11
[ "https://Stackoverflow.com/questions/37155592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396618/" ]
Taking it from where [@Artur Biesiadowski](https://stackoverflow.com/users/4210615/artur-biesiadowski) left off, you are in essence attempting to store more than a byte can handle. ``` 1 0 0 0 0 0 0 0 7th 6th 5th 4th 3rd 2nd 1st 0th ``` This value is +128; Java byte range is -128 to +127...
An alternative solution is to use a `BitSet` with its more human readable methods. You can still use flags for the individual bits, but they'd be indexes instead of bitmasks. Then you can just retrieve the resulting byte with `BitSet.toByteArray()[0]`.
105,496
A friend and I will be flying separately from the USA into Heathrow. I am arriving in T5 and she arrives in T2. I arrive about an hour earlier than she does. We will then be taking the underground into London. What is our best way to connect? Should I go to arrivals in T2 after going through border control, baggage and...
2017/11/19
[ "https://travel.stackexchange.com/questions/105496", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/70491/" ]
The most convenient meeting point is indeed the T2 public arrivals area. It offers comfort, access to food and drink, wifi, immediate updates if your friend's flight is delayed, the ability to make enquiries about any delay and page her if you don't manage to meet. Arrivals areas are accessible to anyone, so make your...
Provided your friend is also a comfortable traveler, the easiest thing for you to do is take the Underground (Piccadilly Line, one stop) from T5 to T2&3 and wait for them on the platform. Or, if they manage to arrive first, they can wait for you there. Basically, the T2 platform is your rendezvous point. If you have ...
45,727
I see that 但 means "only" besides its typical meaning "but". So what is the difference between 但 and 只 and when do you use 但 with the meaning "only"?
2021/07/27
[ "https://chinese.stackexchange.com/questions/45727", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/28802/" ]
When delivering sad or bad news, a common phrase to say is 很不幸,很遺憾,or 很抱歉 Example: **很不幸**, 我心愛的寵物積克已經去世了 - **unfortunately/ sadly**, my beloved pet Jack has passed away. (He was such a good boy) **很遺憾**, 你這次測試你失敗了 - **regretfully**, you have failed this test **很抱歉**, 我對你一點好感也沒有 - **Sorry**, I don't have any good f...
"I am sorry to say". This type of expression is not in the Chinese's blood for the described event - the pass away of a family member. Rather the news is usually announced as a family matter: "家中不幸". 我的祖母在前天晚間過逝了, 她走的很突然但是很安祥. "家中不幸" will be dropped for a person without any attachment/tie to his family or have any li...
71,022,493
i am not able to display country name,image and rating can anyone explain me why this is happening [https://api.tvmaze.com/search/shows?q=avengers] it is the API link.all other data are displaying but these 3 are not working and throwing error. ``` import React, {useState, useEffect} from 'react' import ReactDOM from ...
2022/02/07
[ "https://Stackoverflow.com/questions/71022493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18036567/" ]
As mentioned in the comments, the example with `mstsc` only works because there's a 1-to-1 relationship between closing the main window it produces and *exiting the process*. This relationship does not exist with `explorer` - it'll detect on launch that the desktop session already has a shell, notify it of the request...
Here is some proof-of-concept code that opens the given folder and waits until the new shell (Explorer) window has been closed. This is made possible by the [Shell.Application](https://learn.microsoft.com/en-us/windows/win32/shell/shell) COM object. Its [`Windows()`](https://learn.microsoft.com/en-us/windows/win32/she...
185,867
I configured hardfail SPF for my domain and DKIM message signing on my SMTP server. Since this is the only SMTP server that should be used for outgoing mail from my domain, I didn't foresee any complications. However, consider the following situation: I sent an e-mail message via my SMTP server to my colleague's unive...
2010/09/29
[ "https://serverfault.com/questions/185867", "https://serverfault.com", "https://serverfault.com/users/53736/" ]
The forwarding server needs to setup SRS in order not to break your SPF <http://www.open-spf.org/srs/>
While forwarding does break SPF (without SRS), it typically does not break DKIM. It looks like (based on `dkim=hardfail (test mode)` in GMail's authentication results) the problem is that your SPF key record has the `t=y` flag, indicating it is only for [testing purposes](https://www.rfc-editor.org/rfc/rfc4871#section-...
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
Please, no. I spend so much time fixing things that students believe that they heard in lectures on the German Wikipedia. Excellent points have been made above. I suggest installing <https://bitnami.com/stack/mediawiki> on a machine under your control and keep your notes there.
The lecture material was provided for you and your classmates. You haven't been authorized to share it with the world. Until you have permission to do so, you should not post your notes on Wikipedia.
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
This is not what Wikipedia is for but you can use a [*personal* Wiki](https://en.wikipedia.org/wiki/Personal_wiki). There are several ways to do this. You can actually run a personal webserver on your own machine and access it like any Wiki. There are several open source projects that provide source code for such webs...
**tl;dr**: In theory this could be useful for all concerned. If you have bags of time and patience, including patience with people, you are more likely to succeed, but there's no guarantee. Is it "advisable"? Well I wouldn't *advise* it, for several reasons, which I will come to in a moment. But there is benefit if do...
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
Other have already pointed out many valid reasons why to not abuse Wikipedia for personal note making. However, one more reason comes to mind: *You have no guarantee that someday somebody will alter your notes.* Wikipedia is written by everybody. Granted, there is a review process, which incidentely might also preve...
**tl;dr**: In theory this could be useful for all concerned. If you have bags of time and patience, including patience with people, you are more likely to succeed, but there's no guarantee. Is it "advisable"? Well I wouldn't *advise* it, for several reasons, which I will come to in a moment. But there is benefit if do...
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
This is not what Wikipedia is for but you can use a [*personal* Wiki](https://en.wikipedia.org/wiki/Personal_wiki). There are several ways to do this. You can actually run a personal webserver on your own machine and access it like any Wiki. There are several open source projects that provide source code for such webs...
I used to do this to some extent, that is, adding new things I learned from books and articles to the relevant wikipedia entries (the [Schur polynomial entry](https://www.wikiwand.com/en/Schur_polynomial) is perhaps my main victim). However, I quickly realized that I wanted to add information which is of interest for p...
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
I used to do this to some extent, that is, adding new things I learned from books and articles to the relevant wikipedia entries (the [Schur polynomial entry](https://www.wikiwand.com/en/Schur_polynomial) is perhaps my main victim). However, I quickly realized that I wanted to add information which is of interest for p...
The lecture material was provided for you and your classmates. You haven't been authorized to share it with the world. Until you have permission to do so, you should not post your notes on Wikipedia.
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
No, this is not a good idea. Wikipedia articles and the kind of notes you'd write while following a lecture are very different types of text. Audience: A Wikipedia article should be written for a general public, your notes are written for future-you. Context: A Wikipedia article would start much more with a blank sla...
The lecture material was provided for you and your classmates. You haven't been authorized to share it with the world. Until you have permission to do so, you should not post your notes on Wikipedia.
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
No, this is not a good idea. Wikipedia articles and the kind of notes you'd write while following a lecture are very different types of text. Audience: A Wikipedia article should be written for a general public, your notes are written for future-you. Context: A Wikipedia article would start much more with a blank sla...
This is not what Wikipedia is for but you can use a [*personal* Wiki](https://en.wikipedia.org/wiki/Personal_wiki). There are several ways to do this. You can actually run a personal webserver on your own machine and access it like any Wiki. There are several open source projects that provide source code for such webs...
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
Other have already pointed out many valid reasons why to not abuse Wikipedia for personal note making. However, one more reason comes to mind: *You have no guarantee that someday somebody will alter your notes.* Wikipedia is written by everybody. Granted, there is a review process, which incidentely might also preve...
Please, no. I spend so much time fixing things that students believe that they heard in lectures on the German Wikipedia. Excellent points have been made above. I suggest installing <https://bitnami.com/stack/mediawiki> on a machine under your control and keep your notes there.
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
No, this is not a good idea. Wikipedia articles and the kind of notes you'd write while following a lecture are very different types of text. Audience: A Wikipedia article should be written for a general public, your notes are written for future-you. Context: A Wikipedia article would start much more with a blank sla...
I used to do this to some extent, that is, adding new things I learned from books and articles to the relevant wikipedia entries (the [Schur polynomial entry](https://www.wikiwand.com/en/Schur_polynomial) is perhaps my main victim). However, I quickly realized that I wanted to add information which is of interest for p...
182,330
Some people summarize the content of a lecture to deepen their understanding, but I am thinking about using Wikipedia instead. Specifically, I mean finding the Wikipedia article (in my primary, non-English language) that covers the lecture material and adding any suitable content that the article does not already have....
2022/02/13
[ "https://academia.stackexchange.com/questions/182330", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/153356/" ]
This is not what Wikipedia is for but you can use a [*personal* Wiki](https://en.wikipedia.org/wiki/Personal_wiki). There are several ways to do this. You can actually run a personal webserver on your own machine and access it like any Wiki. There are several open source projects that provide source code for such webs...
The lecture material was provided for you and your classmates. You haven't been authorized to share it with the world. Until you have permission to do so, you should not post your notes on Wikipedia.
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
What you're talking about is a 'push' notification, where the server would pass a notification to the client (a browser) without the client requesting anything. This isnt something which HTTP is naturally capable of, however have a read about [Comet](http://en.wikipedia.org/wiki/Comet_%28programming%29) - this will le...
When a user submit requests I assume that his request is first stored in the database. So on the admin & user part you use ajax which periodically update data from database (for un-approved data), do some google search on ajax auto-update or Javascript's timeout or similar function. The same process will be involved in...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
> > I need a clean and efficient way to show the admin the requests instantly and for the user to see the admin's response instantly. > > > **Instantly** is a very strong term and isn't usually very scalable. For some ideas on how you might implement this I'd recommend you take a look at [Wikipedia's Comet Progra...
When a user submit requests I assume that his request is first stored in the database. So on the admin & user part you use ajax which periodically update data from database (for un-approved data), do some google search on ajax auto-update or Javascript's timeout or similar function. The same process will be involved in...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
I will suggest you take a look at SignalR (<https://github.com/SignalR/SignalR>). It is a framework developed by a few MS developers for doing long polling/notifications from the server. Link for webforms walkthrough - <http://www.infinitelooping.com/blog/2011/10/17/using-signalr/>.
When a user submit requests I assume that his request is first stored in the database. So on the admin & user part you use ajax which periodically update data from database (for un-approved data), do some google search on ajax auto-update or Javascript's timeout or similar function. The same process will be involved in...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
You could also look into using a Timer control. It's a client side control that will cause a postback for ASP.NET AJAX applications. Here's a simple tutorial <http://ajax.net-tutorials.com/controls/timer-control/>
When a user submit requests I assume that his request is first stored in the database. So on the admin & user part you use ajax which periodically update data from database (for un-approved data), do some google search on ajax auto-update or Javascript's timeout or similar function. The same process will be involved in...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
I will suggest you take a look at SignalR (<https://github.com/SignalR/SignalR>). It is a framework developed by a few MS developers for doing long polling/notifications from the server. Link for webforms walkthrough - <http://www.infinitelooping.com/blog/2011/10/17/using-signalr/>.
What you're talking about is a 'push' notification, where the server would pass a notification to the client (a browser) without the client requesting anything. This isnt something which HTTP is naturally capable of, however have a read about [Comet](http://en.wikipedia.org/wiki/Comet_%28programming%29) - this will le...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
You could also look into using a Timer control. It's a client side control that will cause a postback for ASP.NET AJAX applications. Here's a simple tutorial <http://ajax.net-tutorials.com/controls/timer-control/>
What you're talking about is a 'push' notification, where the server would pass a notification to the client (a browser) without the client requesting anything. This isnt something which HTTP is naturally capable of, however have a read about [Comet](http://en.wikipedia.org/wiki/Comet_%28programming%29) - this will le...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
I will suggest you take a look at SignalR (<https://github.com/SignalR/SignalR>). It is a framework developed by a few MS developers for doing long polling/notifications from the server. Link for webforms walkthrough - <http://www.infinitelooping.com/blog/2011/10/17/using-signalr/>.
> > I need a clean and efficient way to show the admin the requests instantly and for the user to see the admin's response instantly. > > > **Instantly** is a very strong term and isn't usually very scalable. For some ideas on how you might implement this I'd recommend you take a look at [Wikipedia's Comet Progra...
7,759,095
I know the question sounds too vague so let me explain exactly what I want to implement. I have a WebApplication that many users log into to submit a request, Request in my project is a form that accepts some information from the user and when he click submit, it reflects on the administrator page. then the admin can ...
2011/10/13
[ "https://Stackoverflow.com/questions/7759095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315625/" ]
You could also look into using a Timer control. It's a client side control that will cause a postback for ASP.NET AJAX applications. Here's a simple tutorial <http://ajax.net-tutorials.com/controls/timer-control/>
> > I need a clean and efficient way to show the admin the requests instantly and for the user to see the admin's response instantly. > > > **Instantly** is a very strong term and isn't usually very scalable. For some ideas on how you might implement this I'd recommend you take a look at [Wikipedia's Comet Progra...
9,777,206
I have a text file which contains following ``` Name address phone salary Jack Boston 923-433-666 10000 ``` all the fields are delimited by the spaces. I am trying to write a C# program, this program should read a this text file and then store it in the formatted array. My Array is as follows: ``` addres...
2012/03/19
[ "https://Stackoverflow.com/questions/9777206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1278465/" ]
You can use File.ReadAllLines method to load the file into an array. You can then use a for loop to loop through the lines, and the string type's Split method to separate each line into another array, and store the values in your formatted array. Something like: ``` static void Main(string[] args) { v...
Do not reinvent the wheel. Can use for example [fast csv reader](http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader) where you can specify a `delimeter` you need. There are plenty others on internet like that, just search and pick that one which fits your needs.
9,777,206
I have a text file which contains following ``` Name address phone salary Jack Boston 923-433-666 10000 ``` all the fields are delimited by the spaces. I am trying to write a C# program, this program should read a this text file and then store it in the formatted array. My Array is as follows: ``` addres...
2012/03/19
[ "https://Stackoverflow.com/questions/9777206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1278465/" ]
Do not reinvent the wheel. Can use for example [fast csv reader](http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader) where you can specify a `delimeter` you need. There are plenty others on internet like that, just search and pick that one which fits your needs.
This answer assumes you don't know how much whitespace is between each string in a given line. ``` // Method to split a line into a string array separated by whitespace private string[] Splitter(string input) { return Regex.Split(intput, @"\W+"); } // Another code snippet to read the file and break the lines int...
9,777,206
I have a text file which contains following ``` Name address phone salary Jack Boston 923-433-666 10000 ``` all the fields are delimited by the spaces. I am trying to write a C# program, this program should read a this text file and then store it in the formatted array. My Array is as follows: ``` addres...
2012/03/19
[ "https://Stackoverflow.com/questions/9777206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1278465/" ]
You can use File.ReadAllLines method to load the file into an array. You can then use a for loop to loop through the lines, and the string type's Split method to separate each line into another array, and store the values in your formatted array. Something like: ``` static void Main(string[] args) { v...
This answer assumes you don't know how much whitespace is between each string in a given line. ``` // Method to split a line into a string array separated by whitespace private string[] Splitter(string input) { return Regex.Split(intput, @"\W+"); } // Another code snippet to read the file and break the lines int...
17,202,066
The code bellow is a part of an activity of an Android app. I am using Jena(Androjena) to query rdf files. That part works fine. The problem is that i am trying to iterate through the results and store the in a two-dimensional array. Where the columns and rows should be like: ``` ///////////////// Adam /Sandler/43 Ka...
2013/06/19
[ "https://Stackoverflow.com/questions/17202066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1146142/" ]
Since you do not know in advance the size of the result set, you cannot use an array. Use an `ArrayList<String[]>` instead and add `String[]` elements to the list as you read rows from the resultSet. ``` ArrayList<String[]> results1 = new ArrayList<>(); ``` When you have read all the rows you can still refer to the...
The problem is that the array that you create is actually `String results1[][] = new String[i][j];` which is `String results1[][] = new String[0][columnNames.size()];` Then in the `for (String var : columnNames)` loop you increment the value of i and try to set an element to `results1[resultSet.getRowNumber()][j]`. ...
2,687,931
Is there a closed form for: $$\sum\_{n=0}^\infty \frac{\cos(n)}{(2n+1)(2n+2)} $$ I know it converges through the direct comparison test, and I'm pretty sure there is a closed form, but I'm not entirely certain what it is. Here's what I've done so far: $$\sum\_{n=0}^\infty \frac{\cos(n)}{2n+1}-\sum\_{n=0}^\infty \fr...
2018/03/12
[ "https://math.stackexchange.com/questions/2687931", "https://math.stackexchange.com", "https://math.stackexchange.com/users/457359/" ]
First, we evaluate $\sum\_{n=0}^\infty \frac{\cos(n)}{2n+1}$. To do so, we note that for $|z|<1$ $$\sum\_{n=0}^\infty \frac{z^{2n+1}}{2n+1}=\text{arctanh}(z)\tag 1$$ In fact, the series in $(1)$ converges for all $|z|\le 1$, $z\ne 1$. Therefore, letting $z=e^{ix}$, $x\ne 2k\pi$, reveals $$\sum\_{n=0}^\infty \frac{...
Hint: $$\sum\_{n=0}^\infty\dfrac{\cos n}{n+2}=$$ Real part of $$e^{-2i}\sum\_{n=0}^\infty\dfrac{(e^i)^{n+2}}{n+2}$$ $$=e^{-2i}\left(-\ln(1-e^i)-\dfrac{e^i}{1}\right)$$ Use [How to prove Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?](https://math.stackexchange.com/questions/3510/how-to-prove-eulers-...
2,687,931
Is there a closed form for: $$\sum\_{n=0}^\infty \frac{\cos(n)}{(2n+1)(2n+2)} $$ I know it converges through the direct comparison test, and I'm pretty sure there is a closed form, but I'm not entirely certain what it is. Here's what I've done so far: $$\sum\_{n=0}^\infty \frac{\cos(n)}{2n+1}-\sum\_{n=0}^\infty \fr...
2018/03/12
[ "https://math.stackexchange.com/questions/2687931", "https://math.stackexchange.com", "https://math.stackexchange.com/users/457359/" ]
For any $z\in\mathbb{C}$ such that $\|z\|\leq 1$ the series $\sum\_{n\geq 1}\frac{z^n}{(2n+1)(2n+2)}$ is absolutely convergent. We may notice that $$ f(w)=\sum\_{n\geq 0}\frac{w^{2n+2}}{(2n+1)(2n+2)}=\int\_{0}^{w}\int\_{0}^{v}\sum\_{n\geq 1}u^{2n}\,du\,dv=\int\_{0}^{w}\int\_{0}^{v}\frac{du}{1-u^2}\,dv $$ is a holomo...
Hint: $$\sum\_{n=0}^\infty\dfrac{\cos n}{n+2}=$$ Real part of $$e^{-2i}\sum\_{n=0}^\infty\dfrac{(e^i)^{n+2}}{n+2}$$ $$=e^{-2i}\left(-\ln(1-e^i)-\dfrac{e^i}{1}\right)$$ Use [How to prove Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?](https://math.stackexchange.com/questions/3510/how-to-prove-eulers-...
2,687,931
Is there a closed form for: $$\sum\_{n=0}^\infty \frac{\cos(n)}{(2n+1)(2n+2)} $$ I know it converges through the direct comparison test, and I'm pretty sure there is a closed form, but I'm not entirely certain what it is. Here's what I've done so far: $$\sum\_{n=0}^\infty \frac{\cos(n)}{2n+1}-\sum\_{n=0}^\infty \fr...
2018/03/12
[ "https://math.stackexchange.com/questions/2687931", "https://math.stackexchange.com", "https://math.stackexchange.com/users/457359/" ]
First, we evaluate $\sum\_{n=0}^\infty \frac{\cos(n)}{2n+1}$. To do so, we note that for $|z|<1$ $$\sum\_{n=0}^\infty \frac{z^{2n+1}}{2n+1}=\text{arctanh}(z)\tag 1$$ In fact, the series in $(1)$ converges for all $|z|\le 1$, $z\ne 1$. Therefore, letting $z=e^{ix}$, $x\ne 2k\pi$, reveals $$\sum\_{n=0}^\infty \frac{...
For any $z\in\mathbb{C}$ such that $\|z\|\leq 1$ the series $\sum\_{n\geq 1}\frac{z^n}{(2n+1)(2n+2)}$ is absolutely convergent. We may notice that $$ f(w)=\sum\_{n\geq 0}\frac{w^{2n+2}}{(2n+1)(2n+2)}=\int\_{0}^{w}\int\_{0}^{v}\sum\_{n\geq 1}u^{2n}\,du\,dv=\int\_{0}^{w}\int\_{0}^{v}\frac{du}{1-u^2}\,dv $$ is a holomo...
40,516,055
I need to create 4 output files. I currently obtain a single file. ``` String url1 = "www.xxxx.com"; String url2 = "www.xxxx.com"; String url3 = "www.xxxx.com"; String url4 = "www.xxxx.com"; String tableaurl[] = {url1,url2,url3,url4}; for(String url : tableaurl) { String encodedString = UrlUtils.encodeAnchor(u...
2016/11/09
[ "https://Stackoverflow.com/questions/40516055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5909095/" ]
If you want 4 files, then use 4 distinct names. ``` int i = 0; // Some number counter for(String url : tableaurl) { // other code... i++; File file = new File(dir + File.separator + i + "_" + date.getTime()); ```
You should use different date object to create different file name. Currently you are using a single object which returns the same time each time you call get time(). You can use new Date().get time().
32,836,103
I am working on Adobe CQ. I created 2-3 versions(1.2,1.2,1.3) for a particular page in my author instance. Now I tried to package my content page and installed it in another instance. I couldn't see the versions of the page which I installed in another instance. Can anyone help me out doing this?? I want to migrate my...
2015/09/29
[ "https://Stackoverflow.com/questions/32836103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5387245/" ]
We are in the same situation. You can extract prior version details using the packaging approach, but you will be precluded from reloading them in due to the new Oak security model. The next issue is that you would need to extract and transform the data, and then reinsert due to the node ID's potentially differing, esp...
Versions are stored by path '/jcr:system/jcr:versionStorage' in AEM. To transfer pages with their versions just create a package with filters for content which you want to move and the version storage path as well, download package and install in other AEM.
32,836,103
I am working on Adobe CQ. I created 2-3 versions(1.2,1.2,1.3) for a particular page in my author instance. Now I tried to package my content page and installed it in another instance. I couldn't see the versions of the page which I installed in another instance. Can anyone help me out doing this?? I want to migrate my...
2015/09/29
[ "https://Stackoverflow.com/questions/32836103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5387245/" ]
We are in the same situation. You can extract prior version details using the packaging approach, but you will be precluded from reloading them in due to the new Oak security model. The next issue is that you would need to extract and transform the data, and then reinsert due to the node ID's potentially differing, esp...
If anyone comes across this question like me, here is the summarised answer: You can use crx2oak utility available from link below to migrate pages and page version across instances: <https://repo.adobe.com/nexus/content/groups/public/com/adobe/granite/crx2oak/> This is a powerful utility with multiple uses (especial...
46,147,019
I made a model using Keras with Tensorflow. I use `Inputlayer` with these lines of code: ``` img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, img_ch)) first_input = InputLayer(input_tensor=img1, input_shape=(img_width, img_heigh, img_ch)) first_dense = Conv2D(16, 3, 3, activation='relu', border_m...
2017/09/11
[ "https://Stackoverflow.com/questions/46147019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148586/" ]
* `InputLayer` is a layer. * `Input` is a tensor. You can only call layers passing tensors to them. **The idea is:** ``` outputTensor = SomeLayer(inputTensor) ``` So, only `Input` can be passed because it's a tensor. Honestly, I have no idea about the reason for the existence of `InputLayer`. Maybe it's suppose...
According to tensorflow website, "It is generally recommend to use the functional layer API via Input, (which creates an InputLayer) without directly using InputLayer." Know more at this page [here](https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer)
46,147,019
I made a model using Keras with Tensorflow. I use `Inputlayer` with these lines of code: ``` img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, img_ch)) first_input = InputLayer(input_tensor=img1, input_shape=(img_width, img_heigh, img_ch)) first_dense = Conv2D(16, 3, 3, activation='relu', border_m...
2017/09/11
[ "https://Stackoverflow.com/questions/46147019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148586/" ]
* `InputLayer` is a layer. * `Input` is a tensor. You can only call layers passing tensors to them. **The idea is:** ``` outputTensor = SomeLayer(inputTensor) ``` So, only `Input` can be passed because it's a tensor. Honestly, I have no idea about the reason for the existence of `InputLayer`. Maybe it's suppose...
Input: Used for creating a functional model ``` inp=tf.keras.Input(shape=[?,?,?]) x=layers.Conv2D(.....)(inp) ``` Input Layer: used for creating a sequential model ``` x=tf.keras.Sequential() x.add(tf.keras.layers.InputLayer(shape=[?,?,?])) ``` And the other difference is that > > When using InputLayer with the...
46,147,019
I made a model using Keras with Tensorflow. I use `Inputlayer` with these lines of code: ``` img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, img_ch)) first_input = InputLayer(input_tensor=img1, input_shape=(img_width, img_heigh, img_ch)) first_dense = Conv2D(16, 3, 3, activation='relu', border_m...
2017/09/11
[ "https://Stackoverflow.com/questions/46147019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148586/" ]
* `InputLayer` is a layer. * `Input` is a tensor. You can only call layers passing tensors to them. **The idea is:** ``` outputTensor = SomeLayer(inputTensor) ``` So, only `Input` can be passed because it's a tensor. Honestly, I have no idea about the reason for the existence of `InputLayer`. Maybe it's suppose...
To define it in simple words: `keras.layers.Input` is used to instantiate a Keras Tensor. In this case, your data is probably not a tf tensor, maybe an `np` array. On the other hand, `keras.layers.InputLayer` is a layer where your data is already defined as one of the tf tensor types, i.e., can be a ragged tensor or ...
46,147,019
I made a model using Keras with Tensorflow. I use `Inputlayer` with these lines of code: ``` img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, img_ch)) first_input = InputLayer(input_tensor=img1, input_shape=(img_width, img_heigh, img_ch)) first_dense = Conv2D(16, 3, 3, activation='relu', border_m...
2017/09/11
[ "https://Stackoverflow.com/questions/46147019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148586/" ]
According to tensorflow website, "It is generally recommend to use the functional layer API via Input, (which creates an InputLayer) without directly using InputLayer." Know more at this page [here](https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer)
Input: Used for creating a functional model ``` inp=tf.keras.Input(shape=[?,?,?]) x=layers.Conv2D(.....)(inp) ``` Input Layer: used for creating a sequential model ``` x=tf.keras.Sequential() x.add(tf.keras.layers.InputLayer(shape=[?,?,?])) ``` And the other difference is that > > When using InputLayer with the...
46,147,019
I made a model using Keras with Tensorflow. I use `Inputlayer` with these lines of code: ``` img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, img_ch)) first_input = InputLayer(input_tensor=img1, input_shape=(img_width, img_heigh, img_ch)) first_dense = Conv2D(16, 3, 3, activation='relu', border_m...
2017/09/11
[ "https://Stackoverflow.com/questions/46147019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148586/" ]
According to tensorflow website, "It is generally recommend to use the functional layer API via Input, (which creates an InputLayer) without directly using InputLayer." Know more at this page [here](https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer)
To define it in simple words: `keras.layers.Input` is used to instantiate a Keras Tensor. In this case, your data is probably not a tf tensor, maybe an `np` array. On the other hand, `keras.layers.InputLayer` is a layer where your data is already defined as one of the tf tensor types, i.e., can be a ragged tensor or ...
46,147,019
I made a model using Keras with Tensorflow. I use `Inputlayer` with these lines of code: ``` img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, img_ch)) first_input = InputLayer(input_tensor=img1, input_shape=(img_width, img_heigh, img_ch)) first_dense = Conv2D(16, 3, 3, activation='relu', border_m...
2017/09/11
[ "https://Stackoverflow.com/questions/46147019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148586/" ]
Input: Used for creating a functional model ``` inp=tf.keras.Input(shape=[?,?,?]) x=layers.Conv2D(.....)(inp) ``` Input Layer: used for creating a sequential model ``` x=tf.keras.Sequential() x.add(tf.keras.layers.InputLayer(shape=[?,?,?])) ``` And the other difference is that > > When using InputLayer with the...
To define it in simple words: `keras.layers.Input` is used to instantiate a Keras Tensor. In this case, your data is probably not a tf tensor, maybe an `np` array. On the other hand, `keras.layers.InputLayer` is a layer where your data is already defined as one of the tf tensor types, i.e., can be a ragged tensor or ...
36,338,261
How can I make my Footer width cover the entire width of the browser window? **Note:** I'm using Bootstrap, the Footer uses 'container-fluid' but the page content uses 'container'. **Live link:** <http://185.123.96.102/~kidsdrum/moneynest.co.uk/blog.html> **HTML** ``` <footer class="container-fluid" style="margin-...
2016/03/31
[ "https://Stackoverflow.com/questions/36338261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3872557/" ]
Your `footer` is inside a `.container` which has a `1170px` `width`. So you just need to get it out of here.
If you move your footer outside of, and directly after div.container, it will span the full-width of the browser window.
36,338,261
How can I make my Footer width cover the entire width of the browser window? **Note:** I'm using Bootstrap, the Footer uses 'container-fluid' but the page content uses 'container'. **Live link:** <http://185.123.96.102/~kidsdrum/moneynest.co.uk/blog.html> **HTML** ``` <footer class="container-fluid" style="margin-...
2016/03/31
[ "https://Stackoverflow.com/questions/36338261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3872557/" ]
Is it what you want? ``` <div class="container"> <p>Your content goes here</p> </div> <footer class="footer"> <div class="container"> <p>Your footer content here.</p> </div> </footer> ```
If you move your footer outside of, and directly after div.container, it will span the full-width of the browser window.
36,338,261
How can I make my Footer width cover the entire width of the browser window? **Note:** I'm using Bootstrap, the Footer uses 'container-fluid' but the page content uses 'container'. **Live link:** <http://185.123.96.102/~kidsdrum/moneynest.co.uk/blog.html> **HTML** ``` <footer class="container-fluid" style="margin-...
2016/03/31
[ "https://Stackoverflow.com/questions/36338261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3872557/" ]
Another solution if you don't want to move the footer outside of container, just add this css to your code: ``` footer { position: relative; width: 100vw; left: calc(-50vw + 50%);} ``` This will make footer have 100% of the viewport width, and move the child element 50% of the viewport width – minus 50% of the paren...
If you move your footer outside of, and directly after div.container, it will span the full-width of the browser window.
36,338,261
How can I make my Footer width cover the entire width of the browser window? **Note:** I'm using Bootstrap, the Footer uses 'container-fluid' but the page content uses 'container'. **Live link:** <http://185.123.96.102/~kidsdrum/moneynest.co.uk/blog.html> **HTML** ``` <footer class="container-fluid" style="margin-...
2016/03/31
[ "https://Stackoverflow.com/questions/36338261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3872557/" ]
Your `footer` is inside a `.container` which has a `1170px` `width`. So you just need to get it out of here.
Is it what you want? ``` <div class="container"> <p>Your content goes here</p> </div> <footer class="footer"> <div class="container"> <p>Your footer content here.</p> </div> </footer> ```
36,338,261
How can I make my Footer width cover the entire width of the browser window? **Note:** I'm using Bootstrap, the Footer uses 'container-fluid' but the page content uses 'container'. **Live link:** <http://185.123.96.102/~kidsdrum/moneynest.co.uk/blog.html> **HTML** ``` <footer class="container-fluid" style="margin-...
2016/03/31
[ "https://Stackoverflow.com/questions/36338261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3872557/" ]
Your `footer` is inside a `.container` which has a `1170px` `width`. So you just need to get it out of here.
Another solution if you don't want to move the footer outside of container, just add this css to your code: ``` footer { position: relative; width: 100vw; left: calc(-50vw + 50%);} ``` This will make footer have 100% of the viewport width, and move the child element 50% of the viewport width – minus 50% of the paren...
6,461,492
I've got several tables that I want to merge for one big query. The criteria for the search are based on two tables: `section_types` and `sections`. I want to pull all `section_types` and their associated `sections` where the `sections` match certain criteria, PLUS any `section_types` that are active but don't have any...
2011/06/23
[ "https://Stackoverflow.com/questions/6461492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/323677/" ]
**EDIT** I deleted this, but based on the conversation, I think it accomplishes what you're looking for. **ORIGINAL** Feels like a hack... but I think it works. ``` Declare @tmp TABLE( id int, name varchar(50), active int, type int, issue int, location int ) Insert Into @tmp SELECT * FROM s...
You just have your tables reversed. `LEFT OUTER JOIN` requires the *left* table to have a row for the `ON` condition. Use a `RIGHT OUTER JOIN` or swap the tables.
6,461,492
I've got several tables that I want to merge for one big query. The criteria for the search are based on two tables: `section_types` and `sections`. I want to pull all `section_types` and their associated `sections` where the `sections` match certain criteria, PLUS any `section_types` that are active but don't have any...
2011/06/23
[ "https://Stackoverflow.com/questions/6461492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/323677/" ]
Is this what you need? All section\_types and ALL their related sections where at least one section has issue `'0611'` and location `1`. Plus all the rest section\_types that are active: ``` SELECT * FROM section_types st JOIN sections s ON s.type = st.id WHERE EXISTS ( SELECT ...
You just have your tables reversed. `LEFT OUTER JOIN` requires the *left* table to have a row for the `ON` condition. Use a `RIGHT OUTER JOIN` or swap the tables.
486
Some ideas: * Rename the [install](https://unix.stackexchange.com/questions/tagged/install "show questions tagged 'install'") tag, to something like [installation](https://unix.stackexchange.com/questions/tagged/installation "show questions tagged 'installation'")? * If applicable, get rid of it in favor of [package-m...
2011/03/02
[ "https://unix.meta.stackexchange.com/questions/486", "https://unix.meta.stackexchange.com", "https://unix.meta.stackexchange.com/users/688/" ]
How about replacing it with [system-installation](https://unix.stackexchange.com/questions/tagged/system-installation "show questions tagged 'system-installation'"), to distinguish it from already-existing [software-installation](https://unix.stackexchange.com/questions/tagged/software-installation "show questions tagg...
Given the lack of opposition, I've declared [install](https://unix.stackexchange.com/questions/tagged/install "show questions tagged 'install'") a tag to be removed in the tag wiki. We can wear it off a little at a time. It would be good to ban [install](https://unix.stackexchange.com/questions/tagged/install "show qu...
29,948,131
Questions from an angularjs newbie. This is a two part problem. I have a page which has a drop down (populated using web service), a text box and button 'Go'. Button ng-click causes the value of drop down and text box to hit a web service which returns JSON which I use to display the grid (Id, name). Grid also has de...
2015/04/29
[ "https://Stackoverflow.com/questions/29948131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1700747/" ]
Q1: Check out [this page for an example](https://angular-ui.github.io/bootstrap/#/modal) on how to pass information to a modal dialog. Basically you need to specify the **resolve** property when calling $modal.open. Q2: See the example again. In ControllerA, you can call **modalInstance.result.then(...)** and provide ...
Use an AngularJS **factory** or **service** to use methods across different controllers. You shouldn't be using global variables, you can look into using **$rootScope** to make things available in a broader scope. Documentation here: <https://docs.angularjs.org/guide/services> & <https://docs.angularjs.org/api/ng/serv...
20,832,048
Im trying to use innerhtml and html() but html() does not work on the browser. what could be the reason... when I replace innerHTML to html() in the fiddle, I dont get any result. <http://jsfiddle.net/7RCyX/> html ``` <ul> <li>First</li> <li>Second</li> </ul> ``` jquery: ``` var listitems = $('li') var ...
2013/12/30
[ "https://Stackoverflow.com/questions/20832048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1050619/" ]
`x` is not being set since firstitem is only the `li` element. You need to add `$()`. ``` var listitems = $('li'); var firstitem = listitems[1]; var x = $(firstitem).html(); alert(x); ``` The above code works as intended.
when you `html()` does not work do you mean `firstitem.html()`, it never do that because it s html node not jQuery object to convert it to jQuery try `$(firstitem)` or `$("li:nth-child(2)")`.
20,832,048
Im trying to use innerhtml and html() but html() does not work on the browser. what could be the reason... when I replace innerHTML to html() in the fiddle, I dont get any result. <http://jsfiddle.net/7RCyX/> html ``` <ul> <li>First</li> <li>Second</li> </ul> ``` jquery: ``` var listitems = $('li') var ...
2013/12/30
[ "https://Stackoverflow.com/questions/20832048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1050619/" ]
``` var firstitem = listitems[1] ``` by specifying this it means it will give you back dom element (see image), so you can access properties of object like `li.className` ![enter image description here](https://i.stack.imgur.com/ma0iS.png) you can change it to ``` var firstitem = listitems.eq(1); // or use nth:ch...
when you `html()` does not work do you mean `firstitem.html()`, it never do that because it s html node not jQuery object to convert it to jQuery try `$(firstitem)` or `$("li:nth-child(2)")`.
20,832,048
Im trying to use innerhtml and html() but html() does not work on the browser. what could be the reason... when I replace innerHTML to html() in the fiddle, I dont get any result. <http://jsfiddle.net/7RCyX/> html ``` <ul> <li>First</li> <li>Second</li> </ul> ``` jquery: ``` var listitems = $('li') var ...
2013/12/30
[ "https://Stackoverflow.com/questions/20832048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1050619/" ]
``` var firstitem = listitems[1] ``` by specifying this it means it will give you back dom element (see image), so you can access properties of object like `li.className` ![enter image description here](https://i.stack.imgur.com/ma0iS.png) you can change it to ``` var firstitem = listitems.eq(1); // or use nth:ch...
`x` is not being set since firstitem is only the `li` element. You need to add `$()`. ``` var listitems = $('li'); var firstitem = listitems[1]; var x = $(firstitem).html(); alert(x); ``` The above code works as intended.
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Ok after digging through the [source code](https://github.com/apache/spark) I found how to add my own custom metrics. It requires 3 things: 1. Create my own custom [source](https://github.com/apache/spark/blob/3c0156899dc1ec1f7dfe6d7c8af47fa6dc7d00bf/core/src/main/scala/org/apache/spark/metrics/source/Source.scala). S...
here's an excellent tutorial which covers all the setps you need to setup Spark's MetricsSystem with Graphite. That should do the trick: <http://www.hammerlab.org/2015/02/27/monitoring-spark-with-graphite-and-grafana/>
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Groupon have a library called [`spark-metrics`](https://github.com/groupon/spark-metrics) that lets you use a simple (Codahale-like) API on your executors and have the results collated back in the driver and automatically registered in Spark's existing metrics registry. These then get automatically exported along with ...
here's an excellent tutorial which covers all the setps you need to setup Spark's MetricsSystem with Graphite. That should do the trick: <http://www.hammerlab.org/2015/02/27/monitoring-spark-with-graphite-and-grafana/>
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Ok after digging through the [source code](https://github.com/apache/spark) I found how to add my own custom metrics. It requires 3 things: 1. Create my own custom [source](https://github.com/apache/spark/blob/3c0156899dc1ec1f7dfe6d7c8af47fa6dc7d00bf/core/src/main/scala/org/apache/spark/metrics/source/Source.scala). S...
to insert rows from based on inserts from VoltDB, use accumulators - and then from your driver you can create a listener - maybe something like this to get you started ``` sparkContext.addSparkListener(new SparkListener() { override def onStageCompleted(stageCompleted: SparkListenerStageCompleted) { stageComplet...
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Ok after digging through the [source code](https://github.com/apache/spark) I found how to add my own custom metrics. It requires 3 things: 1. Create my own custom [source](https://github.com/apache/spark/blob/3c0156899dc1ec1f7dfe6d7c8af47fa6dc7d00bf/core/src/main/scala/org/apache/spark/metrics/source/Source.scala). S...
Groupon have a library called [`spark-metrics`](https://github.com/groupon/spark-metrics) that lets you use a simple (Codahale-like) API on your executors and have the results collated back in the driver and automatically registered in Spark's existing metrics registry. These then get automatically exported along with ...
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Ok after digging through the [source code](https://github.com/apache/spark) I found how to add my own custom metrics. It requires 3 things: 1. Create my own custom [source](https://github.com/apache/spark/blob/3c0156899dc1ec1f7dfe6d7c8af47fa6dc7d00bf/core/src/main/scala/org/apache/spark/metrics/source/Source.scala). S...
Below is a working example in Java. It's tested with `StreaminQuery` (Unfortunately `StreaminQuery` does not have ootb metrics like `StreamingContext` till Spark 2.3.1). **Steps:** **Define a custom source in the same package of `Source` class** ``` package org.apache.spark.metrics.source; import com.codahale.me...
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Groupon have a library called [`spark-metrics`](https://github.com/groupon/spark-metrics) that lets you use a simple (Codahale-like) API on your executors and have the results collated back in the driver and automatically registered in Spark's existing metrics registry. These then get automatically exported along with ...
to insert rows from based on inserts from VoltDB, use accumulators - and then from your driver you can create a listener - maybe something like this to get you started ``` sparkContext.addSparkListener(new SparkListener() { override def onStageCompleted(stageCompleted: SparkListenerStageCompleted) { stageComplet...
32,843,832
I'm working on a Spark Streaming program which retrieves a Kafka stream, does very basic transformation on the stream and then inserts the data to a DB (voltdb if it's relevant). I'm trying to measure the rate in which I insert rows to the DB. I think [metrics](http://metrics.dropwizard.io/3.1.0/manual/) can be useful ...
2015/09/29
[ "https://Stackoverflow.com/questions/32843832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3510671/" ]
Groupon have a library called [`spark-metrics`](https://github.com/groupon/spark-metrics) that lets you use a simple (Codahale-like) API on your executors and have the results collated back in the driver and automatically registered in Spark's existing metrics registry. These then get automatically exported along with ...
Below is a working example in Java. It's tested with `StreaminQuery` (Unfortunately `StreaminQuery` does not have ootb metrics like `StreamingContext` till Spark 2.3.1). **Steps:** **Define a custom source in the same package of `Source` class** ``` package org.apache.spark.metrics.source; import com.codahale.me...
30,462,770
Swift enumerations have both associated and raw values. But the use cases of these values is not clear to me. So I would really appreciate if anyone can explain the difference between the associated and raw values, an example would be very helpful.
2015/05/26
[ "https://Stackoverflow.com/questions/30462770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1920977/" ]
Raw values are for when every case in the enumeration is represented by a compile-time-set value. The are akin to constants, i.e. ``` let A = 0 let B = 1 ``` is similar to: ``` enum E: Int { case A // if you don't specify, IntegerLiteralConvertible-based enums start at 0 case B } ``` So, `A` has a fixed ...
**Swift Enum raw vs associated values** [[Swift types]](https://stackoverflow.com/a/59219141/4770877) `Enumerations` or `Enum` allows you to create a finite set of values and enum variable references on a **single** value from the set ![](https://i.stack.imgur.com/9NnR3.png) In Swift, an enum cannot have both **raw ...
30,462,770
Swift enumerations have both associated and raw values. But the use cases of these values is not clear to me. So I would really appreciate if anyone can explain the difference between the associated and raw values, an example would be very helpful.
2015/05/26
[ "https://Stackoverflow.com/questions/30462770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1920977/" ]
Raw values are for when every case in the enumeration is represented by a compile-time-set value. The are akin to constants, i.e. ``` let A = 0 let B = 1 ``` is similar to: ``` enum E: Int { case A // if you don't specify, IntegerLiteralConvertible-based enums start at 0 case B } ``` So, `A` has a fixed ...
Answers by @Airspeed Velocity and @yoAlex5 explain the difference well, but they state that > > enums can have **either** associated **either** raw values. > > > This is not so for Swift 4 and 5. [Here](https://stackoverflow.com/a/45954779) is a good illustration on for having them both in one enum. You'll need d...
30,462,770
Swift enumerations have both associated and raw values. But the use cases of these values is not clear to me. So I would really appreciate if anyone can explain the difference between the associated and raw values, an example would be very helpful.
2015/05/26
[ "https://Stackoverflow.com/questions/30462770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1920977/" ]
**Swift Enum raw vs associated values** [[Swift types]](https://stackoverflow.com/a/59219141/4770877) `Enumerations` or `Enum` allows you to create a finite set of values and enum variable references on a **single** value from the set ![](https://i.stack.imgur.com/9NnR3.png) In Swift, an enum cannot have both **raw ...
Answers by @Airspeed Velocity and @yoAlex5 explain the difference well, but they state that > > enums can have **either** associated **either** raw values. > > > This is not so for Swift 4 and 5. [Here](https://stackoverflow.com/a/45954779) is a good illustration on for having them both in one enum. You'll need d...
241,552
Hey, I'm trying to learn how to program so I've installed the latest version of Python and I've been following the Byte of Python tutorial. I'm using Textwrangler I've only gotten as far as the simple "Hello World" intro and I'm already having a problem. I type out the code: ``` #!/usr/bin/python #Filename: helloworl...
2011/02/04
[ "https://superuser.com/questions/241552", "https://superuser.com", "https://superuser.com/users/66027/" ]
You need to be in the same directory in the terminal that you saved the file in or you need to specify the full directory on the command line: ``` cd /path/to/directory python3 helloworld.py ``` or ``` python3 /path/to/directory/helloworld.py ``` What directory did you save the file to?
just save your .py file to a folder on your desktop and then you should be able to right click it and at the bottom of the options that come up just press new terminal at folder. I had the same problem as you and this worked for me.
3,521,684
I need to create an extension method to array class, but this extension method must be able to accept many data types, so it also must be generic. In the code bellow the extension method just accept byte data type. I want it to also accept ushort and uint for instance. I believe that the best way to do that is creatin...
2010/08/19
[ "https://Stackoverflow.com/questions/3521684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/321614/" ]
Generics in extension methods aren't really anything special, they behave just like in normal methods. ``` public static int GetLastIndex<T>(this T[] buffer) { return buffer.GetUpperBound(0); } ``` As per your comment, you could do something like the following to effectively restrict the type of `T` (adding guar...
``` public static class MyExtensions { public static int GetLastIndex<T>(this T[] buffer) { return buffer.GetUpperBound(0); } } ```
3,521,684
I need to create an extension method to array class, but this extension method must be able to accept many data types, so it also must be generic. In the code bellow the extension method just accept byte data type. I want it to also accept ushort and uint for instance. I believe that the best way to do that is creatin...
2010/08/19
[ "https://Stackoverflow.com/questions/3521684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/321614/" ]
Generics in extension methods aren't really anything special, they behave just like in normal methods. ``` public static int GetLastIndex<T>(this T[] buffer) { return buffer.GetUpperBound(0); } ``` As per your comment, you could do something like the following to effectively restrict the type of `T` (adding guar...
Same way you do generics in normal (non-extension) methods: Use a placeholder type name introduced in the generic syntax: ``` public static int GetLastIndex<TElement>(this TElement[] buffer) ```
3,521,684
I need to create an extension method to array class, but this extension method must be able to accept many data types, so it also must be generic. In the code bellow the extension method just accept byte data type. I want it to also accept ushort and uint for instance. I believe that the best way to do that is creatin...
2010/08/19
[ "https://Stackoverflow.com/questions/3521684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/321614/" ]
Generics in extension methods aren't really anything special, they behave just like in normal methods. ``` public static int GetLastIndex<T>(this T[] buffer) { return buffer.GetUpperBound(0); } ``` As per your comment, you could do something like the following to effectively restrict the type of `T` (adding guar...
@RHaguiuda You can make constraint like ``` public static class MyExtensions{ public static int GetLastIndex<T>(this T[] buffer) where T: Integer { return buffer.GetUpperBound(0); }} ``` But, type used as a constraint must be an interface, a non-sealed class or a type parameter
3,521,684
I need to create an extension method to array class, but this extension method must be able to accept many data types, so it also must be generic. In the code bellow the extension method just accept byte data type. I want it to also accept ushort and uint for instance. I believe that the best way to do that is creatin...
2010/08/19
[ "https://Stackoverflow.com/questions/3521684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/321614/" ]
``` public static class MyExtensions { public static int GetLastIndex<T>(this T[] buffer) { return buffer.GetUpperBound(0); } } ```
Same way you do generics in normal (non-extension) methods: Use a placeholder type name introduced in the generic syntax: ``` public static int GetLastIndex<TElement>(this TElement[] buffer) ```
3,521,684
I need to create an extension method to array class, but this extension method must be able to accept many data types, so it also must be generic. In the code bellow the extension method just accept byte data type. I want it to also accept ushort and uint for instance. I believe that the best way to do that is creatin...
2010/08/19
[ "https://Stackoverflow.com/questions/3521684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/321614/" ]
``` public static class MyExtensions { public static int GetLastIndex<T>(this T[] buffer) { return buffer.GetUpperBound(0); } } ```
@RHaguiuda You can make constraint like ``` public static class MyExtensions{ public static int GetLastIndex<T>(this T[] buffer) where T: Integer { return buffer.GetUpperBound(0); }} ``` But, type used as a constraint must be an interface, a non-sealed class or a type parameter
3,521,684
I need to create an extension method to array class, but this extension method must be able to accept many data types, so it also must be generic. In the code bellow the extension method just accept byte data type. I want it to also accept ushort and uint for instance. I believe that the best way to do that is creatin...
2010/08/19
[ "https://Stackoverflow.com/questions/3521684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/321614/" ]
Same way you do generics in normal (non-extension) methods: Use a placeholder type name introduced in the generic syntax: ``` public static int GetLastIndex<TElement>(this TElement[] buffer) ```
@RHaguiuda You can make constraint like ``` public static class MyExtensions{ public static int GetLastIndex<T>(this T[] buffer) where T: Integer { return buffer.GetUpperBound(0); }} ``` But, type used as a constraint must be an interface, a non-sealed class or a type parameter
2,236,195
I'm having trouble as to seeing what this problem is asking. Am I supposed to create an algorithm that'll find $R^n$ for set R? If I'm just supposed to find $R^n$ for $R$, why does $n$ continue off into infinity? **Definition:** Let $R$ be a relation on the set $A$. The powers $^$, $ = 1, 2, 3, \dots$ are defined rec...
2017/04/16
[ "https://math.stackexchange.com/questions/2236195", "https://math.stackexchange.com", "https://math.stackexchange.com/users/436188/" ]
Compute $R^2$ first. You have $1\to1,$ $2\to 1,$ $3\to 2$ and $4\to 3,$ so composing this with itself, $R^2 = \{(1,1),(2,1),(3,1),(4,2)\}.$ Now do it again, You see how this is going to go?
I think you are asking ``How am I supposed to solve an infinite number of problems?'' Without solving it for you, note that there are a finite number of relations over a finite set, so at some point $R^n$ must repeat itself with a fixed period (maybe even becoming a constant). Have you tried to solve it for some small...
691,729
I've always known that $\emptyset$ is called an *empty set* or *null*, until recently, when I heard someone calling it *zed*. I looked it everywhere but couldn't find this naming. Is "*zed*" a valid name for the $\emptyset$ symbol?
2014/02/26
[ "https://math.stackexchange.com/questions/691729", "https://math.stackexchange.com", "https://math.stackexchange.com/users/23749/" ]
If we set $$ f(z)=\mathrm{e}^{z}-1, $$ then $$ \frac{f'(z)}{f(z)}=\frac{\mathrm{e}^{z}}{\mathrm{e}^{z}-1}, $$ and $$ \int\_\Gamma\frac{3\mathrm{e}^{z}\,dz}{1-\mathrm{e}^{z}}=-3\int\_{|z|=4\pi/3}\frac{f'(z)\,dz}{f(z)} $$ But $\frac{1}{2\pi i}\int\_{|z|=4\pi/3}\frac{f'(z)\,dz}{f(z)}$ is the number of roots of $f(z)=\math...
You have to compute the residue at each $ z \in \mathbb{C} : e^z=1 $. Then take the points which are in the compact component of the complement of $\Gamma$, and sum the residue with the good sign (depends of the orientation of $\Gamma$).
10,532,448
I would like to know what happens "under the hood" with regards to C++ multithreading on Unix (specifically Linux)- particularly the involvement of the OS and semaphores etc. I have performed an initial google search but it is not throwing up. Could somebody please either describe or point me to a good resource that ...
2012/05/10
[ "https://Stackoverflow.com/questions/10532448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1107474/" ]
It depends on what threading library you're using. In C++11, when you use `#include <thread>` the standard C++ library for your platform can choose to use OS-specific features. In the case of Linux this usually is accessed through pthreads, or in other cases direct calls to `clone(...)` with the appropriate flags and ...
Try running your program with the help of "strace". This will list all system calls made to the operating system.
32,444,728
Hello today I started to work on a project in c# that need to get all files from zip file but the pint was that I need to make it on my own . I can't use other lit or something any idea how to start or even to build something that will work ..... Thanks. Sorry that I don't provide a code but I don't have any .
2015/09/07
[ "https://Stackoverflow.com/questions/32444728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5310203/" ]
.NET Framework has ZipFile class for that. <https://msdn.microsoft.com/en-us/library/system.io.compression.zipfile.openread%28v=vs.110%29.aspx> ``` using System; using System.IO; using System.IO.Compression; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { ...
As it sounds like you can use the classes provided in the .Net Framework, the MSDN documentation will be a good place to look - [ZipFile Class](https://msdn.microsoft.com/en-us/library/system.io.compression.zipfile%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396) This code will extract the files from a given zip file: ...
32,444,728
Hello today I started to work on a project in c# that need to get all files from zip file but the pint was that I need to make it on my own . I can't use other lit or something any idea how to start or even to build something that will work ..... Thanks. Sorry that I don't provide a code but I don't have any .
2015/09/07
[ "https://Stackoverflow.com/questions/32444728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5310203/" ]
.NET Framework has ZipFile class for that. <https://msdn.microsoft.com/en-us/library/system.io.compression.zipfile.openread%28v=vs.110%29.aspx> ``` using System; using System.IO; using System.IO.Compression; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { ...
If you'd like to do your own unzipping, then you have to understand the .zip file format and all of the technologies that go into file compression and packaging. This is a good place to start: <https://en.wikipedia.org/wiki/Zip_%28file_format%29> Good luck! Zipping and unzipping is not simple!
225,446
We have to train the client professionals on the source code for an application we developed. What shall I include in their training plan for source code? Any help would be really appreciated. regards
2008/10/22
[ "https://Stackoverflow.com/questions/225446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This may help: [What are the core elements to include in Support Documentation?](https://stackoverflow.com/questions/205374/what-are-the-core-elements-to-include-in-support-documentation)
You could highlight the important design decisions. So they understand why you have chosen which solution.
225,446
We have to train the client professionals on the source code for an application we developed. What shall I include in their training plan for source code? Any help would be really appreciated. regards
2008/10/22
[ "https://Stackoverflow.com/questions/225446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
1.) If possible show them various changes/revisions the code has gone through, then that will help them to understand the code design at some higher level. (That function needs to be modified for what feature?) 2.) Extract some function Call-Graph/Function-flow diagram using some tool and let them get familiar with th...
You could highlight the important design decisions. So they understand why you have chosen which solution.
28,654,003
I have a simple dataframe in pandas that has two numeric columns. I want to make a histogram out of the columns using matplotlib through pandas. The example below does not work: ``` In [6]: pandas.__version__ Out[6]: '0.14.1' In [7]: df Out[7]: a b 0 1 20 1 2 40 2 3 30 3 4 30 4 4 3 5 3 5 In [8]: ...
2015/02/22
[ "https://Stackoverflow.com/questions/28654003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4572586/" ]
`DataFrame` has its own `hist` method: ``` df =pd.DataFrame({'col1':np.random.randn(100),'col2':np.random.randn(100)}) df.hist(layout=(1,2)) ``` draws a histogram for each valid column of the `dataframe`. ![enter image description here](https://i.stack.imgur.com/jXOkn.png)
I don't believe 'hist' was a supported type in 0.14.1. Try df.hist() instead
1,118,958
i created a Ext.TreePanel and i would have in the node an image, in the text of the node i have the url to the image but i can't load it in the page, i see only the text, there is the possibility to view the image? this is my code ``` var root1 = new Tree.AsyncTreeNode({ text: 'Legenda degli starti PAT', drag...
2009/07/13
[ "https://Stackoverflow.com/questions/1118958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You need to include an "iconCls" attribute for node in your JSON that references a CSS class defining the image you want to show up for that particular node. Per the API docs on extjs.com: // specify the property in the config for the class: ... iconCls: 'my-icon' // css class that specifies background image to be...
Well, it's not clear what your issue is -- do you see image placeholders? If so, you may need to double-check that [Ext.BLANK\_IMAGE\_URL](http://extjs.com/deploy/dev/docs/?class=Ext&member=BLANK_IMAGE_URL) is set correctly. If you are trying to load custom images, inspect the rendered tree nodes in Firebug -- are your...
1,118,958
i created a Ext.TreePanel and i would have in the node an image, in the text of the node i have the url to the image but i can't load it in the page, i see only the text, there is the possibility to view the image? this is my code ``` var root1 = new Tree.AsyncTreeNode({ text: 'Legenda degli starti PAT', drag...
2009/07/13
[ "https://Stackoverflow.com/questions/1118958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You need to include an "iconCls" attribute for node in your JSON that references a CSS class defining the image you want to show up for that particular node. Per the API docs on extjs.com: // specify the property in the config for the class: ... iconCls: 'my-icon' // css class that specifies background image to be...
Ensure your Ext.BLANK\_IMAGE\_URL is properly pointing at the s.gif
236,488
I used Address Book on Mac and I really liked the software. It's simple, easy and it has all the things I needed in an address book. Now, I recently switched to Windows 7 and I am looking for a software which works like Address Book. Light weight with Speed. Even, a Website or a Cloud App which syncs contacts from my s...
2011/01/22
[ "https://superuser.com/questions/236488", "https://superuser.com", "https://superuser.com/users/52143/" ]
Since Vista [contacts are built-in](http://windows.microsoft.com/en-US/windows-vista/Managing-your-contacts), if you have MS Office you might also want to consider MS Outlook. Another alternative is [Free Address Book](http://addressbook.gassoftwares.com/). > > Free Address Book is an address book wherewith you can ...
[Google Contacts](https://www.google.com/contacts/). Plus Android and addressbook nirvana arrives regardless of computing platform.
236,488
I used Address Book on Mac and I really liked the software. It's simple, easy and it has all the things I needed in an address book. Now, I recently switched to Windows 7 and I am looking for a software which works like Address Book. Light weight with Speed. Even, a Website or a Cloud App which syncs contacts from my s...
2011/01/22
[ "https://superuser.com/questions/236488", "https://superuser.com", "https://superuser.com/users/52143/" ]
Since Vista [contacts are built-in](http://windows.microsoft.com/en-US/windows-vista/Managing-your-contacts), if you have MS Office you might also want to consider MS Outlook. Another alternative is [Free Address Book](http://addressbook.gassoftwares.com/). > > Free Address Book is an address book wherewith you can ...
What do you use for email? Thunderbird and the Contacts extension work for me. And I access my contacts on my phone as well with Google.
62,174,656
I got the specific problem from [here](https://www.mathworks.com/help/stats/hidden-markov-models-hmm.html) and wanted to implement it on Cplint as Im learning now the principles of ProbLog [![using the above HMM as an example](https://i.stack.imgur.com/N0ung.png)](https://i.stack.imgur.com/N0ung.png) So from the abov...
2020/06/03
[ "https://Stackoverflow.com/questions/62174656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12619262/" ]
Not sure if this is still useful but in ProbLog you could have tried something like this: ``` %% Probabilities 1/6::red_die(1,T) ; 1/6::red_die(2,T) ; 1/6::red_die(3,T) ; 1/6::red_die(4,T) ; 1/6::red_die(5,T) ; 1/6::red_die(6,T). 7/12::green_die(1,T) ; 1/12::green_die(2,T) ; 1/12::green_die(3,T) ; 1/12::green_die(4,...
hmmpos.pl from [here](http://cplint.ml.unife.it/example/inference/inference_examples.swinb) seems to be usefull enough to continue
58,572,085
We have gRPC stream to share data between two micro services, an API and a Worker (both created in Golang). The intention is to listener about the status of jobs being processed by Worker service pods. So, the communication is one-directional (Worker sends updates to Api). The figure below shows it. [![enter image desc...
2019/10/26
[ "https://Stackoverflow.com/questions/58572085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2463840/" ]
I have got a simple method to resolve that: ``` struct ContentView : View { @State var isPresented = false var body: some View { NavigationView { HStack{ NavigationLink(destination: MyDetailView(message: "Detail Page #2") ,isActive: $isPresented) { ...
You can handle methods from lifecycle using: ``` .onAppear { print("ContentView appeared!") } ``` And: ``` .onDisappear { print("ContentView disappeared!") } ``` check this tutorial: <https://www.hackingwithswift.com/quick-start/swiftui/how-to-respond-to-view-lifecycle-events-onappea...
38,870
I wrote this function to find the index of the first substring. I was wondering if you can help me find some flaws or possibly help increase performance? Example: > > str = "happy" substr = "app" > > > index = 1 > > > My code: ``` public static int subStringIndex(String str, String substr) { int substrlen...
2014/01/09
[ "https://codereview.stackexchange.com/questions/38870", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/32250/" ]
Just checking that you intend to be [reinventing-the-wheel](/questions/tagged/reinventing-the-wheel "show questions tagged 'reinventing-the-wheel'"), you can do: ``` System.out.println("happy".indexOf("app")); ``` You did know that, right? Or, if you want to reformat the 'signature' to match yours, it is: ``` publ...
Actually there is a bug. Consider `str="aaS"` and `substr="aS"`. At first iteration `a` and `a` are equal. At second iteration `a` and `S` are not equal, and it will skip it, however `substr`'s first character is equal to it. So it should be: ``` public static int subStringIndex(String str, String substr) { int s...
38,870
I wrote this function to find the index of the first substring. I was wondering if you can help me find some flaws or possibly help increase performance? Example: > > str = "happy" substr = "app" > > > index = 1 > > > My code: ``` public static int subStringIndex(String str, String substr) { int substrlen...
2014/01/09
[ "https://codereview.stackexchange.com/questions/38870", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/32250/" ]
Just checking that you intend to be [reinventing-the-wheel](/questions/tagged/reinventing-the-wheel "show questions tagged 'reinventing-the-wheel'"), you can do: ``` System.out.println("happy".indexOf("app")); ``` You did know that, right? Or, if you want to reformat the 'signature' to match yours, it is: ``` publ...
Here is another version: ``` public static int indexOf(String original, String find) { if (find.length() < 1) return -1; boolean flag = false; for (int i = 0, k = 0; i < original.length(); i++) { if (original.charAt(i) == find.charAt(k)) { k++; flag = true; ...
38,870
I wrote this function to find the index of the first substring. I was wondering if you can help me find some flaws or possibly help increase performance? Example: > > str = "happy" substr = "app" > > > index = 1 > > > My code: ``` public static int subStringIndex(String str, String substr) { int substrlen...
2014/01/09
[ "https://codereview.stackexchange.com/questions/38870", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/32250/" ]
Just checking that you intend to be [reinventing-the-wheel](/questions/tagged/reinventing-the-wheel "show questions tagged 'reinventing-the-wheel'"), you can do: ``` System.out.println("happy".indexOf("app")); ``` You did know that, right? Or, if you want to reformat the 'signature' to match yours, it is: ``` publ...
My re-writing: clear and clean, yet efficient. There is no innovation in the algorithm. Just the way of the coding in more structural re-arrangement, trying to make the thought and steps easy to read and understand (comments are welcome): ``` static int subStringIndex( String str, String substring) { if (substring...
38,870
I wrote this function to find the index of the first substring. I was wondering if you can help me find some flaws or possibly help increase performance? Example: > > str = "happy" substr = "app" > > > index = 1 > > > My code: ``` public static int subStringIndex(String str, String substr) { int substrlen...
2014/01/09
[ "https://codereview.stackexchange.com/questions/38870", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/32250/" ]
You can get away without the `index` variable as you're reassigning it at each step of your loop anyway. ``` public static int subStringIndex(String str, String substr) { int substrlen = substr.length(); int strlen = str.length(); int j = 0; if (substrlen >= 1) { for (int i = 0; i < strlen; i+...
Actually there is a bug. Consider `str="aaS"` and `substr="aS"`. At first iteration `a` and `a` are equal. At second iteration `a` and `S` are not equal, and it will skip it, however `substr`'s first character is equal to it. So it should be: ``` public static int subStringIndex(String str, String substr) { int s...
38,870
I wrote this function to find the index of the first substring. I was wondering if you can help me find some flaws or possibly help increase performance? Example: > > str = "happy" substr = "app" > > > index = 1 > > > My code: ``` public static int subStringIndex(String str, String substr) { int substrlen...
2014/01/09
[ "https://codereview.stackexchange.com/questions/38870", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/32250/" ]
You can get away without the `index` variable as you're reassigning it at each step of your loop anyway. ``` public static int subStringIndex(String str, String substr) { int substrlen = substr.length(); int strlen = str.length(); int j = 0; if (substrlen >= 1) { for (int i = 0; i < strlen; i+...
Here is another version: ``` public static int indexOf(String original, String find) { if (find.length() < 1) return -1; boolean flag = false; for (int i = 0, k = 0; i < original.length(); i++) { if (original.charAt(i) == find.charAt(k)) { k++; flag = true; ...
38,870
I wrote this function to find the index of the first substring. I was wondering if you can help me find some flaws or possibly help increase performance? Example: > > str = "happy" substr = "app" > > > index = 1 > > > My code: ``` public static int subStringIndex(String str, String substr) { int substrlen...
2014/01/09
[ "https://codereview.stackexchange.com/questions/38870", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/32250/" ]
You can get away without the `index` variable as you're reassigning it at each step of your loop anyway. ``` public static int subStringIndex(String str, String substr) { int substrlen = substr.length(); int strlen = str.length(); int j = 0; if (substrlen >= 1) { for (int i = 0; i < strlen; i+...
My re-writing: clear and clean, yet efficient. There is no innovation in the algorithm. Just the way of the coding in more structural re-arrangement, trying to make the thought and steps easy to read and understand (comments are welcome): ``` static int subStringIndex( String str, String substring) { if (substring...