Id
int64
1.68k
75.6M
PostTypeId
int64
1
1
AcceptedAnswerId
int64
1.7k
75.6M
Question
stringlengths
7
2.03k
Answer
stringlengths
0
2.25k
Image
imagewidth (px)
4
9.41k
11,190,786
1
11,190,906
I need to get rotation matrix from direction vector (vForward) I also have vRight and vUp vectors. All those vectors are unit vectors. I just need to get rotation matrix. To get rotation matrix for rotation in only one plane (xy) parallel to ground, I do this: XMMATRIX xmResult; ''' Vec3f vFwd = pPlayer->VForward; vFwd.z = 0; vFwd.Normalize(); xmResult = XMMatrixSet( vFwd.y, -vFwd.x, 0, 0, vFwd.x, vFwd.y, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); ''' Above code only get rotation matrix to rotate around Z axis: I would like to get the code to rotate around all axis. This is coordinate system I'm forced to use. I know it is strange: <IMAGE> This is how I'm using my matrix later in code: ''' XMStoreFloat3((XMFLOAT3*)&vStart, XMVector3Transform(XMLoadFloat3((XMFLOAT3*)&vStart), xmTransformation)); XMStoreFloat3((XMFLOAT3*)&vEnd, XMVector3Transform(XMLoadFloat3((XMFLOAT3*)&vEnd), xmTransformation)); '''
Depending on how you use your matrices, Right, Up and Forward should correspond to the rows or columns of your matrix. ''' xmResult = XMMatrixSet( vRight.x, vRight.y, vRight.z, 0, vFwd.x, vFwd.y, vFwd.z, 0, vUp.x, vUp.y, vUp.z, 0, 0, 0, 0, 1); '''
19,940,047
1
23,610,819
I am trying to make a web application that is 100% of the screen width and 100% of the screen height, with a 16:9 aspect ratio. It would be awesome if I would be able to view this website fullscreen on my tablet, but unfortunately the on-screen toolbar takes up a large amount of space, making my website display neither in full height nor in full width: <IMAGE> Now I know that since recently, it is possible to hide the scrollbar by scrolling the page down (<URL>. However, since my web application is 100% high, I am unable to hide the toolbar this way. I was wondering whether anybody had another idea as to how I would be able to hide the toolbar. A CSS-only (or perhaps some HTML meta tag unknown to me) method is preferred, but I will settle for a technique using JavaScript as well.
In the end I fixed the problem by adding the possibility to scroll to my document. I positioned the body element fixed so that I am now able to hide the toolbar by swiping up but not moving any content. I admit it's a bit of a hack. ''' html { padding-bottom: 1000px; } body { position: fixed; left: 0; top: 0; right: 0; bottom: 0; } '''
51,187,983
1
51,188,112
I'm having a problem with the CSV generated, it duplicates or iterates the process of printing. Code of printing to CSV: <URL> CSV file generate with null record: <IMAGE> It shows to values 'PASSED' and 'null', I'm only expecting the value with 'PASSED'. Don't know where the 'null' value came from, also in the Debug Sampler the message variable only contains 'PASSED' , did not see any 'null' .
When you use post processor for specific sampler, make sure it will execute only once by putting it under the Sampler, otherwise it can execute for other samplers in its hierarchy which you will not expect If you want it to execute after assertions, change to Beanshell/JSR223 Sampler after your Sampler so it will be executed once after all assertions. See JMetet's <URL>: > ..SamplerPost-Processors> (unless SampleResult is null)Assertions (unless SampleResult is null)..
7,330,027
1
7,330,254
Can anyone tel me how I would make a shape like this in CSS, with the triangle centered top or bottom like I want it ? <IMAGE> With one element.
@harry; there are lot of ways to create this type of triangles arrows. I edit @jam fiddle & center the arrows. CSS: ''' div { background: #76a7dc; padding: 10px; display: inline; position:relative; } div:after { border-color: #76a7dc transparent; border-style: solid; border-width: 10px 10px 0; content: ""; margin-top: 5px; display: block; position: absolute; width: 0; margin-left:-10px; left:50%; bottom:-9px; } ''' check this example <URL>
7,135,392
1
7,135,436
This is a two part question. The first question is. I am looking for a way to shield my php pages using one of these generic login boxes that appear without a real page / html form. Like this box here. What is the name of this? How is it done? <IMAGE> The second is. I want to CRON to visit this password page, and kick off a php script.
The dialog shows up for HTTP "Basic" or "Digest" authentication. . The "Basic" authentication to the server. "Digest" is somewhat better, but there is no way for a user to detect whether the password he's supplying will be used for Basic or Digest (it might not even be clear to the user whether he's authenticating with an HTTP or HTTPS server). Finally, most browsers offer only very obscure ways to clear a password for these authentication methods once it has been typed in. There is no way for the website itself to force a "log out" purge. So users who need to use shared/public computers will not be able to log out afterwards.
50,411,783
1
50,423,724
I am trying to create a new server in Eclipse using Glassfish but when I try to specify the path to my JDK Eclipse wont recognize it. I am getting the same error with Payara as well. I am currently running Antergos Linux. See the image under for example of the error. Error message in Eclipse: <IMAGE> Any ideas what is causing this? I dont know what information to publish here so please request if there is something you want to know.
Neither GlassFish 5 nor Payara Server work with JPMS (introduced in Java 9) yet. The current target is for Payara to be compatible with Java 11, as seen on the support lifecycle: <URL> What this means is that it will probably be the 5.184 version of Payara that will be the first to (officially) support JPMS. The solution for now is to continue to use Java 8, which should be available at least until January 2019.
16,914,935
1
16,915,752
Please have a look at the following Plunker project. I want to keep a list of items in a service which multiple controllers can access. In this example when you select a surname it will come up in the list. However if you set a second name the list is cleared. I just cabn't figure out the logic in the $scope.$watch Users should also be able to select the "please choose" option to remove the name from the list. Then you should see a list of all items which have a last name selected. As in the image the list below should read: - - <URL> I'm still looking at this I just had to abstract it away from my code in case I was doing something wrong there. <IMAGE>
You should save the names and surnames using a hash. Here there is the edited plunkr: <URL> The fact is that you need to trace, for each name, the assigned surname. Otherwise, you are not able to remove it from the list once you assign a new one.
28,814,643
1
28,814,644
I'm trying to open an .aspx file in Visual Studio 2003 and I receive the error "The file could not be loaded into the Web Forms designer...The designer could not be shown for this file because none of the classes within it can be designed." The file then opens displaying the HTML and not the web forms designer. <IMAGE> This is a new installation of VS 2003 on a Windows XP virtual machine. The same .aspx file opens fine on another XP pc. Any suggestions?
The problem went away after I installed <URL>.
18,906,831
1
18,925,494
The title more or less says it all. Judging from the fact that "restrict viewer access" section of the Cloudfront management console (picture below) uses radio buttons, It appears that its an either/or situation.<IMAGE> Are there other ways to parse one's S3 bucket such that it can have both public (i.e., viewable by anyone) and private (i.e., signed urls) content in it?
I can answer my own question. Yes, you can have signed and unsigned urls at the same Cloudfront distribution. In the example below, my distribution is called 'blahblah.cloudfront.com'. The key is to specify two "origin server"s. One for the signed urls and another for the unsigned urls. ''' ->AWS Management Console->Cloudfront->Distribution settings of selected Distribution ->Origins: create both origins (e.g., pointing to 2 different S3 buckets) ->Behaviors: create "path patterns" for each origin such that Cloudfront can distinguish which origin the Cloudfront url points to. E.g., in my S3 bucket named "tim-UNsigned-bucket" I set the path pattern to 'uploads/*'. For my signed url bucket, I gave it the more general path pattern of '*' and prioritized it 2nd. As you can see below, this means that my unsigned url includes the path, uploads/, whereas my signed does not. ''' - Signed urls: 'https:// or http://blahblah.cloudfront.com/file1.jpg?Policy=asf...'- UNsigned urls: 'https:// or http://blahblah.cloudfront.com/uploads/file2.jpg' Making any of these changes can take Cloudfront several minutes (5-15 minutes) to update. Therefore, do your best to make all the changes in my directions with the fewest mistakes possible otherwise it will take you forever.
20,161,175
1
20,161,573
I am perplexed by the API to <URL>. When I want to do this sort of thing in systems like OpenGL, I'm think in terms of computing the transform which applies a 2x2 rotation matrix 'R' about a centre 'c', and therefore thinking of points 'p' being transformed '(p-c)R+c' = 'pR+c-cR', which gives a 'c-cR' term to be used as the translation component of a transform. , according to the issue above, scipy's 'affine_transform' does "" so we actually need to compute an offset 's' such that '(p-c)R+c=(p+s)R' which with a bit of rearrangement gives 's=(c-cR)R'' where 'R'' is the inverse of 'R'. If I plug this into an ipython notebook (pylab mode; code below maybe needs some additional imports): ''' img=scipy.misc.lena() #imshow(img,cmap=cm.gray);show() centre=0.5*array(img.shape) a=15.0*pi/180.0 rot=array([[cos(a),sin(a)],[-sin(a),cos(a)]]) offset=(centre-centre.dot(rot)).dot(linalg.inv(rot)) rotimg=scipy.ndimage.interpolation.affine_transform( img,rot,order=2,offset=offset,cval=0.0,output=float32 ) imshow(rotimg,cmap=cm.gray);show() ''' I get <IMAGE> which unfortunately isn't rotated about the centre. So what's the trick I'm missing here?
Just doing some quick & dirty testing I noticed that taking the negative value of your offset seems to rotate about the centre.
27,597,273
1
27,597,322
I am programmatically generating 2 menus for a view, one of which will always be shown, and one which be shown - call them 'Menu 1' and 'Menu 2'. Is there a way to create these such that 'Menu 2' will be on the bottom of the containing view, if visible, and 'Menu 1' will always be immediately above 'Menu 1', or itself locked to the bottom of the containing view? To illustrate: <IMAGE> I am trying to keep it so that displaying on a larger device or re-sizing works as expected, which works fine using autoresize masks for a single menu; not sure how to approach the definition for 'Menu 2' if 'Menu 1' is visible though.
Use 'UITableView' where Title will be the table header and the content will be the cells.And manipulate the click event on the header and make it show or hide with table view animations available On the other hand you can use one of the customs classes created by some other developers <URL>
4,952,568
1
4,952,645
I'm working on a Java application at the moment and working to optimize its memory usage. I'm following the guidelines for proper garbage collection as far as I am aware. However, it seems that my heap seems to sit at its maximum size, even though it is not needed. My program runs a resource intensive task once an hour, when the computer is not in use by a person. This task uses a decent chunk of memory, but then frees it all immediately after the task completes. The NetBeans profiler reveals that memory usage looks like this: <IMAGE> I'd really like to give all of that heap space back to the OS when not in use. There is no reason for me to hog it all while the program won't even be doing anything for at least another hour. Is this possible? Thanks.
You could perhaps play around with '-XX:MaxHeapFreeRatio' - this is the maximum percentage (default 70) of the heap that is free before the GC shrinks it. Perhaps setting it a bit lower (40 or 50?) and then using 'System.gc()' might go some lengths to get you the desired behaviour? There's no way to force this to happen however, you can try and encourage the JVM to do so but you can't just yank memory away as and when you want to. And while the above may shrink the heap, that memory won't necessarily be handed straight back to the OS (though in recent implementations of the JVM it does.)
30,264,334
1
30,264,448
I have this query: ''' SELECT accounts.id FROM accounts LEFT JOIN account_properties ON account_properties.account_id = accounts.id GROUP BY accounts.id HAVING COUNT(account_properties.id) = 0 ''' It returns a list of all account IDs whose account does not have any account properties. How can I get the count of all accounts without properties? ''' SELECT COUNT(accounts.id) FROM accounts LEFT JOIN account_properties ON account_properties.account_id = accounts.id GROUP BY accounts.id HAVING COUNT(account_properties.id) = 0 ''' This does not work and only returns a list of 1s. <IMAGE>
You'll probably find these queries faster... assuming that id is a unique identifier of an account. For the ids: ''' SELECT accounts.id FROM accounts LEFT JOIN account_properties ON account_properties.account_id = accounts.id WHERE account_properties.id IS NULL ''' For the count of ids: ''' SELECT COUNT(*) FROM accounts LEFT JOIN account_properties ON account_properties.account_id = accounts.id WHERE account_properties.id IS NULL '''
20,946,527
1
20,946,752
I want to display a 'tooltip' with text and an when the over a specific button. Below are two variants of this that I've seen, but I couldn't find information about the implementation. <IMAGE> <URL> <URL>
Take a look at <URL> -- custom Icons can be used in Windows XP SP2 and later.
47,082,056
1
47,082,267
I have some problem and, I think this problem will not have solved. [Style and code bottom] <IMAGE> ''' .box-blog { background: url(../img/image.png) center no-repeat; background-size: cver; width: 80%; display: block; margin: 0 auto; margin-top: 71px; height: 192px; border-radius: 0 40px; -webkit-transform: skew(20deg); -moz-transform: skew(20deg); -o-transform: skew(20deg); background-color: #333; box-shadow: 15px 0 0 rgba(248,48,46,.3); }' '''
A common solution is to use for the background image and create the inverse on it : ''' .box-blog { position: relative; width: 80%; display: block; margin: 0 auto; margin-top: 71px; height: 192px; border-radius: 0 40px; transform: skew(20deg); background-color: #333; box-shadow: 15px 0 0 rgba(248, 48, 46, .3); overflow: hidden; } .box-blog:before { content: " "; background: url(https://lorempixel.com/400/400/) center no-repeat; background-size: cover; position: absolute; top: 0; right: -40px; bottom: 0; left: -40px; transform: skew(-20deg); } ''' ''' <div class="box-blog"> </div> ''' This can be a generic solution for any kind of tranformation and you have two situations : - - You need also to becarefull about any overflow issue.
26,958,941
1
26,959,086
I am relatively new to the Android SDK and am working with a TextView amongst other components on my activity UI. When I set the width to 'wrap_content' and use 'layout_gravity', I am able to center the TextView in my parent container. However, I now need to give the TextView a background that stretches fully along the width of the parent and so I set the width to 'match_parent'. Once I do this, neither 'layout_gravity' nor 'textAlignment="center"' are able to center the text within the view. This is the code I am using: ''' <TextView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:text="@string/trackName" android:textColor="#ffffff" android:layout_gravity="center" android:textSize="28sp" android:paddingTop="7dp" android:paddingLeft="20dp" android:background="#99000000" /> ''' This is what the activity UI looks like right now: <IMAGE> How can I fix this and align my text to the center of the TextView control? Please help!
You should use 'android:gravity'. As the docs say: > <URL> Standard gravity constant that a child supplies to its parent. Defines how the child view should be positioned, on both the X and Y axes, within its enclosing layout.
7,357,619
1
7,357,651
I need the set the Application attribute dynamically in android , particularly i need set the Name field which is shown below , i need to change it dynamically because i import two library packages each package will contain two different Application class to maintain session variable,but i can able to use any one Application class in imported project, i need to use that both dynamically based on the package user going to use, for that i need to set and change the Application class Name dynamically in Android Manifest.xml file. <IMAGE> if any one knows the solution means help me out. Thanks.
Your manifest is within your apk, which is signed, so changing it dynamically would invalidate the whole package. My guess is dynamically changing the manifest is not possible.
11,369,764
1
11,369,860
Lets assume I have the following layout (see image below)... I have a header (A) at the top, footer (C) that is always at the bottom and container (B) that is in the middle and should fill the space left between the header and the footer by 100%. <IMAGE> Can't think of any way how to achieve this using pure css. Any ideas would be appreciated!
Depending on how your page is set up, it may work if you set 'height: 100%;' for (B) and 'position: absolute;' for the container element. Here is an example: ''' <div id="container"> <div id="header"></div> <div id="body"></div> <div id="footer"></div> </div> ''' ''' #container { height: 100%; width: 100%; background: green; position: absolute; } #header, #footer { height: 100px; width: 100%; background: red; } #body { height: 100%; width: 100%; background: blue; } ''' <URL>
70,236,884
1
70,237,117
I have a measurement called "testtable" where I have kept my testcaseIDs in 1 column, time in 1 column and latency which is a value in one column. I fetched latency from the influxDB query in Grafana. <IMAGE> I see the output in the table format. I am unable to see the data in the timeseries graph. Also, how do I consider the time data read from the influxdb as my x-axis and y-axis as Latency with the graph showing the data points.
Your latency is a string, e.g. '1.24s' - you can't graph strings in the Grafana. Only numbers e.g. '1.24' (integers/floats) can be graphed. Also InfluxDB doesn't have 'column', but it has 'fields' and 'tags'. Make sure your latency is a field.
42,078,792
1
42,091,716
I am trying to implement a layout which is able to draw lines between views. Here is a sample picture of a library that does the job but seems outdated, just like other solutions I've found: <IMAGE> Any ideas or code samples?
As @SigvardrOlavrsson pointed out, google material steppers represent the best solution here: <URL>
22,188,980
1
23,601,964
I am implementing 'iAds' in my project that to share single instance of 'iAds' in all 'VC's' by declaring it in subclass of a 'ViewController' as 'adBannerVC' and all other view controllers are subclassed using the 'adBannerVC' and 'iAds' are shown in bottom of 'VC's' by sending it a subView of VC's like this.. <IMAGE> Now, when 'iAds' appear in bottom, the view at bottom changes its position and the other subView (scrollView) in the VC must also resize without using 'AutoLayout'. Help me to overcome this. Thanks..
I have solved this issue using 'Delegate Method' in 'adBannerVC' as below ''' @interface AdBannerController : UIViewController <ADBannerViewDelegate> { @private ADBannerView *ad; BOOL adIsVisible; BOOL displayed; } ''' and implemented this 'delegate' method to resizes 'views' in each 'VC's'
23,327,712
1
23,327,824
I've got a pretty regular HTML '<table>' with one cell that spans multiple rows via 'rowspan'. Inside of this cell I've got a '<div>' that I want to occupy the entire height of the cell but for the life of me I can't seem to figure it out. It seems similar to <URL> but also seems so simple that maybe I'm just not thinking clearly. Here's a stripped down version of my HTML: ''' <table> <tr> <td class="a" rowspan="2"><div>A</div></td> <td class="b"><div>B</div></td> </tr> <tr> <td class="c"><div>C</div></td> </tr> </table> ''' And CSS: ''' td { vertical-align: top; } td.a div { background-color: #f00; height: 100%; } ''' And a <URL>. And here's what I'm getting and what I'm trying to get: <IMAGE> What's really weird is if I use Chrome's inspector to change the '<div>' to 'display: inline-block' and then set it back to 'display: block' it actually looks pretty much exactly how I want it to. (And no, switching away from a table isn't an option for this project, there's other code not shown that requires that.)
## Option 1 Simply add 'overflow:auto;' to your 'div' CSS ## Demo Fiddle ''' td { vertical-align: top; } td.a div { background-color: #f00; height: 100%;overflow:auto; } ''' ## Option 2 Alternatively you'll need to define the height of your table in order for the child to be able to calculate what its 100% is 100% of. ## Option 3 The only other way would be to set 'position:relative' on the 'td' elements then 'position:absolute' for the child 'div'
19,887,950
1
19,889,728
below is my tables in database. <IMAGE> I wanted to calculate payment according to number of children. Let's say payment = $100 per year. It should times by number of children. I have a label which will display the number of children. Now, the sql query I did so far as below but i know it sounds very wrong. I'm just learning sql now. Please assist me. ''' SELECT COUNT(*) FROM Child WHERE ParentId=ParentId '''
After cracking my head for 1 hour. I solved the query myself. 'SELECT COUNT(*) FROM Child c INNER JOIN Parent par on c.ParentId = par.ParentId WHERE par.UserId = ?' Thank you for your time.
54,398,366
1
54,399,351
I want to show a confirmation message when you removing the product on the WooCommerce cart. I can't find any code or solution for it. <IMAGE>
Please add below code in your child theme js. ''' <script> jQuery( function($) { $('.remove').click( function( event ) { if( ! confirm( 'Are you sure you want to remove product?' ) ) { event.preventDefault(); } }); }); </script> ''' I have tested the code and its working for me
64,741,322
1
64,967,024
When ever I try to accept the licenses I am getting the error as shown in the figure .I had tried with Capital 'Y' and small 'y', but no working. (Please note that I didn't pressed enter key after the message is displayed). I am attaching flutter doctor --android licenses and flutter -v <IMAGE> <URL>
I also had this problem and it took days for me to solve this.. This is happening because of the antivirus installed in your system.. check your sdk oolsin folder, there should be file named sdkmanager.bat if that is absent means antivirus is deleting that file, same with archquery.bat , these two files are deleted by antivirus... go to msconfig in windows and to services , hide all Microsoft services then you will see anti virus running in your system.. uninstall that using control pannel.. then reinstall android studio ,, your system will work 100%
45,618,342
1
45,624,967
Why is RDS console on Amazon Web Services showing an estimated monthly charge if I start creating a RDS instance. I am using a free tier account and is well within free tier limit. This is what my console is showing: <IMAGE> This is within the free tier limits, which I found <URL>. Why does this happen, and will it actually charge me anything?
The Amazon RDS console has no visibility into any other services you have (or will) consume during the month. It is simply showing an estimate of the costs for running the database. The benefits of the <URL> will be calculated separately, based upon actual usage. So, if that's the only RDS instance you run during the month and it qualifies for the free tier, you will not be charged.
22,145,168
1
22,145,270
I am trying to increase three numb 3,4,6 from num+0.1 to num+0.7 all numbers are working fine except 3. Why? ''' foreach my $num(3,4,6){ for(my $state=$num+0.1;$state<=$num+0.7;$state+=0.1){ print $state." "; } } ''' Output: <IMAGE> This continues even if I hardcode and print only till 3.6. ''' for(my $state=3;$state<=3.7;$state+=0.1){ print $state." "; } '''
Use 'Math::BigFloat;' like this: ''' #!C:/path/of/perl.exe -w use Math::BigFloat ':constant'; use warnings; use strict; foreach my $num(3,4,6) { for(my $state=$num+0.1;$state<=$num+0.7;$state+=0.1){ print $state." "; } } ''' Output: ''' 3.1 3.2 3.3 3.4 3.5 3.6 3.7 4.1 4.2 4.3 4.4 4.5 4.6 4.7 6.1 6.2 6.3 6.4 6.5 6.6 6.7 '''
6,770,512
1
6,770,547
Recently, I just came across <URL> > Transifex is an open service allowing people to collaboratively translate software, documentation and other types of projects. Designed as a hub for translations of open source projects, Transifex supports translations straight from the project's source. It is really cool. However, I realize that it only support file produced by <URL>? I am using Java properties file - <URL> in open source project. Is there any similar service, to translate Java application collaboratively? I had tried to upload a properties file to Transifex. Here is my outcome. > File you are trying to upload does not seem to belong to a known i18n format. <IMAGE>
The head of the <URL>. You'll need to, of course, self-host it for now, until the hosted version is updated.
8,859,671
1
8,863,260
So I'm working through the code in <URL>. <IMAGE> The problem I'm having is that I can't seem to port over this .xib code to work in Xcode 4.2 storyboards. I am trying to keep that same 'Touch' button and 'AnotherView' displaying on a brand new 'Master-Detail Application' running iOS 5. I am struggling to even keep the button displaying on every view. As in, you can tap the button 'Touch Me' to bring up this alternate view at any page - in the table view or the detail view. I hope this makes some sense? Note that I'm NOT talking about the table row, just the top right button in the UINavigationBar. Please let me know if I can provide any more details! Just trying to build a similar functionality as the 'Touch Me' button in a fresh new iOS 5/Xcode 4.2 Storyboard app WITHOUT any .xib files. thanks in advance
As your know storyboard doesn't use XIBs so you won't be able to follow the tutorial line for line. I recommended first creating a new storyboard project and select the "Master-Detail Application" template when creating the project. This will create a project with a Navigation controller. You can then follow the tutorial on customizing the navigation bar. When following the first part of the tutorial, you will need to select the initial view,"Navigation Controller", in storyboard and change its class to "KTNavigationBar" after you create that class.
20,019,290
1
20,019,390
I want to animate canvas after path and now use: ''' Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(Canvas.LeftProperty)); Storyboard.SetTargetProperty(translateYAnimation, new PropertyPath(Canvas.TopProperty)); ''' Can I set Canvas property? I don't want the ellipse to move outside the path... image: <IMAGE>
There is no Canvas.Center property. So no, you can't set that. You need to do your animation path based on it being the upper left corner (or whichever corner you want, really). Not the center. Edit: I suppose there's lots of ways around that... you could probably write your own attached property for Center that you animate and have it set the Top/Left based on the current Height/Width. Just as an example. But the point is, you've got to do something to make it work.
8,535,215
1
8,536,938
I'm using EF4 to retrieve database objects. I have defined a view which sums up information on users. In SSMS, I get 8 different results using 'select *' or stored procedure. Example: <IMAGE> When querying in EF4, my view returns 8 results, but property 'UserTeamName' is always returned as the first value '(BoboTeam)'. This is strange because 'UserRole' is returned correctly, the difference between these items is that 'UserTeamName' is nullable. It seems like a problem with EF, since the object is filled by the 'ExecuteFunction' method from 'System.Data.Objects.ObjectContext': ''' public ObjectResult<MySecurityView> SecurityList(Nullable<global::System.Int32> userId) { ObjectParameter userIdParameter; if (userId.HasValue) { userIdParameter = new ObjectParameter("userId", userId); } else { userIdParameter = new ObjectParameter("userId", typeof(global::System.Int32)); } return base.ExecuteFunction<MySecurityView>("SecurityList", userIdParameter); } ''' Same result when we use a linqtosql request instead of a stored procedure. Any hint is welcome.
EF requires that each returned record is uniquely identifiable. When you add SQL view to entity model it by default takes all non-nullable columns and defines them as a key. So in your case it selected 'UserRole' and 'UserId' as entity key. Another internal rule of EF can track each entity key only once. So when it loads record with Role=Manager and Id=1 it adds it to its internal identity map. Once it loads record with the same key again it will not create a new instance of the entity but use the already loaded one (which has TeamName=Bobo Team). That is why you have all team names set to Bobo Team. Only first record in the pair is used. Try to manually configure entity key in EDMX to involve UserTeamName.
6,533,434
1
6,533,563
I want to obtain a similar tab effect with the button bar of twitter app. I wish to click on a button and change the view down. I can switch activity but I think It's wrong, or not? The top bar have to be fix like a frame. Like this: <IMAGE> Ok now I post a part of my idea (i found something similar here: <URL> code: ''' newsButton = (ImageButton) findViewById(R.id.news); newsButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // on click go to the news view (no activity yet) setContentView(R.layout.news); } }); '''
Like in the <URL>? If so, the Source Code is freely available <URL>. --- Okay, a little tour on how Google does it: 1. The activity_home.xml-layout includes (Line 21) the actionbar.xml-layout (This is done in every Layout so the Actionbar must not always be duplicated). 2. The actionbar.xml-Layout creates a LinearLayout for the UI-Elements. 3. Then, for example the HomeActivity-Activity sets the content view to the activity_home.xml-layout, receives an ActivityHelper-class and calls its setupActionBar()-method. 4. The mantioned ActivityHelper-class is in the hg/ android/ src/ com/ google/ android/ apps/ iosched/ util/-package and has the setupActionBar()-method which creates the Action bar. This might be easier then it looks. Read your way through the Source Code and try it yourself.
4,409,678
1
4,409,850
I'm searching for a way to convert embossed letters e.g. like in the picture of the credit card below to normal ones like you see them in a book. I don't need specific code here, just ideas which image manipulation steps could lead to the desired result. <IMAGE>
One thing you do know is that it's a Credit Card number -- this will help validate the result at the end. You could use this to fine tune the image processing -- feedback the result and use optimization techniques (like hill-climbing or genetic algorithms) to change the parameters of the image processing. For example, do the image processing with a parameter set (p1, p2, p3, p4) -- then try OCR and you get 6 numeric digits. Then alter the parameter set -- say this time you get 8 numeric digits -- use hill climbing to keep altering the set. For image processing 1. Probably want to start by cropping to number regions if you know them. 2. Clear pixels that aren't in the embossed color range to take out as much information as possible (the tolerance of this is one of the parameters in the parameter set I described) -- probably do this by setting it to black because the part of the numbers that's easy to see is light 3. Target the light color of the emboss -- try to extract it, then invert because OCR finds Black on White 4. Connect close sections 5. OCR and feed results into parameter choices in step 2, 3, 4 (and maybe 1 if you are doing automatic segmentation)
64,467,137
1
64,467,328
<IMAGE> NameError: name 'pd' is not defined
UTF-8 is the default encoding but can't decode some positions in this dataset. Try this: ''' dataframe = pd.read_csv('File_name', encoding='latin') ''' Related information here: <URL>
41,653,762
1
41,654,222
Suppose we've some labeled data X with N data points. Using some clustering algorithm, say k-means, we partition X into k clusters C_1,...,C_k. Let S_1,...,S_k be the true partitioning sets and define the clustering classification error like this: <IMAGE> I want to then find the optimal "match" of the clusters to the true clusters by minimizing this error. So for k=3 the optimal permutation may be {(C_1 and S_2), (C_2 and S_3), (C_3 and S_1)}. The obvious way to find the optimal permutation would be to look at all k! permutations and the resulting error, and pick the one giving smallest error. This however requires k! time so my question is, would it be possible to design an algorithm to do this more efficiently?
There are good and well-tested algorithms for finding the best matching, such as the <URL>. But usually, it is not a good idea to map clusters to classes. A good clustering is one that tells you something about your data. So it be substantially different grom your known classes.
21,526,957
1
21,527,461
I am developing and ASP.NET MVC application. I have the View which have a one partial view. I do have quotation form and that form contains the Product list. I have shown the product list using partial view. as you can see in the picture, I do have a list of products , user can select product from list and its quantity and price and total will appear on that list itself. now, my issue is I cant get the updated data in the parent view whenever user changes/adds Products, Quantity and Price. Like in picture, though I have added many products, Text box in partial view showing correct figure but text box on parent view which I want to show the total figure again , showing old values.... How can I get done this thing ? <IMAGE> I have tried the below code in Jscript tag in View, but not working.... (txtGrandTotal is the textbox name of the partial view) ''' jQuery('#txtGrandTotal').on('input', function () { alert("Changed"); }) $('#txtGrandTotal').change(function () { alert("Changed"); }); $('#txtGrandTotal').bind('input', function () { alert("Changed"); }); '''
Assuming the the total input in your partial view has the id 'txtGrandTotal' and the one in the parent view has the id 'txtParentGrandTotal' you can use the following: ''' $('#txtGrandTotal').change(function() { $('#txtParentGrandTotal').val($(this).val()); }); ''' Please note that your need to execute this code on 'document ready' in the partial view, so that the jQuery 'select' ('$('#txtGrandTotal')') correctly returns your target element.
75,456,886
1
75,457,004
I want to make the 'MenuList' that I added appear on top of the 'MenuButton'. Is there any way possible to do that? <IMAGE> I tried to use position: absolute; but it didn't do anything to the 'MenuList'. here are the code that I wrote: ''' <Menu> <MenuButton as={Button} leftIcon={<MoreHoriz />} bgColor="transparent" aria-label="Options"> Open </MenuButton> <MenuList className={Styles.menuList}> {options.map((option) => ( <MenuItem className={Styles.menuItem}>{option.icon}{option.link}</MenuItem > ))} </MenuList> </Menu> '''
You can use the 'placement' prop on the 'Menu' component with a value of 'top'. ''' <Menu placement="top"> ... </Menu> '''
31,011,785
1
31,013,120
I have developed a VSPackage for Visual Studio. I followed all the instructions in these walkthroughs: <URL> <URL> Everything works fine when I debug the project: I see a new project type defined by me under the Installed Templates. <IMAGE> However when I deploy this VSIX installer to the or install it manually, I don't see the template and the new project type. How can I make this work when deploying? What I want is a VSPackage that when you install, it will add a new project type and adds some other menu commands to the menu bar.
I solved this doing these steps by: - '.zip''bin/debug'- '.vsixmanifest'- '.vsix' These steps were not mentioned in the MSDN walkthroughs.
6,954,408
1
6,979,057
we have a HP BAC probe attached on one of our WebLogic servers and we have noticed that the server is often always taking a sudden and deep "dip" in the number of service threads available. <IMAGE> Does anyone has any encounter or anything to share how i may track this? Currently my thread dump capturing process is unable to capture this because often it is too late. Or is there any continuous thread dump capturing process i may consider?
You can <URL> which will be picked up by <URL> This creates a diagnostic snapshot which you can analyze later. See how to create notification for watches <URL> and specifically in admin console <URL> > Select a watch type from the Watch Type list: *Select Collected Metrics to set a watch based on metrics collected from MBean attributes. *Select Server Log to set a watch based on data written to server logs. *Select Event Data to set a watch based on data generated from a specified instrumentation event.
13,925,149
1
13,925,226
I have an ECDF plot I've created with R and it has a legend in the bottom right hand corner. The problem I'm having is that the faint grey dashed horizontal line that the ECDF plot places at 0.0 is overlapping the last item in my legend. Like so: <IMAGE> At the moment I'm creating the legend with: ''' legend("bottomright",c("Original","Minus 30 minutes"),col=c("black","red"),lty=c("dashed","dotted")) ''' Is there a way to simply push the legend up a little to avoid the overlap problem? An ideal solution would be one that programatically detects the overlap and corrects for it appropriately, but failing this, some empirically determined number of pixels offset would probably suffice.
You probably want to use 'inset=c(0,.01)' (or some other value) in your call to legend
5,460,020
1
5,599,000
I need to write the following component in WPF: <IMAGE> It should be over image, I should able to drag the lines with the mouse (drag X up and down, drag Y left and right, and Z spin from horizontal to vertical) My backround in WPF is almost not exist, Can you give me guidliness? do you know component that doing it, or something similar to that? Do you know what is the name of this control? Thanks.
I managed to do it, <URL>
14,114,984
1
14,391,380
I am new to Java EE (and to Netbeans). I have am trying to automatically generate entity classes from my mysql database... For simple relationships it works, but for the following it always fails: <IMAGE> i get the following error: > Internal Exception: Exception [EclipseLink-7220] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException Exception Description: The @JoinColumns on the annotated element [field tblExpandituresTranx] from the entity class [class entities.restaurant.TblContents] is incomplete. When the source entity class uses a composite primary key, a @JoinColumn must be specified for each join column using the @JoinColumns. Both the name and the referencedColumnName elements must be specified in each such @JoinColumn.. Please see server.log for more details. I think... I have some error in my database or perhaps EclipseLink JPA tool is kaput! please help!
I solved the problem myself... Apparently JPA has a problem with multiple primary keys in bridge tables. So, instead of having foreign keys as primaries I just converted them to unique indexed and everything worked just fine!! wuhu!!
43,205,688
1
43,237,458
I have a SAP HANA Vora virtual table with a single varchar field. I try to execute this following query into this Vora virtual table from SAP HANA Studio: ''' INSERT INTO "BPINST"."VORA_TEST_VORA_VARCHAR" values ('OPT') ''' But the following error appears: > Could not execute 'INSERT INTO "BPINST"."VORA_TEST_VORA_VARCHAR" values ('OPT')' in 3.014 seconds . SAP DBTech JDBC: [403]: internal error: Error executing query [SAP AG][LIBODBCHDB SO][HDBODBC] General error;-888 exception while processing HANA Wire: V2Net error: could not handle api call, failure reason : execution of scheduler plan failed: found error: :-1, CException, Code: 10020 : Runtime category : catch(...) has been caught. , CallStack: /var/lib/ambari-agent/cache/stacks/HDP/2.4/services/vora-manager/package/lib/vora-v2server/lib/libv2runtime.so.1: v2::stacktrace(std::shared_ptr<v2::mm::CAllocator<(v2::mm::AllocBackend)0> >&)+0x1e5 /var/lib/ambari-agent/ca for query " INSERT INTO "VORA"."TEST_VORA_VARCHAR" ( "STATION_TYPE") VALUES (?)" The following image show this case: <IMAGE> What could be the error? Thanks for the support!
Vora does not support INSERT/UPDATE/DELETE. On Vora side you can use the APPEND command to add files to a Vora table. This will however not work from HANA side via virtual tables.
20,365,155
1
20,389,283
I have an app which loads an image from the local disk and then displays it on a UIImageView. I want to set the image to aspect scale to fit. The problem I'm having is that the imageOrientation is coming back as UIImageOrientationRight even though it's a portrait image and that's messing with how the aspect calculations are done. I've tried a few methods of changing the meta data but both rotate the image when it gets displayed. ''' UIImageView *iv = [[UIImageView alloc] initWithFrame:self.frame.frame]; NSMutableString *path =[[NSMutableString alloc] initWithString: [[NSBundle mainBundle] resourcePath]]; [path appendString:@"/pic2.jpg"]; NSData *data = [NSData dataWithContentsOfFile:path]; UIImage *img = [UIImage imageWithData:data]; UIImage *fixed1 = [UIImage imageWithCGImage:[img CGImage] scale:1.0 orientation: UIImageOrientationUp]; UIImage *sourceImage = img; UIImage *fixed2 = [UIImage imageWithCGImage:[img imageRotatedByDegrees:90].CGImage scale:sourceImage.scale orientation:UIImageOrientationUp]; iv.image = fixed1; // fixed2; [iv setContentMode:UIViewContentModeScaleAspectFill]; [self.view addSubview:iv]; ''' <IMAGE>
In the end I took a different approach and made the UIImageView 360 wide and placed it in the centre and this achieved the desired effect.
39,968,088
1
39,983,298
I'm trying to write a shiny app with a custom HTML template. I'm currently adding a simple leaflet marker map. I can create the object and it renders both in: The console and a standalone shiny app: <IMAGE> But not when I create a custom HTML template, where I just see empty space where the post should go. <URL>. Any help would be greatly appreciated.
I was missing the {{headContent}} tag on the html head.
26,892,109
1
26,893,889
When debug-on-error is enabled, I have trouble with corrupted text in buffer. like this. <IMAGE> it says maybe in Japanese. However, I can't understand the message. Does anyone know workaround? it will be ok for me to display the message in English. Any help would be appreciated. Thanks in advance. OS: Ubuntu 14.10 emacs version: 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
Yes, it is bytecode. No, it should not be shown in backtraces. Or at least there should be a user option not to show it in backtraces. This is Emacs <URL>, which was reported 4 years ago. Sadly, it has not been fixed, and was simply moved to "" (effectively aka '/dev/null'). (<URL>
20,175,662
1
20,175,889
I have an Android application and it has an activity in which I use the following code to open a url in browser ''' // show url view intent Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(currentAdUrl)); startActivity(intent); ''' Everything works fine if I don't opt to > Use by default for this action <IMAGE> However, once I opt to use default, the browser stops opening. Please help. Thanks!
I was able to solve it using following ''' // show url view intent Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(currentAdUrl)); Intent chooser = Intent.createChooser(intent, "Open with"); startActivity(chooser); ''' Got the answer from this <URL>.
5,501,702
1
5,522,780
Discovering JFreeChart, I hit a problem using <URL>. This is what I have today <IMAGE> My values are {2, 2, 1.5} By default max value is set to the max value of my dataset (here 2) but I want to set it to 5 which as you can see it did but it did not draw the lines for the value between 2 and 5. How can I progamatically draw them ? : ''' SpiderWebPlot plot = (SpiderWebPlot)chart.getPlot(); plot.setMaxValue(5.00); plot.setHeadPercent(0.01); return chart; ''' I am using JFreeChart through another application that gives me the hand directly on the chart variable. So that the piece of code I introduced.
The lines shown do not appear to be a feature of <URL>, with which your version should be compared.
10,707,650
1
10,708,406
I'm trying to find the best component to display date ranges among a year. An idea is to display are months as boxes (12 boxes) and paint the seasons with a different colour. GWT Datepicker does not really fit my needs since is not extendible enough (<URL>. A calendar component is too much complicated. GXT datepicker lacks of extendibility too. That's a sample of what I'd like to acheive: <IMAGE> Any idea? I'm using GXT as library.
In my opinion, using DatePicker isn't such a bad idea. Here's a little example that covers a single month. I think it won't be too hard to extend this to a full year by arranging 12 of these in a grid: ### Java ''' final DateTimeFormat format = DateTimeFormat.getFormat("yyyy-MM-dd"); final DatePicker datePicker = new DatePicker(); datePicker.setCurrentMonth(format.parse("2012-01-01")); datePicker.addStyleName("my-cal"); final Date start = format.parse("2012-01-17"); final Date end = format.parse("2012-01-28"); for (final Date date = start; date.compareTo(end) <= 0; CalendarUtil .addDaysToDate(date, 1)) { datePicker.addStyleToDates("my-green", date); } ''' ### CSS ''' .my-green { background-color: green !important; } .my-cal .datePickerPreviousButton { visibility: hidden; } .my-cal .datePickerNextButton { visibility: hidden; } ''' With the "clean" theme, it looks like this: <IMAGE> --- P. S. Here's how the full calendar could look like: <IMAGE> Full code: <URL>
15,572,857
1
15,572,888
I am trying to produce something like the date picker below? Does anyone know how to / or even what type of element to use? I was thinking a UISlider, but not sure how to customize the slider to show bubbles and such. Any help would be much appreciated. Thanks <IMAGE>
This looks like <URL>. Also you need some help from <URL>. Those 1d, 1w, 1m, 3m looks like a button or image. Need to write action methods on them.
25,289,198
1
25,289,199
How can I make my text look like the image below using CSS? <IMAGE>
First of all you need to use a mono-space font. You can find some pretty nice looking ones over at <URL>. The font in the image is Ubuntu Mono. Secondly, we are going to be using <URL>. You need to make sure the top line of text is the width you need it be to fit the width. This also means that each line needs to be it's own element. Some example HTML: ''' <p style="font-size: 5vw;">How can I</p> <p>Adjust my font size</p> <p>to fill all the space</p> <p>in a justified</p> <p>layout?</p> ''' We can now use this initial place-holder to work out the 'vw' size for the rest of the lines using the following formula: ''' NewFontSize = BaseFontSize - (((NewLineNumberOfChars - BaseLineNumberOfChars) / NewLineNumberOfChars) * BaseFontSize) ''' I have created <URL>. The code that it spits out is as follows: ''' <p style="font-size: 5vw;">How can I</p> <p style="font-size: 2.36842vw;">Adjust my font size</p> <p style="font-size: 2.14286vw;">to fill all the space</p> <p style="font-size: 3.21429vw;">in a justified</p> <p style="font-size: 6.42857vw;">layout?</p> ''' It should be noted that because Google Chrome rounds all font sizes to the nearest round pixel (boo-hiss), it's not exact and it can look off, especially at smaller sizes.
649,454
1
649,545
If I have two colors defined by their RGB values, can I average the Red, Green and Blue values and then combine to define a third color that looks like a visual average of the two? ie NewColor = (R1+R2)/2,(G1+G2)/2,(B1+B2)/2 EDIT1: Thanks for all the responses. For my current needs, I am only dealing with color pairs that are shades of the same color so I think that averaging them will work. However, I will try converting to Lab Space to make sure that assumption is true and the technique will be useful in the future. EDIT2: Here are my results FWIW. Color1 and Color2 are my two colors and the two middle columns are the results of averaging in Lb space and averaging RGB respectively. In this case there is not a lot of difference between the two color and so the differences in the output from the averaging techniques is subtle. <IMAGE>
Take a look at the answers to <URL>. Basically, you want to convert the colors into something called <URL>, and find their average in that space. Lab space is a way of representing colours where points that are close to each other are those that look similar to each other to humans.
16,802,374
1
16,803,449
Please be very clear with your instructions as I have little experience with working with xcode and making apps in it. Here I am simply trying to make a old iphone app fit the 4-inch screen. I have already made all views into an autolayout and the view you can barely see already works. However, the UIImageView (as you can see below) does not scale to the entire screen like I would like. Thanks! <IMAGE>
If you want you can read up Ray's <URL>. It shows exactly how to do this. You will need to click the sideways 'I'/ the 'H' at the bottom and click either: 'Leading Space to Superview' or 'Trailing Space to: Superview'. Or at the right side of your image, you need to delete the 'Leading Space...' or the 'Trailing Space...' click the little cog drop down menu and delete one and test it, make sure you are in the small 3.5 inch view then test it.
15,593,482
1
16,308,101
I'm trying to use 'Set up deployment from source control' to allow publishing from my TFS project to Azure, but for some reason after I authorize, it says I have no projects. The accounts are correct, I was just wondering, is there some kind of criteria for it to allow the integration or something? I get this window <IMAGE> Yet I have two projects on my TFS Account.
Ended up closing my azure account and getting off of team foundation service, that solved the problem.
23,290,150
1
23,290,829
I use C# WPF and im stuck with that for couple of days. <IMAGE> How do I find point M?
Basic trigonometry or application of a rotation matrix (not to forget: translate the center to the origin and after rotation back to its inital position): ''' XM=a+cos(Cdeg)*(X1-a)-sin(Cdeg)*(Y1-b) YM=b+sin(Cdeg)*(X1-a)+cos(Cdeg)*(Y1-b) ''' The input to the trigonometric functions has to be in radians, 1deg=pi/180, Cdeg=C*1deg. --- In screen coordinates, you have to first replace all y components with their negatives to get a properly oriented cartesian coordinate system. And then back for screen coordinates. Combined, this leads to replacing Y1-b and YM-b with b-Y1 and b-YM, resulting in the formulas ''' XM=a+cos(Cdeg)*(X1-a)-sin(Cdeg)*(b-Y1) YM=b-sin(Cdeg)*(X1-a)-cos(Cdeg)*(b-Y1) ''' which can be rearranged to ''' XM=a+cos(Cdeg)*(X1-a)+sin(Cdeg)*(Y1-b) YM=b-sin(Cdeg)*(X1-a)+cos(Cdeg)*(Y1-b) ''' or ''' XM=a+cos(-Cdeg)*(X1-a)-sin(-Cdeg)*(Y1-b) YM=b+sin(-Cdeg)*(X1-a)+cos(-Cdeg)*(Y1-b) ''' which is also geometrically sensible since a reflection on the x axis changes the direction of rotations.
14,898,766
1
14,909,007
Since a few time Joomla menu in backend administrator is displaying without a decorator. No errors are thrown by PHP, so I can't understand why is doing this way. <IMAGE>
Ok I digged in Inside the #_menu table , there was a voic with a 'level' value very high like 4559099066767 . The 'level' voice, is the level of nesting of category. That causes an infinite loop inside the code, giving the result as the screen. My version was 2.5.9 Thanks
22,459,489
1
22,461,937
Why is the placeholder selectable in a deactivated 'input[type="text"]'? ''' <input name="minMax2" disabled="disabled" id="minMax2" type="text" placeholder="min. 100 / max. 200" min="100" max="200"> ''' I've even have a weird situation where I can type text into the placeholder but this does happens if I click into a text field which is deactivated but because I've left another field and an attached change event did enable the datepicker. <IMAGE> Any idea? Did I miss something or is this a bug of Internet Explorer 10 and 11?
I made a few changes to your jsfiddle from what I understand to be your problem. In your jsfiddle you included jQuery so I thought I would add to your script. I have just changed how you have declared disabled in your input and also made a change to your script so that it now removes the disabled attribute on focus. ''' $('#test3').prop("disabled", false).focus(); ''' <URL> If you want to go further and make it so that the user can't even select the placeholder slightly when it's e.g. disabled then you could alter the user select in the css by adding the following with the appropriate browser prefix: ''' user-select:none; ''' Example of that here: <URL>
9,017,324
1
9,017,378
I want to know that which method will be called when the following key is pressed. <IMAGE> I want to start action on above key press. How do I know this is pressed ?
Observe the 'UIKeyboardDidHideNotification' notification. ''' [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil]; ''' And... ''' - (void)keyboardDidHide:(NSNotification *)aNotification { } ''' You can also change it to 'UIKeyboardWillHideNotification' if you need to be notified BEFORE the keyboard starts to disappear.
71,621,552
1
71,624,914
<IMAGE> print line is behine the first breakpoint, but the result is already in terminal I tryed to look <URL> but not find any similar args. I realize that the problem will only occur when I name the file django.py. When I rename the file to other name like website.py, it won't occur. I wander if there are other names that will trigger this bug. below are my launch.json ''' { "configurations": [ { "name": "Python: Dang Qian Wen Jian ", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", } ] } '''
This is because 'django.py' conflicts with other files. An extract from the <URL> > You'll need to avoid naming projects after built-in Python or Django components. In particular, this means you should avoid using names like 'django' (which will conflict with Django itself) or test (which conflicts with a built-in Python package). --- I.e. some other process(es) is looking for, and running 'django.py'. And your file is over-writing the other file. To fix your issue, just avoid naming the file 'django.py' or 'test.py'
62,312,820
1
62,312,991
I'm using this code below to plot a catplot with Seaborn. Its working ok. ''' sns.catplot(data=df_gol, x='MODALIDADE_DO_VOO', y='VALOR',row='DESTINO', kind='box',height=3, aspect=1, color='red') ''' But I am getting each box-plot stacked. <IMAGE> I'd like to plot it side by side. How can I do that? My DF (df_gol) has these values: ''' Column DESTINO - ['JPA', 'FOR', 'SSA', 'AJU'] Column MODALIDADE_DO_VOO - ['Direto', '1 parada'] Columns VALOR is float type ''' I've been looking for some examples but I didn't understand how to do it. Thanks.
use the <URL> instead of the 'row=' to organize your subplots in columns. You can adjust the number of plots per row by using the 'col_wrap=' argument. ''' sns.catplot(data=df_gol, x='MODALIDADE_DO_VOO', y='VALOR',col='DESTINO', # <--- replaced row= by col= kind='box',height=3, aspect=1, color='red') '''
14,431,048
1
14,431,087
I have some trouble creating something like this with android. I add image buttons in a 'tableLayout' but things get messed. Should i use 'linearLayout' instead? The problem is that they should stretch probably to fit... <IMAGE>
assuming each bill/coin is a separate element you can do this in 3 linear layouts, which are all children of a parent linear layout pseudo... ''' <linearLayout vertical> <!-- first row --> <linearLayout horizontal weightSum = 2> <image layout_width="0dp" layout_weight="1"> <image layout_width="0dp" layout_weight="1"> </linearLayout> <!-- second row --> <linearLayout horizontal weightSum = 2> <image layout_width="0dp" layout_weight="1"> <image layout_width="0dp" layout_weight="1"> </linearLayout> <!-- coins --> <linearLayout horizontal weightSum = 3> <image layout_width="0dp" layout_weight="1"> <image layout_width="0dp" layout_weight="1"> <image layout_width="0dp" layout_weight="1"> </linearLayout> </linearLayout> ''' I'm leaving out all the android specific stuff that you will have to fill in, and just providing the essentials. I believe this will get you what you're after. You'll need to add some marginLeft and marginRight on the middle coin to push them apart so that they aren't sitting side by side (or just add that padding in the image itself as transparency).
8,366,480
1
8,366,507
I need some icons like github icons. just like favorite, settings, profile, remove, tag, etc, few colors, keep the icons small, it's a big problem for a coder to find these things. <IMAGE> this is github icons, it has a gray and white colors, to switch on hover and click
Please search on icon finder <URL> each one with it's name you will find what you want...
9,706,810
1
9,706,848
i am having trouble with my new project. i code corectly if i say. <IMAGE> <URL> This div is giving me tension ''' <div class="content-bottom"></div> '''
### Edit: After checking your code, I noticed that you understand the theory of floating and clearing, so I checked a bit more... It seems that you have '</div>', thus rendering yout 'div.content-bottom' on a different DOM level then after the 'div.content-middle'. ### Original answer: It's because of the floating on your '#content' and '#sidebar' You should use 'clear:both;' for the '.content-bottom' div. Read more about clearing and floating here: <URL>
9,616,963
1
9,846,676
I'm trying to emmulate the following: <IMAGE> Any ideas how? Basically all photos have the same height and photos are arrange/cropped/resized dynamically to fit perfectly on rows so there are no jagged sides left or right. If you resize the browser window it resizes the photos as well to fit. I have tried isotope and jquery masonry and neither give me this effect.
I just implemented this very thing. Here's how I did it: 1. When the page loads, I measure the available width of the target container (the container where my images will live), and call this maxWidth 2. I make an AJAX call, passing the maxWidth up to the server 3. I determine my list of gallery images to display on the server, and process each one by one 4. During iteration of my list, I keep adding images to a row, the row's length being the maxWidth available (which I passed up). Once an image overflows the maxWidth, I calculate the overflow amount 5. I take that overflow amount, divide it by the number of images in my row, and subtract that value off each of the images in the row (so one image doesn't get its width reduced too much) 6. I repeat this for each row, so each row adds up to exactly maxWidth Some things I had to consider: 1. I had to take into account the width of the margins I wanted in between each image, and factor that into the maxWidth accumulated value when processing each row. 2. We needed a corner stamp image (an image that was larger and was fixed in the top left corner. This image encompassed two rows, and was wider than my other thumbnails. I had to calculate a different maxWidth for the first 2 rows as a consequence. 3. I had to recalculate the dimensions when the browser was resized. Binding to the resize event of the window caused multiple AJAX calls during dragging. I had to fix the resize event so it only fired when done. Overall, the image gallery turned out quite well. He's a screenshot. <IMAGE>
19,217,788
1
19,218,465
I know how to make a box shadow run down an element however is it possible to have it extend down 80% of the element instead of the entire height of the element? Also how to make the shadow angle out (this is the thing im struggling with most) <IMAGE>
Something like this? <URL> There are a bunch of ways you could achieve this.. I just set the shadow, and overlayed a triangle. <IMAGE> Here is an alternative without the blurred shadow.. <URL> - pretty simple ''' <div></div> ''' ''' div { width: 100px; height: 200px; position: relative; border: 1px solid black; box-shadow: 20px -10px 30px black; margin: 40px; } div:after { position: absolute; left: 102px; top: 100px; content: "\A"; width: 0; height: 0; border-bottom: 90px solid white; border-right: 50px solid white; border-top: 90px solid transparent; } '''
23,587,019
1
23,587,036
<IMAGE> I need to create a custom chart as shown. Can anyone suggest a library for doing this? I've used highcharts in the past, but never seen one quite like this. I'm not opposed to doing it from scratch if I have to, but I was hoping somebody had a suggestion. I'm using php on the backend and jquery on the front.
<URL> has tons of chart types and it's pretty intuitive. If you want to totally customize the chart then <URL> lets you control every aspect of it, though you'd be building a chart from scratch. <URL> is another one if you want to work from scratch.
18,372,039
1
18,372,123
I'm trying send my value to ajax but it seems empty parameter. Then I try like: ''' <input type="text" id="IDtag"/> <button id="check"></button> $('#check').click(function(){ var IDnum = $("#IDtag").val(); alert (IDnum); }); ''' alert is null even I already fill some value into 'IDtag'. --- UPDATE <IMAGE>
<URL> use document.ready.. ''' $(function(){ $('#check').click(function(){ var IDnum = $("#IDtag").val(); alert (IDnum); }); }); '''
26,706,796
1
26,707,301
I'm creating a database and was trying to upload my images into it. However, I encounter a sql server run away error when i tried to upload a 2+MB file. When I upload a 4MB file, the page simply resets When i upload a 30+kb file, it works ! I have created the column (longblob) and change the upload_max_file size limit in php.ini to 64MB. <IMAGE>
You have to consider more things to do this job. 1. 'max_allowed_packet' mysql> show variables like 'max_allowed_packet'; 2. Your Column type. MySQL Documentation TINYBLOB L+1 bytes, where L < 28 +- 256 bytes BLOB L+2 bytes, where L < 216 +- 65 kilobytes MEDIUMBLOB L+3 bytes, where L < 224 +- 16 megabytes LONGBLOB L+4 bytes, where L < 232 +- 4 gigabytes 3. The better and faster way is store/upload your image/file into disk storage, not db storage. And just store the file location into db. And read these link: <URL> <URL>
7,662,361
1
7,792,557
I am having a problem with sharing/liking links with Open Graph Protocol data for audio/mp3 files. They look OK on Facebook news feed/timeline, but when you click play button, it won't play. It says: 'undefined' (see screenshot). <IMAGE> So I tried playing some older posts of links with OG meta data about audio/mp3 files, and they don't play either. I did some firebug inspection and the audio player is Flash based. I think the problem is in the flashvars part of the embed code. There is a flashvar for 'src' but its value appears to be a SHA256 checksum instead of the URL of the mp3 file.
It seems like Facebook have finally fixed it - at least, the audio players on my page have started working again. Hopefully that means you should see it fixed relatively soon, depending on how this is rolled out.
56,012,715
1
56,012,867
I am trying to change the y-axis to being horizontal so that it can be read easier for my talk. I am new to R and don't have a lot of experience with it. This is my code: ''' first.value = pt(500, 1.127344, 1.561328) space = (1 - first.value)/648 edges = seq(first.value + space, 1 - space, space) value.edges = 1.561328*qt(edges, 1.127344) data = read.table(file.choose()) observed = log(data$V1) expected = log(value.edges) plot(observed,expected, xlim =c(4,15), ylim = c(0,14), las =1) abline(0,1) ''' <IMAGE> I would like the word expected the same orientation as observed. Thank you!
Try this, ''' par(mar = c(6,6,6,3)) plot(1, las=1, ylab="") mtext(text="Test", side=2, line=4, las=1) ''' You can change the values in par to your liking, put your data instead of the 1 in plot, add your x labels etc... Then use mtext to write the yaxis label
20,934,990
1
20,951,232
I'm a novice trying to learn basics for fun. I've set up a 7.24 drupal website. I've installed the bootstrap theme. I managed to create a subtheme and activated it. I use the bootstrap-cdn method. Now, I'm not happy with the style of certain elements. Bootstrap already has great css definitions but they are not used in the basic starter kit of the theme. I want the tag fields of my articles to be styled with the style class 'label label-info' of bootstrap - displayed here: <IMAGE> I've read an article about the usage of template.php but I'm stuck for hours to find the right method name. Something like '<mythemename>_field_X_X_X()'. How do I find out which method name I have to use? If there is an easier way to change/add the style of a certain div class I'm open for suggestions. Thank you for reading this! Your help is appreciated.
The module <URL> did the job.
9,314,491
1
9,314,809
I am designing an application in NetBeans, as illustrated in the screenshot below. <IMAGE> When the user clicks on a JButton on a JFrame, a JDialog pops-up asking the user to enter a numeric value using a numeric keypad. I would like the JDialog to dynamically add 2 JPanels. JPanel 1 will contain a textbox for input. JPanel 2 will contain a numeric keypad. I designed them this way so that I could reuse the numeric keypad whenever I need it. The problem I am facing is displaying dynamically these 2 JPanels on the JDialog that pops-up. JDialog pops-up empty. Please take a look at my code below. Thank you all, I appreciate your help ''' public class MyDialog extends javax.swing.JDialog { public MyDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() {//Add JPanel 2 (Numeric Keypad) to JDialog Container contentPane = getContentPane(); NumericKeypadPanel nkp = new NumericKeypadPanel(); nkp.setLayout(new java.awt.BorderLayout()); contentPane.removeAll(); contentPane.add(nkp); contentPane.validate(); contentPane.repaint(); } }); } ''' ''' public class NumericKeypadPanel extends javax.swing.JPanel { /** Creates new form NumericKeypadPanel */ public NumericKeypadPanel() { initComponents();//Draws 10 number buttons } } '''
basicall there are two ways 1) add a new 'JComponent' by holding 'JDialog' size (in pixels) on the screen, all JCompoenets or part of them could be shrinked 2) resize 'JDialog' by calling 'pack()', then 'JDialog' will be resized <URL>
6,473,465
1
6,473,551
The following code works nicely on the iPhone simulator but, on Android 2.3, I just get a blank map with the Google logo on it (see attached screenshot). ''' var mainWin = Ti.UI.createWindow({backgroundColor:'#fff', fullscreen:true, navBarHidden: true}) mainWin.open(); var win = mainWin; var mapview = Titanium.Map.createView({ mapType: Titanium.Map.STANDARD_TYPE, region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5}, animate:true, regionFit:true, userLocation:true }); win.add(mapview); ''' Any idea what's going on? <IMAGE>
When you use the SDK you get this when you are <URL>. You could try looking into that. Also are you using the android emulator? Because if you are, you need to verify that your images has the google apis.
9,743,543
1
9,743,716
I would like to create a layout for an android application where I have two edittexts at the same height. If I put those edittexts one after the other in the xml code I will have the second below the first, even changing the gravity. I would like to put a textview on each edittext, and it they should be at the same height as well. It should look like this fabulous representation. Thanks!!!!! <IMAGE>
Use <URL>, It should look like the following pseudocode ''' <TableLayout> <TableRow> <TextView /> <TextView /> </TableRow> <TableRow> <EditText /> <EditText /> </TableRow> </TableLayout> '''
52,388,599
1
52,388,693
When I look through my query history on the new UI i can see queries that I have not run and at times when I have not had access to BigQuery. These tend to be simple queries, on tables that i have interacted with but appear to be generated by some kind of software, given the strange SQL. I have confirmed through the cmd line that these queries were run on my account. <IMAGE> SQL: ''' SELECT t0.Branch, t0.Customer_Type, COUNT(1.000000000000000) AS t0_qt_83wd73hgqb, COUNT(1.000000000000000) AS t0_qt_f0hbgeh6pb, COUNT(1.000000000000000) AS t0_qt_jlxx8un6pb FROM 'Redacted_Table_Name' AS t0 GROUP BY t0.Branch, t0.Customer_Type ORDER BY t0_qt_83wd73hgqb DESC; ''' I have noticed these before but most are on cached data, it is only as this one has billed us that i have begun to investigate. Our organisation is new to using BigQuery but I'm guessing this might be something akin to indexing? All developers in my organisation can see these on their accounts sometimes happening dozens of times in a day.
Do you have the data linked to anywhere else such as Data Studio? If so, that runs queries which will be logged and look similar to the above
9,999,739
1
10,000,430
I was recently working on a project that involving connection to a POP3 Server. I was using this piece of C# from CodeProject(<URL>, had complied it into a DLL and was using it in VB.NET. I'd connected to my Hotmail Account (not many mails) and it seems to work just fine. After that, I connected to my GMail account... I started seeing errors! POP3 is meant to fetch emails only from the Inbox. Even when I made my own program to cross-check the problem, I saw that when I requested for the number of messages, the GMail POP3 Server returned a value which is about 5 times less than the actual inbox size. <IMAGE> 255 Emails in my Inbox?? Online it shows me 2,414 emails in my Inbox. And secondly, my MAIN QUESTION is that how does one fetch the LATEST email from the POP3 Mailbox. What I've fetched here was an e-mail with ID 1! I want to fetch the top 20 emails (that were most recently delivered to the account)... Is there any work around for how to fetch the LATEST email from the POP3 Server rather than the oldest emails? I've also tried to connect to the Hotmail POP3 Mail Server. Again a "RETR 1" command fetches me the oldest email and not the latest one! Any known work-around?
<URL> [Update on 2016-06-30: The above link will not necessarily work, demonstrating why link-only answers are frowned upon so...] The messages are made available in batches. After retrieving a batch, re-connect to get the next batch. Repeat as required.
25,330,452
1
25,339,357
I have a 'PdfPTable' with 6 'PdfPCell'. I want to put an image in each cell at an absolute position. I just can get it to work, what am I doing wrong? As shown in the pic, the image always show on the to left (default) location. ''' laImage.scaleAbsolute(50, 50); laImage.setAbsolutePosition(0, 100); laCell.addElement(laImage); ''' <IMAGE>
The 'setAbsolutePosition()' method can be used to define the position on a page (using the coordinates of the page) when adding an image to a document using 'document.add()'. It is very surprising to discover that somebody would be using that method to define a position in a 'PdfPCell'. Depending on what you really want, you could either change the padding of the 'PdfPCell' (to create a distance between one or more of the cell borders and its content) or you could define a border for the 'Image' object. This will introduce relative offsets.
9,224,543
1
20,351,026
In our Silverlight page, I got comboboxes with different values. When selected, some values are too long to fit in the collapsed combobox. <IMAGE> I would like it to ellipsise ("System Use..." with three dots in the end). In the dropdown the full name of the value can be seen, but when collapsed I would like the selected value to ellipsise. It feels like an obvious thing, as a drop down generally affords more space than the collapsed control, but still I cannot find an obvious way to do this.
You might want to take a look at <URL>. It's similar to Zenexar's suggestion, uses a more efficient reduction algorithm in the general case. But it also writes about other types of 'ellipsing', which might also suit your needs perhaps.
7,082,577
1
7,083,619
I need a little help with : I have to rotate some images (with CSS3 transform (deg) ) in the way to get results from '-40' to '+40' <IMAGE> If I'm not wrong this will get me random results in a range from to ''' var counter = Math.round(Math.random()*81)-40; ''' How to exclude from the results numbers between -20 and +20 ???
Modifying existing answers to give a uniform distribution range -40 to -21 and 21 to 40: ''' (Math.random()<.5?-1:1)*(Math.floor(Math.random()*20) + 21) '''
11,452,434
1
11,453,333
I'm not interested in the hex code of the color, but its system name, to use in a Form and match the colors in different versions of windows <IMAGE>
That pane is called the "Details Pane", as evident by the menu to show/hide it under Organize > Layout. I don't believe it has a system color since the background is actually an image, which was more obvious in Windows Vista: <IMAGE> In Windows 7, they just replaced it with a quieter image, leaving only the subtle shadow effect under the top border of the pane. In <URL> they discuss changing the image in Windows 7, which further confirms that it is probably an image and not a color.
24,417,156
1
25,455,636
When you're downloading a <URL> you can define a "CSS Scope". <IMAGE> If you enter, e.g., #my-app in the CSS Scope, then all the CSS rules will be prepended with #my-app, limiting the scope of those rules to the element with id 'my-app'. This is very useful, and I was hoping to accomplish the same thing with a jQuery mobile theme, but I don't see this option anywhere on the <URL>. Does no such feature exist with jQuery mobile, or am I just missing the location of this option?
I ran through the <URL>, selecting only the widgets I was actually using, and while it didn't produced a "scoped" CSS file, it produced a different CSS file that didn't alter other elements of my page. This was the solution in my situation.
28,051,845
1
28,051,996
I have 1 table topics. <IMAGE> I want to order rows in this way. first get rows where 'pinned = 1' order them by 'id ASC' second will be rows where 'pinned = 0' ordered by 'created_ts DESC' code: ''' SELECT topics WHERE category_id = :i AND deleted = :d ORDER BY pinned ASC, created_ts DESC ''' Note: I switched columns in table by mistake ( edited_by <=> edited_ts )
You should be able to use <URL> to only sort by a column if another column meets certain criterias: ''' SELECT id, title, ... FROM topics WHERE category_id = :i AND deleted = :d ORDER BY pinned DESC, -- first 1 then 0 CASE WHEN pinned = 1 THEN id ELSE 0 END, -- ignore for pinned=0 created_ts DESC ''' See <URL>.
25,999,208
1
56,213,842
Now I know there are similar questions posted, but I'm looking for a solution for pixel perfection. Sandbox: <URL> Problem trying to solve: <IMAGE> Attempted code: ''' .mi{float:left; width:150px;height:200px;padding-right:10px;/*margin-top:3px;*/} .mt{float:left; width:400px;margin:0;} ''' In the past I've used the padding/margin hacks to push the image or the text objects down a few pixels to make them visually align at the top edge. And by visually I mean that I know that the fonts have a size and line height, but even taking that into account, the height of the actual font characters may include some space. This you can see in my example above. I've also --based on other threads here --tried using line-height, and although that did achieve pixel perfect alignment, it mangled the the vertical line spacing of the entire paragraph. My question essentially is whether to continue using the padding/margin hacks or is there a more 'legit' solution. I ask this in regards to building layouts that are responsive and then having no issues with uniform layouts. Thanks in advance.
Realize it's an old question but... In CSS one can use a '::before' element add a negative 'margin-top' value to it. Specifically, I wanted to share this <URL> I found that helps create a SASS mixin for this purpose. The gist in this tool is that you remove the capital height from the (font-size * line-height) and then divide by two. But that is a simplification of how your font may or may not be structured. In reality - There is no "pixel-perfect" answer because when it comes down to it, the physical structure of fonts doesn't always match their 'font-size' and different font-families at the same font-sizes can still look taller or shorter.
26,370,940
1
26,371,097
I'm trying to set up a basic storyboard using the Single View Application template in Xcode. The Main.storyboard has one view controller in it. I can add a subview and I can size it fill its parent view, but if I add autlayout constraints, it thinks that the leading and trailing edges need to be set to -16 to fill the screen. If I set them to 0, like I would expect to work, then it has a 16 point gap on the sides of the view. Does anyone know why it insists on having constraints set to -16? <IMAGE>
You've created constraints to the of the superview, not its edges. The edge of the view is 16 points from the margin. This is new in Xcode 6. You can change this by altering the individual constraints (where it says the "item" as superview.margin or similar, in the attributes inspector) or by creating the constraints with the "use margins" box unchecked.
46,366,999
1
46,367,691
I finished my app and now I want to create a update system. I have the installer so I can install the application in other machines, it was made with InnoSetup (I don't know if it is the best way, but it worked). I know the basics, I have to compare the current version with a string stored in a in a web server, if it is greater, download the files. Now, what files? Because the InnoSetup gives me these files: <IMAGE> Where are the .xaml (design) files? And the .cs files? Are they compressed in the .exe? For example If I add a few lines to a class, I want to download this class, no the full installer . Because the final size of my application is 30Mb, if I change some things of a class, I do not want the user to have to download the 30Mb again
In the most basic of terms, when you compile your program the compiler turns your cs and xaml files into machine readable code and puts it all into an exe file. Yes, if you add a few lines to a class and recompile it, it will rebuild your exe (assuming the class is part of it, and not an external library). You still have dependency dll files that you need to include, and any other external content that you've included. But once you have all the external files installed, you wouldn't theoretically need to download them again on an update. Only the files that you've updated, ie the exe.
25,187,433
1
25,187,579
I'd like to see the type of the operator '|>', which is of course defined as 'let |> x f = f x;;'. With other operators, like '+', I can simple hit '(+);;' and the toplevel will tell me it's '- : int -> int -> int = <fun>'. But with '|>', it says: > Error: Failure: "|> must be applied to two arguments" My question is, how can I inspect operator '|>' in OCaml's toplevel. <IMAGE> Append: OK. Now I know it has something to do with Core. If I define it directly it's OK. But in Core environment it just breaks. This is my '.ocamlinit': ''' (* Added by OPAM. *) let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> () ;; #use "topfind";; #thread;; #camlp4o;; #require "core.top";; #require "core.syntax";; open Core.Std;; '''
It works for me. Here's a complete command line session: ''' $ ocaml OCaml version 4.01.0 # let (|>) x f = f x;; val ( |> ) : 'a -> ('a -> 'b) -> 'b = <fun> # (|>);; - : 'a -> ('a -> 'b) -> 'b = <fun> # ''' (Pascal Cuoq clearly has the right answer in the comments below. :-)
21,844,510
1
21,845,543
I am fairly new to R and am exploring the axis function. Here is a small piece of code ''' x = seq(0,1,0.2) y = seq(0,1,0.2) x1 = c(1,1) y1 = c(0,1) plot(x1,y1,,xlab="X-axis",ylab="Y-axis",axes=FALSE) axis(1,at=x,labels=x,pos =0) axis(2,at=y,labels=y) abline(0,1) ''' This is a simple xy graph. The labels on Y axis are exactly what I expect (0,0.2,0.4,0.6,0.8,1.0). However something weird is going on in the X axis. The labels here are (0.6,0.8,1). I have spent some time trying to figure it out but I seem to be stuck. Is this axis function a mere suggestion to the system which it may choose to ignore? What am I missing here? Thanks a lot for your help everybody? <IMAGE>
Instead of removing then remaking the axes just use this ''' plot(x1,y1,,xlab="X-axis",ylab="Y-axis",ylim=c(0,1),xlim=c(0,1)) ''' By default R doesn't plot unnecessary white space, if you want extra white space then you force it with xlim and ylim arguments.
65,256,040
1
65,256,349
Hi I have three tables customers, contacts and order. I need to check if there are duplicates (wrongly entered orders) in the table orders. If yes I need to return the first and last name from table customer, email from table contact and finally order and order id. I want to check these duplicates by finding more orders with the same order_id. <IMAGE>
You need to join this query also: ''' SELECT order_id, COUNT(*) counter FROM orders GROUP BY order_id HAVING counter > 1 ''' which returns the duplicate 'order_id's and there is no need for additional aggregation: ''' SELECT DISTINCT c1.first_name, c1.last_name, c2.email, o.order_id, o.item, t.counter FROM orders o INNER JOIN (SELECT order_id, COUNT(*) counter FROM orders GROUP BY order_id HAVING counter > 1) t ON t.order_id = o.order_id LEFT JOIN customers c1 ON o.customer_id = c1.customer_id LEFT JOIN contacts c2 ON o.customer_id = c2.customer_id '''
30,621,333
1
30,621,439
How would one go about implementing a slider like this on a website? Is there an out of the box solution using something like jQuery or even just css? What is this type of slider called? <IMAGE>
This type of the component is called carousel. There are number of choices: <URL> <URL> <URL> <URL>
26,950,947
1
26,951,654
I followed this tutorial (<URL> for an expandable list view, in which I enter different shop names, categorized by the part of town they are located: <IMAGE> But there is obviously no need to have the same group several times (which is the case for Neukolln for example). Here is what I tried to do: ''' SparseArray<Groups> groups = new SparseArray<Groups>(); DatabaseHandler db = new DatabaseHandler(this) ; List<Shop> shops = db.getAllShops(); Groups group = null ; String str = "null" ; int i = 0 ; for (Shop shop : shops){ // if current shop's district differs from district of the shop of the last iteration if ( shop.getDistrict() != str ) { // making sure that empty group is not appended into groups in the first iteration if (group != null) { groups.append(i, group); i++; } // saving the district of the current shop str = shop.getDistrict(); // creating a new group named after the current district group = new Groups(str); } // adding shop name to the current district group.subitems.add(shop.getName()) ; } // after last iteration the last group needs to be appended to the groups groups.append(i, group); ''' I hope you can understand the basic idea of my code. I sure it has to work out, because I went through it on paper and in theory it works. My first idea was that those if-statements are responsible, but I have no clue how to repair this.
Your 'shop.getDistrict() != str' statement will always return true, use 'String.equals' instead. <URL>
14,842,219
1
14,968,106
I am experiencing something weird at the moment. After I installed Visual Studio 2012 Update 2 (CTP), I can no longer open xaml pages properly in Blend designer view. Looks like everything from other namespaces just cannot be found (see screenshot below)... <IMAGE> Please also note that the whole solution compiles ok if I close up all the xaml pages, and runs well too. But as soon as I open any of the xaml pages, it will throw me those errors... Just an update, a couple of days ago (after I installed the VS Update 2) the same error came back again. What I did to fix this was I had to change my build name from something else to 'Release' (or 'Debug') and did a 'Clean' and 'Build'.
Updating to Visual Studio 2012 Update 2 should fix the issue: <URL>
15,311,110
1
15,311,199
As you can see from the screenshot, the X-Axis points are all jumbled. Is there a way to make them appear vertically so that they can be read? And is there a way to specify the interval in the Y-Axis? I am using ggplot2's qplot. ''' qplot(merged[[1]], merged[[4]], colour = colour, xlab="Positions", ylab ="Salary", main="H1B Salary 2012", ylim=c(50000,300000)) ''' <IMAGE>
Without sample data and your actual code it is hard to give exact answer. Generally, axis texts formatting is changed using function 'theme()' and argument 'axis.text.x=' (for x axis). To set breaks for y axis, 'scale_y_continuous()' should be used with arguments 'breaks='. ''' qplot(mpg, wt, data=mtcars)+ theme(axis.text.x=element_text(angle=90,vjust=0.5))+ scale_y_continuous(breaks=seq(0,5,0.5)) ''' More information about theme() features is on <URL>.
19,278,296
1
19,278,378
I've prepared transparent Button class: ''' public MyButton() { super("button"); setOpaque(false); setContentAreaFilled(false); setBorder(null); setBorderPainted(false); } ''' But button is not fully transparent. When it is clicked it looks like this: <IMAGE> Is there any way to avoid this annoying rectangle? There is no such problem in default L&F but I'd like to use SystemLookAndFeel.
You could do ''' setFocusPainted(false); ''' Note: All the above functionality can be achieved by just creating an instance of 'JButton' and using rather than sub-classing the component
55,329,849
1
55,368,040
I'm looking to migrate data referencing this demo (<URL> and I'm unable to connect to cosmos through mongo shell. I suspect its an issue with SSL or the server/shell versions but I'm not clear what the fix is. I followed the demo to the T and passed the '--sslAllowInvalidCertificates' option along with the auth creds and executed in the correct directory. Here's what I'm seeing in mongoshell, please advise on troubleshooting tips. <IMAGE>
The default download for v3.2 from MongoDB site will not have support for SSL (not sure why ). You need to select the Windows 64-bit version from the OS dropdown box (screenshot below) to get SSL support. Another way to verify is that the msi executable name contains ssl (i.e. <URL> <URL>
6,219,389
1
6,224,131
I made a UITableViewController and tried loading it the previous view ''' [self.view addSubview: poll_ridingController.view]; ''' but when i run it, it display me a blank kid of thing where the footer was supposed to be. See the attached Picture. <IMAGE>
The view you see IB just has what I like to call "eye-candy data" which means that Interface Builder does not implement any data into your project that is your job. The methods you will need to make sure you implement are: ''' - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section ''' For more information read the <URL>
22,970,198
1
22,970,537
I am trying to change the color of my button text to white, the buttons which show who is logged in and the logout button. Right now its blue and not easy to see whats it shows. I think it's because the buttons are links, that why its blue. <IMAGE> Code: ''' <p class="navbar-text pull-right"> <span class="glyphicon glyphicon-user"></span> <span class="label label-info" style="color:white"> Innlogget: <a class="navbar-link" style="color:white">{{ HTML::linkRoute('user_data', Auth::user()->user_name) }} </a> </span> | <span class="label label-danger" style="color:white">{{ HTML::linkRoute('logout', 'Logg ut') }} </span></p> <ul class="nav navbar-nav pull-left"> '''
''' .label, .label a{font-size:18px; /*change font size as per requirement*/ color:#fff} .label-info:after { content: "|"; margin-left:8px; } ''' should work
40,520,708
1
40,521,234
i have put restriction on that the user can only upload format, but when user try to upload a different format's file then it's showing this screen: <IMAGE> If the user upload doc or pdf file format then the form should submit successfully else it should show my own custom error.
Problem here is that your code is invalid. You didn't import 'ValidationError'in your 'app/forms.py' ''' from django.core.exceptions import ValidationError '''
19,163,348
1
19,170,082
How can I add the Current Sprint iteration and burn-down chart to the landing page for TFS Web Access? I am able to pull in the build and backlog queries into "team favorites", but can not seem to find how to add current sprint info and the Work Burn-down chart like I've seen elsewhere. <IMAGE>
This is not added via Team Favorites. It will automatically show up if your user account is setup with "Full" Access vs the default Standard access (you will also get the links to View Backlog and View Board to access the Agile Planning functionality). <IMAGE> You can configure the user access levels by going to the settings page (gear icon in upper-right), then navigating to the root Control Panel (using the breadcrumbs in upper left), then choosing Access Levels Tab. <IMAGE>
5,413,647
1
5,413,772
I am using a notebook without a mouse. After typing 'prop' and pressing 'tab', Visual Studio will automatically give me a property template. Pressing 'tab' will move the cursor between 'type' and 'propertyname' placeholders. I want to move the cursor to a new line after completing the property template. Is there a shortcut to do so? <IMAGE>
Press the Enter key twice. I tried to post this answer 3 times before I left the comment. It wouldn't let me, too short. That's why I'm typing this otherwise useless verbiage.
14,031,538
1
14,031,579
in wamp setup, i am unable to set virtual host for my application. Appache; D:\wampinpachepache2.2.8\conf\extra ''' # # Use name-based virtual hosting. # NameVirtualHost *:80 <VirtualHost 127.0.0.1> DocumentRoot "D:/wamp/www/" ServerName www.example.org # ... </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot D:/wamp/www/facebook_post_style ServerName www.example.net ServerAlias *.example.net # ... </VirtualHost> ''' in host C:\Windows\System32\drivers\etc\hosts ''' 127.0.0.1 www.example.org 127.0.0.1 www.example.net ''' I did above configuration. For both domain, same output is displaying. please check this below URL.<IMAGE>
try this ''' NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "D:\wamp\www acebook_post_style" ServerName www.example.net </VirtualHost> <VirtualHost *:80> DocumentRoot "D:\wamp\www\FolderName" ServerName www.example.org </VirtualHost> ''' also make sure you have uncommented the following line from httpd.conf file ''' Include conf/extra/httpd-vhosts.conf ''' check this <URL> for details