Vote count: 0 how do you compare each element of a list and print out the higher value at each index? use def compare_list(my_list1, my_list2) asked 43 secs agoEmily Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have this code var info = $($(r).find(".BuyPriceBox")).find(".PurchaseButton").data(); which I am trying to change into the JavaScript equivalent I can't find anything that would resemble ".data()" in JavaScript? Could anyone help me with this, and if kind enough help me translate it to JavaScript? asked 1 min agojoseph michael Let's block ads! بخوانید...
ادامه مطلبVote count: 0 how fast is lines search, if I want use text document as database, how fast this way to find certain line in 5000 lines for example asked 1 min agoL_Oni Let's block ads! بخوانید...
ادامه مطلبVote count: 0 For a project I want to use sympy to construct and compute the maximum likelihood of a gaussian distribution for a discrete number of data points. The method I follow can be found at mathworld. But I ran into trouble when I attempted to use an array in a symbolic expression with Product and/or Sum. Below is a simplified version of my earlier attempts. In notebook in Anaconda's Yupyter, I create a python array, say x: N = 10 x = range(N) And I want to use x in a symbolic expression in sympy as follows: from sympy import *, Symbol i = Symbol('i', integer=True) mu = Symbol('mu') s = Sum( (x[i]-mu)**2, (i, 0, N-1)) But this doesn't work, because evaluating the cell results in: Type...
ادامه مطلبVote count: 0 How to load this big size hadoop file? I need to load some files from hadoop to local USB. One file in a directory is strange, it only has a name "-", and the size of it is over 45G. I first use "hadoop fs -get" to get the data to local linux VM, and then use WinSCP to load the data to local USB. But my local Linux VM's capacity is only 19G. How to do this? I am thinking about splitting the 45G file to smaller files using hadoop command. But I have not found such command. asked 5 mins agouser89119 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am using Laravel 5.2.I would want to record file's downloading,there are 3 tables:users , files , download_records , users id name password email 1 Jim ****** Jim@example.com 2 Charles ****** Charles@example.com files id file_path 1 /var/www/uploads/001.jpg 2 /var/www/uploads/002.doc download_records id file_id user_id download_time 1 2 1 2016-04-15 09:00:00 2 1 2 2016-04-15 09:10:00 when a file is downloaded by someone, a record will be added in download_records,the question is:How to know a file is downloaded successfully? asked 3 mins agozwl1619 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to save selected color in $scope.color. Index.html: What is your favourite colour?...
ادامه مطلبVote count: 0 I am working on an Android v22 code. For some reason the List View simply doesn't show up and I have been trying but caot figure out why. There are no errors. Just a blank screen. I have tried debugging it and it goes smoothly upto the last line allianceActivityList.setAdapter(adapter); At that point, hitting F7 takes me inside the ListView.java file, in the code public void setAdapter(ListAdapter adapter) { if (mAdapter != null && mDataSetObserver != null) { mAdapter.unregisterDataSetObserver(mDataSetObserver); } I did notice that 'mAdapter' and 'mDataSetObserver' were both highlighted in red. But I don't know if it's normal behaviour. The code in Main activity that calls list...
ادامه مطلبVote count: 0 I need to be able to extract these fields from this json entry: sender: Hostname mem:used_p cpu: user_p load: load_5 // {"senderDateTimeStamp":"2016-04-07T00:00:00.0093","senderHost":"server1","senderAppcode":"test_infrastats_prod","senderUsecase":"system","destinationTopic":"test_serverstats_realtimedata_topic_prod","correlatedRecord":false,"needCorrelationCacheCleanup":false,"needCorrelation":false,"correlationAttributes":null,"correlationRecordCount":0,"correlateTimeWindowInMills":0,"lastCorrelationRecord":false,"realtimeESStorage":true,"receiverDateTimeStamp":1460001606277,"payloadData":{"timestamp":"2016-04-07T00:00:00.093","sender":{"name":"server1","hostname":"server1"},...
ادامه مطلبVote count: 0 Using SpriteKit in Xcode projects, I am able to use the update function to update everything I need to in between frames. e.g. override func update(currentTime: CFTimeInterval) { /* Called before each frame is rendered */ } How can I do the same thing in Xcode Playground? I do not think that this is a duplication of NSTimer.scheduledTimerWithTimeInterval in Swift Playground edited 1 min agoEric D asked 4 mins agogingrrr Let's block ads! بخوانید...
ادامه مطلبVote count: 0 this validation page doesn't show error and doesn't redirect to the home page. I check if it reach the verifying from the databse and it works fine but doesn't redirect the page so I think that the problem is with "$user = $req->fetch()" help plz if(isset($_POST['login'])){ $useame = $_POST['useame']; $password = $_POST['password']; $pc = md5($password); $req = $pdo->prepare('SELECT * FROM users WHERE nom= :useame AND pass= :password'); $req->execute(array( 'useame' => $useame, 'password' => $pc, )); if ($user = $req->fetch()) { $_SESSION['auth'] = $user; header("location:home.php"); exit(); } else{ echo" alert('LE NOM D UTILISATEUR OU LE MOTS DE PASSE INCORRECTE')"; } asked 19...
ادامه مطلبVote count: 0 I'm trying to display a .tiff image in an android app and it looks like .tiffs are not supported. The number one recommendation people have been recommending is to use Tiffonandroid (a google code project). Is there a basic way to incorporate a separate .apk file into an android app? I've tried to find resources online, but have come up dry. If that it more complicated then I'm imagining it being does anyone know of any .tiff converters or view libraries that would also work? asked 54 secs agocatharsis23 Let's block ads! بخوانید...
ادامه مطلبVote count: -1 I want to split amounts with the split function in JavaScript. Possible inputs are: 10,256,326.26 10.269,69 100 What I want to achieve is by doing the split is getting the numeric values in an array, like: [10,256,326,26] [10,269,69] [100] Which regex can I use for this? asked 39 secs agoJonas Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How to print the square root symbol like picture in wpf ? Please help me a solution ? asked 42 secs agoMR.LB Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I know how thew syntax works for this, but I would like to know the process of how python replaces and alters the list on the left hand side. Ex. L = [0, 1, 2, 3, 4] L[0:2] = [5] print L #L is now [5, 2, 3, 4] So how does python go about the process above? This may be very unclear and I apologize in advance. Thank you. asked 2 mins agoSpegooterCode Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to completely remove a vehicle from geoFire, but when I run this: @Override public void onKeyExited(String key) { // Remove any old marker Marker marker = this.markers.get(key); if (marker != null) { marker.remove(); this.markers.remove(key); } } It is removed from the current view, but when I refresh the location, the vehicle is there. asked 3 mins agoMeir Let's block ads! بخوانید...
ادامه مطلبVote count: 0 List allServer = new List(); List alldatabases = new List(); allServer.Add(new SelectListItem() { Text = "Please Select DataBase...", Value = "", Selected = true }); System.Data.Sql.SqlDataSourceEnumerator instance = System.Data.Sql.SqlDataSourceEnumerator.Instance; System.Data.DataTable dt = instance.GetDataSources(); List ddlInstances = new List(); foreach (DataRow dr in dt.Rows) { ServerCoection Co; Co = new ServerCoection(); Co.ServerInstance = string.Concat(dr["ServerName"], "\", dr["InstanceName"]); allServer.Add(new SelectListItem() { Text = Co.ServerInstance, Value = Co.ServerInstance, Selected = true }); Server Ser = new Server(Co); foreach (Database db in Ser.Database...
ادامه مطلبVote count: 0 Context: I'm trying to write some JavaScript that is being injected into a certain webpage. Think something to the likes of Grease Monkey / Tamper Monkey scripts. (Except I've created a chrome extension) The current webpage is an inteal application, that is rendered via GWT. I don't have access to the code. It's basically a news feed type system, I'm wanting to enable the use of markdown in the feed posts when the extension is enabled/installed. Problem: The page seems to render in multiple phases. All the exteal scrips get attached After about 10 - 15 seconds, the rest of the DOM objects get dynamically created via JavaScript. The problem with this is, my script needs to wait ...
ادامه مطلبVote count: 0 I am currently using: Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Process.Start("C:Program Files (x86)SteamsteamappscommonArma 3Arma3.exe") End Sub The problem with this is that it launches the game but doesnt coect to the server I want to. I also tried: steam://coect/216.52.148.114:2302 But it doesnt detect the game it is ruing on. (Arma 3) Help please! asked 1 min agoNitro Let's block ads! بخوانید...
ادامه مطلبVote count: 0 For example I have one binary array with size of 9 as b = [0 1 0 1 0 1 1 1 1], Then another array 'm' with size of 7 as m = [21 28 36 45 45 66 66]. Here i want to change all the zeros of 'b' by 1st element of m then replace 1's of b by consecutive elements of 'm' so my output 1D array should be like k = [21 28 21 36 21 45 45 66 66]. Below is my code i really don't know where i did mistake please help me to solve this b= [0 1 0 1 0 1 1 1 1]; b=b(:); m = [21 28 36 45 45 66 66]; m = m(:); k=zeros(size(b)); for i=1:length(b) for j=2:length(m) if b(i)==0 k(i)=m(1); else k(i)=m(j); end end end am getting output as k = [21 66 21 66 21 66 66 66 66] asked 1 min agoNisha Haby Let's block...
ادامه مطلب