id
stringlengths
5
11
text
stringlengths
0
146k
title
stringclasses
1 value
doc_23521700
I used an unique index on the table field, and when an new request comes, I used try catch to do with it. I think it is not good. @RestController public class UserController { @Autowired private UserService userService; @RequestMapping("query/{id}") public String query(@PathVariable int id){ re...
doc_23521701
MyObject obj = new MyObject(); WeakReference<MyObject> weak = new WeakReference<>(obj); obj = null; if (weak.get() == null) { System.out.println("OK."); } else { System.out.println("STILL ALIVE!!"); } The obj instance is eligible for Garbage Collection after the obj = null expression. However, weak.get() will...
doc_23521702
I always end with fatal error C1107: could not find assembly 'platform.winmd': please specify the assembly search path using /AI or by setting the LIBPATH environment variable [C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\winsearch.vcxproj] My CMAKELISTS.txt looks like: cmake_minimum_required(VERSI...
doc_23521703
template<typename ... Ts> void myvisit(variant<Ts...> v) { size_t N = std::variant_size<decltype(v)>::value; for (int i=0;i<N;++i) //try to iterate variadic pack { using T = decltype(get<i>(v)); if (holds_alternative<T>(v)) { cout<< get<T>(v); break; ...
doc_23521704
The error : Failed to load resource: net::ERR_CONNECTION_REFUSED http://xxx.xxx.xxx.xxx:8080/socket.io/socket.io.js Uncaught ReferenceError: io is not defined the code : server: var http = require('http'); var fs = require('fs'); var io = require('socket.io'); var server = http.createServer(function(req,r...
doc_23521705
In mongodb I have the following data: { "_id": 10001, "university": "SPYU", "Courses": [ "English", "French" ], "dept": [ "Literature" ], "type": [ "Autonomous" ], "status": "ACTIVE", "isMarked": tru...
doc_23521706
For our decoder, I am currently using a ByteToMessageDecoder as follows: public class MqttMessageDecoder extends ByteToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { if (in.readableBytes() < 2) { return; }...
doc_23521707
Thank you. Here is my attempt to use AJAX. I am unable to loop over the geoJSON structure. Not sure what i ma doing wrong. AJAX and javascript is still kind of foreign to me. <!DOCTYPE html> <html> <head> <p id="demo">coordinates</p> </br> <p id="coords">coordinates</p> <style> html, body, #map_canvas { mar...
doc_23521708
private byte[] excessData; public bool receiveMessage(ref string recvStr, string daddy = "") { recvStr = ""; CSocket_PacketProtocol packprot = new CSocket_PacketProtocol(0, this); WriteDebugWithTimestamp("receiveMessage obtaining client NetworkStream - daddy = " + daddy); NetworkStream nStream = client...
doc_23521709
I was wondering, how can I build a class like UIImagePickerController, which takes input from user and returns the data to parent class? Note that the view is also handled by this class. A: This is a perfect example of a delegate pattern. You create the object, assign a delegate. The object allows user interaction. Wh...
doc_23521710
A: JAuthTools as far as I'm aware isn't actively maintained anymore, and was for Joomla! 1.5. The last SSO integration we did was with JMapMyLDAP and it seemed to work pretty well and it's last update was less than a month ago.
doc_23521711
So I think the way to do this would be to hard-code the assign to value in the url behind this link, but I have no idea if this is possible or if there is an easier/better way to do this. Any advice would be appreciated as I'm a complete beginner. thanks. A: I will not cover "How to modify the contents of an eamil al...
doc_23521712
import numpy as np f=np.matrix("1 2; 3 4 ; 5 6") Is retrieving number of column which have maximum sum of column from matrix possible? How? A: You could write: >>> f.sum(axis=0).argmax() 1 So column 1 sums to the greatest value. To clarify what this does: f.sum(axis=0) sums the columns of the matrix f, returning...
doc_23521713
http://xxxx.xxx.com/bu/PSCLA/Document_3/LA%20Sites/Rio/Site%20OP%20Strategy/Master%20Data%20Audit%20Hair%20Care%20Rio%20Plant/MRP%201-4%20and%20WS%20POSS.xlsx I need download and store this file in my personal computer using a WinForm application created in VS 2013, Framework .Net 4.0. Exists some method to achieve thi...
doc_23521714
ability model class Ability include CanCan::Ability def initialize(user) return if user.nil? #non logged in user can use this. if user.broker? can [:index, :create, :read, :update, :new, :edit], [Order, Customer], :admin_user_id => user.id.to_s can :read, [OrderCategory, O...
doc_23521715
The database column is type (SQL) 'date'. I can manually change the "string RptDate" to "DateTime RptDate" and it works perfectly, but as soon as I make changes to the Dataset it regenerates the Designer code, overwriting my changes. Any ideas on how to force the parameter to be of a specific type? // this is system g...
doc_23521716
{type: 'reference', value: 'owner'}, {type: 'physical', value: 'pending'}, {type: 'document', value: 'pending'} ] How to return object in such a way which should have unique key which store mulpltiple values Expected Result = var data = { physical...
doc_23521717
I then went to Startbootstrap to try out one of the templates in the Laravel framework. I created a view for top bar of one of the templates by copying only the HTML, included http://mysite/js/bootstrap.js and http://mysite/css/bootstrap.css according to the guide, but when I rendered it on the browser (Firefox), I saw...
doc_23521718
I would like to press some button with id (1,2,3,4...) and dynamicaly (with ajax) search in my db some stuff who are related with those ids. My javascript code : appP08.controls.btnZone.on('click', function(){ var ZoneID = $(this).attr('id'); var ZoneName = $(this).text(); alert(ZoneID); ...
doc_23521719
I've noticed that in the database that the "webpages_Membership" table has a column named "PasswordSalt". After creating a few new user accounts, this column always remains blank. So I'm assuming that no password salt (not even a default one) is in use. Obviously this is not the best practice, however I cannot seem to ...
doc_23521720
I'm not getting deserialize this json in vb.net. I need the values lat : -21.4105261 and lng : -42.1956855. { "results" : [ { "address_components" : [ { "long_name" : "28460-000", "short_name" : "28460-000", "types" : [ "postal_code" ] ...
doc_23521721
ursl.py path('accounts/register/', MyRegisterFormView.as_view(), name="register"), forms.py class Register(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User fields = ['username', 'email', 'password1', 'password2'] views.py class MyRegisterFormView(FormView): form_class = Re...
doc_23521722
[https://javascript.info/url][1] Here's my user defined function: use database ...; use schema ...; create or replace procedure sc_test() RETURNS varchar LANGUAGE javascript execute as owner as $$ var url = new URL('http://myurl.com'); result = url.protocol; return result; $$ ...
doc_23521723
I tried this: Add files from Dropzone to form but when I make the request, my server doesn't recognize it as an input file field $.ajax({ url: args.url, data: formData, /*I want the file inside this formData */ success: function(data){ }, error: function() { } }...
doc_23521724
User: id | name ------------- 1 | 'John' 2 | 'Peter' 3 | 'Luke' Accounts: id | userid | amount | date -------------------------- 1 | 1 | 1000 | '2012-01-26' 2 | 1 | 2000 | '2011-12-25' 3 | 1 | 1000 | '2012-01-25' 4 | 2 | 1500 | '2012-01-15' 5 | 3 | 2500 | '2011-11-30' I need...
doc_23521725
df<-as.data.frame(matrix(rexp(200, rate=.1), ncol=10)) colnames(df)<-c("one","two","three","four","five","six","seven","eight","nine","ten") df df.new<-as.data.frame(matrix(rexp(155, rate=.1), ncol=8)) colnames(df.new)<-c("one.two","one.two.new","three.two","three.two.new","five.one","five.one.new","seven.two","s...
doc_23521726
C:\Oracle\Middleware\Oracle_Home\oracle_common\jdk\bin\javaw.exe -server -classpath C:\JDeveloper\mywork\Java_Hello_World.adf;C:\JDeveloper\mywork\Java_Hello_World\Client\classes;C:\Users\ADMIN\Downloads\jsch-0.1.53.jar -Djavax.net.ssl.trustStore=C:\Users\IBM_AD~1\AppData\Local\Temp\trustStore5840796204189742395.j...
doc_23521727
My questions is a bit vague, and I could find what I am needing. Would I just use the window size jquery? or an if.. else... statement? Here is my code. <script type="text/javascript"> $.vegas('slideshow', { backgrounds:[ { src:'img/familyoutsidehome5-dark.jpg', fade:1000 }, { src:'img/familyoutsidehome3-dark.jpg',...
doc_23521728
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</tit...
doc_23521729
* *When I make a request to pull a page using CURLOPT_RETURNTRANSFER => true,d I know I can view the page pulled by just echoing the curl_exec() result. My questions is when I echo the result, is the pages content like images downloaded at that time of viewing, or is all the content grabbed once the request is made ...
doc_23521730
Is there any way to print runtime std::cout messages on console AND then we can catch those messages in electron app using node.js How does node.js runs native module, does it run it on the same thread as a sandboxed program or on a different thread?. A: std::cout console messages do get printed to the console in ...
doc_23521731
curl -u "DOMAIN\login:password" smb://fs/january/soft curl: (56) Failure when receiving data from the peer curl -u "DOMAIN\login:password" smb://fs/january/soft/ curl: (56) Failure when receiving data from the peer If I try to get the file then everything will be okay: curl -u "DOMAIN\login:password" smb://fs/january...
doc_23521732
I want to use stack navigator while not logged, then tabnavigator in sıgnIn Page const AppNavigator=createStackNavigator({ SıgnIn:{screen:SıgnIn}, Welcome:{screen:Welcome}, SıgnUp:{screen:SıgnUp}, ForgetPassword:{screen:ForgetPassword}, }); Its My App.js export default class App extends Component { ...
doc_23521733
When you click on user John Smith in user_id 2 It should go to the url www.example.com/John-Smith-2 profile.php?uid=2 When you click on user Kia Dull in user_id 3 It should go to the url www.example.com/Kia-Dull profile.php?uid=3 Table Users User_id First_name last_name 1 John Smith 2 ...
doc_23521734
for example I have the following xml <mynode xmlns:b2t=".."></mynode> And I want ta add one more namespace for example xmlns:b3t="" in order to get an xml like this <mynode xmlns:b2t=".." xmlns:b3t=".."></mynode> A: XQuery Update provides no means to add namespace declarations in an existing document. However, names...
doc_23521735
* *When passing a returnUrl from a view to all nested views. In the view I have @{ TempData["returnURL"] = Request.Url.AbsoluteUri; } and then access it in a similar way to this (in my real version I check that the key is in TempData and that the returnURL is a real URL): return Redirect(TempData["returnURL"].To...
doc_23521736
SET @CN := (SELECT CONSTRAINT_NAME FROM information_schema.KEY_COLUMN_USAGE WHERE table_name = 'inventory' and referenced_table_name='product_code' and referenced_column_name='shipping_code'); ALTER TABLE inventory DROP FOREIGN KEY @CN; It is correctly getting the contraint name. However it complains about the va...
doc_23521737
I believe packet sniffing tools can be used to capture the password if using HTTP, so would it be better to hash it on the client side? A: Would it be better to hash it on the client side? No, don't hash username/password on the client side, it doesn't make any sense. If the web application is using HTTPS, the regist...
doc_23521738
void traverse(BT t) { if (t == null){ return; } System.out.print(t); traverse(t.left); traverse(t.right); } That doesn't compile for some reason. I think the problem is with the rest of my code. Here's the entire code: class ZOrep extends TreeAndRepresenta...
doc_23521739
Question is what would be the best way to dynamically update authorities? I would like to update it per request, now I just doing it once after user login into the system. I have manager based application, so admin could decide what user could do at any time, and remove/add roles. Problem with this approach that user ...
doc_23521740
For i = 1 To LastRow If Cells(i, 1).Value = "Tube1" Then Val1 = Worksheets("Sheet1").Cells(i, 2).Value Val2 = Worksheets("Sheet2").Cells(i, 2).Value I want the code to find the word "tube" in all the cell in Excel sheet but it can only be until 30.Assume that the keyword here is "Tube". The path name ...
doc_23521741
let myBaseArray = [ { myPropArray: ["s1", "s2"], someOtherProp: "randomString1" }, { myPropArray: ["s2", "s3"], someOtherProp: "randomString2" } ] What I need is to take all arrays under this property and to merge them all in one array, without duplicates (in JavaScript)...
doc_23521742
A: (Spyder dev here) This is not possible right now, sorry. There are two options we are considering for the future: * *Adding Emacs keybindings to our editor pane. *Adding a Qt widget that emulates a real terminal, where users can start Emacs and then use it as their editor. Perhaps option 2 is the best one but I...
doc_23521743
[{"key1": value1, "key2": "value2", "key3": "value3", "key4": "value4"}, {"key1": value1, "key2": "value2", "key3": "value3", "key4": "value4"}] Is there a way to expand this column to get something like this: key1 key2 key3 key4 value1 value2 value3 value4 value1 value2 value3 value4 Note: ke...
doc_23521744
A: Yes, you can. You can specify a "time" field value for every point you want to write to influx. Like this: json_body = [ { "measurement": "cpu_load_short", "tags": { "host": "server01", "region": "us-west" }, "time": "2009-11-10T23:00:00Z", "fields...
doc_23521745
I have manged to configure the npm config using following commands: npm config set proxy http://username:password@host:port npm config set https-proxy http://username:password@host:port And it seems package has been downloaded however I am still getting following error: Failed to fetch package metadata for 'jupyterlab...
doc_23521746
Any suggestions?
doc_23521747
How can I POST the term to the search script instead of GET? A: You'll need to supply a function as the source for the plugin and have your function do the AJAX post to the server to get the matching data. A: You need to specify callback function for the source parameter. Here is an example: http://jqueryui.com/demos...
doc_23521748
the following equation: %Given: Rs=0.5; V=0:1.5:35; I=exp(V+RsI)+(V+RsI); A: If you just need the graph, you don't need to solve the equation, you can use ezplot to plot implicit equations. If you need to solve it specifically over that range you can use fzero inside a for loop, BUT, I think you don't have your equati...
doc_23521749
To create the integration between two pages, I'm willing to implement the localStorage solution, but despite that, I've successfuly created the localStorage items in the index.html, I just can't access the data in comunidade.html page. I already accessed the Devtools and perceived that the index.html page could persist...
doc_23521750
extern void A(); Now I compile and link them as follows nvcc -c -o A.o A.cu gcc -o test_A test_A.c A.o /opt/cuda-4.0/cuda/lib64/libcudart.so and I get error like undefined reference to `A' What am I missing? A: The problem is probably C++ name mangling. CUDA code is compiled with a C++ compiler, not a C comp...
doc_23521751
SELECT TO_CHAR (ADD_MONTHS (start_date, LEVEL - 1), 'fmMonth') months_namE FROM (SELECT DATE '2012-01-01' start_date, DATE '2012-03-25' end_date FROM DUAL) CONNECT BY LEVEL <= MONTHS_BETWEEN (TRUNC (end_date, 'MM'), TRUNC (start_date, 'MM')) ...
doc_23521752
And the most important property it should have: the order of insertions. Each time I iterate over it, it should return elements in the order they were inserted. We can think other way: a queue which guarantees the uniqueness of elements. But I don't want to pop elements, instead I want to iterate over them just like we...
doc_23521753
{ "file/folder": "/Shared/Salesforce/asdf.txt" } ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^---that is my problem Note that the field name has a forward slash, which is invalid for C# when used as a field name. (Newtownsoft does automatic mappings between JSON names and C# fields) The code I have is JsonSerial...
doc_23521754
The following shows the flow of commits for one regular development release which ended up needing a hotfix. Master has the majority of commits as development is happening all the time. UAT and Prod only have commits that represent code promotions. When a hotfix is needed, we merge from prod to hotfix, make the change ...
doc_23521755
class Foo { private final ExecutorService executor; public Foo(ExecutorService executor) { this.executor = executor; } public void doSomething() { executor.execute(() -> {/* Do important task */}); } } Can I gain better performance if instead of passing ThreadPoolExecutor in const...
doc_23521756
Normal SandboxChanged 13m (x42200 over 13h) kubelet, k8s-master Pod sandbox changed, it will be killed and re-created. Warning FailedCreatePodSandBox 3m (x42687 over 13h) kubelet, k8s-master Failed create pod sandbox. I checked my cni interface and found the following: cni0: flags=4163<UP,BROADCAST,R...
doc_23521757
public class User { [Column, Nullable] public string Username { get; set; } [Column, Nullable] public string Status { get; set; } [Column, Nullable] public bool Expired { get; set; } } public class UserRepository : IUserRepository { public IQueryable<User> Get(IDataContext context) { using ...
doc_23521758
I have a server Linux RedHat 8.6 with Apache, MySQL, Flask. I can access to portalweb from a remote terminal, but when I try execute any instruction, for example access to DB en the same server I receive the next error: Thu Feb 09 10:02:29.722504 2023] [wsgi:error] [pid 16853:tid 140337299535616] [remote 192.168.0.5:60...
doc_23521759
{ "presets": ["react", "es2015"] } and I added a build script to my package.json file: { "name": "my-module", "devDependencies": { "babel-cli": "^6.1.4", "babel-preset-es2015": "^6.1.4", "babel-preset-react": "^6.1.4" }, "scripts": { "build": "babel assets/scripts/main.jsx --out-file assets/s...
doc_23521760
<script async="async" src="//...application-123456.js"></script> Additionally, we have a lot of third party scripts that (1) are asynchronously loaded, and (2) create in turn an async <script> tag where a bigger script is called. Just to give an example, one of these third party scripts is Google's gpt.js (you can have...
doc_23521761
public static void main( String[] args ) { System.out.println(Locale.getDefault()); File f = new File("/Users/johngoering/Documents"); File[] fs = f.listFiles(); for (File ff : fs) { System.out.println(ff.getName()); System.out.println(ff.exists()); } } In my Documents folder I have...
doc_23521762
// Expression being setup Expression<Func<UserBinding, bool>> testExpression = binding => binding.User.Username == "Testing Framework"; // Setup of what expression to look for. this.bindingManager.Setup( c => c.GetUserBinding(It.Is<Expression<Func<UserBinding, bool>>> (criteria => criteria == testExpres...
doc_23521763
So, I just added the scrollIntoView in the component componentDidUpdate() lifecycle method : componentDidUpdate() { console.log("scroll"); this.refs.input.scrollIntoView(); } The only problem is that this component does not re render each time (as nothing change in it) so the scrollIntoVIew is called only one ...
doc_23521764
I have a xml file with the size of 36 MB and with 900k lines. On some nodes it has a lot of html markup and some invalid markup like <Obs><p> <jantes -="" .="" 22.000="" apenas="" exclusive="" kms.="" leve="" liga="" o=""> </jantes></p> I've tried different ways to clean this file but only one way is able to perform...
doc_23521765
Example of the rule: (house|mall|building) I want to mark the found string for making the result easier to read. Example of the result I want: New record: Two New York houses under contract for nearly $5 million each. New record: Two New York @house@s under contract for nearly $5 million each. I know I can find the lo...
doc_23521766
Connection string used in web.config file is Client run fortify tools which find vulnerability in code for above mentioned code they mentioned like that there is insecure transport database in connection string. In c# normal sql server connectivity we can resolve it by passing encrypt=true and TrustServerCertifica...
doc_23521767
Example: public static void factory(String name) { // An example of an implmentation I would need, this obviously doesn't work return new name.CreateClass(); } Thanks! Joel A: You may take a look at Reflection: import java.awt.Rectangle; public class SampleNoArg { public static void main(String[] args...
doc_23521768
According to the page on material-ui-pickers regarding localization it gives an example on how to localize the date picker. But no luck trying that example: import React from "react"; import ReactDOM from "react-dom"; import { KeyboardDatePicker, MuiPickersUtilsProvider } from "@material-ui/pickers"; // import dayj...
doc_23521769
import random import asyncio from aiohttp import ClientSession import csv headers =[] def extractsites(file): sites = [] readfile = open(file, "r") reader = csv.reader(readfile, delimiter=",") raw = list(reader) for a in raw: sites.append((a[1])) return sites async def bound_fetch(sem,...
doc_23521770
When I run the program, the window displays the old text values instead of the new text values. The form displays the new font color on the labels. There seems to be no occurrences of the old text value in the source code. Where is the old text value still hiding? I clean the solution and rebuild it, but nothing chan...
doc_23521771
render() { return html` <div class="table"> <div id="col"> <p>testing this component</p> </div> </div>` through the below constructor I'm calling a resize handler: constructor() { super(); window.addEventListener('resize', this._handleResize); } the handleresize metho...
doc_23521772
http://www.codeproject.com/KB/linq/LINQtoCSV.aspx However, I have question, and posted it on the link above, but it seems that the author is not upgrading the lib, and there is no reply to my question. My question is: Using LINQtoCSV (or other library), how to export dynamic number of fields in a class public class Dyn...
doc_23521773
I’m aware there are a huge number of variables here but I’m interested in how others go about getting a sense of rough order of magnitude. This is simply a costing exercise early in a project lifecycle before any specific design has been created so not a lot of info to go on at this stage. The question I’ve had put for...
doc_23521774
The following code works nicely on Android, IOS, Chrome and IE9 where the user can touch (or mousedown) and drag the contents left or right. On WP7 (Mango) all that happens is the original touch seems to highlight the item containing DIV, but any movement is ignored. Content Slider Sample <!DOCTYPE html> <html class="...
doc_23521775
Now every product group has an add button of his own: If one add button was pressed, I have a problem identifying which one was pressed. * *If I connect the add button with a seque, the function prepareForSeque(...) delivers a sender of type UIBarButtomItem, but there is no connection to the header cell from were ...
doc_23521776
Is there is a way that I can put '/' into it between day/month/year? A: Hope this will help you. You are receiving the default date format, store the 'get_field' value in any variable as displayed below: <?php $date_value = get_field('field_name'); echo date('d/m/Y',strtotime($date_value)); ?>
doc_23521777
Shop.includes(:opening_times).where("opening_times.day =?", 'Sunday') Is there any way to get a list of all the shops that are closed on Sundays? That is, all the shops that are not associated with a record where the day column is 'Sunday'? I asked this question here and accepted an answer. However, now my database is...
doc_23521778
To select the images another Activity will start where they can scroll and select which images they would like, with a maximum of 6 images. However, after scrolling through a full page and selecting 6 images to pass to the client Activity, I experience an Out Of Memory Exception. How can I clear the memory before star...
doc_23521779
I.e. for the same piece of code, would it say "June" when viewing it on an English PC and the German equivalent when viewing it on a German PC? I am not too familiar with this I must admit. I guess CalendarPopup(); is used? A: JavaScript does not have a native method that derives the localised names for days & months...
doc_23521780
A minimum viable reproduction is the following: main.py: import argparse import sys def get_subparser_a_1(p): p.add_argument('arg_a1_1', help='Second sublevel argument arg_a1_1.') def get_subparser_a(p): subparsers = p.add_subparsers(dest='sublevel 2') a_1 = subparsers.add_parser('1', description='Second suble...
doc_23521781
case when number = '12' and status = 'y' then cost end as [price] from tblx i got the results from the above query, i want to use the value of price column, again in case statement of the same query as like below select *, case when number = '12' and status = 'y' then cost-500 end as [price], case when price = 24 the...
doc_23521782
Template parse errors: The pipe 'currency' could not be found. But when I try to run the ng serve it does works as expected I've tried to build it with the --prod flag, and it doesn't work. If I remove the production flag, it builds correctly. A: In order to use pipes, you first need add pipe to your module declarat...
doc_23521783
The filter will check values for the specified (hardcoded) key. Object (only pseudocode to avoid too much code): MasterRecord{ MasterName string, AdditionalAttributes SerializableDictionary } Below is my current simple filter using MasterName(string): public string Filter { get { ...
doc_23521784
trying to figure out what this error is TypeError: 'module' object is not callable A: The problem is that you try to use chrome() function but it is in fact a sub-module, what you want to do is call the Chrome() function (notice the capital letter), so your code would look like this: path = "C:\Program Files (x86)\Com...
doc_23521785
If I have Matrix A= n*m and average=mean(A). How I can possible to plot all the value in matrix (there will be n points) and a Average at the same figure in Matlab?? Anyone has the solution?? --------------------- QUESTION I want to plot my data for PCA. For ex/ I have 100*50 matrix. Im now sure, but may be we...
doc_23521786
How can I get unittest to tell me the particular method which failed? Meaning: how can I get unittest to print to stdout the particular parameters which caused the failure of the assert? Any advice greatly appreciated. Thanks A: You can pass assertEqual a third argument (technically fourth if you count self), which is...
doc_23521787
iris0 <- iris iris1 <- cbind(log(iris[,1:4]),iris[5]) iris2 <- cbind(sqrt(iris[,1:4]),iris[5]) I want to create a list object containing the density distributions of all numerical attributes in iris, for each of these three datasets. (So, in total 4 attributes for each of 3 datasets: 12 density plots in one list objec...
doc_23521788
Size = raw_input('Size Number: ') if Size=='4': sizenumber = '530', elif Size=='4.5': sizenumber = '540', elif Size=='5': sizenumber = '550', elif Size=='5.5': sizenumber = '560', elif Size=='6': sizenumber = '570', elif Size=='6.5': sizenumber = '580', elif Size=='7': sizenumber = '590', el...
doc_23521789
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '<ul>%3$s</ul>' ) ); ?> It return me exactly what I need but it puts different classes on <ul> and <li> within the menu. What I need is exactly as follows: <ul> <li class="active"><a href="index.html">Home</a> ...
doc_23521790
longPress = UILongPressGestureRecognizer(target: self, action: #selector(handleLongGesture)) longPress.minimumPressDuration = 0.25 collectionview.addGestureRecognizer(longPress) How to remove long gesture? A: Find the cell and list of gestures added to the cell and remove the one you want .. let cell:UICollectionVi...
doc_23521791
The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe. So, after some googling, I came upon the solution that I needed to remove that directory from my Path, on Environment Variables. This did not solve anything, the message still showed up, and now: 'javac' is not recognized as an internal or e...
doc_23521792
This is what I have tried to clean the column: df.total[df.total == 'Grand Total:'] = '0' df["total"].str.replace(',','').str.replace('Rs.','').str.replace('₹','').astype(float) df.head(10) Gives the following error: ~\anaconda3\lib\site-packages\pandas\core\dtypes\cast.py in astype_nansafe(arr, dtype, copy, skipna) ...
doc_23521793
I've tried deallocating UIWebView using all possible solutions from here and other stackoverflow posts, but none of them worked. I am also clearing NSUrlCache after each request and set cache limits to 0, but still without any effect. Using memory profiler I was able to get stacktrace of method responsible for leak. D...
doc_23521794
I used the following code <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/shape_my"> <stroke android:width="2dp" android:dashWidth="20dp" android:dashGap="20dp" android:color="#c1c1c1" /> <padding android:bottom="20dp" an...
doc_23521795
EDIT: I tried converting pixels to DPI that way: public CreatorView(Context c) { super(c); this.c=c; WindowManager wm = (WindowManager) c.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); this.screenw= display.getWidth(); this.screenh=display.getHeight(); ...
doc_23521796
mysql_query("UPDATE members INNER JOIN forum_banners ON members.id = forum_banners.userid SET members.beta = '1' WHERE forum_banners.bebeta = '1' OR forum_banners.bibeta = '1' OR forum_banners.cbeta = '1' OR forum_banners.wbeta = '1'") or die(mysql_error()); That's w...
doc_23521797
I've tried to use the [((UITabBarController *)(self.parentViewController))setSelectedIndex:index]; method. But it doesn't work. Any suggestions?
doc_23521798
import {select, selectAll} as d3 from 'd3-selection' d3.select(...) d3.selectAll(...) Is it possible? I want to keep the usual code syntax of d3.function in my code, but also import only the symbols I need. A: You can perform that in two lines of code import {select, selectAll} from 'd3-selection'; const d3 = {sele...
doc_23521799
Just, why FB?! I had a dev account, create a FB app, and set the "Test" role to the test account, but after 2 success streaming broadcasts the account was blocked. Now I can't create FB account anymore because my phone number is blacklist due to the number of accounts linked to it. How can I solve it? It's really, real...