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
27,145,979
1
27,146,250
I am currently new to Angular Ionic Framework. I have a screen where the user can see a list of items, where in he can tap on the item and view the details of the item on the screen. However there are certain items in the list which have multiple sub items in them. On tap of those items the user has to be redirected to a different screen which will display the sub list of items <IMAGE> Here in the above image the rows with yellow color have sub items in them, which should redirect the user to a screen A and the other item should redirect the user to screen B. Questions 1. Is there a way to add in ion-list directly or something similar? Eg. ''' <ion-list > <ion-item class="item-icon-right " ng-repeat="alarm in alarmList| filter: alarmName" type="item-text-wrap" ng-if="alarm.status == 1" ng-href=" URL TO BE ADDED HERE " else ng-href=" URL TO BE ADDED HERE " on-swipe-right="swipeRight()" on-swipe-left="acknoledge()" can-swipe="true"> ....... </ion-item> </ion-list> '''
You can do this: ''' ng-href="{{ alarm.status == 1? oneURL : otherURL }}" '''
11,778,177
1
11,779,106
I know it is possible to make a shape looking something like this: <IMAGE> But I don't know how to start with it. Can I make it as a shape? or do I have to do something else? BR
Oh look at that, I was wrong - gradients are not a problem: ''' import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader; import android.view.View; public class ButtonShadow extends View { public ButtonShadow(Context context) { super(context); } @Override public void onDraw(Canvas canvas) { RectF space = new RectF(this.getLeft(), this.getTop(), this.getRight(), this.getBottom()); Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setShader(new LinearGradient(0, getWidth(), 0, 0, Color.BLACK, Color.WHITE, Shader.TileMode.MIRROR)); canvas.drawArc(space, 180, 360, true, paint); Rect rect = new Rect(this.getLeft(),this.getTop() + (this.getHeight() / 2),this.getRight(),this.getBottom()); canvas.drawRect(rect, paint); } } ''' For more on gradient fills look here: <URL>
28,945,023
1
28,951,541
How can I customize the bootstrap 3 navbar that will look like this, with different backgrounds? <IMAGE>
easy: just make 2 divs of that width and make them float to right and left + change background color example: > .left { float: left; background-color: blue;}.right { float: right; background-color: silver; } html: ''' > <div class="left">CONTENT GOES HERE</div> <div class="right">CONTENT > GOES HERE</div> '''
22,350,104
1
22,350,169
I have issue where 'obj->num_rows' constantly returns '1' Heres my code: ''' $open_tickets = $con->query("SELECT COUNT(*) FROM support_tickets WHERE Username='" . $_SESSION['user'] . "'"); echo '<table><tr><th>Open Tickets</th><td>' . $open_tickets->num_rows . '</td></tr></table>'; $open_tickets->close(); ''' '$_SESSION['user']' is currently 'dextermb' <IMAGE> As you can see in my SQL table, there are , so why does the code always return '1'?
You are getting the number of rows returned - of course, this is only ever going to be 1. You probably want to get the value that is returned rather than the number of rows.
27,069,856
1
27,073,742
I am running a sub expect script from a bash script that provisions a vms here, and am not getting my expected result (ala, password = foo). Here is what I'm running, help appr ''' ## Create generic(s) for Vagrant groupadd admin useradd -G admin vagrant /usr/bin/expect -dc 'expect { eval spawn passwd vagrant set prompt ":|#|\\$" ## use correct prompt interact -o -nobuffer -re $prompt return ## must be done twice due to week passwd send "vagrant " interact -o -nobuffer -re $prompt return send "vagrant " interact }' ''' Here is a screen cap of the debug <IMAGE>
Your 'expect' code can be optimized with the use of 'exp_continue' as shown below. ''' PASSWD=$(expect -c ' log_user 0 proc abort {} { puts "Error with setting password?" exit 1 } spawn passwd vagrant expect { password: { send "vagrant ";exp_continue } default abort eof } puts "User Vagrant has had password set..." ') '''
22,775,015
1
22,775,373
I am eager to add a time-out feature to my 'stream.ReadAsync()' and read Microsoft help in this article <URL>' at all. I am using with along with 'using System.Threading;' and this is the piece of code I have: ''' private async Task<int> ReadAsync(BluetoothClient Client) { const int timeoutMs = 10000; var cancelationToken = new CancellationTokenSource(timeoutMs); var stream = Client.GetStream(); byte[] buffer = { 0 }; int offset = 0; int count = 1; StatusManager("~Async Read Started..."); //This line works perfectly fine. var rx = await stream.ReadAsync(buffer, offset, count); //This line gets underlined with error for AsTask() var rx = await stream.ReadAsync(buffer, offset, count).AsTask(cancelationToken); //rx.AsTask().Start(); StatusManager("Recieved byte " + rx.ToString()); StatusManager("~Async Read Finished."); } ''' What am I missing here folks. I am puzzled :) UPDATE: These are the list of .NET packages installed and I would say Visual Studio 2013 uses 4.5 <IMAGE>
As @Noseratio commented, the 'AsTask' in the linked article is for WinRT asynchronous operations, not BCL types. In your case, you can just pass the cancellation token directly to the method: ''' var cancelationToken = new CancellationTokenSource(timeoutMs).Token; ... var rx = await stream.ReadAsync(buffer, offset, count, cancellationToken); '''
23,417,471
1
23,417,529
I've most certainly got something very basic wrong here. Here is the code that is part of my Abstract Class: ''' private $outarray = null; public function add_to_array($ahref, $docname, $description) { $row = array('ahref' => $ahref, 'docname' => $docname, 'description' => $description); if (!isset($this->outarray)) { $this->outarray = array(); } array_push($this->outArray, $row); } ''' <IMAGE> When I step through the code, though, the remains null. It is never created and never populated. I'm still green with PHP, but this help doc seems to leave me believing that this is OK to do: <URL> ...particularly where they are declaring the that performs some action. I've got 5 elements I am trying to populate 'outArray' with, but each of the 5 times I circle into this function, I come out with being NULL.
Variables are case sensitive. You have in one place $this->outarray and in array_push you have $this->outArray
57,148,250
1
57,148,472
I am having an excel sheet tracking member donations. I'm pasting the picture which will explain the situation. Essentially, I am trying to set N/A values (result of failed lookup) to the next non N/A value in the same column but having another column with same value as the row that had N/A column. I am unable to come up with formula for the same. I tried using the code fragments from solutions to problems that looked closer, but have not been able to make it work Tried using multiple ways of SUMPRODUCT, INDEX MATCH combos etc. But none of them worked <IMAGE>
This is an Array formula, enter with Ctrl+Shift+Enter: ''' =IF(ISNUMBER($G4),$G4,SUMPRODUCT(SMALL(IF(($D4:$D$12=$D4)*($G4:$G$12<>"N/A"),($D4:$D$12=$D4)*$G4:$G$12,99999),1))) ''' <URL>
25,396,847
1
25,433,150
I've just noticed a new button in the toolbar of the Google Apps Script IDE. It looks like a lightbulb, and the alt text on it says "Execution hints". I can't find anything in Support, Release Notes, or the Blog about this button. Does anybody know what it does? I can't seem to make the button active to try it out. <IMAGE>
The button seems to only be enabled if you have something in your code which they have pre-defined hints for. For example: I finally saw the button enabled when I was working on one of my custom spreadsheet functions. When clicked, this popped up over my code: <IMAGE> I, too, was intrigued by this new button when it first appeared a few days ago, and I was surprised to see nothing about it in the official <URL>. Once I figured out what it does, I came here to see if anyone else had asked about it. @mwjeffcott Update: Another one of my projects actually had some helpul "execution hints." It told me about deprecated functions that I was using. I mean, it have been more helpful by providing the sunset date and the recommended "alternative solution," but it's better than nothing I guess. <IMAGE>
29,949,518
1
29,955,527
I have a problem with the following sample: <IMAGE> When I click at the place marked as on my screenshot, I can get position in pixels by MouseClick event in a pretty easy way: ''' private: System::Void chart1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { Point chartLocationOnForm = chart1->FindForm()->PointToClient(chart1->Parent->PointToScreen(chart1->Location)); cursorPosX = e->X - chartLocationOnForm.X; cursorPosY = e->Y - chartLocationOnForm.Y; } ''' After printing these values out, I get the position in pixels, where position marked as is equal to (0,0). > , . Is there any way to do that (I mean other than considering padding, margins and borders of the chart and calculating these coordinates by myself)? , but it still seems to be more like a fancy way to solve simple problem than a real, straight-forward solution. Am I right or this is the way I am supposed to solve my problem?
Yep, there is a civilized way of doing that if I understand your question correctly. You can use the Axis.PixelPositionToValue method to do just that. E.g. (in C#) ''' chart.ChartAreas[0].AxisX.PixelPositionToValue(pt.X) chart.ChartAreas[0].AxisY.PixelPositionToValue(pt.Y) '''
8,890,574
1
8,892,858
The tableview I am implementing is a kind of phonebook, where I have an entry(name) and below that I am displaying his/her phone numbers. These data make my cell. An entry(name) can have multiple phone numbers(each phone number displayed in different lines). Against each phone number(in the same line) I have an option to set some status message. How can I implement this. The way I have gone forward is: I have created a 2 labels inside a cell. One for displaying the name and the other for displaying the numbers. These numbers are displayed in a multiline way. The problem I am facing is, adding the status message against each phone number(in the same row of each number). For that I may have to add the status as text in between the phone numbers(displayed in a multiline way) in the same label or I have to add another label inside this label. I am a bit confused regarding, how to go about this. Need help. <IMAGE>
Personnaly, I would add the "To" view as a subview of your UILabel and then set the 'toView.frame.origin.y' to 'index * label.font.lineHeight'.
15,991,276
1
15,995,814
I'm trying to create a horizontal stacked bar graph, for a Gantt chart, but the axis is reversed. Code I have written is below: ''' a[0] = 0; a[1] = 6; a[2] = 7; a[3] = 7; b[0] = 6; b[1] = 0; b[2] = 11; b[3] = 0; c[0] = 0; c[1] = 6; c[2] = 0; c[3] = 19; string[] labels = new string[] { "A1", "A2", "B1" , "B2" }; GraphPane _p = zedGraphControl1.GraphPane; BarItem bar1 = _p.AddBar("", a, null, Color.White); BarItem bar2 = _p.AddBar("", b, null, Color.Blue); BarItem bar3 = _p.AddBar("", c, null, Color.Green); _p.BarSettings.MinClusterGap = 0; _p.YAxis.Scale.TextLabels = labels; _p.YAxis.Type = AxisType.Text; _p.BarSettings.Base = BarBase.Y; _p.BarSettings.Type = BarType.Stack; ''' How to reverse the y-axis? I would like A1 at the top, then A2, B1 and B2. <IMAGE>
''' _p.YAxis.Scale.IsReverse = true; '''
27,816,908
1
27,873,887
I'm using a Digital-7 Typeface for a pair of TextViews. The problem with the TextViews is that whenever I use the character "1" in it, the characters left of the "1" get pushed back and they lose their proper spacing. As seen here: <IMAGE> You can see the 9's are properly in place while the 1's get squished together. Is there any piece of code that can help me fix this or do I need a better Typeface?
As what Der Golem said, switching to a monospace Typeface fixed my issue.
6,239,530
1
6,239,700
Hi I'm new to android world.Iam working on an application that supports multiple screen sizes i did as explained here <URL> . I didn't create different xmls for each screen size. But when I tested it on android 3 emulator it appears in small part of the screen. <IMAGE> So I think that the size specified for my application on the emulator is small so my widgets are not filling the whole screen as I want. Can I control that size of my application on the emulator?
See this question...<URL>
6,145,711
1
6,145,848
I want a UILabel like this. Where can I find one ? <IMAGE>
Create an imageview with the bubble image. add a uilabel as subview of the imageview and position it. ''' UIImageView *imgv = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,100,100)]; imgv.image = [UIImage imageNamed:@"bubble.png"]; ''' //position the label to center of imageview ''' UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(20,30,60,40)]; [imgv addSubview:lbl]; [lbl release]; [self.view addSubview:imgv]; [imgv release]; '''
17,838,990
1
18,018,681
I am trying to setup publishing/deployment of an asp.net mvc project from visual studio to a box running IIS 7.5/Windows Server 2008. I found <URL> useful tutorial and know I need to install something called web deploy. When I go to install this from Web Platform Installer I see a few options: web deployment tool 2.1, web deploy 3.5 and web deploy 3.5 for hosting servers. Which one do I need? What is the difference? <IMAGE>
Web Deploy is just a tool to help automate deploying your ASP.NET web site to many different web server configurations. It does not matter what version of VS you have. The latest version is 3.5 and it just several added features compared to 2.1 Here is a link to the download which will give you lots more information than Web Platform Installer <URL> Here is the blog from the MS IIS team that talks about the various versions and features <URL>
16,767,430
1
16,866,762
This code was written in Word 2007. ''' With Selection.Tables(1) If .Style <> "Table Grid" Then .Style = "Table Grid" End If .ApplyStyleHeadingRows = True .ApplyStyleLastRow = False .ApplyStyleFirstColumn = True .ApplyStyleLastColumn = False .ApplyStyleRowBands = True .ApplyStyleColumnBands = False End With ''' The client are using Word 2003 and there was an incompatibility issue. Saying: <IMAGE> Are there any ways to make the code compatible in Word 2003.
that's a backwards compatibility issue - applystylerowbands was not available in Office 2003.
14,612,192
1
14,612,877
I'm trying to detect a shape (a cross) in my input video stream with the help of <URL>. Currently I'm thresholding to get a binary image of my cross which works pretty good. Unfortunately my algorithm to decide whether the extracted blob is a cross or not doesn't perform very good. As you can see in the image below, not all corners are detected under certain perspectives. <IMAGE> I'm using 'findContours()' and 'approxPolyDP()' to get an approximation of my contour. If I'm detecting 12 corners / vertices in this approximated curve, the blob is assumed to be a cross. Is there any better way to solve this problem? I thought about <URL>, but the algorithm has to perform in real-time and I read that SIFT is not really suitable for real-time.
I have a couple of suggestions that might provide some interesting results although I am not certain about either. If the cross is always near the center of your image and always lies on a planar surface you could try to find a homography between the camera and the plane upon which the cross lies. This would enable you to transform a sample image of the cross (at a selection of different in plane rotations) to the coordinate system of the visualized cross. You could then generate templates which you could match to the image. You could do some simple pixel agreement tests to determine if you have a match. Alternatively you could try to train a <URL> to recognize the cross. This type of classifier is often used in face detection and detects oriented edges in images, classifying faces by the relative positions of several oriented edges. It has good classification accuracy on faces and is extremely fast. Although I cannot vouch for its accuracy in this particular situation it might provide some good results for simple shapes such as a cross.
13,542,456
1
13,553,196
Is it possible to draw a symbol shadow behind the symbol fill? As explained here, <URL> the fill is drawn after the plot fill which results in something that looks like this, <IMAGE>, where the red is the shadow and blue is the fill.
Core Plot issue #478 is fixed. Pull the latest code to fix the symbol drawing. If you don't want to do that, the fix involves adding a transparency layer to the symbol drawing. See the <URL> for the change to see how to fix your copy. The previous changeset fixes the '-copyWithZone:' issue mentioned on the issue tracker, too.
16,339,939
1
16,340,045
I'm trying to get a parent div tag to hold n children div tags such that they are all on the same line, yet grouped together in the center. For example: <IMAGE> Here the children are blue, and the parent is red. Here are the things I've tried: - '&nbsp;'-
''' <style> .container { width: 100%; padding: 0; text-align: center; border: 1px solid red; } .inner { display: inline-block; margin: 0 5px; border: 1px solid blue; } </style> <div class="container"> <div class="inner"> one </div> <div class="inner"> two </div> <div class="inner"> three </div> </div> '''
30,452,111
1
30,452,914
I have a simple problem, but I don't know how to solve it. <IMAGE> In the y axis I have the values '[60.8, 60.9, 60.9]'. So, when I plot it, it will make a horizontal line in the end because we have no variation there. The problem is, the horizontal line is behind the limits of the plot, and aren't good to read. How can I solve this problem? I already have tried some functions about scale and some other configurations but nothing.
You can adjust the 'x' and 'y' limits this way: ''' import matplotlib xmin, xmax = matplotlib.pyplot.xlim() # return the current xlim matplotlib.pyplot.xlim( (xmin, xmax) ) # set the xlim to xmin, xmax matplotlib.pyplot.xlim( xmin, xmax ) # set the xlim to xmin, xmax '''
61,927,676
1
61,928,625
I'm making an avatar command, and it shows the users name in the embed, but not the actual avatar. ''' if (message.content.startsWith(PREFIX + 'avatar')) { const user = message.mentions.users.first() || message.author; const avatarEmbed = new Discord.MessageEmbed() .setImage(user.avatarURL) .setAuthor(user.username) .setColor(0x7732a8); message.channel.send(avatarEmbed); } ''' <IMAGE>
Easy to solve, <URL> after it.
4,582,080
1
4,582,089
Anybody can explain to me about this diagram <IMAGE> How can Android application which run on Dalvik call a native lib from VM?
> > How can Android application which run on Dalvik call a native lib from VM? They use <URL>.
26,985,662
1
27,480,918
The example "Edit On Focus Cell Selection Example" in ng-grid website works fine on Chrome, but it didn't work on IE 10 and 11, when i lost focus on the edit cell, the cell did not go back to readonly state. Can anyone help and give me a better work round for it? Thanks in advance! <URL> <IMAGE>
This is because ng-grid has added an 'unselectable' attribute in the template, this attribute only works in IE, it will make the section unselectable. The newly version ui-grid does not has it. Just added some removing logic in the controller to remove it is ok. ''' //Remove unselectable attribute which is added by ngGrid $timeout(function () { var ngViewPorts = angular.element.find('.ngViewport'); angular.forEach(ngViewPorts, function(ngViewPort){ if(ngViewPort.getAttribute('unselectable') === 'on') { ngViewPort.removeAttribute('unselectable'); } }); }); '''
29,876,614
1
32,319,471
I know the shortcuts: 'CTRL' + 'SHIFT' + '+' 'CTRL' + 'SHIFT' + '-' Which expand and minimize Java-doc comments respectively. However this way of line collapsing keeps a line of space: <IMAGE> How I see it is that the java-doc comments from above takes 1 line of code. --- <URL>
Select the part you want to hide and press ++. Choose either ''' //<editor-fold desc="Description"> // part to hide //</editor-fold> ''' or ''' //region Description // part to hide //endregion ''' Change 'Description' to something that won't distract you, for example '_'. After collapsing this block you will see only '_'.
21,880,305
1
22,791,095
I have 4 radar charts on my Webpage. Three out of the four charts have horizontally orientated x axis labels. One of the charts has its labels orientated towards the centre of the chart. All charts are created dynamically in the same way. I believe it is occurring because the one chart has a large number of points. Please see the below image. <IMAGE> I have the following code setting the orientation of the Xaxis, but this does not work. ''' ca.AxisX.TextOrientation = TextOrientation.Horizontal; ''' The code I have tried so far has not worked. I inserted the following code to see if I could change the orientation of any of the axes, it changes the orientation of the y axis but not the x axis. ''' foreach (Axis axis in chartArea.Axes) { axis.LabelAutoFitStyle = LabelAutoFitStyles.None; axis.LabelAutoFitMaxFontSize = 50; axis.IsLabelAutoFit = false; axis.LabelStyle.Angle = 90; aaxisTextOrientation = TextOrientation.Horizontal; } ''' How do I make all charts have their x axis labels orientated horizontally?
Answering my own question in case it may be useful to someone else in the future: ''' chart.Series[series1]["CircularLabelsStyle"] = "Horizontal"; ''' Other option are 'Radial' and 'Circular' Please see the following link for more details about custom attributes. <URL>
29,972,856
1
29,973,185
This is what my view controller looks like with these two table views. As you can see, the left looks like the frame is in the intended place and the right does not. I've posted my code and the origin y is in the same place in both. What could be causing this? <IMAGE> ''' - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; CGFloat halfLength = self.view.frame.size.width / 2; CGRect ingredientsFrame = CGRectMake(0, 0, halfLength - 1, self.view.frame.size.height); CGRect modsFrame = CGRectMake(halfLength + 1, 0, halfLength - 1, self.view.frame.size.height); _ingredientsTableView = [[UITableView alloc] initWithFrame:ingredientsFrame style:UITableViewStyleGrouped]; _ingredientsTableView.delegate = self; _ingredientsTableView.dataSource = self; _ingredientsTableView.tag = 1; [self.view addSubview:_ingredientsTableView]; _modsTableView = [[UITableView alloc] initWithFrame:modsFrame style:UITableViewStyleGrouped]; _modsTableView.delegate = self; _modsTableView.dataSource = self; _modsTableView.tag = 2; [self.view addSubview:_modsTableView]; } '''
You need to set the second table view's 'contentInset' and 'scrollIndicatorInsets' to compensate for the fact that the top of the table view is up underneath the navigation bar. The reason you don't see the same problem in the first table view is that this done for you automatically for the scroll view in your interface.
20,970,347
1
21,025,044
i have posted a question on ZURB's forum, but i noticed there were no answers to any post. As i think this problem might occur to many others, i think it might be a good idea to put it on SO as well. Here it comes: i have crafted a minimal example of the problem using the following markup (Edited with CLCS advices): ''' <body> <div class="row collapse test"> <div class="large-4 columns"> <p>Test 1</p> </div> <div class="large-4 columns"> <p>Test 2</p> </div> <div class="large-4 columns"> <p>Test 3</p> </div> </div> </body> ''' All CSS classes are ZURB Foundation untouched classes. The only addition is for the test-table class, which sole purpose is only to get visual aid on the problem (Edited as well for clarity sake): ''' .test div { border: 1px solid red; } ''' The expected output would be 3 columns perfectly touching each other. The actual output is two columns touching each other like expected, but the third one being offset a bit on the right, leaving a white space between the center and the right one (See attached image, edited as well, but issue still present). Seems that some other users are facing the same problem under the same environment (Safari 7, Zurb Rails Gem 5.0.2.0) <IMAGE>
Looks like a rounding issue with how Safari is converting the % widths of the columns, default site width ends up (on my machine at least) at 1000px wide. Comparing the calculated results between Chrome and Safari I get 333.328px in Chrome and 333px in Safari. Depending on the rest of your layout requirements a workaround may be to adjust your layout widths to a figure that works better with the columns you require.
22,247,974
1
22,248,100
I have the following sheet: <IMAGE> As you can see, there are two groups of data. One group is in 'A' and 'B' and the group which should be checked against the first group group is in 'D' and 'E' Now I want to check each value in the second group against all the values in the first group. I tried to use '=VLOOKUP(D2:E2;$A$2:$B$10;2;FALSE)' but that only gives me '#Value' and no boolean back. I really appreciate your answer on this problem!!!
You can use the following formula in F2: ''' =NOT(ISERROR(MATCH(D2&E2,$A$2:$A$10&$B$2:$B$10,0))) ''' Enter the formula with --. When you enter it this way, Excel knows that it is an . This means that it'll perform the inner operations (the '&') and return an array for each parameter - i.e. '$A$2:$A$10&$B$2:$B$10' will become '('23.10.2002a', '07.11.2002a', ...)'* - which will then be matched against 'D2&E2', i.e. '01.07.2002f'. Note that this process is quite calculation intense, as the array gets re-calculated for every cell in column F. Alternatively, you can simple use this formula (entered as a normal formula): ''' =COUNTIFS($A:$A,D2,$B:$B,E2) ''' This should be much more efficient - but only works in Excel 2007+. *Excel will convert the date 07.11.2002 to a number, i.e. A2&B2 will result in '37567a', not '07.11.2002a'
42,372,935
1
42,373,105
I want to document a SQL Server 2008 database. I have been asked for the Diagram and the specifications of the tables, fields, data type, etc. (Data Dictionary). The problem is that I can not find a program that suits my requirements. The Erwin Data Modeler has a reverse engineering tool, but it is not useful because it does not allow me to specify only the tables that I want to diagram, at the very same request the schemas (But it is in this program that I am asked to do the diagramming) . SQL Server Management Studio is not an option because it is the same that manages the Databases (it implies modifying the DB in some way) and it is not very flexible with the choice of tables. So I resorted to Data Modeler works perfectly with an Oracle database, you can make diagrams, generate scripts (the latter helped me to pass diagrams to Erwin), and even generate documentation of objects, etc. But I have not been able to connect it to SQL Server 2008 to do the same thing I did with Oracle. I downloaded the jtds-1.2.jar to make the connection but I do not know exactly how to do it. <IMAGE> In summary I need a program that allows me to choose the tables to which I want to diagram (These are things that are achieved with the Data Modeler) and then be able to open them in the Erwin (With the script that generates the latter) which is the target program. And also the field documentation, although this is a secondary issue to the question. It would be helpful if you know of any other method, program or procedure.
download from sourceforge jTDS v1.3 or 1.3.1 get the JAR out of the zip add it to your sqldev folder open preferences in the tool, and go to third party drivers, under database page i think, and then when you get to connection dialog, there will be a SQL Server and Sybase connection type i talk about this in more detail <URL> You can connect to a SQL 2008 db and RE the databases into one or more data models, and then generate data dictionary reports and DDL scripts. And a lot more..get v4.2 if you want to generate HTML reports that include the diagrams themselves.
6,821,885
1
6,821,929
I am starting to learn some linq and there is a place where I need to use datacontent, but it seems that the IntelliSense can't found any datacontent. Am I missing something? I am running VS2010 SP1. Screenshot attached. Thanks in advance for your help.<IMAGE>
'DataContext' is defined in the 'System.Data.Linq' namespace, which you don't have in your using statements. Make sure the 'System.Data.Linq' assembly is referenced, then add that using statement.
16,863,317
1
16,865,473
I was wondering if there is any way to use relative referencing with icon sets in excel. Ideally I would like to lock the row whilst allowing the column to change as the column is copied and pasted across the worksheet (ex. D$3). Excel is telling me that I'm not able to use relative referencing with icon sets. for clarification, what I'm trying to do is apply an icon set based on the relation between the current day and the target date of a project to be completed. -The cell will show a checkmark so long as there is at least a week before the target date or if the cell reads 100%. -If there are less than 7 days between the target date and current date then it will show an exclamation mark. -otherwise show an x when the current day is the same as the target date and the cell's value is not 100% the code that is being used as a condition is: ''' =OR(TODAY()+7-$D$14,$D$12=100) ''' What I would like is something equivalent to: ''' =OR(TODAY()+7-D$14,D$12=100) ''' I just don't know how to go about doing that thanks in advance below is the formatting rule window: <IMAGE>
Without '%' appearing in all cells the only way I can see to meet your requirement is to enter 100 in those cells to display tick and 100% and then format those specific cells #,###"%".
27,890,389
1
27,890,420
I get launching of one executable multiple time, except when writing out the files first time. ''' """ Running hexlified codes from codefiles module prepared previously """ import tempfile import subprocess import os import codefiles if __name__ == '__main__': p = os.path.join(os.curdir, 'Tools') if not os.path.exists(p): os.makedirs(p) for fn, c in codefiles.exes: fnp = os.path.join(os.curdir, 'Tools', fn) if not os.path.exists(fnp): # for some reason hexlified code is sometimes odd length and one nibble if len(c) & 1: c += '0' c = c.decode('hex') with open(fnp, 'wb') as f: f.write(c) print fnp # this following line does not launch the second exe, but previous exe if exes existed # but first exe twice threading.Thread(target=lambda:subprocess.call([fnp])).start() ''' Here screenshot (after moving the windows from over each other) after start. notepad.exe showing in print but two puttys started. <IMAGE>
'fnp' may be changed by the time your 'lambda' executes -- you have a race condition here, so, no surprise if the amount of I/O performed in the meantime can hide or show the race condition, since I/O slows things down. To avoid the race condition, change your 'lambda:' to 'lambda fnp=fnp:' to bind the 'fnp' value at the point of of the 'lambda' rather than at the later time when it .
15,293,107
1
15,293,213
I am struggling to apply a nine patch to a image in android.I dint find android documentation that explanatory.Following is the image that i want to apply a nine patch.I dont have proper understanding of nine patch as i am a newbie to android.The saw like structure is getting stretched on larger screen sizes.If some one could provide nice useful links on how to create nine patch in android would be great help.Isnt there any app or tool that automatically creates a nine patch on images?Also can we apply a nine patch on a circular image? <IMAGE>
Google is your friend Check out these tutorials: <URL> <URL>
9,026,390
1
9,026,468
I'm working on my first asp.net/web development application. Obviously, I'm very new to asp.net development, but I've been doing C# for quite some time and so can rationalize out the logic of the project pretty easily. However, I'm struggling with some markup issues I'm working on. Here's my situation: I have a 'List' of 'Book' objects and each object has a 'Title' and 'CoverImage' property. Okay. I want to display each book as an 'ImageButton' with a border that'll change colors to 'highlight' the one a user clicked. Actually, this doesn't to be done with an 'ImageButton', but that's what I've been attempting to use up to this point. Users can only have one book selected at a time. Now, I think I can handle the logic of 'radio-buttoning' the books, however, I'm struggling to figure out how to properly display these 'buttons'. Finally, there will be a normal button below the grid of books that will allow users to submit their selection and I need to make sure I can determine exactly which book is selected (perhaps by getting the 'Title' of the 'Book' object selected?). This is another area where I've been having trouble as I've attempted to do this with a GridView. Using a GridView control, I've found that by binding a 'List' to the GridView, I can only do a for each Book rather than a "column" for each. At least, using the only methods I know at this time. Also, I need the UI to be 'smart' enough to dynamically change the number of Books displayed in a row based on the image/browser width. Please, any advice or tips on how I might achieve this type of interface would be much appreciated. Even better would be some examples or links with examples as I definitely learn best when I can see example code and rationalize my way through it. Below I put a [colored] wire-frame type of image of what I'm attempting to achieve. <IMAGE>
Try using an ASP.Net <URL> control. It should allow you the layout you request with multiple Books per row.
22,769,210
1
22,771,534
I have my magnifier set up. Take a look. <URL><IMAGE> Looks like all works except it is not magnifying... Can some one tell me exactly what I am missing to magnify the image in the magnifier cursor?
It looks like you're using Bootstrap's "magnify" plugin. Its <URL> say "If you want to show the large preview at a 200% ratio, just use an image twice the size of its container." In your website, you are already displaying the image at its full size, which is why the "magnified" version is identical to the original. Just use a larger image and in the html set its size to the same pixel dimensions you currently have; the plugin will do the rest for you.
41,453,529
1
41,454,605
I have 4 columns in a table - Company Part Number- Manufacturer Part Number- Order Number- Part Receipt DateEx. <IMAGE> I just want to return one record based on the maximum Part Receipt Date which would be the first row in the table (The one with Part Receipt date 03/31/2015). I tried ''' RANK() OVER (PARTITION BY Company Part Number,Manufacturer Part Number ORDER BY Part Receipt Date DESC,Order Number DESC) = 1 ''' at the end of the WHERE statement and this did not work.
Analytic functions like 'rank()' are available in the 'SELECT' clause, they can't be invoked directly in a 'WHERE' clause. To use 'rank()' the way you want it, you must declare it in a subquery and then use it in the 'WHERE' clause in the outer query. Something like this: ''' select company_part_number, manufacturer_part_number, order_number, part_receipt_date from ( select t.*, rank() over (partition by... order by...) as rnk from your_table t ) where rnk = 1 ''' Note also that you can't have a column name like 'company part number' (with spaces in it) - at least not unless they are enclosed in double-quotes, which is a very poor practice, best avoided.
25,704,667
1
25,704,692
The exercise in my book is asking me to calculate the running time of the following for loop: ''' for (int i = 0; i < n; ++i) ++k; ''' This instantly reminds me of summation notation. So I write down the appropriate syntax: <IMAGE> Is this correct? If not, why not - and how can I calculate it correctly?
Let's look at the operation inside the loop: ''' ++k; ''' No matter what 'k' is, that operation will take constant time. So let's replace it with 'O(1)'. ''' for (int i=0; i<n; ++i) O(1) ''' We can see that we are going to iterate over the 'O(1)' block 'n' times. So that is: ''' O(n) * O(1) ''' Which is clearly equal to: ''' O(n) '''
25,357,331
1
25,357,412
As per the threads <URL> and <URL> SOLR 4.x supports join across multiple cores. We tried it and its not giving any response. Details are as follows: Two cores: 1. proposition { stockitemid , name } 2. stocks { mc , counts } Here "mc" references "stockitemid" My query: {!join from=mc to=stockitemid fromIndex=stocks}<IMAGE>
Try using the below code : '{!join from=mc to=stockitemid fromIndex=stocks}*:*'
53,151,859
1
53,155,504
I am on ubuntu 18.04. I am setting up a 'cordova' project. I dont want to install Android Studio so I downloaded sdk tools package. However when I run 'cordova requiremets', I keep getting the out put below. <URL> <IMAGE> That means I have not installed the android targets yet. I have tried to look for proper guides on how to install 'android target' with sdk tools without installing Android Studio without success. Help on this will be highly appreciated. (I hope my question is clear, English not so good, for clarification ask)
I finally cracked it. What you need to do is: use 'sdkmanager' commands to install platforms and other modules. Note: 'Android' command is deprecated. First list all remotely available tools. ''' sdkmanager --list ''' From the list you can, for example, install 'platforms;android-27' ''' sdkmanager --install "platforms;android-27" ''' When you run 'cordova requirements', now you will find that they are android targets are installed and listed.
27,210,854
1
27,211,189
When I compute paths again as vertex 'C to M' Correct path should be ''' C -> B -> N -> M ''' But it is ''' A -> B -> N -> M ''' I used this code <URL> This is the picture for my graph: <IMAGE>
It is because you first call function compute for A then call it for C. some field like this : ''' public double minDistance = Double.POSITIVE_INFINITY; public Vertex previous; ''' are already have a value, so you need to delete pathcomputation for A or clear this values, you can do it with a function like : ''' public void clear() { minDistance = Double.POSITIVE_INFINITY; previous = null; } ''' inside this Vertex Class, and call it like this : ''' for (Vertex v : vertices) { v.clear(); } ''' before 'computePaths(v2);' <URL> is a online version of your code, you could see that the output is : ''' Distance to B: 1.0 Path: [A, B] Distance to M: 5.0 Path: [C, B, N, M] '''
44,816,361
1
44,825,727
In my host, it needs time (about 20s) to initialize CLI session,... before doing cli <IMAGE> I'm trying to do command by playbook ansible: ''' --- - name: Run show sub command hosts: em gather_facts: no remote_user: duypn tasks: - name: wait for SSH to respond on all hosts local_action: wait_for host=em port=22 delay=60 state=started - name: run show sub command raw: show sub id=xxxxx;display=term-type ''' After 10 mins, ansible gives me output which is not the result of show sub command :( ''' ... ["CLI Session initializing..", "Autocompleter initializing..", "CLI>This session has been IDLE for too long.", ... ''' I'm glad to hear your suggestion. Thank you :)
I don't have a copy-paste solution for you but one thing I learned is to put a sleep after ssh is 'up' to allow the machine to finish it's work. This might give you a nudge in the right direction. ''' - name: Wait for SSH to come up local_action: wait_for host={{ item.public_ip }} port=22 state=started with_items: "{{ ec2.instances }}" - name: waiting for a few seconds to let the machine start pause: seconds: 20 '''
38,053,925
1
38,828,605
I am trying to include firebase SDK in my Android Studio Project. But it giving me an error. I am using latest JDK version (1.7.0_71) and it is asking for upgrading higher version to (1.7.0_67). I need help for basic firebase setup SDK on android. I tried to setup it by the reference of following link: <URL>. I am getting following error: Please check attached screenshot <IMAGE>
I had the same problem trying to GCM to an old android project. The solution for me was to also add 'classpath 'com.android.tools.build:gradle:2.1.2'' to the top-level build file dependencies, just before 'classpath 'com.google.gms:google-services:3.0.0''. For the old android project, this dependency only existed in the module-level build file.
4,756,182
1
4,756,228
I have been working/learning HTML5 since couple of months and HTML 5 logo is out couple of days back. What it really means for different people like Developer, Users and Enterprises ? <IMAGE>
It means you can now put an ugly logo onto pages that don't work with IE8... (Developer perspective)
43,757,923
1
43,757,924
The latest version of Chrome (v58) adds a dotted underline to '<abbr>' elements: ''' abbr[title], acronym[title] { text-decoration: underline dotted; } ''' Bootstrap itself applies a dotted bottom border to '<abbr>' elements. This leads to an undesirable double-border effect: > <IMAGE> How can I fix this?
This can be fixed by simply adding the following to your CSS: ''' abbr[title] { text-decoration: none; } ''' I've submitted this as an issue on Bootstrap's GitHub page (<URL>, so hopefully Bootstrap will handle this for us in the next release.
29,080,024
1
29,083,063
In Wordpress ,left sidebar li text is too long and it wraps which causes vertical space in between li's to look uneven. How can I correct this? Any help is appreciated. I've attached screenshot below. <IMAGE>
You should remove the 'font-size: 11px;' in '.sidebar-left a' And add it into '.sidebar-left li'. Finally looks like this. ''' .sidebar-left li { list-style: none; font-size: 11px; } .sidebar-left a { color: #232324; text-decoration: none; } '''
26,668,113
1
27,596,984
Using the rtmplib bindings for Python and experiencing some issues. First off, I have something like this: ''' import librtmp conn = librtmp.RTMP(...) conn.connect() while True: packet = conn.read_packet().body print packet ''' This will print the packets like shown below: <IMAGE> To me this looks like hex, and i get 4 char strings when writing to a file, like this: ''' 0200 086f 6e42 5744 6f6e 6500 <PHONE> <PHONE> <PHONE> <PHONE> <PHONE> 066e 6f74 6963 6500 <PHONE> <PHONE> <PHONE> 2a2a 2a02 000a 5072 6f63 6573 ''' So my question is, how can i turn this into a real string (or buffer) with only readable text? I've tried different things to decode hex, but end up with "" in the result. Also worth mentioning that when writing it contains alot of 00's. Anyone know how can i achieve what i asked earlier in a easy but good way? Thanks in advance.
Solution is 'librtmp.amf.decode_amf'. ''' import librtmp conn = librtmp.RTMP(...) conn.connect() while True: packet = conn.read_packet().body print packet print librtmp.amf.decode_amf(packet) ''' This was pointed out by the guy managing the librtmp wrapper for Python.
28,380,033
1
29,315,572
<IMAGE> Problem occurs if I log in as a standard user. Tools | Options | Environment | General | ComboBox Color Theme: is grayed out I tried: - - - - - - - - Problem is gone and Visual Studio works as expected if I log in as admin user. Expression Blend 12 Update 4 is working well, shows editor colors.
It turned out that the windows theme color settings caused the issue. I moved to a windows built in theme.
28,369,574
1
28,370,033
The app runs great, but there doesn't seem to be a way to terminate it. There is a "Terminate Application" button, but it's greyed out, as seen here: <IMAGE> I've tried pressing the Home and the Back buttons on the device many times, to no effect. The app is from the second lesson in the Android Studio tutorials, so it's the bare minimum amount of code (it's one lesson after Hello World). Is the problem that there's no onClose() event, so it just keeps running? Edit: I should add that I think it's still running because messages are still coming through the debugger. Although, it's just occurred to me-- is the debugger simply listening to the device, and those messages aren't coming from my program, but are just background messages from the device? Edit2: thanks to dexter. You need to select the process name (com.mycompany.myfirstapp) before the terminate button will become active.
You need to select the process 'com.mycompany.myfirstapp' and then press the button.
7,800,733
1
7,800,859
I want create a car dashboard to use with an application written for Android OS. My application retrieves already the wanted data, but now I want to improve the appearance. I can create a dashboard like this using photoshop. <IMAGE> My first question is, how can I rotate the needle to show the actual speed and rpm ? It's possible to do it with Canvas ? Another question is, can I use the place in the middle to show other data like time elapsed or a map ? How ? I hope you can help me out. Thank you.
Remove the arrows in the picture and draw a red line for each programatically. And add a textbox/label over the display in the middle.
12,766,345
1
12,770,665
I am very new to web development, and I need to create objects that contain text in a box with rounded edges, as in the image <IMAGE> The size of the border should grow with the size of the text. I can't use any css libraries or css3 border-radius. Would anyone mind pointing me in the right direction? I don't want full working code - I want to figure the details out on my own - but a list of links or subjects to research would be much appreciated. Thanks! ---edit---- I also can't use any css or javascript libraries. I'm doing this for an assignment rather than a real-world scenario - hence the limitations.
Well, if you don't use libraries and css3.. you have two options: 1. Slice up images of a rounded rect, put the text within a div and create a bunch of other divs with background set to those images, details can be found here 2. Use a canvas refer here Don't worry, canvas isn't a library, its a part of the Html5 spec (though I don't know if you can use html5) Read more about canvas and how to use it <URL>
24,831,540
1
24,841,073
This will be my first Add-In. Please bear with me. The goal of my add-in application is to replicate a very tedious, repetitive work by a user. She tells me that she initiates her task by clicking in some sort of combo box or drop-down menu and typing several digits, followed by a click on the "Ok" button. Question No. 1: What is the official name of that contraption (the one in mustard color) and how is it coded into an Excel cell? <IMAGE> I gather than Add-Ins are coded using something called "Object Model"? I have seen about 4 lines of such code. Is there a statement like this? ''' ClickOnCell("E32"); '''
Due to the lack of responses, both here and in 2 Microsoft forums, I have decided that the answer is: ''' There is no way ''' Then again, with only 13 people the question, the chances of one of them knowing the answer are very low.
23,587,295
1
23,587,335
How can I know, from the mobile chrome browser, that a specific application is installed? In the attached screen shot you can see that Chrome knows that Wikipedia is installed. I wonder how did they do that?, I want to do a similar check from a WebView inside my application. <IMAGE>
''' PackageManager packageManager = getPackageManager(); List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_META_DATA) ''' Returns a list of installed applications. You can also get the uninstalled applications list by using 'GET_UNINSTALLED_PACKAGES' flag. You can create a class that has a method which checks if the given application is installed. Then you can register that class to the webView using 'addJavascriptInterface' method. And in the page you loaded in to the webview, you can call that method to check if the given application is available in the phone. Check this answer for further info about 'addJavascriptInterface' <URL>
68,106,602
1
71,436,862
My colleague just set up a Dynamic Web Project in Eclipse and he also configured the server. He shared the entire project on a git repository and I cloned it. When I try to run the html file I click on 'run on server' but then I'm not able to choose an existing server already configured. Eclipse force me to create a new server with default configuration. I am attaching a screenshot of Eclipse <IMAGE>
Right click on you project and go to properties. Go to Project Facets and on Dynamic Web Module click the little drop down menu and select 3.1. I initially had it at 4.0 and it was not supported in my version of Eclipse.
24,818,650
1
25,200,105
<IMAGE> what if i want to display the input box ABOVE the slider at the centre?? In the image provided, we can see that the input box is overlapping the slider & also the input box's top right & bottom right corner doesn't have border radius. Is it possible to do these customization? Demo: 'http://jsfiddle.net/EWQ6n/572/' i did this by doing ''' $(".ui-slider-input").wrap($('<div />').css({ position : 'relative', display : 'inline-block', height : '36px', width : '45px', overflow : 'hidden' top : '2%', left : '30%' })); '''
Thanks for your Replies. Actually I wanted to get rid of those up-down arrows from the text box. Finally found the solution. I just hid the text box that comes along with the slider, & inserted a new text box whose value changes as we move the slider. ''' <input id="txtvalBox" type="text" value="" /> $("#points").change(function () { document.getElementById("txtvalBox").value = document.getElementById("points").value; }); //points is the id of the slider ''' See This http:<URL>
12,723,183
1
12,723,510
If I have an image like this <IMAGE> I want to break the image according to the grid and save it in a matrix. So if I knew the size of each cell then I can make a new 4-D matrix and save pixel values of each cell into the new matrix like ''' [m n]=size(img); a=ones(m/64,n/64,64,64); x=0;y=0; for i = 1:m for j = 1:n ti=i/64; tj=j/64; a(ti+1,tj+1,i-ti,j-tj)=img(i,j); end; end ''' but I dont know how to do this if we dont know the size of each cell we just need to split the cells according to white boundary also I dont want the pixels of the grid, I just need all the pixels inside the gird lines please tell me how to do this in matlab
There is an excellent Matlab demo that covers this problem, the <URL>
25,726,230
1
25,726,294
I have a ef connection table with 3 columns in it. I want to select distinct value out of two of them. <IMAGE> I want to select distinct rows orderby ResourceId and MetaDataId. So i want it to return row (1, 3 and 4) in this case. Ive tried this: ''' ctx.ResourceMetas.Where(a => a.ResourceId == resourceid).Distinct()}); ''' But obviously this gets the distinct values out of all three. Can i somehow choose to get distinct out of just the two?
You may group by your distinct values and then get the max or min of the leftovers. In your case that you only have one more field you could do it like: ''' ctx.ResourceMetas .GroupBy(x=>new{x.ResourceId, x.MetaDataId}) .Select ( x=>new { MetaListId = x.Min(m=>m.MetaListId ), ResourceId = x.Key.ResourceId, MetaDataId = x.Key.MetaDataId } ) .Where(a => a.ResourceId == resourceid) ''' But in a scenario that you would like the distinct values of 2 fields out of more than three then you would have to do it like: ''' ctx.ResourceMetas .GroupBy(x=>new{x.ResourceId, x.MetaDataId}) .Select ( x=>new { MetaListId = x.Where(i=>i.MetaListId == x.Min(m=>m.MetaListId)).FirstOrDefault().MetaListId , OtherField = x.Where(i=>i.MetaListId == x.Min(m=>m.MetaListId)).FirstOrDefault().OtherField , ResourceId = x.Key.ResourceId, MetaDataId = x.Key.MetaDataId } ) .Where(a => a.ResourceId == resourceid) '''
21,219,687
1
21,219,862
How can i make a tableview where the cells are next to each other. Where there are 2 on each row. example like this? In the second row there are 2 images next to each other. Can this be done in a tableview by making custom tablevieCells? <IMAGE>
Yes this can be done in UItableViewCell But preferred to use collection view for this kind of view. Just subclass uitableviewcell, add new method ''' -(void)setCellWithNumberOfImages:(NSInteger)images withImage1:(UIimage *)image1 withImage2:(UIImage *)image2; if(image2 ==nil) //add only one UIimageView with image1 else //add two imageviews. '''
14,161,132
1
14,161,592
<URL> I'm after a jquery scroll technique please that I would like to adapt to my project. Please see my project example as a fiddle here <URL> Currently you can see that my nav links automatically animates the scrolling relative to the '<section>''s. My question is, using the '$(window).scroll' method, how can I add a '.active' class to my 'nav a' when the sections reach the top of the window? So for example if the user scrolls down the page (instead of the navigation links), I want the active class to be added relative navigation link. Indicating where you are on the page. Also you will have to account for the 28px height of the fixed navigation bar, offset top window. Can anyone please show me a technique that I can try and use or adapt, or perhaps show me using my jsfiddle :) Any help would be much appreciated, thanks in advance! <URL> <IMAGE>
If you wish a more generic function: <URL> ''' $(window).scroll(function() { var windscroll = $(window).scrollTop(); if (windscroll >= 100) { $('nav').addClass('fixed'); $('.wrapper section').each(function(i) { if ($(this).position().top <= windscroll - 100) { $('nav a.active').removeClass('active'); $('nav a').eq(i).addClass('active'); } }); } else { $('nav').removeClass('fixed'); $('nav a.active').removeClass('active'); $('nav a:first').addClass('active'); } }).scroll(); '''
19,986,716
1
19,987,419
I have an 'input' value that has the id 'word' and a jQuery function like this: ''' $(function() { var availableTags = ["register", "malloc", "device", "apre", "fallo"]; $("#word").autocomplete({ source: availableTags }); }); ''' When I type the text in my input, the jQuery function is called, and it shows me the results. Here you can see an example: <IMAGE> I typed "al" and it shows all the words (in the array) containing these letters. It's fine here, but my problem is the following. I want the result to be displayed in the 'textarea', and not as a list. It means that 'malloc' and 'fallo' must be inside the textarea. Do you have any suggestion? You can find the fiddle with the full code <URL>.
<URL> is a fiddle that will hide the autocomplete menu items and update the textarea with the returned items. Notice that the menu is still there, just hidden, so as not to break the autocomplete widget. The idea is to use the response method of the widget to load the textarea with the appropriate values. Note that this will hide all autocomplete menus on the page and will not clear out the textbox when the user clears out all of the tet in the input, but it should give you a start. CSS to hide the autocomplete menu items: ''' .ui-autocomplete li { display: none; } ''' Additional code to grab the responses for the textarea: ''' $( "#word" ).autocomplete({ source: availableTags, response: function( event, ui ) { $("#testo").val(ui.content.map(function(d) { return d.label; }).join(" ")); } }); '''
31,211,409
1
31,220,372
I added '"boofcv\evaluationisualization\src"' to my normal java project in eclipse. I added precompiled libraries too. All other java files are fine except for this single line: <IMAGE> ''' Exception in thread "main" java.lang.Error: Unresolved compilation problems: The constructor VideoProcessAppBase<I>(int, (color ? ImageType.ms(3, imageType) : ImageType.single(imageType))) is undefined Type mismatch: cannot convert from ImageType<MultiSpectral<ImageSingleBand>> to Class<I> Type mismatch: cannot convert from ImageType<MultiSpectral<ImageSingleBand>> to Class<I> Type mismatch: cannot convert from ImageType<ImageSingleBand> to Class<I> Type mismatch: cannot convert from ImageType<ImageSingleBand> to Class<I> at boofcv.alg.sfm.d2.VideoStitchBaseApp.<init>(VideoStitchBaseApp.java:97) at boofcv.alg.sfm.d2.VideoMosaicSequentialPointApp.<init>(VideoMosaicSequentialPointApp.java:55) at boofcv.alg.sfm.d2.VideoMosaicSequentialPointApp.main(VideoMosaicSequentialPointApp.java:137) ''' Any help appreciated.
It is fixed I used these to fix Errors : 1. The evaluation library was not in pre-compiled libs.I download it and add it 2. I deleted other java files in the same package specially the one which had error . There is only one java file in my project
31,255,911
1
31,256,660
### Background I have a real-time application, 'RT Main', that has multiple high-priority timed loops running some simulation code and using RT FIFOs to communicate with a low-priority communication loop that talks with an outside program. I also have a monitoring VI, 'DT Main', running on a non-real-time desktop that I use to start and stop the real-time simulation, load parameter files, that sort of thing. Currently I am passing the 'Stop' button from 'DT Main' to 'RT Main' via a network shared variable. What I want to know is: how can I use this to stop all of my loops on 'RT Main' at (close to) the same time? I know I could use a FIFO-enabled network shared variable in my Timed Loops, but I am worried that with multiple loops reading from the same FIFO, I would only stop one or two of them and then the FIFO would be cleared and the other loops would not stop. ### Current Plan 1. Stop the low-priority communication loop using the network shared Stop button variable. 2. Delete all of my RT FIFOs when this loop stops using the RT FIFO Delete VI with the force destroy? input set to True. 3. Let the high-priority loops shut themselves down the next time they try to read their (now destroyed) FIFOs, which will hopefully cause an error. This is illustrated in a distilled example below. <IMAGE> ### Questions I have two questions: will this work? And regardless of whether this works, I can't figure out whether the <URL> and so I cannot verify. For the record, I have found the <URL> pretty helpful so far, but it does not seem to get into enough detail to answer my question. Thanks! ### Update I was able to test the code and verify that I can stop multiple Timed Loops in this way, but I would still be interested in hearing what your method is for shutting down a remote RT VI with multiple loops at the press of a button on your desktop VI.
The example code works for shutting down multiple Timed Loops simultaneously using errors from the destroyed FIFOs. I was able to verify it with the VI shown below. <IMAGE> <IMAGE> I would still be interested in hearing your solution for stopping an RT VI with multiple loops from a single stop button on your desktop VI.
9,867,142
1
9,867,548
I want to design a login and register layout using android tabs. Image is as shown below. how do i proceed <IMAGE>
I would use the Android API Support Library and the sample 'FragmentTabsPager' located at <URL> You would have two tabs, corresponding to two 'Fragments' that you could name RegisterFragment and LoginFragment. Basically you would remove the lines ''' mTabsAdapter.addTab(mTabHost.newTabSpec("simple").setIndicator("Simple"), FragmentStackSupport.CountingFragment.class, null); mTabsAdapter.addTab(mTabHost.newTabSpec("contacts").setIndicator("Contacts"), LoaderCursorSupport.CursorLoaderListFragment.class, null); mTabsAdapter.addTab(mTabHost.newTabSpec("custom").setIndicator("Custom"), LoaderCustomSupport.AppListFragment.class, null); mTabsAdapter.addTab(mTabHost.newTabSpec("throttle").setIndicator("Throttle"), LoaderThrottleSupport.ThrottledLoaderListFragment.class, null); ''' and replace them with ''' mTabsAdapter.addTab(mTabHost.newTabSpec("register").setIndicator("Register"), RegisterFragment.class, null); mTabsAdapter.addTab(mTabHost.newTabSpec("login").setIndicator("Login"), LoginFragment.class, null); ''' Then you implement those Fragments and integrate this code into your Activity. You'll also need to integrate the fragment_tabs_pager.xml layout into your layout.
15,589,785
1
15,589,809
I want to center h2 inside #top but vert-aliignt middle doesnt work same auto margin... I ave no idea what to do! ''' #top { display: block; position: relative; height: 100px; background-color: rgba(89,144,222,.6); } #top h2{ text-shadow: 2px 2px black; text-align: center; color: white; font-family:"Impact"; font-size: 50px; } ''' effect is - <IMAGE>
Set 'line-height:100px; vertical-align:middle' on #top.
11,143,136
1
11,146,511
I got a table with over 6.6 millions rows. I got a field, named 'trip_id' who's in 'BINARY(16)'. I find my query too slow ('0.2 seconds'). This query run near once every 3 seconds. Before doing anything stupid, I want to know if I lower the index size on 'trip_id' from full to 12, would it make a difference ? If I try to tweak my query more, would it make a difference ? Thanks EDIT: Query : ''' SELECT stop_times.stop_id FROM trips LEFT JOIN stop_times ON trips.trip_id = stop_times.trip_id WHERE trips.route_id = '141' GROUP BY stop_times.stop_id ORDER BY trips.trip_headsign ASC, stop_times.stop_sequence ASC ''' 'trip_id BINARY(16)' 'route_id SMALLINT(3)' 'trip_headsign VARCHAR(50)' 'stop_sequence SMALLINT(3)' Explain of the query : <IMAGE>
After doing researches, I've found the problem because yes, 0.2 seconds is slow. ''' SELECT t.trip_headsign, st.stop_sequence, s.stop_code, s.stop_name FROM stop_times AS st JOIN stops AS s USING (stop_id) JOIN ( SELECT trip_id, route_id, trip_headsign FROM trips WHERE route_id = '141' LIMIT 2 ) AS t WHERE t.trip_id = st.trip_id GROUP BY st.stop_id ''' First, instead of doing a 'LEFT JOIN', 'JOIN' is faster here. But the important point, I was matching all results from trips in the WHERE statement. However, since a bus can only have 2 directions, I only have to limit my results to 2. Now, my results are near 0.018. Over 1000% improvement.
57,998,488
1
57,998,969
I enter a legacy codebase that has their analytics setup already. I am a bit new to Google Analytics but in our codebase, analytics events are pushed into a 'data_layer'array on the 'window' and Google Tag Manager (GTM) consume it at some point. I notice that on my network tag (and when running the GA debugger tool) it appears 'analytics.js' is called and initialized twice. One from gtm.js where we initialized somewhere in our codebase but the other initiator is from <URL>. I look all over the codebase and it doesn't appear this link is called anywhere and when I view the page as a rendered page, I do see two script tag calling for this script. Is this normal or am I definitely missing a init function somewhere? <IMAGE>
This is normal when your website is HTTP not HTTPS. You can see the first call has a 307 status code which is for temp-redirect from HTTP to HTTPS. It is not being loaded twice. GTM.js loads analytics.js and that is normal.
8,055,048
1
8,055,261
I have installed EGit plugin on my Eclipse Helios SR2 Installation. I also have a initialize a GIT repository in one of my projects. But unlike SVN EGIT doesn't show me visiual indications when I make changes to the source code. Why is this happening? Even after the GIT repository is initialized and a commit is made there are no visual indications at all. PS: I have used the Terminal to initialize the repository, add files and make the initial commit. <IMAGE>
If you used the terminal, then you have to tell Eclipse, that the project is a Git project and should be managed by EGit. You can do that by right-clicking on the project, then select Team -> Share Project, choose Git, and in the following dialog check the box "use or create repository in parent folder of project". Then in the column "Repository" it should show you a path like "../.git". Now finish and you should be done.
28,422,288
1
28,422,365
I am just using basic Grails, with the default client-side validation that looks like this (not even sure what plugin it is): <IMAGE> Just looking for how I can test that manually? In the past with jQuery validation I had done something like this: ''' if($('#myForm').valid()) { // do stuff } ''' Thank you.
That's not a library of any sort. That's just your browser supporting the "required" attribute of HTML5 forms. Grails doesn't include any client-side form validation library. Use a jQuery one of your choice.
15,161,345
1
15,161,476
Here as my tables (Entier = Integer // Caractere long variable = Varchar) : <URL> <IMAGE> I created a view V_Enterprise(idContact, phoneNumber, email, name, city, adress) I tried to create a Trigger on that View to allow users to update the view : ''' CREATE TRIGGER test ON V_Entreprise INSTEAD OF INSERT AS DECLARE @T_ContactId INT BEGIN INSERT INTO T_Contact SELECT i.phoneNumber, i.email FROM Inserted i SELECT @T_ContactId = @@IDENTITY INSERT INTO T_Entreprise SELECT @T_ContactId, i.name, i.city, i.adress FROM Inserted i END ; ''' As I expected, it work on simple inserts, but when I add couples of rows at once, it fails because @T_ContactId only contains the first id. Can someone help me to fix it ? I feel like I should use INNER JOIN inserts but I can't figure out how to deal with it.
If 'phoneNumber' and 'email' are a unique key in 'T_Contact' then you could do this: ''' CREATE TRIGGER test ON V_Entreprise INSTEAD OF INSERT AS DECLARE @T_ContactId INT BEGIN INSERT INTO T_Contact SELECT i.phoneNumber, i.email FROM Inserted i SELECT @T_ContactId = @@IDENTITY INSERT INTO T_Entreprise SELECT (SELECT idContact FROM T_Contact WHERE phoneNumber = i.phoneNumber AND email = i.email), i.name, i.city, i.adress FROM Inserted i END ; '''
12,093,559
1
12,094,310
Here is a extract from the grammar section of the C# Language Specification: <IMAGE> 1. Is this written in a specific format? I looked at the grammar section in an old C++ ISO I found and it seemed to follow the same format, so is there some standard being used here for writing this grammar? I ask because I would like to be able to create a tool where I can paste the grammar directly and have a working C# parser immediately. 2. Microsoft seem to release their C# spec for free, but I can't find the C++11 format anywhere. Am I going to have to buy this to view it?
It's a variant of BNF that used by Yacc. Yacc normally has ';' as part of its syntax, but changing that makes things simpler with a language like C# and C++ in which ';' is very significant in itself. Unlike most BNF variants, it has a ':' where often BNF uses '=' (see also Van Wijngaarden grammar and you'll soon know much more than the little bit of knowledge that this answer is coming from). ISO don't have a rule on which grammar must be used in their standards, so others use BNF, ABNF, EBNF, Wirth syntax and perhaps others. ISO standards often originate as national or other standards that are then adopted by ISO. Since different standards bodies use different grammars (The IETF use ABNF in RFCs [itself defined in RFC 5234], BSI and the W3C use different variants of EBNF, and so on) the grammar in an ISO often reflects its origins. This is the case here. Kernigan and Ritchie used this format in their book, . While the ANSI standard and later ISO standards differed in the grammar itself, they used the same format, and it's been used since for other C-like languages.
17,320,304
1
17,320,452
I am trying to implement <URL> in my project but keeps getting error after errors. I followed up some guides and got through some but was eventually stuck. I have added in: ''' public class _iSellCrazyItem extends SherlockPreferenceActivity ''' But when i tried to add a menu into onCreate, most of the resources isn't found. I tried copying the menu.xml into my project and it removes an error. <IMAGE> When i hover over the red line, it gives > > (item) cannot be resolved or is not a type. Edit: Changed to ''' public class _iSellCrazyItem extends SlidingFragmentActivity ''' but still, these 3 lines cannot be resolved ''' menu.setShadowWidthRes(R.dimen.shadow_width); menu.setShadowDrawable(R.drawable.shadow); menu.setBehindOffsetRes(R.dimen.slidingmenu_offset); '''
you have to exentds 'SlidingFragmentActivity' instead of 'SherlockPreferenceActivity'. Did you add the sliding menu library correctly to your project?
29,943,760
1
29,944,134
I am trying to plot a time series data. The dataframe looks like this ''' [1]:Index ship_date cost_amount 0 1/8/2010 34276 1 1/8/2010 12375 2 1/8/2011 12343 3 2/9/2011 15435 [2]: df1.plot(figsize(20,5)) ''' I am trying to plot the data but for some reason plot doesn't have x-axis in ascending order. How do I get the plot with date ascending or descending order ? <IMAGE>
Your problem (as spotted by @ J Richard Snape) is that your dates are in fact strings so it's ordered lexicographically. You should convert to datetime dtype: ''' df1['Ship_date'] = pd.to_datetime(df1['Ship_date']) ''' After which it should maintain the expected order.
22,254,237
1
22,254,330
Unfortunately the title I have given is very vague. I honestly wasn't sure how to word it. Anyway, basically I currently have a vertical navbar with a small caret beside the text. Once clicked, the particular button uncollapses and shows it's contents. <IMAGE> As seen in the image above, I'm attempting to have a secondary caret that should be sitting on the right of the button. This caret will follow suit on every other button once I get it working. Anyway, I'm currently using twitter-bootstrap and from what I understand, I could be able to split the button into 2, each having their own function. For example, if one were to click the text and the downwards caret, it should uncollapse the menu (Which it does fine right now). Though, when you click the right facing caret, it should just bring you to another page via an href or something. Currently, clicking either button will collapse and uncollapse the menu. As you can see, the right facing caret separates itself from the original button but in a weird way. On the far right of the image is an example of the button separation I would like. In the Twitter-Bootstrap example, the "button" text and the caret both do different functions. I'm not entirely sure on how to achieve this via the current button setup I have. I'm quite happy with how the current buttons look visually but I want to be able to add that secondary caret that is justified to the right of the button. As well as have that secondary button separate nicely, similar to that of the Twitter-Bootstrap example. : how do I get a button to split into 2 piece via the current HTML that I have. I would like to keep the styling and I would like each button to have it's own functionality. (Enlarge image) <URL>
Just make two buttons and style them to be close to one another. Use CSS styling to get it done. You can lower the margins on the sides to get them closer, you could use border-radius to get rid of the corners in the middle, etc etc. Just figure out how you want it to look. And forget about splitting buttons, that is not something you can technically do, or should want. Create 2 buttons and style them.
5,378,185
1
5,378,564
The MFC Application Wizard disables visual styles for dialog based applications. - - Thank you! <IMAGE>
I think there's a little confusion here. The greyed out drop-down is title "Visual Styles and colors" in my English version of VS2008. Being greyed out means that you can't modify its value, but it still reports that the resulting app will use "Windows Native/Default". When you go on and create the app and run it, themes are fully supported. For the other application type options (single document, multiple document, multiple top-level documents), and select other non-system themes. The list is: Office 2003, VS 2005, Office 2007 of various different colors. So whilst you don't get these non-standard Office themes, your app will have visual styles and themes as determined by the Windows settings.
24,915,971
1
24,916,283
Here's my code: ''' console.log('©️'); ''' My console output (from node.js) is: ''' ©️ ''' How do I get rid of that character? <IMAGE>
In PuTTY configuration, please have a look at Window-Translation. You probably have the default value at "Character set translation on received data", which is ISO-8859-1 or a similar single-byte encoding. You need to change it to UTF-8.
25,247,378
1
25,248,175
I have a leaflet map with lots of basic markers (about 1000 in germany, to be precise). The map is at <URL> I will add a better link when I get permalinks to work, until then, the node which I am asking about is the one slightly to the east and north of the red marker. When I create a marker for coordinates lat="48.1364" lon="11.<PHONE>" and put it on the map, the marker is shown slightly to the left and bottom. The coordinates are exactly those of the OSM node itself. Any ideas how I can move the marker so the tip of the marker is exactly the node, or at least pretty close to it? <IMAGE>
It's impossible to tell without a live example, but my best bet would be that you have some CSS on your page that is interfering with the map and shifting your tiles up and to the right, or your markers down and to the left. --- Nope, that's not it - you're truncating the numbers. Desired: ''' [48.1364, 11.<PHONE>, "OSM / Germering / Germering Camii"], ''' On this page: ''' [48.136, 11.387, "OSM / Germering / Germering Camii"], ''' So, the thing causing the problem is your source data, not Leaflet.
31,490,666
1
31,492,798
I need to remove horizontal and vertical lines in a binary image. Is there any method for filtering these lines? 'bwareaopen()' is not good method to remove these lines and also Dilation and Erosion are not good for these cases. Does any one know a solution? Example image: <IMAGE> EDIT:(added more example images: <URL> source file of images: <URL> www.directexe.com/9cg/pics.rar
Use 'regionprops' and remove regions with high eccentricity (meaning the region is long and thin) and orientation near 0 or near 90 degrees (regions which are vertical or horizontal). Code: ''' img = im2double(rgb2gray(imread('removelines.jpg'))); mask = ~im2bw(img); rp = regionprops(mask, 'PixelIdxList', 'Eccentricity', 'Orientation'); % Get high eccentricity and orientations at 90 and 0 degrees rp = rp([rp.Eccentricity] > 0.95 & (abs([rp.Orientation]) < 2 | abs([rp.Orientation]) > 88)); mask(vertcat(rp.PixelIdxList)) = false; imshow(mask); ''' Output: <IMAGE>
16,345,026
1
16,345,121
I have a basic CSS/html question about using html/CSS. I thought this was fairly basic and obvious, however it is not working as intended. <IMAGE> In this basic image, I would want the Labels to be to the right of Expertise (creating a registration page where the user selects their Expertise) I would believe this is basically ''' <tr> <td>Expertise</td> <input type="checkbox" style="vertical-align: left; margin: 12px;"> Label </input><br> <input type="checkbox" style="vertical-align: left; margin: 12px;"> Label 2 </input> </tr> ''' however this is not working as intended.
First of all your markup is invalid, 'table' element can only have elements which are meant for 'table' as their child elements i.e 'tbody, thead, th, tr, td' etc, and no other elements, instead you can place those checkboxes inside 'td' Secondly input tag doesn't have any explicit closing tag, you need to self close it, else leave it without closing just like '<br>' Third - Use 'label' tag instead of having stray text besides checkbox <URL> The right way ''' <table> <tr> <td class="valign"> Expertise </td> <td> <input type="checkbox" style="vertical-align: left; margin: 12px;" /> <label>Label</label><br /> <input type="checkbox" style="vertical-align: left; margin: 12px;" /> <label>Labe2</label> </td> </tr> </table> ''' CSS ''' .valign { vertical-align: top; } '''
10,063,495
1
10,064,862
I am trying to use 'Canvas.drawLine' method to draw a polygon Here's the code that I am using ''' Canvas canvas = new Canvas(cache); Paint paint = new Paint(); paint.setStrokeWidth(16); paint.setColor(this.currentDrawing.getColor()); paint.setFlags(Paint.ANTI_ALIAS_FLAG); systemCanvas.drawBitmap(cache, 0, 0, paint); paint.setStrokeCap(Cap.ROOUND); canvas.drawLine(from.getLeft(), from.getTop(), to.getLeft(), to.getTop(), paint); ''' And this is the output that I am getting: <IMAGE> Notice the way the lines render, they break on the round shapes and don't join smoothly. I understand why is it happening but I don't know how to make it smooth and consistent. Any help is appreciated.
Please check this answer out because it is similar to your question: <URL> Please let me know if this helps!
15,089,249
1
15,089,443
I'm originally an Android developer starting with iOS now, but I'm having some problems to do something quite simple: reposition the UI elements based on other UI elements. For example, see the following picture: <IMAGE> I created a layout with an image, a label and two buttons. I programmatically hid the image, then the label and the two buttons repositioned themselves and took the place where the image was originally located. I know this can be done programmatically but is there a way to achieve the same behavior using only the Interface Builder? It's really simple to do that in Android so I hope we can do the same for iOS.
You can't do this in IB, if u hide the image programmatically. It' not like android U have to drag it or adjust the size inspector in xib file for iOS befor execution. In xib file all are static, if u want to make any changes during execution u should do it by programmatically. ie, set the frame for label(I think u are using Textview) and button to the imageview's frame or do it by using tableview add the imageview, label,button programmatically
22,800,802
1
22,800,855
I explain the problem in the picture. I go to great lengths for this problem. But one can not find any solution. You can expect help from. Sorry. My English is very poor, are obvious :) <IMAGE>
The '.post' request is an async call, so the logic inside of the callback waits for that call to finish. Meanwhile, you increment 'i' after the AJAX call, so 'i' gets incremented, the call finishes and then alerts '1'.
26,432,577
1
26,682,915
I'm having a weird issue with a Flash app that seems to be isolated to Google's built-in Flash plugin and Windows OS. And also, oddly, with the Russian language. If I am running Chrome (v38) on Windows while using Chrome's built-in Flash plugin (Pepper Flash), all the Russian characters in my app show up as gibberish. If I disable the built-in Flash plugin and use Adobe's official plugin, the characters show up as normally. Here's what the gibberish text looks like in Chrome/Windows w/ built-in Pepper Flash plugin: <IMAGE> The Russian version of the site looks fine in IE, Firefox, and Chrome on Mac, and English, Spanish, German, and Chinese versions look fine in all browsers, including Chrome/Windows with the built-in Flash plugin. There seems to be a related issue in the Chromium bug tracker but unfortunately it's marked as WONTFIX: <URL> Any ideas, or am I out of luck here?
We solved the issue by embedding the font in the SWF instead of relying on the system font. I guess using the system font is not always reliable if using non-standard character sets.
60,262,015
1
60,262,173
I got a new machine and after setting everything up, the IDE Atom somehow can't print the UTF-8 characters 'a o u' anymore (other such characters probably as well). It is super strange and I have this problem since moving to this new PC of mine. <IMAGE> - - - - - Thanks in advance! --- snakecharmerb (the user on here) commented, that I need to declair the encoding when opening the file 'test.py' with the following command: ''' open('test.py', encoding='utf-8') ''' That worked! His/her comment was removed for some reason, but yeah, it worked. Thank you! : In order to not have to declare the encoding every time, I looked into changing the systems default encoding. Windows 10 has an easy but kind of hidden solution for that: <URL> Open Control panel >> Clock and Region >> Region >> Administrative tab >> Change system locale... >> checkmark 'Beta: Use Unicode UTF-8 for worldwide language support'
You can try exporting 'PYTHONIOENCODING=utf-8' if that doesn't work you can try setting your environment variables in python to ''' LANG=en_US.UTF-8 '''
9,502,315
1
9,585,591
One needs to run ANTLR to make ANTLR grammar file into source file. How can I use Build Action in Visual Studio for this? How can I make an Action something like "Build Antlr" to run antlr to generate source code? <IMAGE>
<URL>: You need to add this line in your project file. '<Project DefaultTargets="Build" InitialTargets="GenerateAntlrCode" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">'
25,068,341
1
25,099,675
I'm following the <URL> of the . Unfortunately the training file <URL> seems to be corrupted somehow? I tested downloading it using Google Chrome and Firefox, same result, see screenshot: <IMAGE> I think, therefore my tests do not work and I always get back 'English 1.0' as score for the 'Muy Bueno' example string. ''' ... { "label": "English", "score": "1.000000" }, ... ''' : My guess is, the file has not been stored in UTF-8 format on the Google server?
The file is in UTF-8, but it doesn't declare an encoding, so viewing it in a browser assumes the default HTTP charset, ISO-8859-1. I'm not sure why you're actually getting a corrupted copy (if I view it in Chrome, it appears corrupt, but saving it results in a correct UTF-8-encoded file), but perhaps you could try another mechanism to download it?
13,839,367
1
15,081,958
I am trying to figure out what a profile result means, before I start to optimize. I am very new with CUDA and profiling in general and I am confused by the result. Specifically, I want to know what is happening during seemingly unoccupied chunks of computation. When I look from top to bottom at the CPU and GPU there appears to be nothing happening during large portions of the code. These look like columns with nothing in 'Thread1' and nothing in 'GeForce'. Is this normal? Whats happening here? The run was done a multicore machine under no load with nvprof. The GPU code was compiled with '-arch=sm_20 -m32 -g -G' for CUDA 5. <IMAGE> <URL>
The error here was to profile the code in debug mode ('-G' compiler flag: "Generate debug information for device code"). The behavior of the program is deeply changed, and this should not be used to profile and optimize one's code. One other thing: a thorough documentation of 's debug mode is hard to find. probably dumps the registers/shared memory in global memory for easier host access and debugging, which may in turn hide problems such as race conditions in shared memory (cf. discussion here: <URL>. Thus, programs such as 'cuda-memcheck --tool racecheck' should be used in release mode too.
10,169,176
1
10,169,246
At first, this question can sound really stupid, but it is not in fundamental. Maybe, it can seem like unresolvable exactly by any algorithm, but I pretend to say it is. So question. I have chart, for example gold. I need to find where are tops and bottoms on time axial. The problem is I need to find where major upturns and major downturns start. The problem is that there is lot of small irrelevant upturns and downturns. Here is the picture for better understanding - the red spots are that I want to find(NOT EXACTLY, but in some way like this). <IMAGE> So I probably need to filter out small turnups and turndowns, but have no idea how to do it. I will be pleased by any ideas. I do not need algorithm in java etc, just in words it would be enough.
1. You could perform a smoothing or lowpass filtering operation first, and find the locations of the local minima/maxima from the smoothed data. Then get the values of the minima and the maxima from the original data. 2. You could use a normal maximum/minimum filter, which finds all turning points, then filter the list of turning points by threshold. 3. I think what you really want to do is remove the "long-term variation" from the signal and look only at the "short term variation". This is can be done using the empirical mode decomposition. See Sec 2.3.2 of my thesis. (Alernately, Google around for "Empirical Mode Decomposition", "EMD", or "Hilbert-Huang Transform".) Here's the EMD in action: <IMAGE> Notice the increasing generality as the EMD algorithm extracts components of the signal, starting at "most detailed" and ending with "most general trend". (Note there are apparently nine components - only a few are shown.)
1,202,535
1
1,204,092
I'm getting a thrown error from javax.net.ssl.SSLHandshakeException (see attached picture) <IMAGE> Is it possible for Java to have a corrupt or missing CA cert? If so how can I repair or resolve this issue/error? 1. I have removed all versions of JRE from the PC and installed the latest version of JRE (1.6.14). 2. Cleaned and removed all unnecessary Trusted Cert's from the User section of Certificates. 3. Try running keytool to get the fingerprints of the CA's When trying to run the keytool I'm getting the following:
It is theoretically possible, but IMO highly unlikely, that Java has a corrupt CA cert. It is more likely that the CA cert you want is not in the JRE's cacerts store. You can check on the contents of the store (on Linux at least) using 'keytool'; e.g. ''' keytool -list -keystore /usr/java/jdk1.6.0_14/jre/lib/security/cacerts ''' Scan through that listing to see if you can see the fingerprint for the CAcert that your URL requires. Reference: the <URL> page/section.
37,023,582
1
37,023,776
Have the following simple code <IMAGE> How to avoid this notification? I think this is because I used the IIFE function. Thanks in advance.
If you want to disable it for this specific case you can just add a disable comment on the same line: '(function(){ // eslint-disable-line newline-before-return' If you'd like to disable it for the entire project, edit your '.eslintrc' file to add it to the 'rules' section: ''' { "rules": { "newline-before-return": "off" } } ''' More info on configuration here: <URL>
22,633,334
1
22,638,610
How to know which item is currently selected in the Combo Box Popup. So that the Combo Box can be updated while the navigation happens inside the Popup. Need to update it though the Combo Box's popup is still open. Like the below image, <IMAGE>
Try set <URL> to 'True'for ComboBox like this: ''' <ComboBox IsEditable="True" IsReadOnly="True" SelectedIndex="0"> <ComboBoxItem>1</ComboBoxItem> <ComboBoxItem>2</ComboBoxItem> <ComboBoxItem>3</ComboBoxItem> </ComboBox> '''
19,672,900
1
19,672,947
I was wondering how can I replicate the sideways gallery like the facebook mobile app but being able to scroll down the feed anytime I want. I was thinking about "listening" for side-swypes and replacing the current ImageView but that doesn't sound like an elegant solution. I searched for awhile and didn't find any library worth using Is there any library or do you have any idea how to do it? <IMAGE>
You could use the 'ViewPager' component. Reference: <URL> Here are some tutorial that can help you get started: 1) <URL> 2) <URL> Take a look at: <URL>!
22,702,825
1
22,702,875
I am trying to create a table with sub-headings and side-headings which looks like the picture below: <IMAGE> This is what I have so far: ''' <table> <thead> <tr> <th>Object</th> <th>Openings</th> <th>Internal Dimensions</th> <th>Weight</th> <th>Volume</th> </tr> </thead> <tbody> <tr> <td>Box</td> <td>300x500</td> <td>300cm x 400cm x 600cm</td> <td>Min: 100g, Max: 200g, NA</td> <td>300</td> </tr> </tbody> </table> ''' Is it possible to have a table that looks similarly to the picture above.
Use CSS ''' <style type="text/css"> .blue_bg{ background-color: blue; } </style> <table> <thead> <tr> <th>Hello</th> <th>Hello</th> <th>Hello</th> </tr> </thead> <tbody> <tr> <td class="blue_bg">Hello</td> <td class="blue_bg">Hello</td> <td class="blue_bg">Hello</td> </tr> <tr> <td class="blue_bg">Hello</td> <td>Hello</td> <td>Hello</td> </tr> <tr> <td class="blue_bg">Hello</td> <td>Hello</td> <td>Hello</td> </tr> <tr> <td class="blue_bg">Hello</td> <td>Hello</td> <td>Hello</td> </tr> </tbody> </table> '''
8,490,322
1
8,505,124
I have a problem with 'UITableView', particularly with 'scrollToRowAtIndexPath'. Here we set a section-header-height and row-height respectively. Later on, when a keyboard is shown, I've resize the tableview and scroll to current involved cell using 'scrollToRowAtIndexPath'. The problem is, after trying 3 different type of positioning, only 'UITableViewScrollPositionTop' is positioned correctly while 'UITableViewScrollPositionMiddle' and 'UITableViewScrollPositionBottom' is misplaced. Here're the screenshots: <IMAGE> Like the images shown, the top positioning put the row at the top, while middle and bottom positioning is put at around 1 row up of the middle row (for both of them). This only happening in this view (it works fine on other view). The tableview has fixed margin and flexible width/height (denoted by all marks are bright red in the IB). I've try to check the origin point of the tableview, it stated 0,0. When I move the origin.y a few pixel, the tableview does move down that amount so this wasn't caused by tableview origin point. I've using this code to get the indexPath before resizing (note that this works fine on other views): ''' NSIndexPath *indexPath = [tblView indexPathForRowAtPoint:self.frame.origin]; //resize the tableview [tblView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; ''' Any idea on why is this position shifting is happening? Thanks in advance.
OK. Now I know the cause of this problem and I think I have to share it here since I'm asking here in the first place. It's because the previous developer set the Content Insets Bottom of Scroll View Size of UITableView to 100 in the xib file (the default value should be 0 I think). This picture show where I found this property: <IMAGE>
26,236,526
1
26,248,304
i'm new in mobile app. I am developing an app in CodeNameOne. I created a flow-chart to describe it. is it possible to implement it in codenameone? does google & apple support to query on purchased items by invoices id? <IMAGE>
See these about IAP in Codename One: <URL> <URL> Normally the products need to be listed in the client side since listing isn't a very cross platform feature so you need to have the product id's on your side.
16,728,294
1
16,729,289
I have following CoreData objects Model <IMAGE> Now I am having issue in making a predicate with following conditions. Fetch all those 'DBOpportunity' WHERE DBOpportunity.stateCode == 1 AND DBOpportunity.invoiceDate >= GIVEN_DATE AND DBOpportunityLines.crmAccept == 1 OR DBOpportunityLines.crmAccept == 3 I have tried lots of examples and programming guide by the <URL> but can't able to achieve this.
'opportunitylines' is a relationship, so there are multiple DBOpportunityLines objects for one DBOpportunity object. Assuming that the last condition > DBOpportunityLines.crmAccept == 1 OR DBOpportunityLines.crmAccept == 3 should hold for of the related objects, you need a SUBQUERY: ''' NSDate *givenDate = ...; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"stateCode == 1 AND invoiceDate >= %@ " "AND SUBQUERY(opportunitylines, $x, $x.crmAccept == 1 OR $x.crmAccept == 3).@count > 0", givenDate]; ''' Unfortunately, the usage of SUBQUERY in predicates is poorly documented. There is <URL>.
6,088,380
1
6,088,967
<IMAGE> Hi I have some text field which, after a decoding, set some UILabel. The problem is that if the user leave some empty field , I don't like to see that space between the labels. I enclose a picture for a better understanding. thanks in advance.
instead of the view below use a uitableview with custom cells Each custom cell having a label ...and add a cell if and only if u have a valid string in a textfeild..set userinteraction=NO and set some backgroung color to match ur view.. just put that string in the uilabel in the custom cell...thats it..
23,167,810
1
23,167,835
So I'm looking for a library that accomplish the same navigation controller of the vine app. For those who don't know what I mean here you go: <IMAGE> So basically it should replace my tabbarcontroller. Is there some similar out there? If not how can I implement this?
You can use this samples. DropdownMenu , REMenu <URL> <URL>
11,660,147
1
11,661,976
I want to show a progress bar in my application's dock icon. It works but for some reason its showing the progress bar as a grey bar, instead of the standard blue one. I used the code I found on <URL>. What am I doing wrong? ''' NSProgressIndicator *progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, 80.0f, 20.0f)]; [progressIndicator setStyle:NSProgressIndicatorBarStyle]; [progressIndicator setIndeterminate:NO]; [[[NSApplication sharedApplication] dockTile] setContentView:progressIndicator]; [progressIndicator setDoubleValue:50]; [[[NSApplication sharedApplication] dockTile] display]; ''' <IMAGE>
I'm not sure this is possible without subclassing the progress indicator and doing your own drawing. I think the problem is that the dock tile is not key (and can't be?). A progress indicator in a non-key window will be gray, I assume the same is true for the dock tile. Making the progress indicator firstResponder didn't help either.
17,720,985
1
17,773,007
I want to upload doc or docx file using primefaces fileUpload,although I specify the type of file it display <IMAGE> ''' <p:fileUpload cancelLabel="#{contenu.annuler}" fileUploadListener="#{utilAdminBean.fileUpload}" allowTypes="/(\.|\/)(doc|docx)$/" multiple="false" mode="advanced" sizeLimit="52428800" showButtons="false" /> '''
I found the solution,I forgot to add to the fileupload component inside '<h:form nctype="multipart/form-data">' functional code is as follows: ''' <h:form id="formcontract" enctype="multipart/form-data" dir="rtl"> <p:fileUpload cancelLabel="#{contenu.annuler}" fileUploadListener="#{utilAdminBean.fileUpload}" allowTypes="/(\.|\/)(doc|docx|xls|xlsx|pdf)$/" multiple="false" mode="advanced" sizeLimit="52428800" showButtons="false" /> </h:form> '''
20,660,390
1
20,667,445
The select menu (the pinwheel) within the new iOS 7 truncates the items as shown in this photo. Is there anyway to prevent the truncating that's occurring by default so the select items "wrap" so the select experience functions more like iOS 6?! I'm looking for CSS and/or jquery solutions. I'm not able to find any topics on the matter either... Any support in this area would be helpful<IMAGE> I also checked apple's site (to see if they are doing anything different) and they suffer from the same problem with their select menus. <URL>
Well, as it turns out, if I insert a fake option group label it disables the truncating. <URL> ''' <select> <option selected="" disabled="">Select a value</option> <option>Grumpy wizards make toxic brew for the evil Queen and Jack</option> <option>Quirky spud boys can jam after zapping five worthy Polysixes</option> <option>The wizard quickly jinxed the gnomes before they vaporized</option> <option>All questions asked by five watched experts amaze the judge</option> <optgroup label=""></optgroup> </select> '''