How to mix numpy slices to list of indices?
Vote count: 0 I have a numpy.array, called grid, with shape: grid.shape = [N, M_1, M_2, ..., M_N] The values of N, M_1, M_2, ..., M_N are known only after initialization. For this example, let's say N=3 and M_1 = 20, M_2 = 17, M_3 = 9 I am trying to loop over this array, as follows: for indices, val...
Cannot hide message box when I close modal overlay
Vote count: 0 I'm trying to create my own modal overlay. If you don't know what that is, it is an effect where you if you activate a certain element by clicking on it an black opaque overlay will show up on your screen, and usually a message box will be in the center of the overlay. I think I have s...
Assign a returned array from a function to a variable in c
Vote count: 0 I'm having trouble assigning a character array retu ed from a function to a variable in main. char *read(char filename[]) { int i = 0; am = 0; char line[80]; char *record[100]; FILE *infile; infile = fopen(filename, "r"); while (fgets(line, sizeof line, infile) != NULL) { record[i] = s...
How does python do list slices and modification on the LHS?
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 ...
having problems with marker cluster on mobile phones?
Vote count: 0 I am using google maps V3 which working well on computer - but on mobile phone the marker cluster is not working correctly issues are on page load the map displays OK and shows clusters - i then click and its split the icons correctly - if i then click again on cluster to split again -...
SQL Query is slow when order by statement added
Vote count: 1 I have a table [Documents] with the following fields Name (string) Status (string) DateCreated [datetime] This table is around 1 million records. All three of these columns have an index (a single index for each one) When I run this query: select top 50 * from [Documents] where (Name =...
How to split a string on another string with space characters?
Vote count: 0 I'm having troubles with splitting a String with another String that has space characters in. Example: "Team 1 vs Team 2" I would like to split on " vs " (note the blank spaces before and after the vs). I tried "\svs\s", " vs ", "\s vs \s" but it does not work. asked 4 mins agoTiago Si...
Rest-API V2 How to load specifiv Posts by ID?
Vote count: 0 I am using $.ajax({ url: 'http://localhost/wordpress-dev/mi/wp-json/wp/v2/cpt/', type: "GET", dataType: "json", }); to load posts of a custom post type. I have an array with ids and i need to modify the url to load only the posts with this ids. How is this possible? something like: url...
Override MVC form submit in js, but then override that
Vote count: 0 I have a view that has a delete button on it that makes a form in each row of the table @using (Html.BeginForm("Delete", "FP/WorkItem", new { fId = Model.FPId, workId = @w.FId })) { <input name="deleteWorkItem" type="submit" value="Delete" class="btn btn-default" onclick="retu confirm(...
Performance degradation on reading .txt files in Swift
Vote count: 0 I have a text file filled with numbers and reading the content of file as follows func arrayFromContentsOfFileWithName(fileName: String) -> [String]? { guard let path = NSBundle.mainBundle().pathForResource(fileName, ofType: "txt") else { retu nil } do { let content = try String(conten...
Javascript / Php content locking issue
Vote count: 0 I have a page on my website which id like to lock down the content to an article with a survey, I have added the JS survey script in the header of the page as instructed but it seems to be doing nothing asked 56 secs agoCosmin George Let's block ads! (Why?)
Matlab sim command called from c# with MLApp
Vote count: 0 I am using the matlab COM object to automate matlab/simulink from c#. It works to read and write from workspace or to call functions. But the SIM command to run a Simulink model does not work. What could be the problem for this? Thanks in advance, Andreas asked 41 secs agoAndreas Bitte...
Getting current class
Vote count: 0 how can I get the current class in Kotlin. For example if there are the abstract class "Animal" and the child-class "Dog" (witch is a child of "Animal") how can I get the class of "Dog" in "Animal". I don't now witch classes will use "Animal" I already tried to use: this::class (what c...
How do I remove a key completely from Database
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 v...