qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
7,488,122
I have a very basic question about SVN. I know SVN has pretty strict rules about things & was wonedring if I would mess up my project if I tried this. I use two computers regularly - onsite & from home. I have Eclipse(Galelio) + subclipse(1.6.x) installed on both. If I were to checkout the same project from SVN reposi...
2011/09/20
[ "https://Stackoverflow.com/questions/7488122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/289918/" ]
You are probably missing the `END` at the end of the stored proc definition that you neglected to show us. I get the same error If I append ``` create proc foo as begin ``` to the beginning of your posted code.
Do you have exactly this? ``` CREATE PROCEDURE GetCurrentLoadDate AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here declare @date datetime declare @vardate varchar(10) set @date=getD...
23,098
Is it possible to use a custom route for your plugin's CP section, instead of `cpTrigger/plugin-handle`, or to direct `cpTrigger/plugin-handle` to a different template other than `plugin-handle/index.twig`?
2017/12/07
[ "https://craftcms.stackexchange.com/questions/23098", "https://craftcms.stackexchange.com", "https://craftcms.stackexchange.com/users/3613/" ]
Whoops, sorry, just found out that Github Pages only works with static content (No PHP, No database). Closing.
Cloudways support Git Deployment. Using this you could have your site on Git and make continuous pushes from anywhere and pull it through Cloudways Control panel. For more information about this you could visit [here](https://support.cloudways.com/using-git-for-deployment/)
20,728,377
I have a WPF app which is going to be deployed to multiple users on a LAN. The users of this app will be factory workers in a manufacturing company, who will be using the app to update their progress on each order. The customer also has an ASP.NET webforms app which is used for entering orders among other things. What...
2013/12/22
[ "https://Stackoverflow.com/questions/20728377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460407/" ]
Try it You need to `ClientID` ``` document.getElementById('<%=hdn_empname.ClientID%>').value = 1; ``` I found out your main problems > > The hidden field values will assign after the if condition call. > > > **Edit :** So, You need to call your logic's in javascript side using ajax ``` if (confirm("Emplo...
`hdn_empname` is server controls Id which is different from client sided id, to get client sided id you need to use ClientID try this: ``` document.getElementById('<%=hdn_empname.ClientID%>').value = "1"; ``` You dont need to compare ``` if (confirm("Employee Introduced already.Continue?") == true) ``` this wil...
20,728,377
I have a WPF app which is going to be deployed to multiple users on a LAN. The users of this app will be factory workers in a manufacturing company, who will be using the app to update their progress on each order. The customer also has an ASP.NET webforms app which is used for entering orders among other things. What...
2013/12/22
[ "https://Stackoverflow.com/questions/20728377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460407/" ]
Where is your break point? If reader2.HasRows returns true your javascript will be registered. But it set the value on client and you get the result after postback.
`hdn_empname` is server controls Id which is different from client sided id, to get client sided id you need to use ClientID try this: ``` document.getElementById('<%=hdn_empname.ClientID%>').value = "1"; ``` You dont need to compare ``` if (confirm("Employee Introduced already.Continue?") == true) ``` this wil...
3,633,481
getting below error in IBM AIX server "JVMJ9VM015W Initialization error for library j9gc23(2): Failed to instantiate heap. 3584M requested" how to resolve the proble ? i want to increase the heap menmory up to 10gb
2010/09/03
[ "https://Stackoverflow.com/questions/3633481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/438672/" ]
`operator int()` is a *conversion function* that declares a user-defined conversion from `A` to `int` so that you can write code like ``` A a; int x = a; // invokes operator int() ``` This is different from `int operator()()`, which declares a function-call operator that takes no arguments and returns an `int`. The ...
you can use this one ``` #include <iostream> using namespace std; class A{ public: A(int n) { _num=n;} operator int(); private: int _num; }; A::operator int(){ return _num; } int main(){ A a(10); cout<<a.operator int()<<endl; return 0; } ```
48,100,432
I have multiple small files in parquet format in a given HDFS location (the count is incremental for a given month as we receive two or more files per day for a given month). When I try to read the files from the HDFS location in SPARK 2.1 the time taken to read these files is more and is incremental when more small fi...
2018/01/04
[ "https://Stackoverflow.com/questions/48100432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7460319/" ]
If you don't want to merge your files, you should consider redesigning upstream process to limit the number of created files in the first place. If producer is Spark you can for example `coalesce` or `repartition` ([Spark dataframe write method writing many small files](https://stackoverflow.com/q/44459355)) the data b...
Please try wholeTextFiles! That works for many small files.
47,128,753
I have an application on Google Cloud Platform that uses FireStore as the Database. I am getting this error when trying to insert records on FireStore. ``` google.api_core.exceptions.NotFound: 404 The project "book-shop-c73ec" does not exist or it does not contain an active Cloud Datastore database. Please visit ht ...
2017/11/06
[ "https://Stackoverflow.com/questions/47128753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4364985/" ]
It was just an error on my environment variable on windows. I had set it to ``` set GCLOUD_PROJECT="project-name" ``` instead ``` set GCLOUD_PROJECT=project-name ```
I was having this exact error, but my problem was that app engine was disabled in the project, enabling it solved the problem and I was able to upgrade to Firestore.
47,128,753
I have an application on Google Cloud Platform that uses FireStore as the Database. I am getting this error when trying to insert records on FireStore. ``` google.api_core.exceptions.NotFound: 404 The project "book-shop-c73ec" does not exist or it does not contain an active Cloud Datastore database. Please visit ht ...
2017/11/06
[ "https://Stackoverflow.com/questions/47128753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4364985/" ]
It was just an error on my environment variable on windows. I had set it to ``` set GCLOUD_PROJECT="project-name" ``` instead ``` set GCLOUD_PROJECT=project-name ```
**GCLOUD\_PROJECT** is already deprecated in favor of **GOOGLE\_CLOUD\_PROJECT**, where btw you are expected to set **the project id and not the name**!
47,128,753
I have an application on Google Cloud Platform that uses FireStore as the Database. I am getting this error when trying to insert records on FireStore. ``` google.api_core.exceptions.NotFound: 404 The project "book-shop-c73ec" does not exist or it does not contain an active Cloud Datastore database. Please visit ht ...
2017/11/06
[ "https://Stackoverflow.com/questions/47128753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4364985/" ]
I was having this exact error, but my problem was that app engine was disabled in the project, enabling it solved the problem and I was able to upgrade to Firestore.
**GCLOUD\_PROJECT** is already deprecated in favor of **GOOGLE\_CLOUD\_PROJECT**, where btw you are expected to set **the project id and not the name**!
58,501,850
I'm a beginner with google mock and I'm not sure how to use it and the concept. If I'm trying to Test a method from a class that is calling some other methods from different classes. Do I need to mock all these methods from this different classes that my Test method is calling. Here is a example: ``` class A { publi...
2019/10/22
[ "https://Stackoverflow.com/questions/58501850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7902477/" ]
In order to test C class with mocks, you need to introduce an interface for the dependency than is to be used in C class (here, added BIface). Then you need to use dependency injection of BIface to C class (via added ctor). Having that you will be able to test interactions of B and C classes. IMO A class doesn't need t...
I'm not 100% sure but in your example you don't have to use mocks at all. You can create your objects really easy here. I would use mocks when I would expect that some method will be called and should return specific value - I'm not testing this method but for example if-statment: ``` A a; if(a.method()) { ...
59,795,353
I’ve been spinning around a bit on how to accomplish this in SQL DW. I need to extract the text between two periods in a returned value. So my value returned for Result is: [![![enter image description here](https://i.stack.imgur.com/G7VOC.png)](https://i.stack.imgur.com/G7VOC.png) I’m trying to extract the values be...
2020/01/17
[ "https://Stackoverflow.com/questions/59795353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4495150/" ]
We can build on your current attempt: ``` substring( result, charindex('.', result) + 1, charindex('.', result, charindex('.', result) + 1) - charindex('.', result) - 1 ) ``` Rationale: you alreay have the first two arguments to `substring()` right. The third argument defines the number of characters to ...
If you are dealing with up to 128 characters per delimited part of the string, try `parsename` as below. Otherwise, GMB has a pretty solid solution up there. ``` select *, parsename(left(result,charindex('.',result,charindex('.',result)+1)-1),1) as mid from your_table; ``` Another method that you can easily modify t...
73,176
Wright Pianoforte Tutor - Around a year and half back, after I started my tentative steps towards learning piano at the ripe age of 50, My then tutor in Mumbai suggested this book to me. While it was available in a city music store I was surprised to see very little reference of this book on the internet. Most recordi...
2018/07/29
[ "https://music.stackexchange.com/questions/73176", "https://music.stackexchange.com", "https://music.stackexchange.com/users/35326/" ]
Good question; it's important to know what skills are being emphasized with etudes like these. 1. The first piece is a little un-melodic, but that's probably because this piece is *designed to test right hand parallel thirds*. In doing so, they wanted the notes themselves to be very easy, so they stuck with a clear fi...
I would give my beginning students pieces like these a little bit after they finish book 1 (kid version) of the Alfred series. I don't find those pieces to be too difficult for a beginner who has built up a little experience, though the second one is significantly more difficult than the first. They are probably grou...
73,176
Wright Pianoforte Tutor - Around a year and half back, after I started my tentative steps towards learning piano at the ripe age of 50, My then tutor in Mumbai suggested this book to me. While it was available in a city music store I was surprised to see very little reference of this book on the internet. Most recordi...
2018/07/29
[ "https://music.stackexchange.com/questions/73176", "https://music.stackexchange.com", "https://music.stackexchange.com/users/35326/" ]
Good question; it's important to know what skills are being emphasized with etudes like these. 1. The first piece is a little un-melodic, but that's probably because this piece is *designed to test right hand parallel thirds*. In doing so, they wanted the notes themselves to be very easy, so they stuck with a clear fi...
"The Wright Pianoforte Tutor" is a bit old-fashioned, but none the worse for that! I've seen it in many British piano stools. We still play melodies in 3rds and 'Alberti' patterns in the LH. (Not sure why @jjmusicnotes says it isn't Alberti?) If these are too hard for you, come back to them later.
73,176
Wright Pianoforte Tutor - Around a year and half back, after I started my tentative steps towards learning piano at the ripe age of 50, My then tutor in Mumbai suggested this book to me. While it was available in a city music store I was surprised to see very little reference of this book on the internet. Most recordi...
2018/07/29
[ "https://music.stackexchange.com/questions/73176", "https://music.stackexchange.com", "https://music.stackexchange.com/users/35326/" ]
"The Wright Pianoforte Tutor" is a bit old-fashioned, but none the worse for that! I've seen it in many British piano stools. We still play melodies in 3rds and 'Alberti' patterns in the LH. (Not sure why @jjmusicnotes says it isn't Alberti?) If these are too hard for you, come back to them later.
I would give my beginning students pieces like these a little bit after they finish book 1 (kid version) of the Alfred series. I don't find those pieces to be too difficult for a beginner who has built up a little experience, though the second one is significantly more difficult than the first. They are probably grou...
113,255
![enter image description here](https://i.stack.imgur.com/Qx5Xb.jpg) What I'd like to know is the best and least expensive way to dress up an old concrete storage floor ? I thought about paint or stain or a mixture of both. Do u have any suggestions?
2017/04/20
[ "https://diy.stackexchange.com/questions/113255", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/68734/" ]
Linoleum square tiles are cheap, ~0.88/ea and can be cut/scored with a utility knife and then snapped but the floor needs to be sound and flat. All high spots removed. Do a search for installing linoleum square tiles.
There are a lot of options. Asking for "the best" depends on your values—not anybody else—so I list options and you choose. * Skim coat with more concrete. This makes the appearance uniform and smooths over deviations. However, this introduces a "step up" edge which may be undesirable. * Sanding/grinding the surface. ...
3,048,967
I had been reading [this](https://math.stackexchange.com/questions/2985740/let-%CE%B1-be-an-ordinal-and-a-be-a-set-of-ordinals-then-sup-limits-%CE%B2%E2%88%88a-%CE%B1%CE%B2). In the proof, below lemma is used. I don't know how to go for proving it.*Notice that I want to prove this theorem for set of ordinals not re...
2018/12/21
[ "https://math.stackexchange.com/questions/3048967", "https://math.stackexchange.com", "https://math.stackexchange.com/users/108744/" ]
First of all $B\subseteq C$, so any upper bound of $C$ is an upper bound of $B$, hence $\sup C$ is an upper bound of $B$. Because $\sup B$ is the least upper bound of $B$ we conclude that $\sup B\leq\sup C$. Now let any $c\in C$. There is an element $b\in B$ such that $c\leq b\leq \sup B$. Hence $\sup B$ is an upper ...
This holds generally in partially ordered sets. > > *Let $B\subseteq C$ be subsets of the partially ordered set $(X,\le)$. Suppose that, for every $c\in C$ there exists $b\in B$ such that $c\le b$. If one among $B$ and $C$ has the supremum, then both have and they are equal.* > > > Consider $B^\*$ the set of uppe...
24,404,224
I am using Parse loginViewController to Log In the User via Facebook. I just cant figure out how to call the Graph API in Swift. I found the following on Parse ``` [PFFacebookUtils logInWithPermissions:permissionsArray block:(PFUseruser, NSError error) { if (user) { [FBRequestConnection startForMeWithCompletionHa...
2014/06/25
[ "https://Stackoverflow.com/questions/24404224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3720883/" ]
``` func logInViewController(logInController: PFLogInViewController!, didLogInUser user: PFUser!) -> Void { FBRequestConnection.startForMeWithCompletionHandler({connection, result, error in if !error { PFUser.currentUser().setObject(result.id as? String, forKey: "fbId") PFUse...
``` func getFBData(user: PFUser!){ FBRequestConnection.startForMeWithCompletionHandler({connection, result, error in if (error != nil) { println(result) }else { println("Error") } }) } ```
10,394,010
There are quite a few tutorials on how to access crash reports [using a computer](http://iphonedevelopertips.com/debugging/locating-crash-reports.html), but what I would like my app to do is scan for crash reports (from itself) on startup--so that users can use my app to send me their reports. Is this possible?
2012/05/01
[ "https://Stackoverflow.com/questions/10394010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046898/" ]
[PLCrashReporter](https://www.plcrashreporter.org/) is an open source crash reporting framework that can be added to an iOS App. Reports are generated in protobuf encoded format, which should allow an app to upload these reports to a server.
Take a look at these few resources that may have the solution you need: * ~~<https://testflightapp.com/>~~ * <http://www.hockeyapp.net/> * <http://quincykit.net/>
10,394,010
There are quite a few tutorials on how to access crash reports [using a computer](http://iphonedevelopertips.com/debugging/locating-crash-reports.html), but what I would like my app to do is scan for crash reports (from itself) on startup--so that users can use my app to send me their reports. Is this possible?
2012/05/01
[ "https://Stackoverflow.com/questions/10394010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046898/" ]
[PLCrashReporter](https://www.plcrashreporter.org/) is an open source crash reporting framework that can be added to an iOS App. Reports are generated in protobuf encoded format, which should allow an app to upload these reports to a server.
You can get them using your itunes connect account ``` When the user synchronizes their device using iTunes, crash reports are copied to a directory on the user's computer. If the application was distributed via the App Store and the user has chosen to submit crash logs to Apple, the crash log will be uploaded and t...
10,394,010
There are quite a few tutorials on how to access crash reports [using a computer](http://iphonedevelopertips.com/debugging/locating-crash-reports.html), but what I would like my app to do is scan for crash reports (from itself) on startup--so that users can use my app to send me their reports. Is this possible?
2012/05/01
[ "https://Stackoverflow.com/questions/10394010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046898/" ]
[PLCrashReporter](https://www.plcrashreporter.org/) is an open source crash reporting framework that can be added to an iOS App. Reports are generated in protobuf encoded format, which should allow an app to upload these reports to a server.
Another proprietary (but free) framework you can use for crash reporting is [Crashlytics](http://crashlytics.com/ "Crashlytics").
7,304,033
As far as I know, we use SqlTransaction to enable rollback if a statement in a batch of commands fails. My question is, is it necessary to use SqlTransaction when retrieving data/using select statements?
2011/09/05
[ "https://Stackoverflow.com/questions/7304033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/724689/" ]
No, it is not necessary. Each Sql statement has an implicit transaction. But it can be useful if either the default transaction is not optimal - such as a Read Uncommitted would be better - or if you have multiple reads and you want the data to be consistent - such as separate statements for the summary and detail and ...
No, there's no need to do this. Transactions are only needed if you want to recover from error on an insert/update/delete operation. If you can't read something, tough luck, but data integrity won't be affected.
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
**CORRECTION** @Alohci's assessment in the answer below is correct. However, in this case, applying `display: block` to the contained `<img>` rather than the outer `<picture>` solves the problem. Doing so forces the `<picture>` container to take on the size of the block level `<img>`. Turns out the answer to this que...
I found the following in [**WHATWG**](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element): > > The picture element is somewhat different from the similar-looking video and audio elements. While all of them contain source elements, the source element's src attribute has no meaning when th...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The picture element is by default a non-replaced inline element. [CSS 2.2 says of such elements:](https://www.w3.org/TR/CSS22/visudet.html#inline-non-replaced) > > The height of the content area should be based on the font, but this > specification does not specify how. > > > So the picture element's height is t...
I found the following in [**WHATWG**](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element): > > The picture element is somewhat different from the similar-looking video and audio elements. While all of them contain source elements, the source element's src attribute has no meaning when th...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The problem seems to be the "picture" element, the problem is due to the alignment of its element (the image). You just only have to edit you img css instruction: ``` img {display:block} ```
I found the following in [**WHATWG**](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element): > > The picture element is somewhat different from the similar-looking video and audio elements. While all of them contain source elements, the source element's src attribute has no meaning when th...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
I found the following in [**WHATWG**](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element): > > The picture element is somewhat different from the similar-looking video and audio elements. While all of them contain source elements, the source element's src attribute has no meaning when th...
This forces `img` tags inside of a `picture` to respect the boundaries of the parent container (the `picture`) instead of just arbitrarily being bigger or smaller than it: ``` picture { display: flex; } ``` Once the `picture` has sane layout rules (its contents stay inside of it), other layout adjustments can be...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The picture element is by default a non-replaced inline element. [CSS 2.2 says of such elements:](https://www.w3.org/TR/CSS22/visudet.html#inline-non-replaced) > > The height of the content area should be based on the font, but this > specification does not specify how. > > > So the picture element's height is t...
**CORRECTION** @Alohci's assessment in the answer below is correct. However, in this case, applying `display: block` to the contained `<img>` rather than the outer `<picture>` solves the problem. Doing so forces the `<picture>` container to take on the size of the block level `<img>`. Turns out the answer to this que...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The problem seems to be the "picture" element, the problem is due to the alignment of its element (the image). You just only have to edit you img css instruction: ``` img {display:block} ```
**CORRECTION** @Alohci's assessment in the answer below is correct. However, in this case, applying `display: block` to the contained `<img>` rather than the outer `<picture>` solves the problem. Doing so forces the `<picture>` container to take on the size of the block level `<img>`. Turns out the answer to this que...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
**CORRECTION** @Alohci's assessment in the answer below is correct. However, in this case, applying `display: block` to the contained `<img>` rather than the outer `<picture>` solves the problem. Doing so forces the `<picture>` container to take on the size of the block level `<img>`. Turns out the answer to this que...
This forces `img` tags inside of a `picture` to respect the boundaries of the parent container (the `picture`) instead of just arbitrarily being bigger or smaller than it: ``` picture { display: flex; } ``` Once the `picture` has sane layout rules (its contents stay inside of it), other layout adjustments can be...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The picture element is by default a non-replaced inline element. [CSS 2.2 says of such elements:](https://www.w3.org/TR/CSS22/visudet.html#inline-non-replaced) > > The height of the content area should be based on the font, but this > specification does not specify how. > > > So the picture element's height is t...
The problem seems to be the "picture" element, the problem is due to the alignment of its element (the image). You just only have to edit you img css instruction: ``` img {display:block} ```
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The picture element is by default a non-replaced inline element. [CSS 2.2 says of such elements:](https://www.w3.org/TR/CSS22/visudet.html#inline-non-replaced) > > The height of the content area should be based on the font, but this > specification does not specify how. > > > So the picture element's height is t...
This forces `img` tags inside of a `picture` to respect the boundaries of the parent container (the `picture`) instead of just arbitrarily being bigger or smaller than it: ``` picture { display: flex; } ``` Once the `picture` has sane layout rules (its contents stay inside of it), other layout adjustments can be...
38,361,657
**HERE IS WHAT I DO NOT EXPECT** Strangely, the `<picture>` appears to have its own location and height below the image itself. Its CSS `height` is set to `auto`, so I'm unsure where this height of `18px` is coming from. **HERE IS THE EXPECTED BEHAVIOR** The `<picture>` to contain the `<img>` within the `<picture>`....
2016/07/13
[ "https://Stackoverflow.com/questions/38361657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003754/" ]
The problem seems to be the "picture" element, the problem is due to the alignment of its element (the image). You just only have to edit you img css instruction: ``` img {display:block} ```
This forces `img` tags inside of a `picture` to respect the boundaries of the parent container (the `picture`) instead of just arbitrarily being bigger or smaller than it: ``` picture { display: flex; } ``` Once the `picture` has sane layout rules (its contents stay inside of it), other layout adjustments can be...
50,213,815
I need to implement a hall booking system and there is a requirement to get the free halls based on booked `FromDateTime` to `ToDateTime` Order Table ``` HallID FromDateTime ToDateTime 1 2018-01-01 03:00:00 2018-01-01 05:00:00 2 2018-01-01 06:30:00 2018-01-01 12:00:00 3 201...
2018/05/07
[ "https://Stackoverflow.com/questions/50213815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5733738/" ]
``` @Component({ selector: 'app-transaction', templateUrl: './transaction.component.html', styleUrls: ['./transaction.component.scss',] }) ``` Another component (if you have it): ``` @Component({ selector: 'my-app', templateUrl: './my-app.component.html', styleUrls: ['./my-app.c...
I think your problem is a syntax error. You have defined two selectors for this component. I think this line in your **transaction.component.ts** ``` selector: 'app-transaction','my-app', ``` should only be ``` selector: 'app-transaction', ``` since the selector doesn't take arrays as value (like e.g. styleUrls d...
52,305,860
When I try: ``` >>> from skimage import io ``` I get at the end the following: ``` from ..color import rgb2gray ImportError: cannot import name 'rgb2gray' from 'skimage.color' (C:\Users\user\A ppData\Local\Programs\Python\Python37-32\lib\site-packages\skimage\color\__init_ _.py) ``` Although I have installed th...
2018/09/13
[ "https://Stackoverflow.com/questions/52305860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10254054/" ]
It looks like you haven't installed *`scikit-image`* package. Try this on terminal: ``` pip install -U scikit-image ``` And then try importing like this: ``` from skimage import io from skimage.color import rgb2gray ``` If you still got the *error or you have installed the package* previously, [try reinstalling...
three ways to convert RGB2Gray: opencv: ``` import cv2 img=cv2.imread("file.jpg",0) [enter link description here][1] ``` or you can do this: ``` img=cv2.imread("file.jpg") gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) ``` **cv2.COLOR\_BGR2GRAY** beacause it reads BGR mode. another methods you can look this link: ...
52,305,860
When I try: ``` >>> from skimage import io ``` I get at the end the following: ``` from ..color import rgb2gray ImportError: cannot import name 'rgb2gray' from 'skimage.color' (C:\Users\user\A ppData\Local\Programs\Python\Python37-32\lib\site-packages\skimage\color\__init_ _.py) ``` Although I have installed th...
2018/09/13
[ "https://Stackoverflow.com/questions/52305860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10254054/" ]
In case you run into this error from inside a Jupyter Notebook, try restarting the kernel [as suggested in this GitHub issue.](https://github.com/scikit-image/scikit-image/issues/3273) That solved the problem for me.
three ways to convert RGB2Gray: opencv: ``` import cv2 img=cv2.imread("file.jpg",0) [enter link description here][1] ``` or you can do this: ``` img=cv2.imread("file.jpg") gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) ``` **cv2.COLOR\_BGR2GRAY** beacause it reads BGR mode. another methods you can look this link: ...
52,305,860
When I try: ``` >>> from skimage import io ``` I get at the end the following: ``` from ..color import rgb2gray ImportError: cannot import name 'rgb2gray' from 'skimage.color' (C:\Users\user\A ppData\Local\Programs\Python\Python37-32\lib\site-packages\skimage\color\__init_ _.py) ``` Although I have installed th...
2018/09/13
[ "https://Stackoverflow.com/questions/52305860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10254054/" ]
In case you run into this error from inside a Jupyter Notebook, try restarting the kernel [as suggested in this GitHub issue.](https://github.com/scikit-image/scikit-image/issues/3273) That solved the problem for me.
It looks like you haven't installed *`scikit-image`* package. Try this on terminal: ``` pip install -U scikit-image ``` And then try importing like this: ``` from skimage import io from skimage.color import rgb2gray ``` If you still got the *error or you have installed the package* previously, [try reinstalling...
52,305,860
When I try: ``` >>> from skimage import io ``` I get at the end the following: ``` from ..color import rgb2gray ImportError: cannot import name 'rgb2gray' from 'skimage.color' (C:\Users\user\A ppData\Local\Programs\Python\Python37-32\lib\site-packages\skimage\color\__init_ _.py) ``` Although I have installed th...
2018/09/13
[ "https://Stackoverflow.com/questions/52305860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10254054/" ]
It looks like you haven't installed *`scikit-image`* package. Try this on terminal: ``` pip install -U scikit-image ``` And then try importing like this: ``` from skimage import io from skimage.color import rgb2gray ``` If you still got the *error or you have installed the package* previously, [try reinstalling...
It happened to me once when I import `skimage` using `env conda` on Jupyter. I installed by `pip` or `conda` in env, that error happened. However, after restart the Jupyter, it worked.
52,305,860
When I try: ``` >>> from skimage import io ``` I get at the end the following: ``` from ..color import rgb2gray ImportError: cannot import name 'rgb2gray' from 'skimage.color' (C:\Users\user\A ppData\Local\Programs\Python\Python37-32\lib\site-packages\skimage\color\__init_ _.py) ``` Although I have installed th...
2018/09/13
[ "https://Stackoverflow.com/questions/52305860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10254054/" ]
In case you run into this error from inside a Jupyter Notebook, try restarting the kernel [as suggested in this GitHub issue.](https://github.com/scikit-image/scikit-image/issues/3273) That solved the problem for me.
It happened to me once when I import `skimage` using `env conda` on Jupyter. I installed by `pip` or `conda` in env, that error happened. However, after restart the Jupyter, it worked.
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
Regarding Android x86 6.0 The "EEEPC" assignment is only for ASUS EEEPCs, only use it if you have one, otherwise use `android_x86`, **do not use generic\_x86**, you will get stuck at the boot animation and have to restart by using `CTRL`+`F1` to access the terminal and issue `reboot` as the GUI will not get loaded. I ...
None of the other answers worked for me, so I decided to find the solution myself in the files provided by the ISO image with Android-x86 installation files. In `Android-x86 LiveCD1/efi/boot/android.cfg` I found the following menu entry: ``` set root=$android linux $kdir/kernel root=/dev/ram0 androidboot.selinux=perm...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
[This is from XDA Developers](http://forum.xda-developers.com/showthread.php?t=2703270) For GRUB 1.97 - 1.99 & 2.00 + 1. To make it easy, install GRUB Customizer Type these into terminal emulator : Code: ``` sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt-get update sudo apt-get install grub-c...
* Open `40_custom`: ``` sudo -H gedit /etc/burg.d/40_custom ``` * Add Android x86 menu entry: ``` menuentry "Android-4.3-x86" --class android { set root='(hd*,msdos*)' linux /path/android-4.3-x86/kernel quiet root=/dev/ram0 androidboot.hardware=tx2500 acpi_sleep=s3_bios,s3_mode SRC=/path/android-4.3-x86 vga=788 init...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
This is a ten month old question but I figured I'd help anyway. It's actually a very simple fix. I'm throwing the fix in my answer instead of hitting "edit" on the above answer because I don't want to wait for peer reviewing or whatever. Anyway, the answer with the most votes states that you should use the following c...
This was all very helpful, but in the end, it was missing a small bit for me and it wouldn't work until I added in all the parts. ``` set root='(hd0,2)' linux /cm-x86-14.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug initrd /cm-x86-14.1-r2/initrd.img ``` As posted by Banan3'14...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
[This is from XDA Developers](http://forum.xda-developers.com/showthread.php?t=2703270) For GRUB 1.97 - 1.99 & 2.00 + 1. To make it easy, install GRUB Customizer Type these into terminal emulator : Code: ``` sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt-get update sudo apt-get install grub-c...
This is a ten month old question but I figured I'd help anyway. It's actually a very simple fix. I'm throwing the fix in my answer instead of hitting "edit" on the above answer because I don't want to wait for peer reviewing or whatever. Anyway, the answer with the most votes states that you should use the following c...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
* Open `40_custom`: ``` sudo -H gedit /etc/burg.d/40_custom ``` * Add Android x86 menu entry: ``` menuentry "Android-4.3-x86" --class android { set root='(hd*,msdos*)' linux /path/android-4.3-x86/kernel quiet root=/dev/ram0 androidboot.hardware=tx2500 acpi_sleep=s3_bios,s3_mode SRC=/path/android-4.3-x86 vga=788 init...
None of the other answers worked for me, so I decided to find the solution myself in the files provided by the ISO image with Android-x86 installation files. In `Android-x86 LiveCD1/efi/boot/android.cfg` I found the following menu entry: ``` set root=$android linux $kdir/kernel root=/dev/ram0 androidboot.selinux=perm...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
This is a ten month old question but I figured I'd help anyway. It's actually a very simple fix. I'm throwing the fix in my answer instead of hitting "edit" on the above answer because I don't want to wait for peer reviewing or whatever. Anyway, the answer with the most votes states that you should use the following c...
Don't bother with the sda or sdc, it is always (hd0,x) in my case if you installed the android x86 to the booting device. That's to say, in my case, whether your device is listed in os like ubuntu as /dev/sda or /dev/sdb, you should add (hd0,x), x is the number of your android x86 partition, in the grub 2 item, as long...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
Regarding Android x86 6.0 The "EEEPC" assignment is only for ASUS EEEPCs, only use it if you have one, otherwise use `android_x86`, **do not use generic\_x86**, you will get stuck at the boot animation and have to restart by using `CTRL`+`F1` to access the terminal and issue `reboot` as the GUI will not get loaded. I ...
This was all very helpful, but in the end, it was missing a small bit for me and it wouldn't work until I added in all the parts. ``` set root='(hd0,2)' linux /cm-x86-14.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug initrd /cm-x86-14.1-r2/initrd.img ``` As posted by Banan3'14...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
[This is from XDA Developers](http://forum.xda-developers.com/showthread.php?t=2703270) For GRUB 1.97 - 1.99 & 2.00 + 1. To make it easy, install GRUB Customizer Type these into terminal emulator : Code: ``` sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt-get update sudo apt-get install grub-c...
None of the other answers worked for me, so I decided to find the solution myself in the files provided by the ISO image with Android-x86 installation files. In `Android-x86 LiveCD1/efi/boot/android.cfg` I found the following menu entry: ``` set root=$android linux $kdir/kernel root=/dev/ram0 androidboot.selinux=perm...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
[This is from XDA Developers](http://forum.xda-developers.com/showthread.php?t=2703270) For GRUB 1.97 - 1.99 & 2.00 + 1. To make it easy, install GRUB Customizer Type these into terminal emulator : Code: ``` sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt-get update sudo apt-get install grub-c...
This was all very helpful, but in the end, it was missing a small bit for me and it wouldn't work until I added in all the parts. ``` set root='(hd0,2)' linux /cm-x86-14.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug initrd /cm-x86-14.1-r2/initrd.img ``` As posted by Banan3'14...
517,212
I have a small problem. I have seven partitions: ``` Device Boot Begin End Blocks Id System /dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7 /dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,.... /dev/sda3 735516...
2014/08/28
[ "https://askubuntu.com/questions/517212", "https://askubuntu.com", "https://askubuntu.com/users/321414/" ]
This was all very helpful, but in the end, it was missing a small bit for me and it wouldn't work until I added in all the parts. ``` set root='(hd0,2)' linux /cm-x86-14.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug initrd /cm-x86-14.1-r2/initrd.img ``` As posted by Banan3'14...
Don't bother with the sda or sdc, it is always (hd0,x) in my case if you installed the android x86 to the booting device. That's to say, in my case, whether your device is listed in os like ubuntu as /dev/sda or /dev/sdb, you should add (hd0,x), x is the number of your android x86 partition, in the grub 2 item, as long...
123,320
In showing that MSE can be decomposed into variance plus the square of Bias, [the proof in Wikipedia](https://en.wikipedia.org/wiki/Mean_squared_error#Proof_of_variance_and_bias_relationship) has a step, highlighted in the picture. How does this work? How is the expectation pushed in to the product from the 3rd step to...
2014/11/09
[ "https://stats.stackexchange.com/questions/123320", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/55780/" ]
The trick is that $\mathbb{E}(\hat{\theta}) - \theta$ is a constant.
$E(\hat{\theta}) - \theta$ is not a constant. The comment of @user1158559 is actually the correct one: $$ E[\hat{\theta} - E(\hat{\theta})] = E(\hat{\theta}) - E[E(\hat{\theta})] = E(\hat{\theta}) - E(\hat{\theta}) = 0 $$
123,320
In showing that MSE can be decomposed into variance plus the square of Bias, [the proof in Wikipedia](https://en.wikipedia.org/wiki/Mean_squared_error#Proof_of_variance_and_bias_relationship) has a step, highlighted in the picture. How does this work? How is the expectation pushed in to the product from the 3rd step to...
2014/11/09
[ "https://stats.stackexchange.com/questions/123320", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/55780/" ]
The trick is that $\mathbb{E}(\hat{\theta}) - \theta$ is a constant.
There has been some confusion about the question which was ambiguous being about the highlight **and** the step from line three to line four. There are two terms that look a lot like each other. $$\mathbb{E}\left[\hat{\theta}\right] - \theta \quad \text{vs} \quad \mathbb{E}\left[\hat{\theta}\right] - \hat\theta$$ T...
13,321,304
i need the query for count the number of Columns in my SQL Server table .
2012/11/10
[ "https://Stackoverflow.com/questions/13321304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1814317/" ]
``` select count(*) from your_table ``` counts **all** rows, even when some records contain `NULL` entries. ``` select count(some_column) from your_table ``` counts records where `some_column` `IS NOT NULL`
this ``` select count(*) from table ``` `*` means all columns
21,628,601
I am looking for over 12 hours to find a proper solution for this particular problem... I have an ASP MVC (.NET framework 4.5) application that utilizes an Interbase XE database. As long as I run it locally on my own machine, it works correctly. However, when I try to publish the site to my remote server, I get some a...
2014/02/07
[ "https://Stackoverflow.com/questions/21628601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1077345/" ]
Finally after a few weeks, I have managed to solve this particular issue. It turned out to be a simple solution, as simple solutions are most often the hardest ones to find... It turns out that Embarcadero RAD Studio has the Borland.Data.DbxCommonDriver.dll, Borland.Data.AdoDBXClient.dll and the Borland.Data.DBXInterB...
I am having the same issue ( you posted on my thread) Maybe this cna be of help : <http://docs.embarcadero.com/products/rad_studio/radstudio2007/RS2007_helpupdates/HUpdate4/EN/html/devcommon/deployingadodbxclient_xml.html> I am too novice to find the PublicKeytoken.. but maybe you can work it out for your project wit...
1,339,188
I was wondering, if I deploy a WSP using the stsadm command: ``` stsadm -o addsolution –filename myWSP.wsp ``` Will this also install the required DLL's (already included in the WSP) into the GAC? Or is this another manual process?
2009/08/27
[ "https://Stackoverflow.com/questions/1339188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41543/" ]
This is determined by the **DeploymentTarget attribute** in the solution's `manifest.xml`. If you are maintaining this file yourself, using the following syntax will deploy the code to the GAC: ``` <Assemblies> <Assembly DeploymentTarget="GlobalAssemblyCache" Location="MyGAC.dll" /> </Assemblies> ```...
As the command says **addsolution** it is just going to add the solution to the Solution store. You need to call the command **deploysolution** to get the stuffs to place. Here is the command that you need to call ``` stsadmin -o deploysolution -name [solutionname] -allowgacdeployment ``` Note that **allowgacdeploy...
1,339,188
I was wondering, if I deploy a WSP using the stsadm command: ``` stsadm -o addsolution –filename myWSP.wsp ``` Will this also install the required DLL's (already included in the WSP) into the GAC? Or is this another manual process?
2009/08/27
[ "https://Stackoverflow.com/questions/1339188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41543/" ]
This is determined by the **DeploymentTarget attribute** in the solution's `manifest.xml`. If you are maintaining this file yourself, using the following syntax will deploy the code to the GAC: ``` <Assemblies> <Assembly DeploymentTarget="GlobalAssemblyCache" Location="MyGAC.dll" /> </Assemblies> ```...
If you're building the packages via VS, open the Package and click the Advanced tab on the bottom. You'll be able to add additional assemblies and specify the Deployment Target from here. I'd strongly recommend doing this rather than updating the XML directly...but that's just me.
1,077,258
I am using the following to search for a file defined as a macro DB\_CONFIG\_FILE\_PATH\_1. ``` wchar_t filename[100]; SearchPath( L".\\", DB_CONFIG_FILE_PATH_1, NULL, 100, filename, NULL); ``` If the file is in C:\ directory, it is found. But, if the file is in one of its sub-directories the function doesn't find i...
2009/07/02
[ "https://Stackoverflow.com/questions/1077258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For searching subdirectories in native code on Win32, you need to do it yourself, using FindFirstFile and then recursing into subdirectories. The return value of FindFirstFile isn't a file handle - the file information is contained in the WIN32\_FIND\_DATA structure returned. The handle is used in calls to FindNextFil...
`GetCurrentDirectory()` should tell you the path: <http://msdn.microsoft.com/en-us/library/aa364934(VS.85).aspx> and the second argument of `FindFirstFile()`: <http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx> which is a `WIN32_FIND_DATA` Structure should tell you the name of the file: <http://msdn.mic...
45,969,767
How can I generate a narrative functionally in RMarkdown? For instance, say I want to generate 3 headers like ``` ##First ##Second #Third ``` from a vector `c('First', 'Second', 'Third')`, then knit to pdf
2017/08/30
[ "https://Stackoverflow.com/questions/45969767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4997164/" ]
> > How to get this parameter displayed as dropdown? > > > As bmoore-msft mentioned we could replace the `defaultValue` with `allowedValues` and `array` with `string`. We also could set the dropdownlist default value from the template. In your case, please have a try to use the following code. More details we coul...
Replace "defaultValue" with "allowedValues" and "array" with "string".
35,278,669
I have saved my JSON object in a variable and I am making calculations off of the properties within the object; however, I am finding that the calculations are very long to write and if the data becomes larger, the calculations can become pretty long. I am hoping that there is a simpler way to make calculations than ...
2016/02/08
[ "https://Stackoverflow.com/questions/35278669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5518272/" ]
You can use [Task Logging Commands](https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/authoring/commands.md) to do this. > > To invoke a logging command, simply emit the command via standard > output. For example, from a PowerShell task: > > > "##vso[task.setvariable variable=testvar;]testvalue" > > ...
For Mac, do this : ``` echo '##vso[task.setvariable variable=variableName;]'$variableValue ```
57,353,552
I'm working on bringing linux to a custom Cortex-M7 board with 16 Mb of SDRAM and 64 Mb of Flash. The platform has no-MMU, no shared libraries, FLAT executables. I'm having problems booting a Busybox system with very simple init.d shell scripts. The system is running out of memory by executing simple shell commands li...
2019/08/05
[ "https://Stackoverflow.com/questions/57353552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/158099/" ]
TL-DR; Linux has a huge infrastructure and variety of rootfs or boot file systems available. The choice is due to accommodation of different system constraints and end user functions. Busybox is a good choice for the target system, but any software can be misused if a system engineer doesn't spend time to understand it...
The point of BusyBox is that you need to have only one (shared) executable in memory. You wrote: > > It turns out that everytime one of these commands are executed the system needs to load the FULL, one and only busybox executable (650 Kb on my system). > > > That's not entirely true. For the first command the e...
353,391
I have a new install of magento 2.4 and i set it up for a custom domain and HTTPS and now when I go to the / admin panel I get a large Magento logo with no formatting and when I login the backend shows text only and no formatting for any of the panels. I was researching it a little and saw it might be an issue with the...
2022/02/23
[ "https://magento.stackexchange.com/questions/353391", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/103932/" ]
Whenever a patch is run, Magento adds it into the `patch_list` table, so, the next time when you run `setup:upgrade`, it checks if that patch is present in that table, then it skips the patch. So, what you can do, is just manually add `\Magento\Tax\Setup\Patch\Data\UpdateTaxRegionId` into the table.
I guess this issue occurred during `php bin/magento setup:upgrade` look like you already applied patch earlier and upgrade want to apply it again so, simply you can delete this file > > /vendor/magento/module-tax/Setup/Patch/Data/UpdateTaxRegionId.php > > > or try to upgrade with latest version 2.4.3-p2 this may...
51,344,048
i'm new to ruby on rails and I am trying to create a custom message for a model's validation failure scenario. Here is the code. ``` class TestModel include ActiveModel::Model attr_accessor :attr validates :attr, presence: true, format: {with: /\A[A-Za-z].+\z/, message: -> (value) do ...
2018/07/14
[ "https://Stackoverflow.com/questions/51344048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7969928/" ]
If you're going to use a lambda with the `:message` option then your lambda will get *two* arguments. From the [fine guide](http://guides.rubyonrails.org/active_record_validations.html#message): > > **3.3 :message** > > [...] > > A Proc :message value is given two arguments: the object being validated, and a ...
You're not using `message` correctly. You don't need to pass it a block to interpolate the value. Use it like so. ``` require 'active_model' class TestModel include ActiveModel::Model attr_accessor :attr validates :attr, presence: true, format: {with: /\A[A-Za-z].+\z/, messa...
69,935,987
I have a class of Orders and it has the number of the order, and it has to increase by 1 every time a new order is created. I tried to use static but it changed the number of all the orders Any help?
2021/11/11
[ "https://Stackoverflow.com/questions/69935987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14121088/" ]
If it is ID generator you need, there is simple solution with combination of static + instance variable ``` public class Order { private static volatile long nextId = 0L; private long id; public Order (){ id = nextId++; } } ``` **EDIT** I'll just leave it here for reference [Is a volatile int in Java t...
maybe like that? ``` public class Order { private long id; public Order (long lastId){ id = lastId++; } } ``` so, when you create a new you do `Order order = new Order(otherOrder);`
20,316,821
Why doesn't the following work ? ``` app.js reports/ ├── index.js └── batch.js ``` in `app.js` : ``` app.use('/reports', require('./reports') ``` in `index.js` : ``` var express = require('express'); var batch = require('./batch'); var app = express.createServer(); ... app.use('/batch', batch); module.ex...
2013/12/01
[ "https://Stackoverflow.com/questions/20316821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599912/" ]
try this: in app.js : ``` var express = require('express'), http = require('http'), path = require('path'); var app = express.createServer(); require('./reports')(app); ``` in reports/index.js : ``` module.exports = function(app){ var batch = require('./batch')(app); app.use('/batch', batch); } ...
Here is my app.js. It passes db and app to the feature.js. Basically they share the same app variable. in app.js ``` var express = require('express'), http = require('http'), path = require('path'), mongoose = require('mongoose'), db = mongoose.connect('mongodb://abc:123@xxxx.mongohq.com:90000/ap...
20,316,821
Why doesn't the following work ? ``` app.js reports/ ├── index.js └── batch.js ``` in `app.js` : ``` app.use('/reports', require('./reports') ``` in `index.js` : ``` var express = require('express'); var batch = require('./batch'); var app = express.createServer(); ... app.use('/batch', batch); module.ex...
2013/12/01
[ "https://Stackoverflow.com/questions/20316821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599912/" ]
It seems that I have forgotten javascript a little. I was doing ``` app.use('/batch', batch); ``` `batch` is equal to ``` function() { var app = express.createServer(); console.log('I am here'); app.get('/', function(req, res) { console.log('I am there'); }); return app; }; ``` Instead I should h...
Here is my app.js. It passes db and app to the feature.js. Basically they share the same app variable. in app.js ``` var express = require('express'), http = require('http'), path = require('path'), mongoose = require('mongoose'), db = mongoose.connect('mongodb://abc:123@xxxx.mongohq.com:90000/ap...
20,316,821
Why doesn't the following work ? ``` app.js reports/ ├── index.js └── batch.js ``` in `app.js` : ``` app.use('/reports', require('./reports') ``` in `index.js` : ``` var express = require('express'); var batch = require('./batch'); var app = express.createServer(); ... app.use('/batch', batch); module.ex...
2013/12/01
[ "https://Stackoverflow.com/questions/20316821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599912/" ]
try this: in app.js : ``` var express = require('express'), http = require('http'), path = require('path'); var app = express.createServer(); require('./reports')(app); ``` in reports/index.js : ``` module.exports = function(app){ var batch = require('./batch')(app); app.use('/batch', batch); } ...
It seems that I have forgotten javascript a little. I was doing ``` app.use('/batch', batch); ``` `batch` is equal to ``` function() { var app = express.createServer(); console.log('I am here'); app.get('/', function(req, res) { console.log('I am there'); }); return app; }; ``` Instead I should h...
12,398,957
If the following possible? I wish to move the alert(result) into a function and to dynamically call it. **Current** ``` $.ajax(this.href, { success: function (result) { alert(result); AjaxComplete(); } }); ``` **My Attempt - not working** ``` $.ajax(this.href, { success: function ...
2012/09/13
[ "https://Stackoverflow.com/questions/12398957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511438/" ]
Why can't you just do this? ``` MyAlert(result); ``` If `MyAlert` is a part of the `window` object, it's already a global. Unless you want to call an arbitrary function by name (which isn't really good practice, IMO), which you can do like this: ``` window[function_name_string](argument); ```
``` window["MyAlert(result)"); ``` is invalid syntax (missmatching `[` and `)`, wrong function name, and not calling it at all, just getting it..). Should be ``` window["MyAlert"](result); ``` if you want to call it like that, but I see no reason why you couldn't just call it normally, as Blender mentioned.
68,396
I'm currently writing my thesis in mathematics and in the introductory part I want to give a brief overview over a field I'm not very familiar with. There are some results in the book I'm reading which are stated as exercises for the reader, which I'd like to include as theorems in my thesis. I don't want to prove them...
2016/05/09
[ "https://academia.stackexchange.com/questions/68396", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/8040/" ]
> > Don't give any citation at all and assume these concepts are well known to anyone working in the field? - I wouldn't give the definition of a vector space in my thesis, so this might be justifiable. However, I wouldn't consider those theorems as basic as the definition of vector spaces... > > > The general ide...
If it's a fact that needs to be justified but is not relevant enough to devote space in your thesis to proving it in detail, it's better to cite a source that gives the proof, if you can find one. If you can't, I recommend trying to come up with a proof of your own, and writing in your thesis something like > > This ...
68,396
I'm currently writing my thesis in mathematics and in the introductory part I want to give a brief overview over a field I'm not very familiar with. There are some results in the book I'm reading which are stated as exercises for the reader, which I'd like to include as theorems in my thesis. I don't want to prove them...
2016/05/09
[ "https://academia.stackexchange.com/questions/68396", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/8040/" ]
In mathematics, if you cite a result, you should really be able provide the proof if somebody asks for it. So I would strongly recommend against option 3. One thing you might consider is writing the author of the textbook, explaining your situation, and asking if he's willing to send you a proof. Then you can cite it ...
If it's a fact that needs to be justified but is not relevant enough to devote space in your thesis to proving it in detail, it's better to cite a source that gives the proof, if you can find one. If you can't, I recommend trying to come up with a proof of your own, and writing in your thesis something like > > This ...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
``` var touchmoved; $('button').on('touchend', function(e){ if(touchmoved != true){ // button click action } }).on('touchmove', function(e){ touchmoved = true; }).on('touchstart', function(){ touchmoved = false; }); ```
I came across this elegant solution that works like a charm using jQuery. My problem was preventing list items from calling their touch start event during scrolling. This should also work for swiping. 1. bind touchstart to each item that will be scrolled or swiped using a class 'listObject' ``` $('.listObject').live(...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
``` var touchmoved; $('button').on('touchend', function(e){ if(touchmoved != true){ // button click action } }).on('touchmove', function(e){ touchmoved = true; }).on('touchstart', function(){ touchmoved = false; }); ```
I use this bit of code so that buttons are only triggered (on touchend) if not being swiped on: ``` var startY; var yDistance; function touchHandler(event) { touch = event.changedTouches[0]; event.preventDefault(); } $('.button').on("touchstart", touchHandler, true); $('.button').on("touchmove", touchHandler...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
Here's what I eventually came up with to allow for a list of items to be scrollable via swipe, but also each item to be 'triggerable' via a tap. In addition, you can still use with a keyboard (using onclick). I think this is similar to Netlight\_Digital\_Media's answer. I need to study that one a bit more. ``` $(do...
I came up with this, since i wanted a global event that also can prevent linking dynamically. So `preventDefault()` must be callable in the event listener, for this the touch event is referenced. The detection is like most solutions posted here so far. On the end of the touch check if the element is still the same or ...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
``` var touchmoved; $('button').on('touchend', function(e){ if(touchmoved != true){ // button click action } }).on('touchmove', function(e){ touchmoved = true; }).on('touchstart', function(){ touchmoved = false; }); ```
I came up with this, since i wanted a global event that also can prevent linking dynamically. So `preventDefault()` must be callable in the event listener, for this the touch event is referenced. The detection is like most solutions posted here so far. On the end of the touch check if the element is still the same or ...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
I came up with this, since i wanted a global event that also can prevent linking dynamically. So `preventDefault()` must be callable in the event listener, for this the touch event is referenced. The detection is like most solutions posted here so far. On the end of the touch check if the element is still the same or ...
jQuery Mobile has a [`.tap()`](http://api.jquerymobile.com/tap/) event which seems to have the behavior you'd expect: > > The jQuery Mobile tap event triggers after a quick, complete touch event that occurs on a single target object. It is the gesture equivalent of a standard click event that is triggered on the rele...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
Here's what I eventually came up with to allow for a list of items to be scrollable via swipe, but also each item to be 'triggerable' via a tap. In addition, you can still use with a keyboard (using onclick). I think this is similar to Netlight\_Digital\_Media's answer. I need to study that one a bit more. ``` $(do...
I use this bit of code so that buttons are only triggered (on touchend) if not being swiped on: ``` var startY; var yDistance; function touchHandler(event) { touch = event.changedTouches[0]; event.preventDefault(); } $('.button').on("touchstart", touchHandler, true); $('.button').on("touchmove", touchHandler...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
What you basically want to do is to detect what is a swipe and what is a click. We may set some conditions: 1. Swipe is when you touch at point `p1`, then move your finger to point `p2` while still having the finger on the screen, then releaseing. 2. A click is when you tap start tapping and end tapping on the same e...
jQuery Mobile has a [`.tap()`](http://api.jquerymobile.com/tap/) event which seems to have the behavior you'd expect: > > The jQuery Mobile tap event triggers after a quick, complete touch event that occurs on a single target object. It is the gesture equivalent of a standard click event that is triggered on the rele...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
What you basically want to do is to detect what is a swipe and what is a click. We may set some conditions: 1. Swipe is when you touch at point `p1`, then move your finger to point `p2` while still having the finger on the screen, then releaseing. 2. A click is when you tap start tapping and end tapping on the same e...
I did this with a bit of a different work around. It's definitely not very elegant and certainly not suited to most situations, but it worked for me. I have been using jQuery's toggleSlide() to open and close input divs, firing the slide on touchstart. The problem was that when the user wanted to scroll, the touched ...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
Some of these solutions worked for me, but in the end I found that this lightweight library was simpler to setup. Tocca.js: <https://github.com/GianlucaGuarini/Tocca.js> It's quite flexible and detects touch as well as swipe, double-tap etc.
I did this with a bit of a different work around. It's definitely not very elegant and certainly not suited to most situations, but it worked for me. I have been using jQuery's toggleSlide() to open and close input divs, firing the slide on touchstart. The problem was that when the user wanted to scroll, the touched ...
7,069,458
I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list. Here's what I've found: Doesn't trigger when scrolling: * click * mous...
2011/08/15
[ "https://Stackoverflow.com/questions/7069458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172279/" ]
I came up with this, since i wanted a global event that also can prevent linking dynamically. So `preventDefault()` must be callable in the event listener, for this the touch event is referenced. The detection is like most solutions posted here so far. On the end of the touch check if the element is still the same or ...
I did this with a bit of a different work around. It's definitely not very elegant and certainly not suited to most situations, but it worked for me. I have been using jQuery's toggleSlide() to open and close input divs, firing the slide on touchstart. The problem was that when the user wanted to scroll, the touched ...
69,931,297
I would just like to send a DM to my friend via python code. This is my code, but it does not work. Code: ``` import discord client = discord.Client(token="MY_TOKEN") async def sendDm(): user = client.get_user("USER_ID") await user.send("Hello there!") ```
2021/11/11
[ "https://Stackoverflow.com/questions/69931297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15370132/" ]
1. Your bot might now have the user in its cache. Then use `fetch_user` instead of `get_user` (`fetch` requests the Discord API instead of its internal cache): ```py async def sendDm(): user = await client.fetch_user("USER_ID") await user.send("Hello there!") ``` 2. You can run it with [`on_ready` event](htt...
So are you trying to do this with a command? If so here is that ``` @bot.command() async def dm(ctx, user: discord.User = None, *, value = None): if user == ctx.message.author: await ctx.send("You can't DM yourself goofy") else: await ctx.message.delete() if user == None: await ctx.send(f'**{ctx....
15,376,478
I want to get the name and picture of a Cub Scout, the Cub Scout details, the awards and details for each award and display these details in a view. Is it best to get each set of details from the server side, pass it back to the client side and display it or get all the information at once? I would opt for option 2. H...
2013/03/13
[ "https://Stackoverflow.com/questions/15376478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965599/" ]
Unless your query is returning some huge dataset, then multiple queries probably aren't necessary. If load times are too slow when you implement your queries, consider paging your results.
When showing a view with all records from db, it is usually a good practice to show minimum data for each row with a link to more details for each row for better user experience and less load time from query. Now when user click on more details, other detail data of that particular row should be fetched.
15,376,478
I want to get the name and picture of a Cub Scout, the Cub Scout details, the awards and details for each award and display these details in a view. Is it best to get each set of details from the server side, pass it back to the client side and display it or get all the information at once? I would opt for option 2. H...
2013/03/13
[ "https://Stackoverflow.com/questions/15376478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965599/" ]
Unless your query is returning some huge dataset, then multiple queries probably aren't necessary. If load times are too slow when you implement your queries, consider paging your results.
I agree that if the size of the information is not that big, probably is a good idea to get it all at once. All depends on your UX and you backend design. Are you expecting to show the info according to user interactions?, Are you going to reuse part of that information somewhere else in your app?. Are you caching qu...
15,376,478
I want to get the name and picture of a Cub Scout, the Cub Scout details, the awards and details for each award and display these details in a view. Is it best to get each set of details from the server side, pass it back to the client side and display it or get all the information at once? I would opt for option 2. H...
2013/03/13
[ "https://Stackoverflow.com/questions/15376478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965599/" ]
Unless your query is returning some huge dataset, then multiple queries probably aren't necessary. If load times are too slow when you implement your queries, consider paging your results.
Get the benefits of Asynchronous call load as less data as possible on `on-load` and make `Asynchronous calls` when data needed. Two main reasons to go for `Asynchronous` : **Reduce the traffic travels between the client and the server.** **Response time is faster so increases performance and speed.**
46,078,942
i want to do like let user to add a new item which user can enter item name, item description, item price and so on. let say the name variable stored candy and i have a candy image in my drawable can i do like R.drawable.name to refer to R.drawable.candy?? Anyone help pls ``` public class item { String name; S...
2017/09/06
[ "https://Stackoverflow.com/questions/46078942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8525038/" ]
You can use the [`Resources.getIdentifier()` method](https://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String,%20java.lang.String,%20java.lang.String)). For `R.drawable.candy`, you'd use it like this: ``` int id = getResources().getIdentifier("candy", "drawable", getPac...
Answer is No, You can not do like R.drawable.name
20,349,577
When I execute the following command in SSMS I get the results I expect - ``` SELECT * FROM [Event] WHERE Active = 'True' AND [Name] LIKE '%P%' ``` i.e. All the Events whose Name contains a P are displayed However, when I build this command in my WinForms app written in C# I always get an empty datatable. I am usi...
2013/12/03
[ "https://Stackoverflow.com/questions/20349577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1109750/" ]
Remove single quote from between `@Name` parameter. ``` sqlText += " AND [Name] LIKE @Name"; ```
After this line : sqlCom.CommandText = sqlText; You should add this line: sqlCom.ExecuteNonQuery();
55,019,779
This does not work. What am I doing wrong? The error says x is undefined. I was trying to increment xx by one with an x keypress. ``` xx = int() yy = int() zz = int() print(xx, yy, zz) b = input("New value:") if b == x: then [xx ++ 1] print(xx, yy, zz) else : print(xx, yy, zz) ```
2019/03/06
[ "https://Stackoverflow.com/questions/55019779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11158548/" ]
You can use nth-last-child to solve what you need, see my below edits which solves your issue. More info on nth-last-child here: <https://www.w3schools.com/cssref/sel_nth-last-child.asp> Thanks ```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px soli...
If you want to do something from the last row, Use `:nth-last-child()`. ```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px solid red; } .box:nth-last-child(odd) { background: grey; } .box:nth-last-child(even) { background:green; } ``` `...
55,019,779
This does not work. What am I doing wrong? The error says x is undefined. I was trying to increment xx by one with an x keypress. ``` xx = int() yy = int() zz = int() print(xx, yy, zz) b = input("New value:") if b == x: then [xx ++ 1] print(xx, yy, zz) else : print(xx, yy, zz) ```
2019/03/06
[ "https://Stackoverflow.com/questions/55019779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11158548/" ]
```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px solid red; } .box:nth-child(odd) { background: grey; } .box:nth-child(even) { background:green; } .box:last-child { background: grey; } .box:nth-last-child(2){ background:green;...
If you want to do something from the last row, Use `:nth-last-child()`. ```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px solid red; } .box:nth-last-child(odd) { background: grey; } .box:nth-last-child(even) { background:green; } ``` `...
55,019,779
This does not work. What am I doing wrong? The error says x is undefined. I was trying to increment xx by one with an x keypress. ``` xx = int() yy = int() zz = int() print(xx, yy, zz) b = input("New value:") if b == x: then [xx ++ 1] print(xx, yy, zz) else : print(xx, yy, zz) ```
2019/03/06
[ "https://Stackoverflow.com/questions/55019779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11158548/" ]
You can use nth-last-child to solve what you need, see my below edits which solves your issue. More info on nth-last-child here: <https://www.w3schools.com/cssref/sel_nth-last-child.asp> Thanks ```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px soli...
You can select div using `nth-last-child`. Try my code- ```css .main { width: 500px; height: 500px; border: 1px solid blue; } .box { width: 500pxpx; height: 50px; border: 1px solid red; } .box:nth-last-child(2n+1) { background: grey; } .box:nth-last-child(2n) { background: green; } ``...
55,019,779
This does not work. What am I doing wrong? The error says x is undefined. I was trying to increment xx by one with an x keypress. ``` xx = int() yy = int() zz = int() print(xx, yy, zz) b = input("New value:") if b == x: then [xx ++ 1] print(xx, yy, zz) else : print(xx, yy, zz) ```
2019/03/06
[ "https://Stackoverflow.com/questions/55019779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11158548/" ]
You can use nth-last-child to solve what you need, see my below edits which solves your issue. More info on nth-last-child here: <https://www.w3schools.com/cssref/sel_nth-last-child.asp> Thanks ```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px soli...
```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px solid red; } .box:nth-child(odd) { background: grey; } .box:nth-child(even) { background:green; } .box:last-child { background: grey; } .box:nth-last-child(2){ background:green;...
55,019,779
This does not work. What am I doing wrong? The error says x is undefined. I was trying to increment xx by one with an x keypress. ``` xx = int() yy = int() zz = int() print(xx, yy, zz) b = input("New value:") if b == x: then [xx ++ 1] print(xx, yy, zz) else : print(xx, yy, zz) ```
2019/03/06
[ "https://Stackoverflow.com/questions/55019779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11158548/" ]
```css .main{ width:500px; height: 500px; border:1px solid blue; } .box{ width:300px; height: 100px; border:1px solid red; } .box:nth-child(odd) { background: grey; } .box:nth-child(even) { background:green; } .box:last-child { background: grey; } .box:nth-last-child(2){ background:green;...
You can select div using `nth-last-child`. Try my code- ```css .main { width: 500px; height: 500px; border: 1px solid blue; } .box { width: 500pxpx; height: 50px; border: 1px solid red; } .box:nth-last-child(2n+1) { background: grey; } .box:nth-last-child(2n) { background: green; } ``...
18,277,952
I'll be working on a project that will require a live output of a number of tweets users have hash tagged on Twitter as well as their tweets. Something along the lines of MTV's Twitter Tracker: <http://vma-twittertracker.mtv.com/live/#buzz>. What intrigued me about this site is how can they constantly make API calls t...
2013/08/16
[ "https://Stackoverflow.com/questions/18277952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1300806/" ]
Check out [Linq2Twitter](http://linqtotwitter.codeplex.com "Linq2Twitter"). It is a great wrapper around the Twitter API, and provides two mechanisms that will help you: * There is a search function that allows you to search for hash tags, etc, which will limit the amount of data you are getting back * You have the op...
you can look into Storm framework. Below are few links for further reference:- <http://storm-project.net/> <https://github.com/nathanmarz/storm>
18,277,952
I'll be working on a project that will require a live output of a number of tweets users have hash tagged on Twitter as well as their tweets. Something along the lines of MTV's Twitter Tracker: <http://vma-twittertracker.mtv.com/live/#buzz>. What intrigued me about this site is how can they constantly make API calls t...
2013/08/16
[ "https://Stackoverflow.com/questions/18277952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1300806/" ]
Check out [Linq2Twitter](http://linqtotwitter.codeplex.com "Linq2Twitter"). It is a great wrapper around the Twitter API, and provides two mechanisms that will help you: * There is a search function that allows you to search for hash tags, etc, which will limit the amount of data you are getting back * You have the op...
Thanks for all your responses. It looks like sites such that display a lot of Twitter stats/data use [third party approved providers](https://dev.twitter.com/programs/twitter-certified-products/products#Certified-Data-Products) that have direct access to [Twitter's Firehose API](https://dev.twitter.com/docs/api/1.1/ge...
18,170,579
``` $qb = $this->doctrine->em->createQueryBuilder() ->from('User','u') ->select('count(u.name)') ->where('u.name = :name') ->setParameter('name', $user->getUsername()); ``` When I execute `$qb->getQuery()->getResult()`, I get this error: > > Fatal er...
2013/08/11
[ "https://Stackoverflow.com/questions/18170579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2672010/" ]
the following code works great, just add "Entities\" in the clause from. ``` $qb = $this->doctrine->em->createQueryBuilder() ->select($this->doctrine->em->createQueryBuilder()->expr()->count('u.username')) ->from('Entities\User','u') ->where('u.username = :username') ->s...
``` $qb->$this->doctrine->em->createQueryBuilder() ->select($qb->expr()->count('u.name')) ->from('User','u') ->where('u.name = :name') ->setParameter('name', $user->getUsername()); ```
18,170,579
``` $qb = $this->doctrine->em->createQueryBuilder() ->from('User','u') ->select('count(u.name)') ->where('u.name = :name') ->setParameter('name', $user->getUsername()); ``` When I execute `$qb->getQuery()->getResult()`, I get this error: > > Fatal er...
2013/08/11
[ "https://Stackoverflow.com/questions/18170579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2672010/" ]
the following code works great, just add "Entities\" in the clause from. ``` $qb = $this->doctrine->em->createQueryBuilder() ->select($this->doctrine->em->createQueryBuilder()->expr()->count('u.username')) ->from('Entities\User','u') ->where('u.username = :username') ->s...
You can use a User::class to define the entity name. ``` $qb = $this->doctrine->em->createQueryBuilder() ->from(User::class,'u') ->select('count(u.name)') ->where('u.name = :name') ->setParameter('name', $user->getUsername()); ```
20,825,758
I'm having the following data structure in my Meteor project: - Users with a set of list-ids that belong to the user (author) - Lists that actually contain all the data of the list Now I'm trying to publish all Lists of a user to the client. Here is a simple example: ```js if (Meteor.isClient) { Lists = new...
2013/12/29
[ "https://Stackoverflow.com/questions/20825758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3123726/" ]
Solution -------- ``` Lists = new Meteor.Collection('lists'); if (Meteor.isClient) { Tracker.autorun(function() { if (Meteor.userId()) { Meteor.subscribe('lists'); Meteor.subscribe('myLists'); } }); } if (Meteor.isServer) { Meteor.startup(function() { if (Meteor.users.find().count() ===...
Meteor.users.find() returns a cursor of many items but you're trying to access `.lists` with ``` Meteor.users.find({_id: this.userId}, {limit: 1}).lists; ``` You need to use findOne instead. ``` Meteor.users.findOne({_id: this.userId}).lists; ``` Additionally you're running `.fetch()` on an array which is stored ...
20,825,758
I'm having the following data structure in my Meteor project: - Users with a set of list-ids that belong to the user (author) - Lists that actually contain all the data of the list Now I'm trying to publish all Lists of a user to the client. Here is a simple example: ```js if (Meteor.isClient) { Lists = new...
2013/12/29
[ "https://Stackoverflow.com/questions/20825758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3123726/" ]
The real problem here is the schema. Don't store "this user owns these lists" eg, against the users collection. Store "this list is owned by this user" By changing your example to include an `ownerId` field on each `List` then publishing becomes easy - and reactive. It also removes the need for the `myLists` publica...
Meteor.users.find() returns a cursor of many items but you're trying to access `.lists` with ``` Meteor.users.find({_id: this.userId}, {limit: 1}).lists; ``` You need to use findOne instead. ``` Meteor.users.findOne({_id: this.userId}).lists; ``` Additionally you're running `.fetch()` on an array which is stored ...
20,825,758
I'm having the following data structure in my Meteor project: - Users with a set of list-ids that belong to the user (author) - Lists that actually contain all the data of the list Now I'm trying to publish all Lists of a user to the client. Here is a simple example: ```js if (Meteor.isClient) { Lists = new...
2013/12/29
[ "https://Stackoverflow.com/questions/20825758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3123726/" ]
Solution -------- ``` Lists = new Meteor.Collection('lists'); if (Meteor.isClient) { Tracker.autorun(function() { if (Meteor.userId()) { Meteor.subscribe('lists'); Meteor.subscribe('myLists'); } }); } if (Meteor.isServer) { Meteor.startup(function() { if (Meteor.users.find().count() ===...
The real problem here is the schema. Don't store "this user owns these lists" eg, against the users collection. Store "this list is owned by this user" By changing your example to include an `ownerId` field on each `List` then publishing becomes easy - and reactive. It also removes the need for the `myLists` publica...
50,041,391
**Use case:** I want to have two collections which have same fields. One collection will have recent data (say 15 days)and other have old data(say last 6 months). I want to achieve this with a single POJO as it will be easier to do query based on date and then convert it to VOs. **Bottom line: I want to create 2 colle...
2018/04/26
[ "https://Stackoverflow.com/questions/50041391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1971954/" ]
I had the same problem. I don't think it is easily doable because the collection name is set in the `@Document` annotation which sits on your POJO. It is possible to change it dynamically by using SpEL expressions (see e.g. [How To Configure MongoDb Collection Name For a Class in Spring Data](https://stackoverflow.com/...
1. Considering you have similar POJO ``` @Document(collection = "domain") public class Domain { @Id private long id; @Indexed(unique = true) private String name; private Date createdDate; //getters and setters } ``` 2. You can write `QueryMethods` in `Repo` to extract conditional data fro...
189,767
I installed 12.04 xubuntu and latest eclipse. Java is also installed. path is set correctly. but there are two things strange to me. 1. when I double click the eclipse executable, it says cannot find java; 2. create a launcher on the desktop, it says the same thing as above;\*\* open a terminal, type `eclipse`, it wi...
2012/09/17
[ "https://askubuntu.com/questions/189767", "https://askubuntu.com", "https://askubuntu.com/users/91088/" ]
I suspect you need to use update-alternatives to get the links to default locations in order. Your edits to .bashrc aren't applied unless you run in a terminal. Alternately, you could make a bash script to run your bashrc and then eclipse and use that as your launcher target.
Maybe this question is duplicated and the following link can help: [How to pin Eclipse to the Unity launcher?](https://askubuntu.com/questions/80013/how-to-pin-eclipse-to-the-unity-launcher)
226,599
So I have xml that looks like this: ```html <todo-list> <id type="integer">#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id type="integer">#{project_id}</project-id> <milestone-id type="integer">#{milestone_id}</milestone-id> <position type="integer">#{position}</positi...
2008/10/22
[ "https://Stackoverflow.com/questions/226599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9401/" ]
Checkout <http://xsd2code.codeplex.com/> Xsd2Code is a CSharp or Visual Basic Business Entity class Generator from XSD schema.
i had the same questions few years back that how abt mapping xml to C# classes or creating C# classes which are mapped to our XMLs, jst like we do in entity Framework (we map tables to C# classes). I created a framework finally, which can create C# classes out of your XML and these classes can be used to read/write you...
226,599
So I have xml that looks like this: ```html <todo-list> <id type="integer">#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id type="integer">#{project_id}</project-id> <milestone-id type="integer">#{milestone_id}</milestone-id> <position type="integer">#{position}</positi...
2008/10/22
[ "https://Stackoverflow.com/questions/226599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9401/" ]
Boils down to using xsd.exe from tools in VS: ``` xsd.exe "%xsdFile%" /c /out:"%outDirectory%" /l:"%language%" ``` Then load it with reader and deserializer: ``` public GeneratedClassFromXSD GetObjectFromXML() { var settings = new XmlReaderSettings(); var obj = new GeneratedClassFromXSD(); var reader = ...
Well, you'd have to have classes in your assembly that match, roughly, the XML (property called Private, a collection property called ToDo, etc). The problem is that **the XML has elements that are invalid for class names**. So you'd have to implement IXmlSerializable in these classes to control how they are serialize...
226,599
So I have xml that looks like this: ```html <todo-list> <id type="integer">#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id type="integer">#{project_id}</project-id> <milestone-id type="integer">#{milestone_id}</milestone-id> <position type="integer">#{position}</positi...
2008/10/22
[ "https://Stackoverflow.com/questions/226599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9401/" ]
Well, you'd have to have classes in your assembly that match, roughly, the XML (property called Private, a collection property called ToDo, etc). The problem is that **the XML has elements that are invalid for class names**. So you'd have to implement IXmlSerializable in these classes to control how they are serialize...
i had the same questions few years back that how abt mapping xml to C# classes or creating C# classes which are mapped to our XMLs, jst like we do in entity Framework (we map tables to C# classes). I created a framework finally, which can create C# classes out of your XML and these classes can be used to read/write you...
226,599
So I have xml that looks like this: ```html <todo-list> <id type="integer">#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id type="integer">#{project_id}</project-id> <milestone-id type="integer">#{milestone_id}</milestone-id> <position type="integer">#{position}</positi...
2008/10/22
[ "https://Stackoverflow.com/questions/226599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9401/" ]
Deserialize any object, as long as the type `T` is marked Serializable: ``` function T Deserialize<T>(string serializedResults) { var serializer = new XmlSerializer(typeof(T)); using (var stringReader = new StringReader(serializedResults)) return (T)serializer.Deserialize(stringReader); } ```
There are a couple different options. * Visual Studio includes a command line program called xsd.exe. You use that program to create a schema document, and use the program again on the schema document to creates classes you can use with `system.xml.serialization.xmlserializer` * You might just be able to call Dataset....