_id
stringlengths
2
6
partition
stringclasses
3 values
text
stringlengths
4
46k
language
stringclasses
1 value
title
stringclasses
1 value
d3801
train
Are you sure that the data import configuration matches your Solr document schema?
unknown
d3802
train
The problem is that the second argument to indexOf is the first index in the string that it searches. Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. Once it finds the first "C", it will then continue to always find that same "C" in ...
unknown
d3803
train
Can you try this: <p:progressBar value="#{data.financingDataModel.mortgagePercentage}" styleClass="animated ui-soba-progress-bar " global="false" style="overflow:hidden" labelTemplate="#{data.financingDataModel.mortgagePercentage}%"> </p:progressBar> I only add the `labelTemplate'. It is wor...
unknown
d3804
train
The API is not documented, however we can track it with tools... You can add SSH public keys by calling below REST API: Write a script to create the SSH keys with the ssh-keygen command for users, please see Use SSH key authentication for details. Then call the REST API to add the public keys: POST https://{Account}.v...
unknown
d3805
train
import java.awt.*; import javax.swing.*; import javax.swing.border.EmptyBorder; import java.net.URL; import javax.imageio.ImageIO; class ImagePanel extends JPanel { Image image; ImagePanel(Image image) { this.image = image; } @Override public void paintComponent(Graphics g) { sup...
unknown
d3806
train
Agree with the comments on the Q. Either: 1.) Use Client Credentials grant type in OAuth 2 - with an embedded secret in your App. Understand that this isn't super secure and someone will reverse engineer it eventually. Ideally each client would get a unique secret - so you could revoke a client if they're abusing it...
unknown
d3807
train
Visual Studio is just calling git clone command to clone the repo. Suggest you could directly use Git Command, such as follow git clone https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam C:\Repos\FabrikamFiber If you still get the same result. Afraid these files .xxx are all ignored in Git by default. Y...
unknown
d3808
train
Changing the "names" of the grid areas from numbers to strings fixed it. @import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700"); .grid { display: grid; grid-gap: 1rem; grid-template-rows: 1fr 1fr 1fr; grid-template-columns: repeat(7, 1fr); grid-template-areas: "p1 p1 p1 p1 p...
unknown
d3809
train
You need a template.reload after your second save. Otherwise, the template record will contain the values from when it was first loaded. A: I GOT IT ! I just had to turn transactionnal fixtures to false inside spec_helper.rb : RSpec.configure do |config| ... config.use_transactional_fixtures = false # true by def...
unknown
d3810
train
you could use the below SO post code for uploading images to server. How can I upload a photo to a server with the iPhone? upload image from iphone to the server folder
unknown
d3811
train
To display multiple lines add : android:ellipsize="none" //the text is not cut on textview width android:scrollHorizontally="false" //the text wraps on as many lines as necessary A: I recomend to use: <TextView android:singleLine="false" /> or android:ellipsize="end" android:singleLine="true" with and...
unknown
d3812
train
This is obviously a permission related issue so you need to check for permissions on folder for the users application pool, network service and aspnet Check read only attribute of the files that are throwing access denied. many times, user uploads images from CD. When you are saving file, try to remove read only flag a...
unknown
d3813
train
This is because you can't alias column used in WHERE clause and use that in ORDER BY clause. Instead you need to SELECT that column and use HAVING clause to filter it: SELECT friends.*, isNeighbour(lat,lon,friends.latitude,friends.longitude,rad) AS dist FROM account friends LEFT JOIN account_friendTest me ...
unknown
d3814
train
This is your query: SELECT TOP 2 [Flight_Date], [No_Launches] FROM Flights WHERE [Claimed_By_ID] = ? ORDER BY [Flight_Date] DESC LIMIT 1,1; You need to decide which database you are using. Some support TOP; some support LIMIT. Based on your error and the use of the square braces, I would guess that you are using SQL...
unknown
d3815
train
Try this code: if 'b' in l1 and 'b' in l2: # Separated both statements to prevent ValueErrors if l1.index('b') == l2.index('b'): print 'b is in both lists and same position!' Unlike Volatility's code, the length in either list doesn't matter. The index() function gets the position of an element in a strin...
unknown
d3816
train
Extract the contants into functions that describe them (basic refactoring): FooBar fb = { foo(), bar() }; I know that style is very close to the one you didn't want to use, but it enables easier replacement of the constant values and also explain them (thus not needing to edit comments), if they ever change that is. A...
unknown
d3817
train
SharpDevelop also has built-in capabilities for laying out a WiX dialog. I prefer it over WixEdit. A: I created a full list of editors for WiX here: https://robmensching.com/blog/posts/2007/11/20/wix-editors/ (which is amazingly still up to date) A: this is excellent GUI IDE and it is open source..... try this... ht...
unknown
d3818
train
You're not running an event loop in the thread where the QProcess instance lives. Any QObject in a thread without an event loop is only partially functional - timers won't run, queued calls won't be delivered, etc. So you can't do that. Using QObjects with QtConcurrent::run requires care. At the very least, you should ...
unknown
d3819
train
There are a number of problems in this code. The one the compiler is whining about is that you have a function definition fn (f,x) => x on the left-hand side of a case arm, where only patterns are permitted. Some other problems: * *Redundant parentheses make the code hard to read (advice is available on removing...
unknown
d3820
train
Update the version of the native2ascii-maven-plugin to the newest version. A: adding this works for me: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>native2ascii-maven-plugin</artifactId> ... <!-- added for java 7 compilation --> ...
unknown
d3821
train
It should be just <nav id="navbuttons"> <button type="button" id="projectsMenu">Projects</button> </nav> then $(document).ready(function () { $("#projectsMenu").click(function () { $("#projects").stop(true).slideToggle("slow"); }); }); Demo: Fiddle because in your case, the actual slideToggle code...
unknown
d3822
train
Generally speaking, I prefer not to use stub chains, as they are often a sign that you are violating the Law of Demeter. But, if I had to, this is how I would mock that sequence: let(:vanity_url) { 'https://vanity.url' } let(:partner_campaigns) { double('partner_campaigns') } let(:loaded_partner_campaigns) { double('lo...
unknown
d3823
train
Here goes: #include <iostream> #include <sstream> #include <boost/archive/binary_oarchive.hpp> #include <boost/serialization/vector.hpp> int main() { std::ostringstream oss; boost::archive::binary_oarchive oa(oss); std::vector<char> v(1000); // stream oa << v; std::cout << "The number of byt...
unknown
d3824
train
Your query is logically correct but syntactically wrong: match(n:Student{id:2), <--- missed a closing curly brace here (n)-[r1:STUDENT_CLASS]->(b:Class), (n)-[r2:STUDENT_RANK]->(m:Rank) delete r1,r2 return n.name Try this: match(n:Student{id:2}), (n)-[r1:STUDENT_CLASS]->(b:Class), (n)-[r2:STUDENT_RANK]->(m:Rank) delet...
unknown
d3825
train
I was able to do this by following: https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10 Once you have added the new Variable, make sure to restart PowerShell as @J. Bergmann has mentioned.
unknown
d3826
train
The MSDN documentation does explain but it isn't laid out very clearly. In a trigger, SQL server automatically makes 2 special in-memory tables available to you: * *inserted: the data which was added to the table (for insert and update statements) *deleted: the data which was removed from the table (for update and ...
unknown
d3827
train
The issue is relating to async/sync communication. After separating js for html2, i was calling onLoad2() function inside onLoad() function after assuming the connection is established, but no. Should 'wait' till the connection is established and then call another function. js2: let db; let itemsCollection; ...
unknown
d3828
train
simply use for loop to iterate every character from the string. Demo: In [28]: s = "qazxswedcvfrgbnhyujmkiopl" In [29]: count = 0 In [30]: for i in s: ....: if i.lower() in ["a", "i", "o", "u", "e"]: ....: count += 1 ....: In [31]: print count 5
unknown
d3829
train
It seems that your old weblogic (10) had a different session descriptor on the weblogic.xml. If you want to keep the same sessionID lenght you should update your weblogic 12c's weblogic.xml: session-descriptor node id-length value (default is 52). Reference: https://docs.oracle.com/cd/E24329_01/web.1211/e21049/weblogi...
unknown
d3830
train
See Automatic Naming and Relative Imports, in the docs: http://celeryq.org/docs/userguide/tasks.html#automatic-naming-and-relative-imports The tasks name is "tasks.Submitter" (as listed in the celeryd output), but you import the task as "fable.jobs.tasks.Submitter" I guess the best solution here is if the worker also s...
unknown
d3831
train
Do you really need to use those versions? Why not simply replace gem "authlogic", "2.1.6" with gem "authlogic" and let the bundle solve version dependencies? Sometimes after doing so in the gemfile you get an error from the bundler and you have to run bundle update authlogic before the general bundle install
unknown
d3832
train
You can do that in 2 ways : 1. Simple change the response : exports.get = id => Model.sum('price', { where: { id, } } ).then(sum => {sum}); //<----- Little hack 2. Use sequelize.fn , Below one will return array , so you need to return the first element of array , for your expected ...
unknown
d3833
train
Your change to the indentation of the print statements is only changing what the console prints out, not any of the data. The first version only prints the date (and if its a weekday) before and after its been changed, while the second prints the date before, and then how it changes in each iteration of the while loop...
unknown
d3834
train
You can use ng-show or ng-if for this <button class="button button-energized" ng-click="getPhoto()"><span ng-if="!lastPhoto ">Take Photos</span><span ng-if="lastPhoto">Retake Photo</span></button>
unknown
d3835
train
I have reconstructed your code. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Test</title> <style> body { ba...
unknown
d3836
train
For: 1. Err: You must give at least one requirement to install (see "pip help install") You need to run this on the Raspberry PI: sudo pip install twilio If you don't have pip installed then run: sudo apt-get install python3-pip and then again: sudo pip install twilio for 2. Err: Traceback (most recent call last): Err:...
unknown
d3837
train
If you are happy to split the string once you are in Python, you can try with regex and the module re: # Python3 import re p = re.compile(r"\['(.*)','(.*)']") res = p.search("['ALLEGHANY','POLYGON((1308185.614362,...))']") print(res.group(1)) # 'ALLEGHANY' print(res.group(2)) # 'POLYGON((1308185.614362,...))'
unknown
d3838
train
How can I get all combinations of lists that hold all the combinations of the sublists? The order of the lists in the list does not matter. E.g. [[1, 3, 2], [4, 2, 5, 6], [7, 2, 5], [8, 9, 10]], [[2, 1, 3], [4, 2, 5, 6], [7, 2, 5], [8, 9, 10]] You need to permute all inner lists and then product those. First store per...
unknown
d3839
train
No. You can choose whatever size you want, just make sure the button or other elements are within safeAreaLayoutGuide. Besides, the guidelines are just Guidelines , they guide you as to what might look most appropriate as per apple, but these are not necessarily restrictions that must be enforced. A: They are guidelin...
unknown
d3840
train
Your code is very close to achieving what you want, except you are attempting to delete the Embed object that you created instead of the Message object of the embed. Here's a slight tweak that will achieve what you need: const wait = 30000; let count; const embed = new Discord.MessageEmbed() .setColor('#9EFF9A') ...
unknown
d3841
train
If need resample per groups is possible use Grouper for resample per days and then for add missing values is used Series.unstack with DataFrame.stack: df = (df.groupby(['Type', pd.Grouper(freq='1D', key='Date')])['Value'] .mean() .unstack() .stack(dropna=False) .reset_index(name='Value')...
unknown
d3842
train
I was able to figure it out. I changed my Utils.ShowMessage function as follows: public static void ShowMessage(UIViewController myview, string message, string messagetype) { var window = UIApplication.SharedApplication.KeyWindow; var vc = window.RootViewController; while (vc.PresentedV...
unknown
d3843
train
Why not just: //An abstract class that represents a person abstract class Person { public string Name { get; set; } } //A concrete person that represents a basketball player class Player : Person { } //A concrete person that represents a basketball coach class Coach : Perso...
unknown
d3844
train
Perhaps the fonts you have in ./src/fonts are not copied to public? You can check by navigate to the Network tab in the developer tools of your preferred browser, filter by font and see the response. It's likely that they're 404. A quick fix would be to manually copy the fonts to static directory (create one if you don...
unknown
d3845
train
Variables declared with var have a file scope, and are indeed inside a closure like you mentioned. However, if you declare new variables without the var keyword, they are accessible throughout your project (given you load files in the right order), as Meteor declares these variables outside the closure. In your case th...
unknown
d3846
train
Ok i have it if (intent.getAction().equals(Intent.ACTION_VIEW)) { Toast.makeText(this, "work", Toast.LENGTH_SHORT).show(); Uri data = intent.getData(); // ContentResolver contentResolver = getContentResolver(); String text = getStringFromShare(data); Log.d("sas...
unknown
d3847
train
Well, I'm not sure I get your question correctly but, from what I understand, you just want to proxy the API calls to MS Graph and make some changes on the fly to the response. OData queries are just simple query parameters (see the OData tutorial). So, basically, you just have to get those query parameters in your pro...
unknown
d3848
train
I use an environment file that stays on my computer and contains some variables linked to my environment. In my Django settings.py (which is uploaded on github): # MANDRILL API KEY MANDRILL_KEY = os.environ.get('DJANGO_MANDRILL_KEY') On dev env, my .env file (which is excluded from my Git repo) contains: DJANGO_MANDRI...
unknown
d3849
train
This just isn't going to work, even if you fix the typos. COM interop doesn't have a standard mapping from List<T> to something in COM, and it certainly won't map it to std::list. Generics aren't allowed to appear in COM interfaces. UPDATE I tried using ArrayList as the return type, as that's non-generic I thought mayb...
unknown
d3850
train
You're adding the same array object to the array repeatedly. Instead clone: var test_first = [ ...test[0] ]; A: You are manipulating the value test_first, and you are implicitly stringifying the value in test[0][0] by accessing test[0] - which returns an array of a single number, not a number. The code that produces ...
unknown
d3851
train
Few mistakes I could find right off the bat: * *In your html, there are no opening and closing quotes for the ids *counter variable is declared twice. You can name the counter button variable to something like counterButton *In the code snippet, include jQuery library
unknown
d3852
train
In order to do this sort of management, you should access the Databricks account portal at the tenant level: Databricks Account From there, you can create and manage the metastores, as well as assign a metastore with a Databricks Workspace, which is what you have created. Take into account that for most of what you ha...
unknown
d3853
train
to make it easier for you I would re-download the whole bundle in http://developer.android.com/sdk/index.html
unknown
d3854
train
Not sure if this is the most optimized solution, but you can use: * *rowClass (https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-rowclass) *selectionChange (https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-selectionchange) With that function and event, ...
unknown
d3855
train
$("ul li").click(function(){ $("ul li.active").removeClass('active'); $(this).stop().addClass('active'); })
unknown
d3856
train
To run a transformation programmatically, you should do the following: * *Initialise Kettle *Prepare a TransMeta object *Prepare your steps * *Don't forget about Meta and Data objects! *Add them to TransMeta *Create Trans and run it * *By default, each transformation germinates a thread per step, so use t...
unknown
d3857
train
The underlying implementation of both is pretty much identical: * *push thread bindings (using the bindings supplied) *try the body *finally pop thread bindings binding was added in Clojure 1.0 and with-bindings in 1.1. I don't see the latter used in any code tho', just the former.
unknown
d3858
train
Try something like this List<string> list = new List<string>(); DataTable dt1 = new DataTable(); dt1.Columns.Add("td",typeof(int)); var rows = doc.DocumentNode.SelectNodes("xpath link") .Descendants("tr") .Where(tr=>tr.Elements("td").Count()>1) .Select(td => td.InnerText.Trim()) .ToList(); ...
unknown
d3859
train
That's because you're setting it inside an asynchronous block, and asynchronous blocks return immediately. If you look at the time stamps of the two logs, you'll see that the outer log is actually being posted before both the inner log, and the setting of the variable. From the GCD docs on dispatch_async(): This funct...
unknown
d3860
train
create a new file called authorization.guard.ts and add this import { Injectable } from '@angular/core'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Observable } from 'rxjs/Observable'; import {AppContextService} from './context'; @Injectable() export class Au...
unknown
d3861
train
Try escaping your slashes maybe? system('"C:\\Program Files\\Java\\jre7\\bin\\java.exe" -server -Xincgc -Xmx8192M -jar craftbukkit.jar 2>&1');
unknown
d3862
train
The reason you're getting a null issue is that on @JoinColumn(name = "meeting_settings_name", nullable = false) you've got nullable = false. the column you're joining on is meeting_settings_name which doesn't seem to be a column on meeting_times and the actual name on meeting_settings is meeting_name. You'll have to ad...
unknown
d3863
train
You could define a set of serializable commands (see command design pattern for further details) that are generated whenever a change must be performed. Then you can execute those commands locally to apply changes to your model and serialize those commands in a queue. Whenever a client pulls them, it can simply reapply...
unknown
d3864
train
It is possible, but it requires deep knowledge of shader writing. Why not use the built-in Volumetric Fog? Unity has its own implementation, and installation guide.
unknown
d3865
train
Remove the WebLogic Domain data folder and setup it again. This time I restart the WebLogic server domain after the WebLogic Domain data folder setup and enable the SSL after. Next open the browser with the https address and it work.
unknown
d3866
train
Here is a snippet from the descriptor_extractor_matcher.cpp sample available from OpenCV: if( !isWarpPerspective && ransacReprojThreshold >= 0 ) { cout << "< Computing homography (RANSAC)..." << endl; vector<Point2f> points1; KeyPoint::convert(keypoints1, points1, queryIdxs); vector<Point2f>...
unknown
d3867
train
Turns out I didn't understand what the namespace was supposed to be. The following is correct: foreach($rss_items as $item) { $public_url = $item->get_item_tags('http://xml.theplatform.com/media/data/Media', 'publicUrl'); print_r($public_url); }
unknown
d3868
train
For the request test step, add Script Assertion with below snippet: //Check response is not empty assert context.response //Parse response and fetch required value def cResponse = new XmlSlurper().parseText(context.response).'**'.find {it.name() == 'CompressedResponse'}?.text() log.info "Extracted data : $cResponse"
unknown
d3869
train
You can store them in a map. The solution can be extended easily to arbitrarily many pointers, but I've used three here for concreteness. std::unordered_map<MyType *, double> computed_values; for (MyType *p: {A, B, C}) { if (computed_values.find(p) == computed_values.end()) { computed_values[p] = p->get(); ...
unknown
d3870
train
With my limited understanding of what REST is about, then the following might be the "most" restful. GET /resource/?page=<pageenr>&asof=<datetime> Since the content of the representation would never change unexpectedly, and caching could be used. But to actually answer your question, I think the parameter page is th...
unknown
d3871
train
Use its internal routing framework with the donotlog action: route = ^foo donotlog: But ensure your instance has internal routing support compiled in (if not you should see a warning in the startup logs).
unknown
d3872
train
It looks like you can simply use the centerCoordinate property of the MKMapView class - the docs say: Changing the value in this property centers the map on the new coordinate without changing the current zoom level. It also updates the values in the region property to reflect the new center coordinate and the new spa...
unknown
d3873
train
calloc() description from man7 #include <stdlib.h> void *calloc(size_t nelem, size_t elsize); The calloc() function shall allocate unused space for an array of nelem elements each of whose size in bytes is elsize. The space shall be initialized to all bits 0. The order and contiguity of storage allocated by ...
unknown
d3874
train
Here: char a[] = "Hello"; char * b = a; You are taking advantage of array to pointer decay. So now b points to a[0]. That is, b holds the address of a[0] and then char ** c = &b; c now points to the address of b, which is itself a pointer. c holds the address of b, which holds the address of a (see why people hate po...
unknown
d3875
train
I don't know what the problem was. However I've nuked everything from orbit and started over. I deleted everything except a single html file in my /home/public directory. I deleted /home/private/.npm-global. I recreated /home/private/.npm-global. I followed the steps listed in the answer to: Global Node modules not ins...
unknown
d3876
train
Can we somehow pass the type HTML input attribute value to the $_POST array or grab it anyhow else with PHP? Not per se. I am aware that I can create a hidden field and basically put the type of the real input into the value of the hidden field That is a way to do it. It seems a real shortcoming that the type of an...
unknown
d3877
train
Could it be that LFS tries to upload the new version of large file before deleting the previous one? If this is the case you need at least 1.2GB in order to update a 600MB file. To test it, you could try with a smaller test version of the zip file (about 300MB). If you are able to update it and logging in Bitbucket you...
unknown
d3878
train
First, invert the dictionary, so that you can easily look up the digit symbol for a given letter: num_code = { letter: digit for digit, letters in char_code.items() for letter in letters } Then simply use that lookup to do the mapping: word_list[:] = [num_code[letter] for letter in word_list] Which gives ...
unknown
d3879
train
There is an exception that occurs when the items are painted, but it is not reported right away. On my system (PyQt 4.5.1, Python 2.6), no exception is reported when I monkey-patch the following method: def drawItems(painter, items, options): print len(items) for idx, i in enumerate(items): print idx, i...
unknown
d3880
train
The answer is to move the call to next() under the new CallbackFilterIterator. Here's the final version: https://gist.github.com/drupol/8513c7bfdbe1ad7d66fa710f51a21b32 Thanks @jeto !
unknown
d3881
train
TC CONTACT RECIVED!!" $body = "Name: $name\nEmail: $email\nSubject: $subject\nMessage: $message" mail($to, $about, body, "From: $name <$email>") $success = "Message sent, thank you for contacting us!"; $name = $email = $message = ''; } } ?> JAVASCRIPT CODE (function($) { "use strict"; // Start of use stric...
unknown
d3882
train
But object is not updating values to database With the code from your question you are only reading data from the database (with the once() method). If you want to update the values in the database, you would need to use the update() or set() methods, depending on your exact needs.
unknown
d3883
train
The code is using a single contiguous block of memory to hold a 2-D array. char *data = (char *)malloc(rows*cols*sizeof(char)); Ok -- this line is allocating space for the entire 2-D array. The 2-D array is rows rows by cols columns. So the total number of elements is rows * cols. Then you have to multiply that by ...
unknown
d3884
train
If you add this: $element = $('.element:last-child') before appendText($element); I think will solve your problem jsFindle here: http://jsfiddle.net/733Xd/5/. Best regards! A: That is an expensive thing to do. I would advise against it for performance reasons. I did this pluggin in the beggining of last year https:/...
unknown
d3885
train
Join the table to a query that returns the maximum id for each user with type = 'good': select t.* from tablename t inner join ( select user, max(id) id from tablename where type = 'good' group by user ) tt on tt.user = t.user and tt.id <= t.id See the demo. Results: | id | user | type | amount | | --- | ---...
unknown
d3886
train
Not sure why you don't want to / can't use row_number() but here's some code that works using CROSS APPLY. First I created a table with your specification and my dummy data: DROP TABLE IF EXISTS #applicants; CREATE TABLE #applicants ( id INT PRIMARY KEY IDENTITY, [name] VARCHAR(255), [age] INT, [address...
unknown
d3887
train
For PostgreSQL, you can use ROW_NUMBER() to basically mimic the plan you have for a tempid, but all within one query: SELECT * FROM (SELECT id, subID, dataTarget, ROW_NUMBER() OVER (PARTITION BY id ORDER BY subID asc) RN FROM target ) T JOIN (SELECT id, othersubID, dataSource, ROW_NUMBER() OVER...
unknown
d3888
train
You should change your partial to <p><%= company_name(project) %><p> <p><%= summary_description(project) %><p> See the Rails documentation about this under "Rendering Collections". A: I figured out what the problem was. It was because I was using a differently-named partial to the model I was trying to render. I need...
unknown
d3889
train
Using Object.fromEntries(), you can build an array of [key, value] pairs by mapping (.map()) each key (ie: value) from a to an array of values from the same index from all the other arrays: const a = ["F", "M"]; const b = ["female", "male"]; const c = ["fa-female", "fa-male"]; const buildObj = (keys, ...values) ...
unknown
d3890
train
I don't know if this is the most efficient method, but I can't come up with something better right now. I assume this will have a terrible performance on a larger table. with userlist as ( select array_agg(t.usr_id) as users, a.address from t_table t left join unnest(t.address) as a(address) on true ...
unknown
d3891
train
Use a file search to see if the following path is valid: themes/1/
unknown
d3892
train
It is a bit unclear what you want as output. Are you looking for this: from skimage.util.shape import view_as_windows b = view_as_windows(a,(f,f,f),f).reshape(-1,f,f,f).transpose(1,2,3,0).reshape(f,f,-1) suggested by @Paul with similar result (I prefer this answer in fact): N = 8 b = a.reshape(2,N//2,2,N//2,N).transpo...
unknown
d3893
train
Your unit registrations and classes look a little off. From what I can gather, this is what you really want to do. Setup a factory that will determine at runtime which IAuthStrategy should be used: public interface IAuthStrategyFactory { IAuthStrategy GetAuthStrategy(); } public class AuthStrategyFactory : IAuthSt...
unknown
d3894
train
You can just use style 108 instead of 114 in the CONVERT function to get only the hh:mm:ss: CREATE PROCEDURE dbo.St_Proc_UpdateTimeSpent @timeEntryID int, @status int output AS BEGIN SET NOCOUNT ON; DECLARE @Date DATETIME; SET @Date = GETDATE(); UPDATE dbo.Production ...
unknown
d3895
train
Several notes: * *foreach ($rmdata[$key] as $field=>$value) is the same as foreach ($properties as $field=>$value) in this context *the whole if(isset($value)) thing can be avoided by starting that loop with if(!$value) continue; *When you select for the propid, you are selecting every row in the table, surely th...
unknown
d3896
train
Maybe that's not the exact answer to your question, but what for you want to create file with settings? Wouldn't be much easier, to use Unity3d built-in feature for saving game preferences, which also works cross-platform? If you want to give it a try, read about PlayerPrefs.
unknown
d3897
train
You need to follow redirects too: curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
unknown
d3898
train
You can just add ampersand '&' to separate each command: php script1.php & php script2.php & php script3.php ... This ampersand symbol will tell the shell to run command on background. To check the output, you can redirect it to a file: php script1.php > script1.log.txt & php script2.php > script2.log.txt And you can...
unknown
d3899
train
* *first import user service class. *then set it as a global variable inside the drool file. import com.intervest.notification.service.RadiusFilterService; global RadiusFilterService radiusFilterService; rule "your rule name" when $map : Map(); then Map $originDataMap = (Map) $map.get("originDataMap"); Long $hashVal...
unknown
d3900
train
There are really good solutions which exploit the internal btree representation of sql indices. This is based on some great research done back around 1998. Here is an example table (in mysql). CREATE TABLE `node` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `tw` int(10) unsigned ...
unknown