_id
stringlengths
2
6
text
stringlengths
4
46k
title
stringclasses
1 value
d17001
Currently I would suggest to use command grep in terminal(Xcode could not search .xib file): grep -i -r --include=*.xib "TextToFindHere" /PathToSearchHere Another way is to right click your .xib file and Open As Source Code and use Command+F to search. But this method can only search one file a time.
d17002
To completely customize your ActionBar tabs, try something like the following, for a fictional tab called "Home". This layout contains an image and label. (1) create the tab as normal, but specify a custom layout via ActionBar.Tab.setCustomView() // Home tab LayoutInflater inflater = (LayoutInflater) this.getSystemSer...
d17003
If you have numeric ratings, you could use diff to check if you consistently have 0 difference between each rater: f <- function(cols, data) { sum(colSums(diff(t(data[cols]))==0)==(length(cols)-1)) / nrow(data) } Results are as expected when applying the function to example groups: f(c("a","b","d"), df) #[1] 0.6 f(c...
d17004
As the secondary volume has the same UUID and the Amazon Linux used UUID based identification for root, then there might be a chance that the secondary volume was taken as the root volume. This may be the reason why there would be a mess up in choosing the root volume and the initial attempt to find test.txt would fail...
d17005
You have middleware 'auth' for your route. You should investigate a bit on it and you'll understand why doesn't it work. The point is that 'auth' middleware requires cookies to work correctly, while you have it empty when you're have Ajax request. Why does it give you 302 and not 401? You should look into your authenti...
d17006
At least in my case, the answer is to run the jobs as the same user as the pg_cron background thread. I've posted more details to the end of the original question.
d17007
You need to consider using the anchor and Dock properties this is how you position your controls on the form and control their positions in various scales you can find here very useful article about using anchoring and docking A: By making use of anchors and docks then you should be able to create a WinForm which sca...
d17008
Specifying popover-placement fixed the problem for me. Example: <input type="number" popover-placement="top" popover="This is some text that explains something" popover-trigger="focus"> A: There seems to be a problem with placement/position of tooltips, and popovers. It has something to do with ...
d17009
This code actually works fine. The only problem was that I was looking at the _i value of the moment object to check it's value (this is the value used as the initial input when creating the object, not necessarily the current value). Changing the console.log line to the following yields the expected / correct result: ...
d17010
Yes it is. See http://www.meteorpedia.com/read/Deploying_to_a_PaaS In most cases this is as simple as using "meteor bundle", demeteorizer, and then uploading the resulting files with your PaaS provider's CLI deploy tool. Demeteorizer wraps and extends Meteor’s bundle command by creating something that more close...
d17011
Your problem is that you are referring to sold_quantity here : select(tp.package_rate * sold_quantity ) The alias is not recognized at this point.You will have to replace it with sum(sales). You will also have to group by tp.package_rate. Your query should ideally be like : select tp.package_rate, sum(sell) as so...
d17012
I think that one of the best solutions is the use of Collections.sort Collections.sort(posts, new Comparator<WPPost>() { @Override public int compare(WPPost o1, WPPost o2) { return o2.getRating() - o1.getRating(); } }); In some implemetations Collectios sort use merge sort a...
d17013
You are just declaring the functions, you haven't made a call to any functions at all. Use the sample below and change your program accordingly. Example: int main() { int i_array={0,1,2,3,4,5}; function(i_array); // Call a function printf("%d",i_array[0]); // will print 100 not 0 } void fun...
d17014
Use your query as a subselect: SELECT * FROM (SELECT a.name ...) dummy WHERE distance < 500.0;
d17015
Your suggested method is good practice: you should try to flatten your data structure as much as possible. I'd suggest using the user's ID for the membership of each address so it's easy to identify though. This way you can obtain a list of the members of "Sherman Street" from /addresses/Sherman Street and then match t...
d17016
I am afraid that there is no such a feature in azure devops to group the approval requests of service endppoints currently. Actually, the resource owner doesnot need to click multiple times to approve each individual approval request for a pipeline run. He can simply click Approval All to approve at once In my test ya...
d17017
Don't use two separate ways of attaching handlers when you only need one. Inline event handlers are essentially eval inside HTML markup - they're bad practice and result in poorly factored, hard-to-manage code. Seriously consider attaching your events with JavaScript, instead. The problem is that when assigning the han...
d17018
You can use to_char to format characters. So, for the format you have specified to_char(money, '9,99,999.99' ); Would return 8,80,856.00 example It should be noted that this is simply the length of the string provided in the first answer, and a longer second argument can be provided to properly format the number as de...
d17019
One solution is to use Batch as x values and Yield as y values. Line is added with stat_summary() and argument fun.y=mean to get mean value of Yield. Then coord_flip() is used to get Batch as y axis. To change order of Batch values you can use reorder() function inside the aes() of ggplot(). ggplot (Dyestuff, aes (reor...
d17020
You scan always the first value of text, because you forgot to move the input for strtoul right after the end of the previous scan. That's what the **end-parameter of strtoul is good for: it points to the character right after the last digit of a successful scan. Note: if nothing could have been read in, the end-pointe...
d17021
I realized we don't need a CTE to do this, you can simply do: SELECT TOP(1) month, COUNT(*) FROM newspaper CROSS JOIN months WHERE (start_month<=month) & (end_month>=month) GROUP BY month ORDER BY 2 DESC ; This will grab the top row, and it will be ordered by the highest count. I am unsure of language used by CodeAc...
d17022
You can do this many ways Via codeigniter 3.x then first load form validation library in controller function and set rules and place holder for showing errors in view file. See for reference https://codeigniter.com/userguide3/libraries/form_validation.html#the-controller https://codeigniter.com/userguide3/libraries/for...
d17023
My guess is that it's your StreamWriter that is chunking your data. Try setting AutoFlush = true.
d17024
If you're just iterating over that series to build a list of floats, you could instead use astype(float). It seems like you have some values in that column, though, that cannot be converted to float. For the sake of troubleshooting, maybe just try for alpha in zip(df['age_in_years']): try: X_parameter.appe...
d17025
It's actually quite simple. You have points A (A.x, A.y) and B (B.x, B.y) and need the update for your character position. Start by calculating the direction vector dir = B - A (subtract component-wise, such that dir.x = B.x - A.x; dir.y = B.y - A.y). If you add this entire vector to your character's position, you will...
d17026
Before I share some numbers, I'd highly recommend to not perform such premature optimizations. Consider the following code: private func getAttributedString() -> NSMutableAttributedString{ let attributedString = NSMutableAttributedString(string: "Something ") attributedString.append(NSAttributedString(string: "...
d17027
Change this line 'edit' => site_url('admin/users_group_controller_update') .'/'. $this->getId($controller) to 'edit' => site_url('admin/users_group_controller_update' .'/'. $this->getId($controller)) A: With in my files variable I had to use the db function to get it to work. No errors show now all fixed. <?php c...
d17028
If the +0000 part is always the same and doesn't matter, you can use: DATE(STR_TO_DATE(my_field, '%b %d %H:%i:%s +0000 %Y')) The used specifiers here are: Specifier | Description ----------|------------ %b | Abbreviated month name (Jan..Dec) %d | Day of the month, numeric (00..31) %H | Hour (00..2...
d17029
I assume that you're using class-based components. You can render the image which is captured from camera by setting the response photo to a local state and conditionally rendering it. import React from "react"; import { Image } from "react-native"; import { Camera } from "expo-camera"; import Constants from "expo-cons...
d17030
to connect your SparkR session to Elasticsearch you need to make the connector jar and your ES configuration available to your SparkR session. 1: specifiy the jar (look up which version you need in the elasticsearch documentation; the below version is for spark 2.x, scala 2.11 and ES 6.8.0) sparkPackages <- "org.elasti...
d17031
Compare the speed of what you're doing now against querying the keys one-at-a-time using a keys-only query. If there isn't a clear winner, take the keys-only query, since it costs less.
d17032
Explanation: * *Your code is indeed inefficient because you are calling setValue() and setBackground() 9 times each when you can simply use setValues() and setBackgrounds() instead once. It will get even more inefficient for a larger number of iterations. *There is a little trick you need to do and that is to conve...
d17033
I really haven't done much with Bayesian posterior distributions ( and not for a while), but I'll try to help with what you've given. First, k!(N-k)! / (N+1)! = 1 / (B(N,k) * (N + 1)) and you can calculate the binomial coefficients in Matlab with nchoosek() though it does say in the docs that there can be accuracy pro...
d17034
For the first part, assuming that you have a function solve[m] and a range of values for m={1,2,3,...}, you can use: Map[solve, m] I'm not sure what you mean by "fixing it", but this will give you an array, which you can investigate further.
d17035
From my point of view your calculated member will be something like: SET [Used Keys] AS NONEMPTY([Key].[Key].[Key], [Measures].[Count]) MEMBER [AVG Keys] AS AVG( [Date].[Month].&[2017-01].Children, DistinctCount([Used Keys]) )
d17036
(edit: as far as directly answering your question about R values, see below) One way to approach this would be to use cross-correlation. Bear in mind that you have to normalize amplitudes and correct for delays: if you have signal S1, and signal S2 is identical in shape, but half the amplitude and delayed by 3 samples,...
d17037
You can use realloc: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <dirent.h> extern char *strdup(const char *src); int scandir(char ***list, char dirname[], char const *ext) /* Scans a directory and retrieves all files of given extension */ { DIR *d = NULL; struct dirent *dir = NULL; ...
d17038
Looks like rbenv's installed under root. It should probably be installed under your (or your app user's) home directory, in this case for the user named 'deploy.' This Passenger configuration line from nginx.conf shows where it's expected to live: /home/deploy/.rbenv/shims/ruby So you should probably (re)install rbenv...
d17039
It looks like the issue here is due to a known path length limitation. Azure has a limitation on paths in the package being more than 255 chars and in this case bringing in socket.io WITH all of it's dependencies is hitting that path. There are several possible work arounds here. A. - Zip up node modules and extract on...
d17040
Do you want to zip_longest the first num with the first text, second null with second text, etc.? Then start by combining the sublists of the two inputs with zip: [list(zip_longest(a, b, fillvalue='Description')) for a, b in zip(claim_num, claim_text)] Output: [[('1', '1. A method'), ('2', '2. The method'), ('Des...
d17041
Here is my answer and it works perfectly: Moves forward, Rotates and Collides with Other objects (Having RigidBody and Box/Capsule Collider). tThis is based from Burkhard's answer. But befor all do this : Create an empty Object set it a child of your Player and drag your camera Object into your empty Object. NB : You...
d17042
If you want "C:\" to "\Device\SomeHardDisk1" you can use QueryDosDevice. (GetLogicalDriveStrings will list them all)
d17043
You see label as fos_user_registration_form_name, because FOSUserBundle uses translations files to translate all texts in it. You have to add your translations to file called like Resources/translations/FOSUserBundle.nb.yml (example for norwegian) or you can modify translations file coming with the bundle (copying it t...
d17044
Using <xsl:param name="start-tag"><![CDATA[<h2>]]></xsl:param> <xsl:param name="end-tag"><![CDATA[</h2>]]></xsl:param> and then a substring-after(substring-before combination <xsl:template match="Data"> <xsl:value-of select="substring-before(substring-after(., $start-tag), $end-tag)"/> </xsl:template> should do. ht...
d17045
If you want to use color from ResourceDictionary , you can access it first and pass the result color to the second parameter of method NavigationPage.SetIconColor. Please refer to the following code: Color color = (Color)Application.Current.Resources["defaultBackgroundColor"]; NavigationPage.SetIconColo...
d17046
Turns out that the problem was the server trying to send messages to channels that have expired. The error rate has gone down considerably when I made sure that doesn't happen anymore.
d17047
You can't Define a Name in a UDF you must use a sub the following will fail: Public Function qwerty(r As Range) As Variant qwerty = 1 Range("B9").Name = "whatever" End Function
d17048
Set<Integer>[] varargs = new HashSet[2]; varargs[0] = new HashSet<Integer>() ; A: I believe array of Set should be defined like this: Set<Integer>[] varargs = new Set[2]; varargs[0] = new HashSet<Integer>(); varargs[1] = new HashSet<Integer>();
d17049
In the settings.json file, add this line: "typescript.preferences.importModuleSpecifier": "non-relative" If this property is removed, then the ugly relative auto-import is the default option. Simply change 'typescript' to 'javascript' if you're currently using JS. To know more about this setting option, just hover on ...
d17050
I had to make a lot of guesses here because you didn't include much code or explanation for what you are trying to achieve but I think I have managed to create the overall appearance of what you want. I have created two ways that this works, one which should work for anyone and another which will work for everyone but ...
d17051
I do not think it has anything to do with the component being lazy-loaded. LazyLoadedComponent is not part of the AppModule – it is part of the LazyModule. According to the docs, a component can only be part of one module. If you try adding LazyLoadedComponent to AppModule also, you would get an error to that effect. ...
d17052
One approach would be to use an <xsl:key> in the following way. Keys let you index nodes by a certain property, for example you could index all nodes by some attribute value. But you could also index them by a calculated value. In your case you have many <w> nodes like this: <doc> ...
d17053
Floating point numbers have an infinite number of decimal places. When you print them it will only print 2 unless you specify with the second parameter how many to print. For example: float x = 67.1234 Serial.print(x); // will print 67.12 Serial.print(x,3); // will print 67.123 Serial.print(x, 4); // will print 67.12...
d17054
as CevaComic said you are setting the initial value as an empty array. useEffect will only work after the component has been rendered, so when you will console.log the data stored in result you will get the initial value. Only after the component will render for the second time, because of the changed made inside setRe...
d17055
The code shown in your question is missing some critical parts to fully understand your problem, but it sounds like you're creating a new bitmap for every frame. Since Android only allows for about 16MB of allocations for each Java VM, your app will get killed after about 52 frames. You can create a bitmap once and r...
d17056
Ember uses Broccoli.js for it's build pipeline. Broccoli is build around the concept of trees. Please have a look in it's documentation for details. You could exclude files from the tree using a plugin called broccoli-funnel. It expects an input node, which could be either a directory name as a string or an existing br...
d17057
Avoid the GAC unless you have full administration rights on the host server. What you could do is create a project containing the source for your shared DLL. You can then add this project into each of your web site solutions, and add a reference in your site solutions to the project. This has the added advantage of ena...
d17058
Use this in the delegate for your first UIWebView: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked) { [otherWebView loadRequest:request]; return ...
d17059
I am using the latest version of PushSharp (version 3.0) in a project of mine to send toast notifications to Windows Phone Devices and it is working fine for me. I notice by the code you have above that you are using an older version of the PushSharp package, there is a new 3.0 version available from nuget. You could u...
d17060
It's Solve is so easy just stop your app and run it again i hope this is useful
d17061
The Find() function returns a Range object if successful or Nothing if not. So you need to test the return value to ensure it's a Range object before you try accessing its properties and methods. For Each c In objworksheet.Range("A2:A3").Cells val = c.value Set objRange = objWorksheet2.UsedRange Set found =...
d17062
Yes, you will need to remember the last selection yourself, wxWidgets doesn't do it for you (and neither does the native control).
d17063
For this situation you may be better off using a windowing function like row_number() select id, fruit, color, createddate from ( select id, fruit, color, createddate, row_number() over(partition by fruit order by createddate desc) seq from tblFruit ) d where seq = 1; See Demo Using this allows you to partiti...
d17064
You have a typo in line 325 (the line with that comment): it's IDInput you want to compare with, not inputID which is the name of the function it's in.
d17065
1 and 2: For adjusting the distance between the options target span and reduce the margin on it to make them closer between each other. You can add the class to your spans like this, then use padding to make the lines farther from text. Play with the values. Would look something like: <span class="spanMenu"> .spanMen...
d17066
To list updated rows, you conceptually need either of the two things: * *The updating statement's effect on the table. *A previous version of the table to compare with. How you get them and in what form is completely up to you. The 1st option allows you to list updates with statement granularity while the 2nd is ...
d17067
It did, but I'm guessing the Saver instance you created had the default max_keep value of 5, so it overwrote them as the last 5 were created. To keep 10, change your saver creation line to saver = tf.train.Saver(max_keep=10) You might also want to play with the keep_checkpoint_every_n_hours argument if you don't want ...
d17068
The blurb in the documentation refers to the value in the manifest.json file. Dependencies in the manifest are defined by an alias mapped to a string in the format of <name>@<version>. The exact meaning of that string is not currently enforced so it just serves as documentation for the app. If you mount an app that has...
d17069
Structs in ColdFusion are unordered HashMaps, so there is no order at all. You can keep insertion order by using structNew("Ordered") (introduced with ColdFusion 2016). Unfortunately you can no longer use the literal syntax anymore, but I assume you are generating the data dynamically anyway. <cfset data = structNew("O...
d17070
As the page says: Use the KeyChain API when you want system-wide credentials The purpose of the KeyChain API is to use username/password credentials to get a 'token' that this app (and potential other apps) can use. The KeyChain is also used a lot for syncing private information (like mails) in the background. But ...
d17071
I think you can just use this.text.width. This has historically had some bugs associated with it, but it should be working right in the latest version.
d17072
You should use GridView for this purpose. It has adapter. See an example here: http://developer.android.com/guide/topics/ui/layout/gridview.html For dealing with images, i would also take a look at https://github.com/nostra13/Android-Universal-Image-Loader it just makes my life so easy.
d17073
Could there be instances such that it could print the following i.e. some thread numbers are lost and some numbers are doubled? st is a method local variable, also st doesn't escape the method's scope so it is thread-safe. So, multithreading will have no effect on st . The messages can be printed out of order dependin...
d17074
I found the silly solution. The browser was zoomed to 120% unknown to me so I adjusted it back to 100%
d17075
Take a look at JarInputStream, JarOutputStream, ZipInputStream, and ZipOutputStream. They are a part of the JDK, so external libraries are not required. Pay attention that unlike other streams these require you to care about current entry. You can find a lot of examples of how to use the java zip API.
d17076
Looks like they only allow this feature for the 'pull' option. A: More information about Cloud Pub/Sub Exactly Once Delivery and Push Subscriptions: https://cloud.google.com/pubsub/docs/exactly-once-delivery#exactly-once_delivery_and_push_subscriptions.
d17077
try with the zipjs.bat: call zipjs.bat list -source "C:\myZip.zip" -flat yes|find /i "filename" && ( echo file does exists in the zip color )|| ( echo file does NOT exists in the zip )
d17078
Vecs can contain Vecs too: let mut vecs: Vec<Vec<i32>> = vec![]; // or Vec::with_capacity(2) for _ in 0..2 { vecs.push(Vec::with_capacity(100)); }
d17079
You could use a join instead, putting the values in a derived table: select p.* from passages p join (values (413, 2), (414, 3), (415, 4), (416, 5) ) v(id, category_id) on p.id = v.id and p.category_id = v.category_id; A: If you can store that dictionary container in a table it will be easier to use it...
d17080
You cannot directly plot a dictionary in matplotlib. It needs x values and y values. You can see that type(df) will be a <class 'dict'> which contains the value something like this: {'TSLA': {'2017-02-09': {'open': 266.25, 'high': 271.18, 'low': 266.15, 'close': 269.2, 'volume': 7820222}}} so, if you want to get it gra...
d17081
You will have to use a ng-grid plugin Flexible Height Plugin. Add this plugin to plugins property of the grid options. $scope.gridOptions = { data: 'nagruzkaData', enableColumnResize: true, showGroupPanel: true, plugins: [new ngGridFlexibleHeightPlugin()] }; A: Eventually, as I need to solve that prob...
d17082
If you want to map Incident to IncidentDTO while retaining and mapping the Agency object in the agency property (to an AgencyDTO) of an Incident instance I'd suggest renaming the agencyDTO property to agency in your IncidentDTO and then use a tweak to the CloneInjection sample from the Value Injector documentation as d...
d17083
To keep an independent copy of the data, you'll want to perform a deep copy of the object using something like klona. Using Object.assign is a shallow copy and doesn't protect against reference value changes.
d17084
Iterate through the array starting at index 1. Then append that item after its preceding element. That's it. http://jsfiddle.net/jT8Tt/ var order = [2, 3, 1, 5, 4]; for (var i = 1; i < order.length; i++) { $('li[data-number="' + order[i] + '"]').insertAfter($('li[data-number="' + order[i - 1] + '"]')); } Or in sl...
d17085
lambda x: f + g This is a function that takes in x and returns the sum of two values that do not depend on x. Whatever values f and g were before they stay that value. lambda x: x + x + 1 This is a function that returns the input value x as x+x+1. This function will depend on the input. In python, unlike mathematic...
d17086
Your second line works and gives the "expected" result. The first fails because the result of length(date) is a vector of length 2 rather than a single value. since you want a result for each row of your data.frame, you should use transform rather than summarise: ddply(x, .(date), transform, freq=length(date), calc=(...
d17087
Change this for(int i=0; i < index; i++) { cout << array[index] << endl; } To for(int i=0; i < index; i++) { cout << array[i] << endl; } You used index at the seconde loop causing your program to print all the array cell's after the user input. Also, if -1 is your condition you should change it to } while(in...
d17088
You can use Ext.Date class for getting 12 hours format. Here is defied some formats:- * *g 12-hour format of an hour without leading zeros 1 to 12 *i Minutes, with leading zeros 00 to 59 *a Lowercase Ante meridiem and Post meridiem am or pm *A Uppercase Ante meridiem and Post meridiem AM or PM I have created a...
d17089
After searching through Google and StackOverflow for hours, I finally came up with a solution to the problem on my own. Running the type command within terminal against node, I got this returned: :~ myusername$ type node node is /Users/myusername/.nvm/v0.10.48/bin/node Subsequently, after deleting that folder, Node a...
d17090
I am not absolutely sure, but I think the problem lies in the AddWithValue. While convenient this method doesn't allow to specify the exact datatype to pass to the database engine and neither the size of the parameter. It pass always an nvarchar parameter for a C# UNICODE string. I think you should try with the standar...
d17091
The browser tab should close automatically when the auth succeeds and Azure AD B2C calls back to the app. It's possible that you might mis-configured the app or their is a bug in the specific browser you're using (we've seen this before on smaller browsers, so the data could help). With respect to Azure AD B2C, I'd hi...
d17092
I was able to accomplish updating the parent windows URL in the address bar using history.pushState by sending the new URL to the parent from the child Iframe window using postMessage and on the parent window listening for this event. WHen the parent receives the child iframes postMessage event, it updates the URL with...
d17093
When you add an object to an array, the array just keeps a reference to that object (a pointer). It doesn't create a copy of that object. So, in the code example above, you're always dealing with the same instance of Tutorial: * *First, you create a new Tutorial with alloc and init, and store a reference to it with ...
d17094
First solution you can add one more option tag for default value Html Code <div ng-app="MyApp"> <div ng-controller="MyCtrl"> <select ng-options="opt as opt for opt in testOpt" data-ng-model="resultOpt" data-ng-change="checkResultOpt(resultOpt)"> <option value=''>Choo...
d17095
gzip is basically a header + deflate + a checksum. Gatling will retain the original Content-Encoding response header so you can check if the payload was gzipped, and then trust the gzip codec to do the checksum verification and throw an error if the payload was malformed.
d17096
In then location manger didUpdateLocations set manager.delegate to = nil after you call manager.stopUpdatingLocation(). Let me know if you want me to show you how it looks in my code. func findLocation() { locationManager = CLLocationManager() locationManager.delegate = self locationManager.desiredAccuracy...
d17097
I suppose that cable will have the same functionality as a connector for a projector or second display right? If that is the case then the answer is: IS POSSIBLE. But, everything that is want to show in the second display have to be explicitly done by you. There is no mirroring system or something alike. Read here, t...
d17098
Starting from dotnet core 3, Ef will throw an exception if a Linq query couldn't be translated to SQL and results in Client-side evaluation. In earlier versions you would just receive a warning. You will need to improve your Linq query so that it can be evaluated on client side. Refer to this link for details, https://...
d17099
First, creating these types of sql objects should use begin.. end blocks. Second is,you can ignore the else statement. CREATE TRIGGER invalidScore ON dbo.dbo_score AFTER INSERT AS BEGIN DECLARE @score DECIMAL; SET @score = (SELECT s.score FROM Inserted s); IF(@score > 10) BEGIN RETURN 's...
d17100
In MainMenuScreen you have to draw things in the render() method, not in the show() method. Like this: @Override public void render() { stage.draw(); // ... possibly more drawing code }