(Swift) How would one check if a specific index of an array was empty?
◷
تاریخ انتشار: 1395/3/12 | ساعت: 5:54
Vote count: 0 var array:[Int] = [] var index = 5 if array[index] == nil { array[index] = 1 } Currently Xcode states that an int can not take the value of nil. So this code doesn't work. Is there any way to produce the same effect or verifying if a specific index is empty? asked 2 mins agojaems Let's...
Windows Explorer: self implemented Overlay Icons do not work
◷
تاریخ انتشار: 1395/3/12 | ساعت: 5:54
Vote count: 0 I'm trying to simply display some overlay icons in the Windows Explorer. Since I'm relatively new to programming for Windows (I just have some experience in Mac programming), I used this article to start. So this is my code: Icon.h #pragma once #include "resource.h" #include "ExplorerS...
Trying to build a matrix with a loop in python
◷
تاریخ انتشار: 1395/3/12 | ساعت: 5:54
Vote count: 0 I am trying to create a matrix with that is 8 by 3. For each row I want the three values to be the results of the trigonometric functions described in my code below. The problem is that I keep getting an error saying that the list index is out of range. I don't understand why it is say...
Android studio run app not working : Could not initialize class org.jetbrains.android.inspections.lint.IntellijLintIssueRegistry
◷
تاریخ انتشار: 1395/3/12 | ساعت: 4:44
Vote count: 0 I am using Android Studio 2.1.1 and gradle version is 2.1.0, project is ru ing on buildToolsVersion "23.0.3". I moment ago studio was working fine. Then i added a image file from "new" - "Image asset" and cleaned project. Studio somehow crashed and restarted. From that moment on i am g...
How to undo canvas antialiasing?
◷
تاریخ انتشار: 1395/3/12 | ساعت: 4:44
Vote count: 0 I draw some rectangles and then erase and redraw them to simulate movement to the right. However canvas antialiasing makes them leave traces and I don't want to redraw the entire canvas. Here's what I'm talking about And here is the code for that: var canvas = document.getElementById("...
How to avoid using all RAM by mongodb?
◷
تاریخ انتشار: 1395/3/12 | ساعت: 4:44
Vote count: 0 During mongodb index creation machine becomes very slow. "Top" command shows that mongodb uses 98% of RAM. I have closed ssh session and after that I can't login by ssh anymore. asked 1 min agokz_sergey Let's block ads! (Why?)
Getting no output when using json_encode on an array
◷
تاریخ انتشار: 1395/3/12 | ساعت: 3:01
Vote count: 0 My $output array looks like this Array ( [0] => Array ( [country] => Abkhazia [capital] => Sukhumi ) [1] => Array ( [country] => Afghanistan [capital] => Kabul ) [2] => Array ( [country] => Akrotiri and Dhekelia [capital] => Episkopi Cantonment ) [3] => Array ( [country] => Albania [ca...
microdoft bot How to send message in telegram
◷
تاریخ انتشار: 1395/3/12 | ساعت: 3:01
Vote count: 0 var co ector = new Co ectorClient(); List<Cha elAccount> participants = new List<Cha elAccount>(); var tBot = new Cha elAccount { Cha elId = "telegram", Address = "9digit", IsBot = true, Id = "salodkid_bot", Name = "salodkid_bot" }; participants.Add(tBot); var tUser = new Cha elAccount...
Angularjs $http post promise
◷
تاریخ انتشار: 1395/3/12 | ساعت: 3:01
Vote count: -1 I try to use the promise respond from a $http.post, to get back the new ID of the record as integer and use it for the next $http.post. I used How do I retu the response from an asynchronous call? for help but it still don´t work. var streckenId; var trackpunktId; var getStreckeID = f...
php does not echo inside an isset($_POST['###'])
◷
تاریخ انتشار: 1395/3/12 | ساعت: 1:25
Vote count: 0 All, I have a situation where php does not echo inside my isset code. Does anyone know why not? I have confirmed that 'my_id' is coming into the isset block of code by emailing it to myself I use ajax to post the my_id to the same php file where it is captured by the isset <?php if(iss...
jQuery/Bootstrap : dropdown-toggle is not setting the selected menu item as default selected item
◷
تاریخ انتشار: 1395/3/12 | ساعت: 1:25
Vote count: 0 I have a bootstrap dropdown but i am not able to set the selected menu item as default selected dropdown item? <div class="dropdown"> <button class="btn dropdown-toggle" type="button" id="drpDownCat" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> Select a Category<sp...
jQuery slice from specific phrase in string
◷
تاریخ انتشار: 1395/3/12 | ساعت: 1:25
Vote count: 0 I am displaying some rss content from a vbulletin feed. The retu ed xml is structured like so: "entries":[{"title":"Article Title","link":"http://www.foo.com","author":"","publishedDate":"","contentSnippet":"Forum: forum titlenPosted By: somebodynPost Time: 05-29-2016 at 04:27 PM","con...
Calculate similarity between one sparse vector and matrix
◷
تاریخ انتشار: 1395/3/12 | ساعت: 0:12
Vote count: 0 How to calculate the (e.g., cosine) similarity between one sparse vector and a matrix (i.e., an array of sparse vectors)? Is this possible using scikit-lea , scipy, numpy, etc.? If possible, the similarity metric should be easily changeable. asked 6 mins agoMaVe Let's block ads! (Why?)
How to use SharedPreferences value to fill EditText?
◷
تاریخ انتشار: 1395/3/12 | ساعت: 0:12
Vote count: 0 I'd like to know how to fill EditText field with the values of SharedPreferences. My code is as follows: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolba...
failed to load resource , the server responded with a status of 500(internal server error) and failed to parse SourceMap
◷
تاریخ انتشار: 1395/3/12 | ساعت: 0:12
Vote count: 0 This is the server.js file var express = require('express'); var app = express(); var mongoose = require('mongoose'); var bodyParser = require('body-parser'); app.use(bodyParser.json()); mongoose.co ect("mongodb://localhost/test"); var todoschema = new mongoose.Schema ({ name : {type: ...
RealmSwift: issue whilst saving relationship objects with primary key
◷
تاریخ انتشار: 1395/3/11 | ساعت: 22:40
Vote count: 0 I'm trying out Realm and ObjectMapper. I have these two models: class User : Object, Mappable { override class func primaryKey() -> String { retu "id" } dynamic var id : String [...] func mapping(_ map: Map) { id <- map["id"] } } class Media, Object, Mappable { override class func prim...
Getting image id from SQL dataBase ind setting it in imageView( Android)
◷
تاریخ انتشار: 1395/3/11 | ساعت: 22:40
Vote count: 0 I want to get image id from sql database and put it in imageView through RecyclerViewAdapter . Unfortunately I have got no luck until now. -once I tried to put the ids in an array and getting number of array from database and calling the related array, but app force closed. -another ti...
Button/Link to disable meta http-equiv redirect
◷
تاریخ انتشار: 1395/3/11 | ساعت: 22:40
Vote count: 0 I am trying to add a button or link somewhere on the webpage that would disable the <meta> http-equiv redirect in the document head. If I am honest, I have no idea how to go about doing this. If it helps, I am using Bootstrap 3.3.6 I would appreciate if anyone could help me achieve thi...
Node app staging fails at Installing App Management stage
◷
تاریخ انتشار: 1395/3/11 | ساعت: 21:38
Vote count: 0 I've been trying to push a new build of an app to Bluemix, but staging keeps failing when it's at "Installing App Management" because it can't create regular files and directories due to the disk quota being exceeded. I've already tried pushing it with "-k 2G", but it it still fails. I...
Issue in getting previously created Session object with the atmosphere request with latest 9.3.0 release of Jetty
◷
تاریخ انتشار: 1395/3/11 | ساعت: 21:38
Vote count: 0 Issue in getting previsouly created HttpSession with Atmosphere request I have already verified following solution, sending cookie in header with JSESSIONID: Solution was to send the cookie in header with JSESSIONID. It was going as 'set-cookie' instead of 'cookie' asked 1 min agoJyoti...