qid
int64
1
74.6M
question
stringlengths
45
24.2k
date
stringlengths
10
10
metadata
stringlengths
101
178
response_j
stringlengths
32
23.2k
response_k
stringlengths
21
13.2k
21,020,187
From [this Spring documentation](http://docs.spring.io/spring/docs/3.2.6.RELEASE/spring-framework-reference/htmlsingle/#beans-factory-autowire) I know that when I use @Bean, the default is already equivalent to: @Bean(autowire = Autowire.NO) > > (Default) No autowiring. Bean references must be defined via a ref elem...
2014/01/09
['https://Stackoverflow.com/questions/21020187', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1538856/']
Setting `Autowire.NO` does not mean that the bean cannot be injected in other beans via `@Autowire`. `@Autowire` works by default by type, and can also work by name using `@Qualifier`. So if your bean has the right type or name, it will get inject in other beans, that's normal. `Autowire.NO` means something like: > ...
The `autowire` element of the `@Bean` annotation (as well as the `autowire` attribute of the `bean` element in xml-based config) determines the autowiring status of the **bean's own properties** and has no relation to how a bean which is marked with the `@Bean` annotation will be injected into other beans. On the oth...
21,020,187
From [this Spring documentation](http://docs.spring.io/spring/docs/3.2.6.RELEASE/spring-framework-reference/htmlsingle/#beans-factory-autowire) I know that when I use @Bean, the default is already equivalent to: @Bean(autowire = Autowire.NO) > > (Default) No autowiring. Bean references must be defined via a ref elem...
2014/01/09
['https://Stackoverflow.com/questions/21020187', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1538856/']
The `autowire` element of the `@Bean` annotation (as well as the `autowire` attribute of the `bean` element in xml-based config) determines the autowiring status of the **bean's own properties** and has no relation to how a bean which is marked with the `@Bean` annotation will be injected into other beans. On the oth...
`no` The traditional Spring default. No automagical wiring. Bean references must be defined in the XML file via the `<ref/>` element (or `ref` attribute). We recommend this in most cases as it makes documentation more explicit. Note that this default mode also allows for annotation-driven autowiring, if activated. ...
21,020,187
From [this Spring documentation](http://docs.spring.io/spring/docs/3.2.6.RELEASE/spring-framework-reference/htmlsingle/#beans-factory-autowire) I know that when I use @Bean, the default is already equivalent to: @Bean(autowire = Autowire.NO) > > (Default) No autowiring. Bean references must be defined via a ref elem...
2014/01/09
['https://Stackoverflow.com/questions/21020187', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1538856/']
Setting `Autowire.NO` does not mean that the bean cannot be injected in other beans via `@Autowire`. `@Autowire` works by default by type, and can also work by name using `@Qualifier`. So if your bean has the right type or name, it will get inject in other beans, that's normal. `Autowire.NO` means something like: > ...
`no` The traditional Spring default. No automagical wiring. Bean references must be defined in the XML file via the `<ref/>` element (or `ref` attribute). We recommend this in most cases as it makes documentation more explicit. Note that this default mode also allows for annotation-driven autowiring, if activated. ...
54,141,802
i am using a viewbag to show a drop down in view .. now when my post method is complete it returns back to view which then throws exception for dropdown because my view bag has nothing after that . ``` [HttpGet] public ActionResult Add(string id) { List<req> objlist = new List<req>(); objlist = Getlist(Id); ...
2019/01/11
['https://Stackoverflow.com/questions/54141802', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10250043/']
Here is an example combining transform and some gradient: ```css .CD { width: 200px; height: 200px; margin: auto; background: linear-gradient(to bottom, #000 0, #000 calc(50% - 20px), transparent calc(50% - 20px), transparent calc(50% + 20px), #000 calc(50% + 20px)) center/3px 100%, linea...
You could create a vectorized image in Illustrator and then transform it to SVG code for HTML. Examples with SVG: <https://www.w3schools.com/graphics/svg_examples.asp> A practical guide here: <https://svgontheweb.com/> Inspiration: <https://www.awwwards.com/websites/svg/>
102,032
Next month I am traveling to country **X**, where I would need **Y** minutes of calls, **Z** text messages and most importantly **Q** megabytes of data. How can I find the cheapest/most reliable SIM card for my needs?
2017/09/13
['https://travel.stackexchange.com/questions/102032', 'https://travel.stackexchange.com', 'https://travel.stackexchange.com/users/9009/']
Your best bet is to check the massively useful website called "[Prepaid Data SIM Card Wiki](https://prepaid-data-sim-card.fandom.com/wiki/Prepaid_SIM_with_data)". They have an article on pretty much every country in the world and it's kept relatively up to date thanks to their volunteer editors. There is also a new we...
For your usecase I would consider getting a phone which supports eSIM. This will at least in some countries ([see list](https://support.apple.com/en-us/HT209096) on Apple's website) put your in a position to sign up with a GSM operator purely over the Internet (which also means: prior to arrival) and have your plan act...
29,227,143
I have a simple WPF MVVM application that consist of a `MainWindow` and two UserControl (`Login`, `Register`) and Database Table `Users`. I want to bind the user control to main window like, if in my sql table data already exist then `Login` user control will be displayed else `Register` user control.
2015/03/24
['https://Stackoverflow.com/questions/29227143', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4701699/']
If you look at my answer to the [WPF MVVM navigate views](https://stackoverflow.com/questions/19654295/wpf-mvvm-navigate-views/19654812#19654812) question, you'll find a way to display different views in a single place. The answer to your question is for you to implement a similar setup in which you can display either ...
I got my answer as Write the below method in **App.xaml.cs** and delete **StartupUri=""** from **App.xaml** ``` protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var con = new SqlConnection { ConnectionString = "Data Source=localhost;Initial Catalog...
193,306
I'm a chrome user and an enthusiast but few days ago I made Ubuntu get some updates using `Update Manager`, then I turned off my notebook and when I restarted it, I tried to start Chrome which after a few seconds turned the screen completely black, and some errors appeared for few seconds and then I got logged off, and...
2012/09/26
['https://askubuntu.com/questions/193306', 'https://askubuntu.com', 'https://askubuntu.com/users/92902/']
If your bookmarks are the only thing you are worried about, you can recover them from the terminal by running `cp ~/.config/google-chrome/Default/Bookmarks* ~/.` This will copy your Chrome bookmarks to your home folder directory. You should sync Chrome through Google, it is one of the major selling points of chrome....
Same thing happened to me, and I found the following user who was able to resolve the issue: <http://productforums.google.com/forum/#!msg/chrome/xcKqyLSij5A/OGSpv2FaLZoJ> Could it be that in your case, as in mine and the above user's, you tried updating your NVIDIA drivers and something went wrong? If so a reinstall o...
13,672,727
I am writing a webapp that utilizes localstorage. I have it setup now to save to the local storage with the following format: Key: Four digit number Value: My data I need to take all the separate data from the localStorage, and output it to a single file with the following format: XXXX <- Four digit key Data -...
2012/12/02
['https://Stackoverflow.com/questions/13672727', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1341539/']
``` var output = ""; for(var key in localStorage) { output += key+"\n"; output += localStorage[key]+"\n"; output += "\n"; } // output contains combined string ``` As for the email part you could try using a `mailto:` like this, ``` <a href='mailto:user@domain?subject=[subject here]&body=[email body her...
It is possible to integrate directly mail adress in the code, before mailto: ``` anchor.href = "mailto:*youradress@ttt.com*"+recipient+"? subject=Local+Storage+Data&body="+encodeURIComponent(output); ```
3,956,004
I would like to deactivate the right click in my app that offers the option to install the app on the desktop. How do I do such thing?
2010/10/18
['https://Stackoverflow.com/questions/3956004', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/375814/']
Right click on the project in Visual Studio and select properties. There is a check-box "enable running out of browser" option there.
Here's a hackish way to do it for older versions of SilverLight from [a silverlight forum](http://forums.silverlight.net/forums/p/37820/350972.aspx): ``` <div id="silverlightObjDiv"> <!-- silverlight object here --> </div> <script> document.getElementById('silverlightObjDiv').oncontextmenu = disableRightClick; fun...
4,249,795
I've been working with Java for a long time but never have come across something like this. I would like to know what it does and why it is not an error. ``` public class Foo{ private int someVariable; { doSomething(); } public Foo(){ } private void doSomething(){ // Something is done here } } ```...
2010/11/22
['https://Stackoverflow.com/questions/4249795', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/297376/']
It's a (non-static) initializer block. It is documented in the official tutorial [here](http://download.oracle.com/javase/tutorial/java/javaOO/initial.html): > > **Initializing Instance Members** > > > Normally, you would put code to initialize an instance variable in a constructor. There are two alternatives to us...
That's an initializer block, which is copied into all constructors for the class.
59,512,508
I had been trying to do it like when I add a new line to a normal statement but it doesn't work if I do it like that. ``` cars = ["audi", "bmw", "toyota"] print(\ncars) ``` It shows this error: ``` SyntaxError: unexpected character after line continuation character ``` How does one add a new line to a printed lis...
2019/12/28
['https://Stackoverflow.com/questions/59512508', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11820914/']
try this: ``` print("\n",cars) ``` write backslash n, instead of slash n
Try ``` print("\n"+cars) ``` That's the correct way to do it. You need to write backslash n, not forward slash n
59,512,508
I had been trying to do it like when I add a new line to a normal statement but it doesn't work if I do it like that. ``` cars = ["audi", "bmw", "toyota"] print(\ncars) ``` It shows this error: ``` SyntaxError: unexpected character after line continuation character ``` How does one add a new line to a printed lis...
2019/12/28
['https://Stackoverflow.com/questions/59512508', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11820914/']
`print("\n".join(cars))` This was answered already here: [Printing list elements on separated lines in Python](https://stackoverflow.com/questions/6167731/printing-list-elements-on-separated-lines-in-python)
Try ``` print("\n"+cars) ``` That's the correct way to do it. You need to write backslash n, not forward slash n
59,512,508
I had been trying to do it like when I add a new line to a normal statement but it doesn't work if I do it like that. ``` cars = ["audi", "bmw", "toyota"] print(\ncars) ``` It shows this error: ``` SyntaxError: unexpected character after line continuation character ``` How does one add a new line to a printed lis...
2019/12/28
['https://Stackoverflow.com/questions/59512508', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11820914/']
try this: ``` print("\n",cars) ``` write backslash n, instead of slash n
`print("\n".join(cars))` This was answered already here: [Printing list elements on separated lines in Python](https://stackoverflow.com/questions/6167731/printing-list-elements-on-separated-lines-in-python)
25,071,854
I've been stuck on this problem for quite some time to the point that I've moved on and finished experimenting with coding other quiz styles ala-Buzzfeed. Now, the logic goes, "Once a radio button in all of the radio button sets are clicked, show the div" I've "somewhat" solved this problem by cheating my way to it, a...
2014/08/01
['https://Stackoverflow.com/questions/25071854', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3804291/']
``` $("input[name^=qa]").on('change', function() { if(!$("input[name^=qa]:not(:checked)").length) { //all input box that name begin with "qa" checked $('div#id').show(); } else { // do some stuff here while it's not all checked. } }); ```
I solved it by enclosing your `.click()` inside a function `giveResults()` that will be called from a `.click()` event on the `.a-choice` once every input is `:checked` ;) [Fixed JsFiddle](http://jsfiddle.net/m4Jcb/1/)
35,005,158
What is the difference between the `@ComponentScan` and `@EnableAutoConfiguration` annotations in Spring Boot? Is it necessary to add these? My application works very well without these annotations. I just want to understand why we have to add them.
2016/01/26
['https://Stackoverflow.com/questions/35005158', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5258516/']
> > What is the difference between the @ComponentScan and > @EnableAutoConfiguration annotations in Spring Boot? > > > [`@EnableAutoConfiguration`](http://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html) annotation tells Spring Boot to "guess" how yo...
One of the main advantages of Spring Boot is its annotation driven versus traditional xml based configurations, **@EnableAutoConfiguration** automatically configures the Spring application based on its included jar files, it sets up defaults or helper based on dependencies in pom.xml. Auto-configuration is usually appl...
35,005,158
What is the difference between the `@ComponentScan` and `@EnableAutoConfiguration` annotations in Spring Boot? Is it necessary to add these? My application works very well without these annotations. I just want to understand why we have to add them.
2016/01/26
['https://Stackoverflow.com/questions/35005158', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5258516/']
> > What is the difference between the @ComponentScan and > @EnableAutoConfiguration annotations in Spring Boot? > > > [`@EnableAutoConfiguration`](http://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html) annotation tells Spring Boot to "guess" how yo...
**`@EnableAutoConfiguration`** in spring boot tells how you want to configure spring, based on the jars that you have added in your classpath. For example, if you add `spring-boot-starter-web` dependency in your classpath, it automatically configures Tomcat and Spring MVC. ``` <dependency> <groupId>org.springframe...
35,005,158
What is the difference between the `@ComponentScan` and `@EnableAutoConfiguration` annotations in Spring Boot? Is it necessary to add these? My application works very well without these annotations. I just want to understand why we have to add them.
2016/01/26
['https://Stackoverflow.com/questions/35005158', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5258516/']
One of the main advantages of Spring Boot is its annotation driven versus traditional xml based configurations, **@EnableAutoConfiguration** automatically configures the Spring application based on its included jar files, it sets up defaults or helper based on dependencies in pom.xml. Auto-configuration is usually appl...
**`@EnableAutoConfiguration`** in spring boot tells how you want to configure spring, based on the jars that you have added in your classpath. For example, if you add `spring-boot-starter-web` dependency in your classpath, it automatically configures Tomcat and Spring MVC. ``` <dependency> <groupId>org.springframe...
26,691,252
I've been trying to recreate a list like the one below (the checkbox and the x are just png images) but I can't seem to figure it out. ![example site](https://i.stack.imgur.com/qVVHR.png) I have tried using two texted cols but I can't for the life of me figure out how to get the alignment and the text breaks correct....
2014/11/01
['https://Stackoverflow.com/questions/26691252', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1816357/']
DEMO: <http://jsbin.com/faboze/1/> ---------------------------------- *<http://jsbin.com/faboze/1/edit?html,css,output>* ![enter image description here](https://i.stack.imgur.com/aqVdF.png) *Look carefully at the html and the css so you can understand how to adjust the spacing and how a hanging indent is done with a...
You didnt close your tags properly. Check below code. You can use text-center class from bootstrap for centering the stuff. ```html <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"/> <div class="row text-center"> <div class="col-md-6 col-md-6-offset-2"> <h4>THEY LOVE</h4...
2,326,499
Is it possible to define a CSS style for an element, that is only applied if the matching element contains a specific element (as the direct child item)? I think this is best explained using an example. **Note**: I'm trying to **style the parent element**, depending on what child elements it contains. ``` <style> ...
2010/02/24
['https://Stackoverflow.com/questions/2326499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19635/']
As far as I'm aware, styling a parent element based on the child element is not an available feature of CSS. You'll likely need scripting for this. It'd be wonderful if you could do something like `div[div.a]` or `div:containing[div.a]` as you said, but this isn't possible. You may want to consider looking at [jQuer...
Basically, no. The following *would* be what you were after in theory: ``` div.a < div { border: solid 3px red; } ``` Unfortunately it doesn't exist. There are a few write-ups along the lines of "why the hell not". A well fleshed out one by Shaun Inman is pretty good: <http://www.shauninman.com/archive/2008/05/05/...
2,326,499
Is it possible to define a CSS style for an element, that is only applied if the matching element contains a specific element (as the direct child item)? I think this is best explained using an example. **Note**: I'm trying to **style the parent element**, depending on what child elements it contains. ``` <style> ...
2010/02/24
['https://Stackoverflow.com/questions/2326499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19635/']
As far as I'm aware, styling a parent element based on the child element is not an available feature of CSS. You'll likely need scripting for this. It'd be wonderful if you could do something like `div[div.a]` or `div:containing[div.a]` as you said, but this isn't possible. You may want to consider looking at [jQuer...
On top of @kp's answer: I'm dealing with this and in my case, I have to show a child element and correct the height of the parent object accordingly (auto-sizing is not working in a bootstrap header for some reason I don't have time to debug). But instead of using javascript to modify the parent, I think I'll dynami...
2,326,499
Is it possible to define a CSS style for an element, that is only applied if the matching element contains a specific element (as the direct child item)? I think this is best explained using an example. **Note**: I'm trying to **style the parent element**, depending on what child elements it contains. ``` <style> ...
2010/02/24
['https://Stackoverflow.com/questions/2326499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19635/']
As far as I'm aware, styling a parent element based on the child element is not an available feature of CSS. You'll likely need scripting for this. It'd be wonderful if you could do something like `div[div.a]` or `div:containing[div.a]` as you said, but this isn't possible. You may want to consider looking at [jQuer...
In my case, I had to change the cell padding of an element that contained an input checkbox for a table that's being dynamically rendered with DataTables: ``` <td class="dt-center"> <input class="a" name="constCheck" type="checkbox" checked=""> </td> ``` After implementing the following line code within the [in...
2,326,499
Is it possible to define a CSS style for an element, that is only applied if the matching element contains a specific element (as the direct child item)? I think this is best explained using an example. **Note**: I'm trying to **style the parent element**, depending on what child elements it contains. ``` <style> ...
2010/02/24
['https://Stackoverflow.com/questions/2326499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19635/']
Basically, no. The following *would* be what you were after in theory: ``` div.a < div { border: solid 3px red; } ``` Unfortunately it doesn't exist. There are a few write-ups along the lines of "why the hell not". A well fleshed out one by Shaun Inman is pretty good: <http://www.shauninman.com/archive/2008/05/05/...
On top of @kp's answer: I'm dealing with this and in my case, I have to show a child element and correct the height of the parent object accordingly (auto-sizing is not working in a bootstrap header for some reason I don't have time to debug). But instead of using javascript to modify the parent, I think I'll dynami...
2,326,499
Is it possible to define a CSS style for an element, that is only applied if the matching element contains a specific element (as the direct child item)? I think this is best explained using an example. **Note**: I'm trying to **style the parent element**, depending on what child elements it contains. ``` <style> ...
2010/02/24
['https://Stackoverflow.com/questions/2326499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19635/']
Basically, no. The following *would* be what you were after in theory: ``` div.a < div { border: solid 3px red; } ``` Unfortunately it doesn't exist. There are a few write-ups along the lines of "why the hell not". A well fleshed out one by Shaun Inman is pretty good: <http://www.shauninman.com/archive/2008/05/05/...
In my case, I had to change the cell padding of an element that contained an input checkbox for a table that's being dynamically rendered with DataTables: ``` <td class="dt-center"> <input class="a" name="constCheck" type="checkbox" checked=""> </td> ``` After implementing the following line code within the [in...
2,326,499
Is it possible to define a CSS style for an element, that is only applied if the matching element contains a specific element (as the direct child item)? I think this is best explained using an example. **Note**: I'm trying to **style the parent element**, depending on what child elements it contains. ``` <style> ...
2010/02/24
['https://Stackoverflow.com/questions/2326499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19635/']
On top of @kp's answer: I'm dealing with this and in my case, I have to show a child element and correct the height of the parent object accordingly (auto-sizing is not working in a bootstrap header for some reason I don't have time to debug). But instead of using javascript to modify the parent, I think I'll dynami...
In my case, I had to change the cell padding of an element that contained an input checkbox for a table that's being dynamically rendered with DataTables: ``` <td class="dt-center"> <input class="a" name="constCheck" type="checkbox" checked=""> </td> ``` After implementing the following line code within the [in...
9,923,265
I'm trying to utilise TFS Team Build to deploy web applications from a solution as part of the build process, however I'm having a problem with the IIS website name when using package .zip and cmd files. In the web application project settings "Package/Publish Web" tab I can set the IIS website name (eg "mobile") and ...
2012/03/29
['https://Stackoverflow.com/questions/9923265', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/329666/']
Maybe, when you build your project through `MSBuild` you don't set the same `Configuration` in which you have changed the `IIS Web Site/application name` through `Package/Publish Web` settings on Visual Studio 2010.
The deploy path can be different for each Project Configuration. Perhaps you set the Debug value while TFS is using Release?
33,631
I need help dimensioning a screw-beam system of a press. I built one prototype but the beam is bending too much. Below is a sketch of my press. In the middle it has a fixing screw which presses downwards on a beam (3D printed plastic) that presses down my Device Under Test (DUT). The problem is that the beam bends too...
2020/03/13
['https://engineering.stackexchange.com/questions/33631', 'https://engineering.stackexchange.com', 'https://engineering.stackexchange.com/users/21516/']
You are on track with your beam calculations, but I doubt you will be happy with the results, just because a 3-D printed part is unlikely to act the way a cast or milled solid plastic part would. You would be well served to just buy aluminum bar stock and cut it with a hack saw. As to the screw force produced, I doubt...
Force F is related to torque and the pitch of the screw: let's call the radius of your screw r and the tread pitch N and torque t. $ F= \frac{\tau/r}{(2\pi r/N )} $ And the answer to the 2nd part is the numbers are ok, but these are for very small angles of deformation, things around a few degrees, and L should bee ...
15,467,646
Im implementing HeapSort for an assignment in my algorithms class, and Im finally done, but for some reason, the sort is skipping over the first element in my array. Original array: ``` int heapArray[SIZE] = { 5 ,99, 32, 4, 1, 12, 15 , 8, 13, 55 }; ``` Output after HeapSort() ``` 5 99 32 15 13 12 8 4 1 ``` Iv...
2013/03/17
['https://Stackoverflow.com/questions/15467646', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1286945/']
You have several issues in your code: Firstly: array indices start from 0 not 1, therefore, there are many places with index errors listed as follows: In HeapSort function: ``` for(int i = n-1; i >= 2; i--) { //should be 1 not 2 temp = heapArray[1]; //should be 0 not 1 in those 2 statements ...
here ``` Build_Max_Heap(heapArray); for(int i = n-1; i >= 2; i--) { ^^^^^ temp = heapArray[1]; heapArray[1] = heapArray[i]; heapArray[i] = temp; heap_size = heap_size-1; Max_Heapify(heapArray,1); } return; } ``` you stop looping on i=2, decrease it to 1, don't take first elemen...
15,467,646
Im implementing HeapSort for an assignment in my algorithms class, and Im finally done, but for some reason, the sort is skipping over the first element in my array. Original array: ``` int heapArray[SIZE] = { 5 ,99, 32, 4, 1, 12, 15 , 8, 13, 55 }; ``` Output after HeapSort() ``` 5 99 32 15 13 12 8 4 1 ``` Iv...
2013/03/17
['https://Stackoverflow.com/questions/15467646', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1286945/']
You have several issues in your code: Firstly: array indices start from 0 not 1, therefore, there are many places with index errors listed as follows: In HeapSort function: ``` for(int i = n-1; i >= 2; i--) { //should be 1 not 2 temp = heapArray[1]; //should be 0 not 1 in those 2 statements ...
The `Parent`, `Left` and `Right` functions are fit for 1-based arrays. For 0-based you need to use: ``` int Parent(int i) { return (i - 1) / 2; } int Left(int i) { return (2 * i) + 1; } int Right(int i) { return 2 * (i + 1); } ``` As you can check on example heap: ``` 0 / \ 1 2 / \ / \ 3 ...
683,529
A brief summary of my problem is that we have started a DNS server upgrade here at my facility. We currently have 2 internal dns servers and 2 external dns servers. We are upgrading to new equipment and merging our servers so we have 1 master and 1 slave that will take care of both internal and external dns. Both ser...
2015/04/17
['https://serverfault.com/questions/683529', 'https://serverfault.com', 'https://serverfault.com/users/282253/']
He guys just wanted to update this to let you know what I found out for the solution. Under my Internal view the match-clients argument was messing me up. ``` match-clients { internal_hosts; !external_slave; internal_slave; }; ``` The internal\_hosts acl includes the range 129.42.0.0/16. This was listed before the !...
My guess this line in your master config options is preventing the others from getting the zones: ``` allow-transfer {127.0.0.1; }; ``` I'd try removing that line or updating it to include your external\_master. Perhaps it's because you have multiple views in your config, the default view is getting that limited ...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
Try: ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[ 0 ]​[ 1 ] ``` However I worry that you are planning to parse xml with regular expressions. If this cdata is part of a larger valid xml document, better to use an xml parser
The code below shows the substring extraction using regex in groovy: ``` class StringHelper { @NonCPS static String stripSshPrefix(String gitUrl){ def match = (gitUrl =~ /ssh:\/\/(.+)/) if (match.find()) { return match.group(1) } return gitUrl } static void main(String... args) { def git...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
Try: ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[ 0 ]​[ 1 ] ``` However I worry that you are planning to parse xml with regular expressions. If this cdata is part of a larger valid xml document, better to use an xml parser
A little bit late to the party but try using backslash when defining your pattern, example: ``` def articleContent = "real groovy" def matches = (articleContent =~ /gr\w{4}/) //grabs 'gr' and its following 4 chars def firstmatch = matches[0] //firstmatch would be 'groovy' ``` you were on the right track, it was...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
Try: ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[ 0 ]​[ 1 ] ``` However I worry that you are planning to parse xml with regular expressions. If this cdata is part of a larger valid xml document, better to use an xml parser
One more sinle-line solution additional to tim\_yates's one ``` def result = articleContent.replaceAll(/<!\[CDATA\[(.+)]]>/,/$1/) ``` Please, take into account that in case of regexp doesn't match then result will be equal to the source. Unlikely in case of ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
Try: ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[ 0 ]​[ 1 ] ``` However I worry that you are planning to parse xml with regular expressions. If this cdata is part of a larger valid xml document, better to use an xml parser
In my case, the actual string was multi-line like below ``` ID : AB-223 Product : Standard Profile Start Date : 2020-11-19 00:00:00 Subscription : Annual Volume : 11 Page URL : null Commitment : 1200.00 Start Date : 2020-11-25 00:00:00 ``` I wanted to extract the `Start Date` value from this string so here is how my...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
The code below shows the substring extraction using regex in groovy: ``` class StringHelper { @NonCPS static String stripSshPrefix(String gitUrl){ def match = (gitUrl =~ /ssh:\/\/(.+)/) if (match.find()) { return match.group(1) } return gitUrl } static void main(String... args) { def git...
A little bit late to the party but try using backslash when defining your pattern, example: ``` def articleContent = "real groovy" def matches = (articleContent =~ /gr\w{4}/) //grabs 'gr' and its following 4 chars def firstmatch = matches[0] //firstmatch would be 'groovy' ``` you were on the right track, it was...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
The code below shows the substring extraction using regex in groovy: ``` class StringHelper { @NonCPS static String stripSshPrefix(String gitUrl){ def match = (gitUrl =~ /ssh:\/\/(.+)/) if (match.find()) { return match.group(1) } return gitUrl } static void main(String... args) { def git...
One more sinle-line solution additional to tim\_yates's one ``` def result = articleContent.replaceAll(/<!\[CDATA\[(.+)]]>/,/$1/) ``` Please, take into account that in case of regexp doesn't match then result will be equal to the source. Unlikely in case of ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
The code below shows the substring extraction using regex in groovy: ``` class StringHelper { @NonCPS static String stripSshPrefix(String gitUrl){ def match = (gitUrl =~ /ssh:\/\/(.+)/) if (match.find()) { return match.group(1) } return gitUrl } static void main(String... args) { def git...
In my case, the actual string was multi-line like below ``` ID : AB-223 Product : Standard Profile Start Date : 2020-11-19 00:00:00 Subscription : Annual Volume : 11 Page URL : null Commitment : 1200.00 Start Date : 2020-11-25 00:00:00 ``` I wanted to extract the `Start Date` value from this string so here is how my...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
A little bit late to the party but try using backslash when defining your pattern, example: ``` def articleContent = "real groovy" def matches = (articleContent =~ /gr\w{4}/) //grabs 'gr' and its following 4 chars def firstmatch = matches[0] //firstmatch would be 'groovy' ``` you were on the right track, it was...
One more sinle-line solution additional to tim\_yates's one ``` def result = articleContent.replaceAll(/<!\[CDATA\[(.+)]]>/,/$1/) ``` Please, take into account that in case of regexp doesn't match then result will be equal to the source. Unlikely in case of ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
A little bit late to the party but try using backslash when defining your pattern, example: ``` def articleContent = "real groovy" def matches = (articleContent =~ /gr\w{4}/) //grabs 'gr' and its following 4 chars def firstmatch = matches[0] //firstmatch would be 'groovy' ``` you were on the right track, it was...
In my case, the actual string was multi-line like below ``` ID : AB-223 Product : Standard Profile Start Date : 2020-11-19 00:00:00 Subscription : Annual Volume : 11 Page URL : null Commitment : 1200.00 Start Date : 2020-11-25 00:00:00 ``` I wanted to extract the `Start Date` value from this string so here is how my...
17,536,926
I have data that looks like this ``` { "status": "success", "data": { "data1": { "serialNumber": "abc123", "version": "1.6" }, "data2": { "irrelvent": [ "irrelvent", "irrelvent" ] }, "data3":...
2013/07/08
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
One more sinle-line solution additional to tim\_yates's one ``` def result = articleContent.replaceAll(/<!\[CDATA\[(.+)]]>/,/$1/) ``` Please, take into account that in case of regexp doesn't match then result will be equal to the source. Unlikely in case of ``` def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[...
In my case, the actual string was multi-line like below ``` ID : AB-223 Product : Standard Profile Start Date : 2020-11-19 00:00:00 Subscription : Annual Volume : 11 Page URL : null Commitment : 1200.00 Start Date : 2020-11-25 00:00:00 ``` I wanted to extract the `Start Date` value from this string so here is how my...
52,700,186
I successfully trained a few models on the Custom Translator portal which I cannot deploy. I tried several times, but each time I start the deployment I get a "Deploymentfailed" status after a while. Is there anything I should bear in mind or anything I can do about that? Thanks
2018/10/08
['https://Stackoverflow.com/questions/52700186', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10472409/']
Quoting the [official backports documentation](https://backports.debian.org/Instructions/) > > For jessie add this line > > > > ``` > deb http://ftp.debian.org/debian jessie-backports main > > ``` > > to your `sources.list` (or add a new file with the ".list" extension to > `/etc/apt/sources.list.d/`) You can a...
Ok so I found out how this works and wanted to answer because I felt that the documentation I found was pretty vague so this is how you add Debian 9 stretch-backports to your sources.list: * Manually, and with admin rights, navigate to /etc/apt/sources.list then create your stretch-backport.list file then enter it wit...
52,700,186
I successfully trained a few models on the Custom Translator portal which I cannot deploy. I tried several times, but each time I start the deployment I get a "Deploymentfailed" status after a while. Is there anything I should bear in mind or anything I can do about that? Thanks
2018/10/08
['https://Stackoverflow.com/questions/52700186', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10472409/']
You can also append the key to sources.list via echo. ``` sudo echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list ``` My full install script is (all run as root or sudo) ``` echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list apt-g...
Ok so I found out how this works and wanted to answer because I felt that the documentation I found was pretty vague so this is how you add Debian 9 stretch-backports to your sources.list: * Manually, and with admin rights, navigate to /etc/apt/sources.list then create your stretch-backport.list file then enter it wit...
52,700,186
I successfully trained a few models on the Custom Translator portal which I cannot deploy. I tried several times, but each time I start the deployment I get a "Deploymentfailed" status after a while. Is there anything I should bear in mind or anything I can do about that? Thanks
2018/10/08
['https://Stackoverflow.com/questions/52700186', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10472409/']
Quoting the [official backports documentation](https://backports.debian.org/Instructions/) > > For jessie add this line > > > > ``` > deb http://ftp.debian.org/debian jessie-backports main > > ``` > > to your `sources.list` (or add a new file with the ".list" extension to > `/etc/apt/sources.list.d/`) You can a...
You can also append the key to sources.list via echo. ``` sudo echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list ``` My full install script is (all run as root or sudo) ``` echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list apt-g...
42,019,535
I have questions about how to properly implement objects in C. Is the fact that I return objects from methods more prone to memory leaks than, for example, never returning an object and doing it by reference in the argument list like this? ``` extern void quaternion_get_product(Quaternion * this, Quaternion * q, Qua...
2017/02/03
['https://Stackoverflow.com/questions/42019535', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4900440/']
Actually, it can get even worse if some function has *both* side effect of updating something and return a newly constructed value. Say, who remembers that `scanf` returns a value? Looking at [GNU Multi Precision Arithmetic Library](https://gmplib.org/) I'd suggest that the following is one reasonable solution (actual...
There is no need to dynamically allocate your quaterions. A quaternion has a fixed size and therefore you can use just plain Quaternions. If you make integer calculations you also use just `int`s without dynamically allocating space for each `int`. Idea for not using `malloc/free` (untested code) ``` Quaternion quate...
42,019,535
I have questions about how to properly implement objects in C. Is the fact that I return objects from methods more prone to memory leaks than, for example, never returning an object and doing it by reference in the argument list like this? ``` extern void quaternion_get_product(Quaternion * this, Quaternion * q, Qua...
2017/02/03
['https://Stackoverflow.com/questions/42019535', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4900440/']
Actually, it can get even worse if some function has *both* side effect of updating something and return a newly constructed value. Say, who remembers that `scanf` returns a value? Looking at [GNU Multi Precision Arithmetic Library](https://gmplib.org/) I'd suggest that the following is one reasonable solution (actual...
Looks to me like you're calling it wrong. You also need to check to see if malloc() returns NULL and handle that failure (such as by displaying an out of memory error message and exiting if it fails because that's non-recoverable generally). **UPDATE:** Since YOU need to free your intermediate result you have to tak...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
What you want is to add a view from your running service instance. This way you can persist the view across all activities - and from anywhere else. See this great example: <http://www.piwai.info/chatheads-basics/>
What you want is an Activity instead of a Service and a Dialog instead View. I suggest you read this document by google: <http://developer.android.com/guide/topics/fundamentals.html> However to answer your question about both being interactable. This isn't possible. At any given time 1 and only 1 activity is on the to...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
Services most definitely can have a user interface: Input methods are an obvious example. See <http://developer.android.com/resources/samples/SoftKeyboard/index.html> for an example.
Services run in the background and do not have an UI. So you can not show something over a Service. If you need a Service to notify user about something, then use [`Notification`](http://developer.android.com/guide/topics/ui/notifiers/notifications.html). Ayou could use a `Toast`, but I advise against it, as it can c...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
I guess you are misusing the word "Service". Service is invisible, Activities are visible. There are no buttons in an Service! So you have no choice! You should put both views in one Activity, and I would use a RelativeLayout and set the visibility of your chidren to GONE/Visible. <http://developer.android.com/refer...
Services run in the background and do not have an UI. So you can not show something over a Service. If you need a Service to notify user about something, then use [`Notification`](http://developer.android.com/guide/topics/ui/notifiers/notifications.html). Ayou could use a `Toast`, but I advise against it, as it can c...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
Yes it's possible, what you need to do is call the `WindowManager` service and add your view via the same. ``` WindowManager windowManager=(WindowManager)getSystemService(WINDOW_SERVICE); LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE); RelativeLayout layout=(RelativeLayout) inflater....
Services most definitely can have a user interface: Input methods are an obvious example. See <http://developer.android.com/resources/samples/SoftKeyboard/index.html> for an example.
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
Services most definitely can have a user interface: Input methods are an obvious example. See <http://developer.android.com/resources/samples/SoftKeyboard/index.html> for an example.
What you want is an Activity instead of a Service and a Dialog instead View. I suggest you read this document by google: <http://developer.android.com/guide/topics/fundamentals.html> However to answer your question about both being interactable. This isn't possible. At any given time 1 and only 1 activity is on the to...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
Yes it's possible, what you need to do is call the `WindowManager` service and add your view via the same. ``` WindowManager windowManager=(WindowManager)getSystemService(WINDOW_SERVICE); LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE); RelativeLayout layout=(RelativeLayout) inflater....
What you want is to add a view from your running service instance. This way you can persist the view across all activities - and from anywhere else. See this great example: <http://www.piwai.info/chatheads-basics/>
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
Yes it's possible, what you need to do is call the `WindowManager` service and add your view via the same. ``` WindowManager windowManager=(WindowManager)getSystemService(WINDOW_SERVICE); LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE); RelativeLayout layout=(RelativeLayout) inflater....
Services run in the background and do not have an UI. So you can not show something over a Service. If you need a Service to notify user about something, then use [`Notification`](http://developer.android.com/guide/topics/ui/notifiers/notifications.html). Ayou could use a `Toast`, but I advise against it, as it can c...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
I guess you are misusing the word "Service". Service is invisible, Activities are visible. There are no buttons in an Service! So you have no choice! You should put both views in one Activity, and I would use a RelativeLayout and set the visibility of your chidren to GONE/Visible. <http://developer.android.com/refer...
What you want is an Activity instead of a Service and a Dialog instead View. I suggest you read this document by google: <http://developer.android.com/guide/topics/fundamentals.html> However to answer your question about both being interactable. This isn't possible. At any given time 1 and only 1 activity is on the to...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
What you want is to add a view from your running service instance. This way you can persist the view across all activities - and from anywhere else. See this great example: <http://www.piwai.info/chatheads-basics/>
Services run in the background and do not have an UI. So you can not show something over a Service. If you need a Service to notify user about something, then use [`Notification`](http://developer.android.com/guide/topics/ui/notifiers/notifications.html). Ayou could use a `Toast`, but I advise against it, as it can c...
7,521,307
Already asked a similar question, yet without much luck. Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intractable, i.e. the user should be able to both click buttons within the view, as well as ones on the service in the background. ![enter image description her...
2011/09/22
['https://Stackoverflow.com/questions/7521307', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/651418/']
Yes it's possible, what you need to do is call the `WindowManager` service and add your view via the same. ``` WindowManager windowManager=(WindowManager)getSystemService(WINDOW_SERVICE); LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE); RelativeLayout layout=(RelativeLayout) inflater....
I guess you are misusing the word "Service". Service is invisible, Activities are visible. There are no buttons in an Service! So you have no choice! You should put both views in one Activity, and I would use a RelativeLayout and set the visibility of your chidren to GONE/Visible. <http://developer.android.com/refer...
52,647,892
Bit of theoretical question. I'd like someone to explain me which colour space provides the best distances among similar looking colours? I am trying to make a humidity detection system using a normal RGB camera in dry fruits like almond and peanuts. I have tried RGB and HSV color space for EDA(please find the attachme...
2018/10/04
['https://Stackoverflow.com/questions/52647892', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7554629/']
A `ValueEventListener` always gets a snapshot of the entire location you attach it to. If you'd like to get a snapshot of the specific child, you should use a `ChildEventListener`. ``` ref.child("chat").child("branches").addChildEventListener(new ChildEventListener() { public void onChildAdded(DataSnapshot snapshot...
``` ref.on("child_changed", function(snapshot) { var changedPost = snapshot.val(); console.log("The updated post title is " + changedPost.title); }); ``` For more information you can **[click](https://firebase.google.com/docs/database/admin/retrieve-data#child-changed)** Here
60,540,060
is there a way to set a css class on a child component inside a Blazor component? What i have right now is: ```cs @using Microsoft.AspNetCore.Components; @inherits ComponentBase <div class="button-group-wrapper"> @SecondaryButton <div class="floating-sticky-wrapper"> @PrimaryButton </div> </div> ...
2020/03/05
['https://Stackoverflow.com/questions/60540060', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8018536/']
Setting the startingDeadlineSeconds to 180 fixed the problem + removing the spec.template.metadata.labels.
I suspended my workload then resumed it after quite a while and saw the same error. Isn't it a bug because I triggered the suspend action on purpose anytime between suspend and resume should NOT be counted against missing starting.
2,377,096
I am having trouble with my UITableView in the NavigationController. When I add data to the table I use another class to download images to display in that table, while all that works great but if in the middle of images being download I swtich back to the previous view in the navigationcontroller app crashed. Here is...
2010/03/04
['https://Stackoverflow.com/questions/2377096', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/190892/']
If you view all files for the project and then view the file called Reference.svcmap for the appropriate service reference could you please let me know what the following config options are in the xml? ``` <ExcludedTypes /> <ImportXmlTypes>false</ImportXmlTypes> <GenerateInternalTypes>false</GenerateInternalTypes> <Ge...
As far as I know, proxy classes are generated by SvcUtil.exe why do not you look at it with reflector...
1,635,102
I am getting an unexpected value with a simple math calculation in Objective C. I have output the three different parts of the calculation as well as the result of the calculation below. The following code ``` NSLog(@"self.contentView.bounds.size.width: %f", self.contentView.bounds.size.width); NSLog(@"SWATCH...
2009/10/28
['https://Stackoverflow.com/questions/1635102', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/197808/']
This: ``` self.contentView.bounds.size.width - SWATCHES_WIDTH - RIGHT_MARGIN ``` is expanding to this: ``` self.contentView.bounds.size.width - SWATCH_SIZE * 3.0 + SPACE_BETWEEN * 2.0 - RIGHT_MARGIN ``` What you really want is: ``` self.contentView.bounds.size.width - SWATCH_SIZE * 3.0 - SPACE_BETWEEN * 2.0 - RI...
CPP strike again! Your subtraction, after cpp runs, goes from this: `(self.contentView.bounds.size.width - SWATCHES_WIDTH - RIGHT_MARGIN)` to this: `(self.contentView.bounds.size.width - SWATCH_SIZE * 3.0 + SPACE_BETWEEN * 2.0 - 12.0)` See the problem? You want SWATCHES\_WIDTH to expand with parens around it, so ...
50,925,793
What is the proper way of adding external CSS file in Vue.js Application ? I found several ways to add CSS file in Vue.js Application. Some one suggest to use this one. `<link rel="stylesheet" type="text/css" href="/static/bootstrap.min.css">`. Some one suggest this one ``` <style lang="scss"> @import 'src/assets...
2018/06/19
['https://Stackoverflow.com/questions/50925793', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5043301/']
1. Install sass ``` npm install sass-loader --save-dev ``` 2. Create new `css` directory under your `src/assets` directory 3. Create a `styles.scss` file in the new `css` directory 4. Add the following line of code to your `main.js` file ``` import '../src/assets/css/styles.scss'; ``` In the `styles.scss` file yo...
The best way for me(!) in Vue.js is to include global page-styles in my main index.html with a link tag. This way they are accessible from everywhere and are loaded when the page is first opened. Like this: *index.html:* ``` <link rel="stylesheet" type="text/css" href="/static/bootstrap.min.css"> ``` The style-rules...
7,376,423
* Would you please examine [this jsFiddle](http://jsfiddle.net/znPGj/)? * Resize the width of the "result" frame. * Observe that the layout of the boxes switches between 2 and 3 columns. This glitch is anoying I want the layout to look like this and stay like this even when I resize the window: ``` _________ | ▄ ▄ ▄ ...
2011/09/11
['https://Stackoverflow.com/questions/7376423', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/552067/']
<http://jsfiddle.net/znPGj/3/> fixes it by setting a height in px on the img boxes
check this example <http://jsfiddle.net/sandeep/znPGj/4/> css: ``` a { float:left; width: 33%; margin: 0; padding: 4px 0; color: #000; font: medium sans-serif; text-align: center; } a:nth-child(4){clear:both} img { width: 80%; } ```
7,376,423
* Would you please examine [this jsFiddle](http://jsfiddle.net/znPGj/)? * Resize the width of the "result" frame. * Observe that the layout of the boxes switches between 2 and 3 columns. This glitch is anoying I want the layout to look like this and stay like this even when I resize the window: ``` _________ | ▄ ▄ ▄ ...
2011/09/11
['https://Stackoverflow.com/questions/7376423', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/552067/']
<http://jsfiddle.net/znPGj/3/> fixes it by setting a height in px on the img boxes
You could wrap all the `img` in a `div` and set a specific `width` on the `div` Example: <http://jsfiddle.net/jasongennaro/znPGj/5/>
7,376,423
* Would you please examine [this jsFiddle](http://jsfiddle.net/znPGj/)? * Resize the width of the "result" frame. * Observe that the layout of the boxes switches between 2 and 3 columns. This glitch is anoying I want the layout to look like this and stay like this even when I resize the window: ``` _________ | ▄ ▄ ▄ ...
2011/09/11
['https://Stackoverflow.com/questions/7376423', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/552067/']
<http://jsfiddle.net/znPGj/3/> fixes it by setting a height in px on the img boxes
Have you tried dropping the width to 32%? Worked for me, but I didn't test on many browsers.
58,029,124
I would like to modify the date of a pandas Timestamp variable but keeping the time as it is. E.g. having the following timestamp ``` time_stamp_1 = pd.Timestamp('1900-1-1 13:59') ``` I would like to set the date to the 3rd of February 2000. I.e. after the modification the print statement ``` print(time_stamp_1) `...
2019/09/20
['https://Stackoverflow.com/questions/58029124', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1833326/']
Use [`Timestamp.replace`](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.replace.html): ``` print (time_stamp_1.replace(year=2000, month=2, day=3)) 2000-02-03 13:59:00 ``` Or add to `Timestamp` only times converted to `timedelta` with times extracted by [`Timestamp.strftime`](http://panda...
can also do: ``` new = pd.Timestamp('2000-02-03') + pd.Timedelta(str(time_stamp_1.time())) ``` output: ``` Timestamp('2000-02-03 13:59:00') ```
58,029,124
I would like to modify the date of a pandas Timestamp variable but keeping the time as it is. E.g. having the following timestamp ``` time_stamp_1 = pd.Timestamp('1900-1-1 13:59') ``` I would like to set the date to the 3rd of February 2000. I.e. after the modification the print statement ``` print(time_stamp_1) `...
2019/09/20
['https://Stackoverflow.com/questions/58029124', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1833326/']
Use [`Timestamp.replace`](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.replace.html): ``` print (time_stamp_1.replace(year=2000, month=2, day=3)) 2000-02-03 13:59:00 ``` Or add to `Timestamp` only times converted to `timedelta` with times extracted by [`Timestamp.strftime`](http://panda...
You can do subtraction with `normalize` ``` pd.to_datetime('2000-02-03') + (time_stamp_1 - time_stamp_1.normalize()) Timestamp('2000-02-03 13:59:00') ``` --- This scales much better if you have a Series/DataFrame because it avoids `.strftime`, though is slower for a single timestamp. ``` import perfplot import pan...
10,509,984
I am using Graph API to upload video on facebook. I am able to upload .wmv format video but not .mp4. My code is as below ``` strVidUrl=@"http://myshow.com.au/Videos/mp4s/20111216044530271247467.mp4"; //strVidUrl=@"http://www.myshow.com.au/Videos/BossAlarm.wmv"; NSURL *url = [NSURL URLWithString:strVidUrl]; ...
2012/05/09
['https://Stackoverflow.com/questions/10509984', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/482058/']
That may be due to the missmatch of codecs and compression rates of your source video and fb's recomented video format
Check the following Links * [Upload Video on facebook](http://developers.facebook.com/blog/post/532/) * [demo](http://developers.facebook.com/attachment/VideoUploadTest.zip) Regards, Let me know in case of queries.
68,172,043
The output i need > > enter name: john > > > > > name not found in array > > > Here is my pseudocode ``` //ask for name System.out.print("enter name") name = sc.nextLine() //loop to check if name exists in my array for (int count = 0; count < arrayofnames.length; count++) { if (name.equals(arrayofname...
2021/06/29
['https://Stackoverflow.com/questions/68172043', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/16306518/']
You can have a flag, which you can test after the loop ``` System.out.print("enter name") name = sc.nextLine() boolean found = false; for (int count = 0; count < arrayofnames.length; count++) { if (name.equals(arrayofnames[count])) { found = true; break; } } if (!found) System.out.prin...
``` public static void main(String[] args) { String name = "jhn"; String[] arrayofnames = {"john", "tomer", "roy", "natalie"}; IsName(name, arrayofnames); } public static void IsName(String _name, String[] _arrayofnames){ boolean a = false; for (String name : _arrayofnam...
68,172,043
The output i need > > enter name: john > > > > > name not found in array > > > Here is my pseudocode ``` //ask for name System.out.print("enter name") name = sc.nextLine() //loop to check if name exists in my array for (int count = 0; count < arrayofnames.length; count++) { if (name.equals(arrayofname...
2021/06/29
['https://Stackoverflow.com/questions/68172043', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/16306518/']
You can have a flag, which you can test after the loop ``` System.out.print("enter name") name = sc.nextLine() boolean found = false; for (int count = 0; count < arrayofnames.length; count++) { if (name.equals(arrayofnames[count])) { found = true; break; } } if (!found) System.out.prin...
You can solve this problem by putting your `String[] arrayOfNames` into an `ArrayList<>` and simply checking if the `ArrayList<>` contains the name given by the user. ``` String[] arrayOfNames = {"Angelo", "David", "John"}; String name = "Angelo"; //the name given by the user ArrayList<String> newArray = new ArrayLis...
68,172,043
The output i need > > enter name: john > > > > > name not found in array > > > Here is my pseudocode ``` //ask for name System.out.print("enter name") name = sc.nextLine() //loop to check if name exists in my array for (int count = 0; count < arrayofnames.length; count++) { if (name.equals(arrayofname...
2021/06/29
['https://Stackoverflow.com/questions/68172043', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/16306518/']
You can have a flag, which you can test after the loop ``` System.out.print("enter name") name = sc.nextLine() boolean found = false; for (int count = 0; count < arrayofnames.length; count++) { if (name.equals(arrayofnames[count])) { found = true; break; } } if (!found) System.out.prin...
If you want your code more compact, you can also use Streams to check if any element of the array equals the given String like this: ```java boolean found = Arrays.stream(arrayofnames).anyMatch(n -> n.equals(name)); if(found) { //code to be executed if name is found in arrayofnames } ```
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
When Spring loads your bean definitions, and has been configured to look for `@Transactional` annotations, it will create these **proxy objects** around your actual **bean**. These proxy objects are instances of classes that are auto-generated at runtime. The default behaviour of these proxy objects when a method is in...
It may be late but I came across something which explains your concern related to proxy (only 'external' method calls coming in through the proxy will be intercepted) nicely. For example, you have a class that looks like this ``` @Component("mySubordinate") public class CoreBusinessSubordinate { public void doSo...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
This is a big topic. The Spring reference doc devotes multiple chapters to it. I recommend reading the ones on [Aspect-Oriented Programming](https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#aop-api) and [Transactions](https://docs.spring.io/spring-framework/docs/current/reference/html/data-...
**The simplest answer is:** On whichever method you declare `@Transactional` the boundary of transaction starts and boundary ends when method completes. If you are using JPA call then **all commits are with in this transaction boundary**. Lets say you are saving entity1, entity2 and entity3. Now while saving enti...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
When Spring loads your bean definitions, and has been configured to look for `@Transactional` annotations, it will create these **proxy objects** around your actual **bean**. These proxy objects are instances of classes that are auto-generated at runtime. The default behaviour of these proxy objects when a method is in...
All existing answers are correct, but I feel cannot give just this complex topic. For a comprehensive, practical explanation you might want to have a look at this [Spring @Transactional In-Depth](https://www.marcobehler.com/guides/spring-transaction-management-transactional-in-depth) guide, which tries its best to cov...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
As a visual person, I like to weigh in with a sequence diagram of the proxy pattern. If you don't know how to read the arrows, I read the first one like this: `Client` executes `Proxy.method()`. 1. The client calls a method on the target from his perspective, and is silently intercepted by the proxy 2. If a before asp...
It may be late but I came across something which explains your concern related to proxy (only 'external' method calls coming in through the proxy will be intercepted) nicely. For example, you have a class that looks like this ``` @Component("mySubordinate") public class CoreBusinessSubordinate { public void doSo...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
This is a big topic. The Spring reference doc devotes multiple chapters to it. I recommend reading the ones on [Aspect-Oriented Programming](https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#aop-api) and [Transactions](https://docs.spring.io/spring-framework/docs/current/reference/html/data-...
As a visual person, I like to weigh in with a sequence diagram of the proxy pattern. If you don't know how to read the arrows, I read the first one like this: `Client` executes `Proxy.method()`. 1. The client calls a method on the target from his perspective, and is silently intercepted by the proxy 2. If a before asp...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
When Spring loads your bean definitions, and has been configured to look for `@Transactional` annotations, it will create these **proxy objects** around your actual **bean**. These proxy objects are instances of classes that are auto-generated at runtime. The default behaviour of these proxy objects when a method is in...
**The simplest answer is:** On whichever method you declare `@Transactional` the boundary of transaction starts and boundary ends when method completes. If you are using JPA call then **all commits are with in this transaction boundary**. Lets say you are saving entity1, entity2 and entity3. Now while saving enti...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
All existing answers are correct, but I feel cannot give just this complex topic. For a comprehensive, practical explanation you might want to have a look at this [Spring @Transactional In-Depth](https://www.marcobehler.com/guides/spring-transaction-management-transactional-in-depth) guide, which tries its best to cov...
It may be late but I came across something which explains your concern related to proxy (only 'external' method calls coming in through the proxy will be intercepted) nicely. For example, you have a class that looks like this ``` @Component("mySubordinate") public class CoreBusinessSubordinate { public void doSo...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
**The simplest answer is:** On whichever method you declare `@Transactional` the boundary of transaction starts and boundary ends when method completes. If you are using JPA call then **all commits are with in this transaction boundary**. Lets say you are saving entity1, entity2 and entity3. Now while saving enti...
All existing answers are correct, but I feel cannot give just this complex topic. For a comprehensive, practical explanation you might want to have a look at this [Spring @Transactional In-Depth](https://www.marcobehler.com/guides/spring-transaction-management-transactional-in-depth) guide, which tries its best to cov...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
As a visual person, I like to weigh in with a sequence diagram of the proxy pattern. If you don't know how to read the arrows, I read the first one like this: `Client` executes `Proxy.method()`. 1. The client calls a method on the target from his perspective, and is silently intercepted by the proxy 2. If a before asp...
All existing answers are correct, but I feel cannot give just this complex topic. For a comprehensive, practical explanation you might want to have a look at this [Spring @Transactional In-Depth](https://www.marcobehler.com/guides/spring-transaction-management-transactional-in-depth) guide, which tries its best to cov...
1,099,025
I want to know what actually happens when you annotate a method with `@Transactional`? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: 1. I heard that Spring creates a **proxy class**? Can someone explain this in more **depth**. **What actually resides in that p...
2009/07/08
['https://Stackoverflow.com/questions/1099025', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/133830/']
When Spring loads your bean definitions, and has been configured to look for `@Transactional` annotations, it will create these **proxy objects** around your actual **bean**. These proxy objects are instances of classes that are auto-generated at runtime. The default behaviour of these proxy objects when a method is in...
As a visual person, I like to weigh in with a sequence diagram of the proxy pattern. If you don't know how to read the arrows, I read the first one like this: `Client` executes `Proxy.method()`. 1. The client calls a method on the target from his perspective, and is silently intercepted by the proxy 2. If a before asp...
21,715,723
Ok, I realize there are similar topics on this, many in fact, but none of them are helping me figure out my issue and it just seems to lead me farther and farther from my goal. I have tried implode, for each, loops, etc., but either I receive "Query was empty" because I am passing empty array or else I get a syntax err...
2014/02/11
['https://Stackoverflow.com/questions/21715723', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2036030/']
What's with the single-dollar on the first command? ``` <tab>$(CC) >>$<< $(CC) ... ```
Don't you need blank lines between different sections? James' snippet has the `%.o:` target, followed by a blank line, followed by the `$(EXE):` target, followed by a blank line, followed by the `clean:` target. Now that I think about it some more, I believe the blank lines aren't optional. In your snippet, try putti...
21,715,723
Ok, I realize there are similar topics on this, many in fact, but none of them are helping me figure out my issue and it just seems to lead me farther and farther from my goal. I have tried implode, for each, loops, etc., but either I receive "Query was empty" because I am passing empty array or else I get a syntax err...
2014/02/11
['https://Stackoverflow.com/questions/21715723', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2036030/']
The "line 4" is a bit misleading, but that's the line **of the `$(EXE)` rule** that make's parser got to before deciding it couldn't proceed any further. As @jia103 alluded to, you have a spurious `$` in your $(EXE) rule. You also have what appears to be incorrect compiler flag syntax - there shouldn't be any whitespac...
Don't you need blank lines between different sections? James' snippet has the `%.o:` target, followed by a blank line, followed by the `$(EXE):` target, followed by a blank line, followed by the `clean:` target. Now that I think about it some more, I believe the blank lines aren't optional. In your snippet, try putti...
21,715,723
Ok, I realize there are similar topics on this, many in fact, but none of them are helping me figure out my issue and it just seems to lead me farther and farther from my goal. I have tried implode, for each, loops, etc., but either I receive "Query was empty" because I am passing empty array or else I get a syntax err...
2014/02/11
['https://Stackoverflow.com/questions/21715723', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2036030/']
It is possible you have newline expressions for a different system (eg. Windows newline symbols in a Unix makefile). You can fix it in Notepad++: edit->EOL conversion->Unix (or Windows or Old Mac) or you can reenter the newline characters manually on the machine on which you're compiling.
Don't you need blank lines between different sections? James' snippet has the `%.o:` target, followed by a blank line, followed by the `$(EXE):` target, followed by a blank line, followed by the `clean:` target. Now that I think about it some more, I believe the blank lines aren't optional. In your snippet, try putti...
339,515
I'm a developer who builds mainly single page client side web applications where state in maintained on the client-side. Lately some of the applications have become very complex with very rich domain models on the client-side and increasingly complicated UI interactions. As we've gone along we've implemented some very...
2008/12/04
['https://Stackoverflow.com/questions/339515', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/37196/']
Try something like this: ``` <object> <param name="wmode" value="transparent" /> <embed src="example.swf" wmode="transparent"></embed> </object> ``` The main things to note are the `<param />` tag with the transparent attribute, and the `wmode="transparent"` in the embed tag. You'll also need to run the ...
should be aware that wmode=transparent will kill use of scroll wheel in firefox. this is true even in FP10
339,515
I'm a developer who builds mainly single page client side web applications where state in maintained on the client-side. Lately some of the applications have become very complex with very rich domain models on the client-side and increasingly complicated UI interactions. As we've gone along we've implemented some very...
2008/12/04
['https://Stackoverflow.com/questions/339515', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/37196/']
I believe the short answer is: **No**. Sorry. However, If you had complete control over how the Flash object is authored - you might be able to expose a public API to the javascript - allowing it to "manually" forward live mouse-coordinate, and mouse-button information into the flash, as you operate the mouse on top ...
should be aware that wmode=transparent will kill use of scroll wheel in firefox. this is true even in FP10
73,645,259
`ListView` doesn't stop scrolling when I reach the end of content, It keeps scrolling (**not infinite scrolling**). How do I stop the scroll when there is no more content to scroll to? Tried replacing `ListView` with `Column` --> didn't work. Tried adding `SingleChildScrollView` --> didn't work. Tried adding `physi...
2022/09/08
['https://Stackoverflow.com/questions/73645259', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19717894/']
Use below formula. ``` =TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",100)),100)) ``` If you have most recent release of ***Microsoft-365*** then could try. ``` =TEXTAFTER(A1,"\",-1) ``` [![enter image description here](https://i.stack.imgur.com/deQgt.png)](https://i.stack.imgur.com/deQgt.png)
Just select the column. Data tab - text to column - select "Delimited" - next - choose Other and enter "" in the box - next - Finish You can keep which part you want and delete others [![enter image description here](https://i.stack.imgur.com/M5nnB.png)](https://i.stack.imgur.com/M5nnB.png) [![enter image descripti...
526,522
For simplicity, let's take the 1D Schrödinger's equation for a single non-relativistic particle: $$-\frac{\hbar^2}{2m} \frac{\partial^2 \Psi(x,t)}{\partial x^2} + V(x) \Psi(x,t) = i\hbar \frac{\partial\Psi(x,t)}{\partial t}$$ Applying separation of variables, $\Psi(x,t)=\psi (x)\phi (t)$, we get the time dependent sol...
2020/01/22
['https://physics.stackexchange.com/questions/526522', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/173206/']
This is essentially the *definition* of energy in quantum mechanics -- it is $\hbar$ times the rate of change of phase. That's one of the fundamentally new ideas in quantum mechanics, so it can't be derived from anything you already know classically. If that's not very satisfying, we can say the same thing in more ste...
The reason that we take it to be the energy is that this is closely related to the classical energy, when one follows the standard rules and conventions of "quantizing" the classical quantities. In a similar manner, you can take any classical quantity $A$, and then from the classical concept of the Hamiltonian (which ...
61,312,693
So I have a file that has one line of int : 5551212 I am trying to use InputStream to read this file and then see if I can extract the number written within in it I did the following steps: ``` import java.io.*; class Shuffle { public static void main(String args[]) throws IOException { FileInputStream...
2020/04/19
['https://Stackoverflow.com/questions/61312693', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11122895/']
With Java 11 or above, a file can be read using a single line of code - ***Files.readString*** **Here is a working example for reading a text file:** ``` // File name: ReadFile.java import java.nio.file.*; public class ReadFile { public static void main(String[] args) throws Exception { String path = ...
The file you're reading is a text file, and thus the bytes you're receiving are representing encoded chars. If you look at ascii table (eg <http://www.asciitable.com/>) at decimal value 53, you'll see it's corresponding to a char "5"
61,312,693
So I have a file that has one line of int : 5551212 I am trying to use InputStream to read this file and then see if I can extract the number written within in it I did the following steps: ``` import java.io.*; class Shuffle { public static void main(String args[]) throws IOException { FileInputStream...
2020/04/19
['https://Stackoverflow.com/questions/61312693', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11122895/']
With Java 11 or above, a file can be read using a single line of code - ***Files.readString*** **Here is a working example for reading a text file:** ``` // File name: ReadFile.java import java.nio.file.*; public class ReadFile { public static void main(String[] args) throws Exception { String path = ...
You are reading an int, and the file is text data, not binary. Hence whatever bytes are in the file are interpreted as binary, and you get these numbers. To read from a text file, you can either use a Scanner, or read as text first and then convert to int. ``` import java.io.*; class Shuffle { public static void...
17,937,982
Im trying to search for three pieces of data from a string and they are: ``` first name, space ,last name (?=[A-Z][a-z]+\s[A-Z][a-z]+) //AND first name ,space ,last name ,and suffix (?=[A-Z][a-z]+\s[A-Z][a-z]+\s[A-Z][a-z]+) //AND, age (?=[0-9]{2}) ``` from several tutorials I've seen it seems that these three p...
2013/07/30
['https://Stackoverflow.com/questions/17937982', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/497763/']
That multiple-lookahead trick is for times when you know certain components must be present, but you don't know what order they'll appear in. You see it most often in regexes that enforce strong password policies. Your problem is much simpler; the components always come in the same order, but the last one is optional...
You're looking for an OR operator, not an AND: ``` [A-Z][a-z]+\s[A-Z][a-z]+|[A-Z][a-z]+\s[A-Z][a-z]+\s[A-Z][a-z]+|[0-9]{2} ``` If there can be multiple space characters between words, make sure to quantify the `\s`: ``` [A-Z][a-z]+\s+[A-Z][a-z]+|[A-Z][a-z]+\s+[A-Z][a-z]+\s+[A-Z][a-z]+|[0-9]{2} ``` And don't forge...
17,937,982
Im trying to search for three pieces of data from a string and they are: ``` first name, space ,last name (?=[A-Z][a-z]+\s[A-Z][a-z]+) //AND first name ,space ,last name ,and suffix (?=[A-Z][a-z]+\s[A-Z][a-z]+\s[A-Z][a-z]+) //AND, age (?=[0-9]{2}) ``` from several tutorials I've seen it seems that these three p...
2013/07/30
['https://Stackoverflow.com/questions/17937982', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/497763/']
That multiple-lookahead trick is for times when you know certain components must be present, but you don't know what order they'll appear in. You see it most often in regexes that enforce strong password policies. Your problem is much simpler; the components always come in the same order, but the last one is optional...
You can use non-capturing group `(?:...)` and question marks to make the groups optional: ``` [A-Z][a-z]+\s[A-Z][a-z]+(?:\s[A-Z][a-z]+(?:\s[0-9]{2,3})?)? ``` If you want to extract the data, using named captures is a clean way: ``` $pattern = <<<'LOD' ~ (?<first_name>[A-Z][a-z]+) \s+ (?<last_name>[A-Z][a-z]+) (?: ...
17,937,982
Im trying to search for three pieces of data from a string and they are: ``` first name, space ,last name (?=[A-Z][a-z]+\s[A-Z][a-z]+) //AND first name ,space ,last name ,and suffix (?=[A-Z][a-z]+\s[A-Z][a-z]+\s[A-Z][a-z]+) //AND, age (?=[0-9]{2}) ``` from several tutorials I've seen it seems that these three p...
2013/07/30
['https://Stackoverflow.com/questions/17937982', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/497763/']
That multiple-lookahead trick is for times when you know certain components must be present, but you don't know what order they'll appear in. You see it most often in regexes that enforce strong password policies. Your problem is much simpler; the components always come in the same order, but the last one is optional...
``` ([a-zA-Z]+\s+[a-zA-Z]+\s+[a-zA-Z0-9]) ``` You can test your RegEx with tools like <http://www.cyber-reality.com/regexy.html>
62,160,195
I'm setting up a CI pipeline on a BitBucket Repository based around docker. I'm running build commands then up then test, basically. This all works so far, but the issue I'm having is BitBucket **only** commits or lets me edit changes to the *bitbucket-pipelines.yaml* file on the master branch. I'm not the only develo...
2020/06/02
['https://Stackoverflow.com/questions/62160195', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3069555/']
You should be able to have a pipeline in any branch you want. From the [troubleshooting section](https://confluence.atlassian.com/bitbucket/troubleshooting-bitbucket-pipelines-792298903.html#TroubleshootingBitbucketPipelines-Mybranchdoesn%27tbuild): > > My branch doesn't build > ----------------------- > > > Mak...
My problem was that pipelines had not been enabled for the repo and since I added the bitbucket-pipelines.yml file to a branch that was not the main branch, and not using the onboarding tutorial, pipelines had not been enabled for the repository. Go to Repository settings -> Pipelines | Settings -> Enable Pipelines. Th...
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
It is totally impossible to be able to tell if someone is 'cheating' unless you go to their house and check their phone browser history for any of those word helping websites. Other than that, what's to say they aren't just good with words? It is also important to note that the complexity of the word or length mean n...
What you can do is play two or three games with them simultaneously. Work out their average time they take to make a move. They could cheat in the first game because they could take any length of time, but after their first go, you should be able to tell if you are both playing at the same time. If they don't play thei...
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
It is totally impossible to be able to tell if someone is 'cheating' unless you go to their house and check their phone browser history for any of those word helping websites. Other than that, what's to say they aren't just good with words? It is also important to note that the complexity of the word or length mean n...
On their phone check the dictionary of words added - it'll be the letters from their rack(s) when they entered them on the site.
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
It is totally impossible to be able to tell if someone is 'cheating' unless you go to their house and check their phone browser history for any of those word helping websites. Other than that, what's to say they aren't just good with words? It is also important to note that the complexity of the word or length mean n...
It is indeed hard to figure out if your friend is using an online cheat tools or dictionary when playing Words with Friends, since you cannot see them in person. But there are other signs which could help you to figure out whether they are cheating or not such as your friend tend to use difficult or unknown words consi...
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
It is totally impossible to be able to tell if someone is 'cheating' unless you go to their house and check their phone browser history for any of those word helping websites. Other than that, what's to say they aren't just good with words? It is also important to note that the complexity of the word or length mean n...
If it it someone you know, the best thing to do is ask them if they think it's fair to use the cheater apps or sites. My good friend said she thought that was quite legit and I told her I prefer not to play like that. So now we don't.
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
It is totally impossible to be able to tell if someone is 'cheating' unless you go to their house and check their phone browser history for any of those word helping websites. Other than that, what's to say they aren't just good with words? It is also important to note that the complexity of the word or length mean n...
There is ENTIRELY too much cheating in Words with Friends. There is really nothing you can do about it except refuse to play the cheater anymore. One good indicator that your opponent is using a cheat program, however, is that these programs only try to score the maximum points while ignoring strategy. I've seen oppone...
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
What you can do is play two or three games with them simultaneously. Work out their average time they take to make a move. They could cheat in the first game because they could take any length of time, but after their first go, you should be able to tell if you are both playing at the same time. If they don't play thei...
It is indeed hard to figure out if your friend is using an online cheat tools or dictionary when playing Words with Friends, since you cannot see them in person. But there are other signs which could help you to figure out whether they are cheating or not such as your friend tend to use difficult or unknown words consi...
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
On their phone check the dictionary of words added - it'll be the letters from their rack(s) when they entered them on the site.
It is indeed hard to figure out if your friend is using an online cheat tools or dictionary when playing Words with Friends, since you cannot see them in person. But there are other signs which could help you to figure out whether they are cheating or not such as your friend tend to use difficult or unknown words consi...
54,231
I would deem cheating in Words with Friends to use a dictionary or site that generates words in a manner of best score. I have had opponents play 100 + point words that I didn't even know existed. Is there anyway without being with them / watching them play to see if my opponent is 'cheating' ?
2012/03/08
['https://gaming.stackexchange.com/questions/54231', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/18818/']
If it it someone you know, the best thing to do is ask them if they think it's fair to use the cheater apps or sites. My good friend said she thought that was quite legit and I told her I prefer not to play like that. So now we don't.
It is indeed hard to figure out if your friend is using an online cheat tools or dictionary when playing Words with Friends, since you cannot see them in person. But there are other signs which could help you to figure out whether they are cheating or not such as your friend tend to use difficult or unknown words consi...
53,179,085
I'm writing a code using Java Swing to press the right button when I type a number key. But I can't find what I want through search. This is my code and I can't understand why this isn't working. Please help me.. ``` import javax.swing.*; import java.awt.Dimension; import java.awt.event.*; class class01 { public...
2018/11/06
['https://Stackoverflow.com/questions/53179085', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8933767/']
The code you are showing does exactly one thing: attach action listeners to your buttons.. Meaning: when you click the button, then the listener will be called. You need a generic keyboard listener that translates key events into calls to the appropriate button, respectively action listener instead.
When you do this: ``` button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { button1.keyPressed(KeyEvent.VK_1); JOptionPane.showMessageDialog(f.getComponent(0), "Coffee selected"); } }); ``` You are telling `button1` what to do whe...