_id
stringlengths
2
6
text
stringlengths
4
46k
title
stringclasses
1 value
d6901
Have ng-click like this. Pass all the details necessary to navigate to your chosen state. <td class="text-left"> <a class="curosr" ng-click="navigateToDetails(x)">{{x.name}} </a> </td> And in controller, first inject $state as dependency, and then, use $state.go to navigate to the state. $scope.navigateToDetails ...
d6902
A union is just going to decrease readability of your code. And depending on how you use it will increase maintenance too. Actually the fact that you mentioned "implementing the rule of 5" despite having a std::string member suggests that your class is going to be a nightmare to maintain. I would look at these options ...
d6903
First define your tweet class: public class Tweet { public long StatusId { get; set; } public string Author { get; set; } public string Content { get; set; } } Then try this statement like this: var newTweet = new Tweet { StatusId = 2344 , Author = "@AuthorName" , Content = "this is a tweet" }; gr...
d6904
You can use QueryOver, it's a wrapper on ICriteria with Lambda Expressions: session.QueryOver<HobbyDetail>() .Fetch(hobbyDetail => hobbyDetail.HobbyMasters).Eager .TransformUsing(Transformers.DistinctRootEntity) .List();
d6905
Try this: #define RADIANS(degrees) ((degrees * M_PI) / 180.0) CGAffineTransform leftWobble = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(-5.0)); CGAffineTransform rightWobble = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(5.0)); for (UICollectionView *cell in self.gridView.visibleCells) { ...
d6906
Destructure id and spread the rest course.map( ({ id, ...item }) => ( <div id={id}> {item.foo} </div> )) A: You can't destruct an object into its an element and itself. It could be better destruct item in the callback function like below. console.log('-------Only get rest obj------'); const courses = [{ na...
d6907
First read, Performing Custom Painting and Painting in AWT and Swing to get a better understanding how painting in Swing works and how you're suppose to work with it. But I already have ... public void paint(Graphics g){ drawMenu((Graphics2D)g); } would suggest otherwise. Seriously, go read those links so you ...
d6908
Your String solution is fine and in fact quite common. If you're interested in making it more compact, you may want to use a tuple of integers. Another common method used in distributed systems is to use range allocation: have a central (singleton) server which allocates ranges in which each client can name its IDs. Su...
d6909
Is your question whether or not this is possible? Then the answer is "Yes!" -- What else would you like to know? Are there any details to your question? Specific areas you would like to concentrate on? Areas that are causing you problems? Or are you simply looking for a full solution?
d6910
You need to use views keys query parameter to get records with keys in specified set. function(doc){ emit(doc.table.id, null); } And then GET /db/_design/ddoc_name/_view/by_table_id?keys=[2,4,56] To retrieve document content in same time just add include_docs=True query parameter to your request. UPD: Probably, y...
d6911
You need to call the addItemsOnSpinner2() function when the first spinner item has got selected. public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) { addItemsOnSpinner2();} A: you are setting both spinner at the beginning of the code ( in onCreate). You should populate the second spin...
d6912
The DataGridView does not provide a SelectedDataRows and SelectedRows in not Linq-enabled, so Yes, you will have to write a foreach loop. A: A generic extension method to add "SelectedDataRows" to DataGridViews: public static T[] SelectedDataRows<T>(this DataGridView dg) where T : DataRow { T[] rows = new T[dg.Se...
d6913
getElementsByClassName returns a HTMLCollection. You must iterate it: var elements = document.getElementsByClassName("hungry-menu-item-price"); for(var i=0; i<elements.length; ++i) elements[i].textContent = elements[i].textContent.replace(".00", ""); <p class="hungry-menu-item-price">$24.00</p> A: document.get...
d6914
Automatic indenting kicked in. The easiest way to disable it is: :set paste :help paste 'paste' boolean (default off) global {not in Vi} Put Vim in Paste mode. This is useful if you want to cut or copy some text from one window and paste i...
d6915
Regarding: My question is why is DocuSign Connect not returning a signed PDF version of the docx file that was sent? DocuSign did return a PDF document to you. Your conclusion that the file was not a PDF file is not correct. The filename field is just informational, the file extension in the filename field is also no...
d6916
Have you considered a database trigger? Below example is taken from this StackExhange post: CREATE OR REPLACE FUNCTION check_number_of_row() RETURNS TRIGGER AS $body$ BEGIN IF (SELECT count(*) FROM your_table) > 10 THEN RAISE EXCEPTION 'INSERT statement exceeding maximum number of rows for this table' ...
d6917
You can get the CPU and memory usage of a process using ps. If you know the pid of the process, then a command like this will give you the percentage CPU usage and memory usage in kilobytes: ps -o pcpu,rss -p <pid> You can redirect the output of this to a file in the usual way, and do whatever you want with it. Other ...
d6918
The "advantage" of from xyz import * as opposed to other forms of import is that it imports everything (well, almost... [see (a) below] everything) from the designated module under the current module. This allows using the various objects (variables, classes, methods...) from the imported module without prefixing them...
d6919
Can you make the same query (actually, better use a different parameters, to avoid the cost of caching) and check again? The most common reason for this to take so long is that you are paying for the first time connection and establishing of the document store setup. The strange part here is that you are doing this on ...
d6920
The .map method here is requiring you to pass a function with has a parameter which is a nullable user (User?), and return a nullable user. But you have defined the parameter to be a non-nullable user. Add a ? to the type of your parameter to make it nullable. Stream<User?> get currentUser { return _firebaseAuth....
d6921
This type of plot is a stacked bar plot. To produce it most easily with ggplot2, you need to transform your data into long format, so that one column has all the counts for both male and female, and another column contains a factor variable with the labels "Male" and "Female". You can do this using tidyr::pivot_longer:...
d6922
As of Liferay 6.1 RC, the path has changed to /api/jsonws (from tunnel-web/jsonws). Most (if not all) public services should be registered by default.
d6923
As your applications are separate, essentially in the background meaning a different application ID and set of keys then merging the logins will not be possible. The authentication is based on OAuth so each application is treated as a separate resource meaning you'll need a valid token to authenticate requests against ...
d6924
Needed to add a client-config.wsdd to my project and add the following line: <transport name="jms" pivot="java:com.ibm.mq.soap.transport.jms.WMQSender"/> To override the client-config in axis.jar. I thought this was already done in this call: com.ibm.mq.soap.Register.extension(); It still complained about the connect...
d6925
It looks like you're trying to run a class compiled with Java 8 on an older version of the JVM. Is that Tanuki wrapper honouring the JAVA_HOME variable that you set? What happens if you run it without going through the wrapper? See here: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor ver...
d6926
I'm not sure is this what you mean, but I'll give it a shot: I found this hack some time ago const isDebuggingEnabled = (typeof atob !== 'undefined'); A: This seems to work for now: const debuggingEnabled = !!window.navigator.userAgent; As window.navigator.userAgent is undefined on android and ios
d6927
We are doing something similar. Our host is a .NET Framework 4.7.1 project: <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net471</TargetFramework> <IsPackable>true</IsPackable> <PlatformTarget>x86</PlatformTarget> <OutputType>Exe</OutputType> </PropertyGroup> <PropertyGr...
d6928
Before Unity starts write these lines to pass the current language into unity NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString* preferredLang = [languages objectAtIndex:0]; [[NSUserDefaults standardUserDefaults] setObject: preferredLan...
d6929
var window = window.open(url, windowName, [windowFeatures]); moidify the dom on the window object. A: Not sure if you can do it in a separate window. However, for validation you can use the window.confirm function natively build into the browsers. Here is an example: // window.confirm returns a boolean based on the...
d6930
Looking at your code, I see that you're adding your VBox to the TileGroup as follows: table.addElement(vbox); But then you're trying to remove it using removeChild(): t.parent.removeChild(t); The proper method to add/remove items to/from Spark containers is add/removeElement(): var t:IVisualElement = IVisualElement(eve...
d6931
You can get the phone number of incoming SMS in the following manner. Bundle bundle = intent.getExtras(); SmsMessage[] msgs = null; String string = ""; String phone = ""; if (bundle != null) { //---receive the SMS message-- Object[] pdus = (Object[]) bundle.get("pdus"); msgs =...
d6932
Try the short version of IF var result = cmd.Parameters["@error"].Value; message = (result == DBNull.Value) ? string.Empty : result.ToString(); or simply var result = cmd.Parameters["@error"].Value; message = (result == DBNull.Value) ? string.Empty : result.ToString(); or var result = cmd.Parameters["@error"].Value; ...
d6933
if all you need is to isolate those 2 numbers from that string try this: def parse(text): return [float(i) for i in text.split('[', 1)[1].split(']', 1)[0].split(', ')] long_lat = parse(your_string_var) EDIT: oh and to get the id something like this should do: def parse2(text): return text.split('_', 1)[1].split...
d6934
Use regex /\b[0-9]+:[0-9]+\b/. Explanation: * *\b - word boundary *[0-9]+ - 1+ digits *: - literal colon *[0-9]+ - 1+ digits *\b - word boundary I do not know your specific use in selenium, but here is an example: src = 'Media: a few minutes ago, 3:25 pm uts' pattern = re.compile(r'(\\b[0-9]+:[0-9]+\\b)') match ...
d6935
You actually can use something similar to $1: for (var i=0; i<len; i++) { var e = arr[i], //<- strings re = new RegExp(e,"ig"); target.html( target.html().replace( re, "<span class='rep'>$&</span>" ) ); //you could also have used $1 to refer to the first bac...
d6936
As so many have said - it does nothing. Why is it there? Here is a possibility … I am fed up with bad coders on my team not checking return values of functions. So, since we develop in Linux with the GCC compiler, I add __attribute__((warn_unused_result)) to the declaration of all of my typed functions. See also this...
d6937
Try adding .json to the end, like below, to get a JSON response Studio can parse. /2010-04-01/Accounts/{YourAccountSid}/Recordings/{RecordingSid}/Transcriptions.json
d6938
One idea would be to create a macro that runs when the workbook is opened and it sets the row height using the Range.RowHeight property, here: https://msdn.microsoft.com/en-us/library/office/ff193926.aspx A: If anyone ever has a similar issue, I managed to find a workaround. Instead of using SSIS I'm using SSRS where ...
d6939
If you're using Selenium with Python, you may be able to take advantage of the Page Object Model abilities of the SeleniumBase framework. Here's some code examples of that: File 1 - google_objects.py: class HomePage(object): dialog_box = '[role="dialog"] div' search_box = 'input[title="Search"]' list_box = ...
d6940
You could try if (column == "PressureChange") { if (sortDirection == "ascending") { testResults = testResults.OrderBy(t => double.Parse(t.PressureChange)); } else { testResults = testResults.OrderByDescending (t => double.Parse(t.PressureChange)); } } ... but it depe...
d6941
Well, you can also use position: fixed; bottom: 0;, which will stick the element to the bottom of the window. That means it won't even scroll with the rest of the page. When you use that for a full-width footer or the like (the most likely use case), you'd then need to add a margin to the rest of the page content so th...
d6942
@RequestMapping annotation makes controller to be initialized eagerly despite the fact that it is also annotated with @Lazy(value=true). In your case, removing @RequestMapping annotation should make the controller initialize lazily. Though I do not know if it is possible to use @RequestMapping annotation and have that ...
d6943
I have read the tutorial you give as a link. That tutorial doesn't give the full code. According to what I see the variables you mention must be defined. For SET_TIME_REQUEST_ID usually you add this at the beginning with something like that private static final int SET_TIME_REQUEST_ID = 1; because onActivityResult(int...
d6944
Try this viewController .h NSTimer *timer; viewcontroller.m timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(pollTime) userInfo:nil ...
d6945
A simple solution is to create our own widget so we overwrite the mouseDoubleClickEvent method, and you could overwrite paintEvent to draw the widget: #ifndef DOUBLECLICKEDWIDGET_H #define DOUBLECLICKEDWIDGET_H #include <QWidget> #include <QPainter> class DoubleClickedWidget : public QWidget { Q_OBJECT public: ...
d6946
The difference is the type of list you are running on. box1 is a NodeList (a.k.a a live node list) which is updated when the DOM changes. box2 is an array, which is a non-live list - so changing the DOM doesn't affect it. What happens when you iterate on box1 is that on every class toggle, the box1 list is updated, wh...
d6947
Try this instead DEMO $('input[type="checkbox"]').click(function() { ($(this).is(":checked")) ? $(this).next().hide() : $(this).next().show(); }); A: Try to hide all the divs with class div1 initially, $(".div1").hide(); $('input[type="checkbox"]').click(function() { $(this).next('.div1').toggle(!this.checke...
d6948
DarkBee's answer is good, but if your macro is in the same twig file that's calling it then you will still need to import it like so: {% import _self as my_macros %} {{ my_macros.widget_prototype(...) }} Seems a bit counter-intuitive but that's how it is. A: You need to import the macro, not include it {% import "my_...
d6949
There's only one connection there - and a command using the same connection. Both will be disposed. This is effectively: using(OleDbConnection con = new OleDbConnection(conString)) { using(OleDbCommand command = con.CreateCommand()) { } // command will be disposed here } // con will be disposed here
d6950
One error is that your checktables function corrupts your linked list structure by calling delete on one of the nodes: found = temp; delete found; // Discard What you've just done in those lines above is to have a linked list with a broken (invalid) link in it. Any functions that now t...
d6951
There are a couple of things wrong that I see right away. The primary problem you're having is a network problem--not a code problem or a Spring Social problem. Even if your network admin says you can see Facebook, the exception you show tells me otherwise. That's something you'll need to work out on your end. Once you...
d6952
Is there an ID for your snapshot.data.documents[index]? If yes, add it to the end. onTap: () { print("Tapped ${snapshot.data.documents[index]['the property you want']}"); },
d6953
Pretty sure you need this to auth: https://learn.microsoft.com/es-es/javascript/api/azure-arm-resource/subscriptionclient?view=azure-node-latest and this call to get locations: https://learn.microsoft.com/es-es/javascript/api/azure-arm-resource/locationlistresult?view=azure-node-latest Node SDK repo: https://github.com...
d6954
This question was answered on the jQuery forum It's jQuery.extend
d6955
Updated @Luca Angeletti answer for Swift 3.0.1 extension String { func image() -> UIImage? { let size = CGSize(width: 30, height: 35) UIGraphicsBeginImageContextWithOptions(size, false, 0); UIColor.white.set() let rect = CGRect(origin: CGPoint(), size: size) UIRectFill(CGRec...
d6956
In arbitrary-precision arithmetic, ball arithmetic is about twice as fast as interval arithmetic and uses half as much space. The reason is that only the center of a ball needs high precision, whereas in interval arithmetic, both endpoints need high precision. Details depend on the implementation, of course. (In practi...
d6957
Try using to_date() with concat() Spark functions from pyspark.sql.functions import concat, to_date, col, lit timestampedDf = dropnullfields3.toDF() timestampedDf = timestampedDf.withColumn("snap_timestamp", to_date(concat(col('year'), lit('-'), col('month'), lit('-'), col('day')))) timestamped4 = DynamicFrame.fromDF...
d6958
Thank you thisfeller for push to the right direction! The problem was that the default password change portlet is mentioned to be used only with password reset portlet that sends email to user etc. So I wrote my own portlet based on that reset password portlet but removed the finding of wanted user by token and instead...
d6959
You can use FlowLayoutPanel Though, you might need to set the FlowDirection to TopDown Just put those labels into the panel
d6960
IsNumeric will match things like "2E+1" (2 times ten to the power of 1, i.e. 20) as that is a number in scientific format. "0D88" is also a number according to IsNumeric because it is the double-precision (hence the "D") version of "0E88". You could use LIKE '####' to match exactly four digits (0-9). If you had more co...
d6961
Learning OOP and learning about MVC is a good idea, before getting into PHP frameworks. Straight away you will have to make design decisions about where you should put different code. If you make the mistakes early, then to improve your design you will have to go back and fix up poor mistakes. I read a nice answer rece...
d6962
You should declare String answer=""; inside doAgain function. Otherwise you will get cannot find symbol error in this line while (incorrect(answer) != false); Modify doAgain function to this public static boolean doAgain() { String answer=""; do { Scanner kb = new Scanner(System.in); // ...
d6963
Vertica is a mass data database, and it prefers more efficient joins and existence checks than correlated sub-selects - what an EXISTS predicate boils down to - and what results in a slowing-down nested loop. Put the datehired check into a LEFT JOIN predicate with a Common Table Expression - in a WITH clause. If the jo...
d6964
IMO approach is valid, make sure that APIs resource policy allows only assumed identity role to perform actions (assuming this is your use case). You can also change the authorization type to Cognito and use the Cognito user access token and scopes to authorize access. Then you do not need to manage policies, see https...
d6965
There are a few ways to solve this issue: * *Use a REDIS SENTINEL with failover capabilities. This way, if the primary REDIS instance goes down, the sentinel will automatically failover to the replica instance and your elements will not be lost. *Use a REDIS CLUSTER. This will provide you with high availability and...
d6966
Often when you stumble across a problem like this, you need to look at encapsulation rather than extension. Can't you use the MapView as a member variable? If you check out the MapView API, it states that we must implement the Android life cycle for the MapView in order for it to function properly. So, if you use a Map...
d6967
Will it just happily deallocate/reuse/etc. activities behind the scenes? Yes. Is there a way to cause the reusing of activities so that only one instance of each activity is ever allocated and is just reused for each cycle? Try FLAG_ACTIVITY_REORDER_TO_FRONT on your Intent to launch the activity. Based on ...
d6968
Try downloading the module tar zip from cpan or metacpan. Then build the module locally using any make utility(e.g.dmake). You can find more info for building module locally from here.
d6969
I think you are mistaken about the SWP_NOMOVE parameter. That parameter does not mean that the window will not be movable, it just means that the x,y parameters will be ignored during that specific call to the method SetWindowPos. The goal of that flag is to use the function SetWindowPos for changing the size of the ta...
d6970
Define an “outer” function that takes the self and the constant arguments. Inside that define an “inner” function that takes only the interactive arguments as parameters and can access self and the constant arguments from the outer scope. from ipywidgets.widgets import interact import matplotlib.pyplot as plt DEFAULT_...
d6971
couple of exemple : int[] a={1,2,4,1}; output : 2 ==> if you can see (1+2= 3 ) ,(2+4=6) so those is %3=0 ==> beacuse that the number is 2 beacuse is two subarray that giving me %3 to be =0. int[] a={3,4,4,2}; output : 2 int[] a={3,3,3,3,0,1}; output : 5 int[] a={3,2,7,6,6,1}; output : 5
d6972
About a general catch, not distinghuishing individual exceptions. You can use base class exceptions, like IOException, and drop its child exceptions, like EOFException. This is a good practice as all (possibly future) child exceptions are catched. This principle also holds for a throws IOException clause. Run time exce...
d6973
The assets directory is readonly. It's defined and initialized at compile time, you cannot add or edit its contents. Source (note it doesn't mention anything about writing to files...only reading them.) Use the SDCard for such operations. A: slote is right . use internal file storage/SD Card or sqLite database to save...
d6974
* *If you want to sort Fruit, you need to implement the Comparable interface for the Fruit class. *If you want to display attributes, have an abstract method in Fruit class and provide the implementations in the subclass. This way depending on the instance of the Fruit , it will show the corresponding properties. pu...
d6975
If you're trying to validate a string, it's simpler to do it as multiple checks. m{^[A-Za-z0-9 /-]*\z} && /[A-Za-z]/ && /[0-9]/ Those can be combined into one pattern, but I advice against it. m{^(?=.*[A-Za-z])(?=.*[0-9])[A-Za-z0-9 /-]*\z}s On the other hand, if you're trying to extract from a string, you'll need the...
d6976
You can throw an exception: throw "Help I have fallen and cannot get up"; Not exactly the same, but (in my experience) it's not too common to see exception handling in ordinary DOM-wrangling sorts of JavaScript code, so that usually will blow out of any event loop. However, it's not really the same thing as any surro...
d6977
Quick Primer to Passwords in the DB This goes to show that encryption in the database is hard, and that you shouldn't do it unless you have thought carefully through your threat model and understand what all the tradeoffs are. To be honest, I have serious doubts that an ORM can ever give you the security you need wher...
d6978
Magento calculates weight used for getting shipping rates in Mage_Sales_Model_Quote_Address_Total_Shipping::collect. When collecting shipping address totals, items are looped and their weight accumulated and then set to address object. That being said, you have to be careful how are you going to change this behavior. O...
d6979
In solution one, I misunderstood something and find a horizontal line on the bounding box, this is your desired line cordinates. import numpy as np import cv2 def get_order_points(pts): # first - top-left, # second - top-right # third - bottom-right # fourth - bottom-left rect = np.zeros((4, 2), ...
d6980
You have to set the 'employee' field in your Address class. Update the setter in your Employee class to: public void setAddresses(List<Address> addresses) { this.addresses.clear(); for (Address address: addresses) { address.setEmployee(this); this.addresses.add(address); } } A: Before saving ...
d6981
I'm not an expert in Javascript, so I may be talking nonsense. It seems like you can achieve what you want if your struct S implements the Codable protocol. Then you can transform it to a Data blob using an encoder, like this: let encoder = JSONEncoder() do { let data = try encoder.encode(s) // do what you want with ...
d6982
Click on the Filtering icon at the top right corner of the global search dialog. It seems it remembers the filters.
d6983
From http://www.w3.org/TR/css3-lists/#html4: /* The start attribute on ol elements */ ol[start] { counter-reset: list-item attr(start, integer, 1); counter-increment: list-item -1; } Adding this to the CSS allowed the start attribute to be recognized in my tests. EDIT: Instead of using the start attribute, ...
d6984
It might be to do with the context. I've had issues in the past with getApplicationContext not working for certain things, although can't remember what form the top of my head. Instead of using getApplicationContext, in the activity where you call your async task put this in the constructor call. For example, assumin...
d6985
well! well! I was able to do it using following line: Split-Path (Split-path $MyInvocation.InvocationName -Parent)
d6986
The following may not be a direct answer but a close one? set hour=%time:~0,2% if "%hour:~0,1%" == " " set datetimef=%date:~-4%_%date:~3,2%_%date:~0,2%__0%time:~1,2%_%time:~3,2%_%time:~6,2% else set datetimef=%date:~-4%_%date:~3,2%_%date:~0,2%__%time:~0,2%_%time:~3,2%_%time:~6,2% At least it may be inspiring. A: REM ...
d6987
I'm an idiot. I was doing hash_object = hashlib.sha1(pKey), but pKey is an RSA key, not a string, so I needed to do hash_object = hashlib.sha1(pKey.exportKey()) instead.
d6988
inside GeoTagTask location object is different one and also doesn't initilized. Location location; private String lat = Double.toString(location.getLatitude()); private String lng = Double.toString(location.getLongitude()); A: Problem Problem is inside GeoTagTask , Location location; private String lat =...
d6989
Ok i managed to resolve my problem. First i used StringBuilder instead of IntPtr. To add a string "COR_ENABLE_PROFILING=1\0COR_PROFILER=PROFILER_GUID\0COR_PROFILER_PATH=GetProfilerFullPat\0\0" i simply add("COR_ENABLE_PROFILING=1") and the increse the Stringbuilder lenght + 1 etc...; the end should be incremented one ...
d6990
If we use self-hosted agent, we need to configure the environment on the local machine. According to the error message, It seems that your agent machine do not have the .NETFramework 4.7.2, we should Install the .NET Framework 4.7.2 and restart the agent. A: It looks like I had to add some specificity to publish comm...
d6991
According to MySQL doc the syntax should be : INSERT IGNORE INTO messages (message, hash, date_add) VALUES('message', 'hash', NOW());
d6992
Consider using the unscanned_table_summary.sql query we provide on GitHub
d6993
It's quite hard to understand your question, but I'll have a shot: The source code in Angular projects is composed of ES modules, ie functions and variables are passed from one file to another via imports and exports. If you want to use val from test.js in some.component.ts, you might want to do that: In test.js: var v...
d6994
You need to enable imap in your php.ini. I used the wamp menu to edit the php.ini. I enabled the php_imap.dll. -> http://www.wampserver.com/phorum/read.php?2,23447,printview,page=1 A: I got the solution: I am running Windows 7 64bit environment with WAMP server, it has two php.ini files: 1] C:\wamp\bin\apache\apache...
d6995
Access to a remote Service Control Manager (SCM) is subject to OS privileges. W/o SCM privileges you cannot know what services are running, nor can you start or stop any. The required privileges are listed at Access Rights for the Service Control Manager. None of the above is in any way at all related to SQL Server sec...
d6996
[...] uses activex, objcomauto, comobj; type {$METHODINFO ON} TMySriptableClass = class(TObjectDispatch) public [...] function FnWithVarNumOfArgs(const args: OleVariant): string; [...] function TMySriptableClass.FnWithVarNumOfArgs(const args: OleVariant): string; var dispParams: activex.DISPPAR...
d6997
What would need to be done to code the program to use both processors? You need to understand how the code is spending the cpu-cycles, i.e. benchmark. Read on about simple method duration versus context-switch duration. "C++ has no notion of cores". Thus, the idea of associating a thread with a particular core is de...
d6998
To elaborate my suggestion in the comments, I would implement the following algorithm for spending points: * *Find the oldest still valid rows (say A and B) with a sum equal or larger than the required amount (X). How to select rows that sum to a certain value *If such rows do not exist, return an error. *Mark row...
d6999
This is allocating huge amounts of (wasted) memory. Since you can use decimal floating numbers to represent this number without any loss of precision, I'd do that: Note that 1 << n is equal to 2^n (pow(2, n)), so you can write: #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/cpp_dec_float.hpp...
d7000
Depending on your exact version of Apache, you may have encountered the same Apache rewrite bug that bit me: Internal URL rewrite no longer working after upgrading Apache to 2.4 See the workaround I linked to there.