М.Б.

2

votes
1

answer
12

views

Training and evaluating accuracies different in keras LSTM model: why does evaluation not produce same results as during training?

We are building an LSTM for modeling a physical optical procees. So far, I have produced the following code in python using Keras with Tensorflow backend. #Define model model = Sequential() model.add(LSTM(128, batch_size=BATCH_SIZE, input_shape=(train_x.shape[1],train_x.shape[2]), return_sequences=...
M B
1

votes
1

answer
177

views

Function array_rand() doesn't work [PHP] [closed]

I have array: Array ( [0] => 1 [2] => 3 [3] => 4 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 [10] => 11 [11] => 12 [12] => 13 [13] => 14 [14] => 15 [15] => 16 [16] => 17 [17] => 18 [18] => 19 [20] => 21 [21] => 22 [22] => 23 ) I want to draw a number array_rand() $rand_array = array_rand($new_arr...
M. B.
1

votes
1

answer
451

views

Divide a graph into same size disjoint sets with minimum cut

Is there any algorithm or code that divide graph nodes into two or more disjoint sets that satisfy following conditions: first, only edges allowed to remove. second, edges are weighted and those that would be removed must has minimum weight(minimum cut algorithm). third,desired disjoint sets have sa...
m b
1

votes
1

answer
623

views

AutoMapper: passing 2 elements to the resolution context

I am using AutoMapper to retreive an Order object. For the price, I resolve using an extension method of the object and I need to pass in a PriceType and a Markup for the calculation. Currently, I have it working for just PriceType //in the mapping .ForMember(d => d.TotalPrice, opt => opt.ResolveUsi...
M B
1

votes
4

answer
760

views

change backlight brightness in linux with python

I'm working on a python project which should be able to control my backlight brightness. I working with Ubuntu 17.04 and I already locate where the file is that show my backlight brightness /sys/class/backlight/acpi_video0/brightness the command that I can use in the bash terminal to change the valu...
Harm M-B
0

votes
0

answer
6

views

Unable to set private key

I have a certificate in .pem and .cer format. It has only certificate but not RSA private key within it. something like shown below ------BEGIN CERTIFICATE---------------------- gvhfgvdshjgchjbdhbcdcd --------END CERTIFICATE---------------------- when i execute this command in curl , it fails with t...
Aiyappa M B
0

votes
0

answer
8

views

Elastic Search start after run my other services

Guys i got a little trouble with the docker-compose when I started the Elastic Search service. I need to wait the elastic search start and be able to receive the request, but it take a long time to do it. So here is my docker-compose file. I wanna start the other services when the ES start. version:...
1

votes
1

answer
2.8k

views

How to generate code coverage reports for Android unit tests

I'd like to start generating unit test code coverage reports for my Android application, where the unit tests are not in the androidTest folder, but in a test folder that I've created. To start, I've added the following to my build.gradle file: buildTypes { ... debug { debuggable true testCoverageEn...
M B
1

votes
1

answer
336

views

Backbone PUT request to cross domain is not appending id to URL

I have the following backbone model. var aModel = Backbone.Model.extend({ url: 'http://api.site1.com/list }); modelObj = new aModel(); Domain of my application is product.site1.com, so all the request made to server by my application are cross domain requests. All my backbone requests to the API nee...
Sreedhar M B
4

votes
1

answer
56

views

How do I create 5 JQuery AJAX calls using eventhandlers?

I am developing a registry system for my school/workplace, and the instructors need a thorough list of the students who fall into 5 seperate categories: Have not met and have not registered abscence Have not met but registered abscence after 8 am Have not met but registered abscence before 8 am Hav...
1

votes
3

answer
2.5k

views

How to implement map function of Mongodb cursor in node.js (node-mondodb-native)

I am trying to implement following MongoDB query in NodeJS db.tvseries.find({}).map(function(doc){ var userHasSubscribed = false; doc.followers && doc.followers.forEach(function(follower) { if(follower.$id == 'abc') { userHasSubscribed = true; } }); var followers = doc.followers && doc.followers.map...
Sreedhar M B
5

votes
5

answer
8.6k

views

Zoom Camera2 Preview using TextureView

i have a Problem with my Preview Zoom for the Camera2 API. I am using a TextureView. I want to zoom only the preview Stream that was showed in the TextureView. I want to zoom the Area where i use the Zoom Gesture. I use the SimpleOnScaleGestureListener! I added following Code. The zoomingFactor and...
m.b.
2

votes
1

answer
360

views

managing two libraries with cabal that depend on each other

I've got the following question: I've got two Haskell libraries that depend on each other, and both libraries are managed by cabal. The corresponding cabal files look like this: Library 1: name: Lib1 version: 0.1 cabal-version: >=1.2 build-type: Simple author: Matthias...
M.B.
3

votes
1

answer
817

views

Mysql, Check field value change?

Mysql, Check field value change? if change the value then show different value table: a id size name -------------- 1 500 abc 2 200 bcd 3 400 xyz 4 500 bbb 5 200 aaa select @s:[email protected]+1 as index, id, size, name from a,(SELECT @s:= 0) AS s order by size; In this query data like. ind...
M.B Kakadiya
3

votes
1

answer
192

views

what does (filter (\y -> not(x == y)) xs) mean?

I'm trying to work out how to remove duplicates from a list in haskell. I found the answer below to my problem... type Regist = [String] type ListRe = [Regist] rmDup :: ListRe -> ListRe rmDup [] = [] rmDup (x:xs) = x : rmDup (filter (\y -> not(x == y)) xs) on stackoverflow but I don't understand wha...
Jake M-B
2

votes
1

answer
1.5k

views

c# tools for named entities recognizer

I am looking for a simple but 'good enough' Named Entity Recognition tool (nlp tool) or library for C#, I am looking to process name entities in medical domains. Any recommendations? Thanks.
M.B
2

votes
2

answer
5.7k

views

How to solve “undeclared selector 'forwardGeocoderDidFail:withErrorMessage” warning?

How do I solve this warning? The warning is 'undeclared selector 'forwardGeocoderDidFail:withErrorMessage:''. Why am I getting this warning, and how can I solve it? This is my code: if (!handeledByBlocks && self.delegate) { if (!parseError && parser.statusCode == G_GEO_SUCCESS) { [self.delegate forw...
M.B Kakadiya
2

votes
2

answer
1.4k

views

JSON parse in iphone Application [duplicate]

This question already has an answer here: iPhone/iOS JSON parsing tutorial [closed] 6 answers I am new in iphone development. I want to use parse with Json framework in my iphone application. Can anybody provide me guideline or a good tutorial link .Thanks
M.B
4

votes
5

answer
3.2k

views

How to save unique image name in document directory

In my ios app i am stuck on a task. I need to take pic from camera and save it on document directory.Problem is that i want save unique name of image.I was try to add current time with a name. but there are length problem to save image.Please suggest me how can i do that task. Thanks
M.B
12

votes
5

answer
28.7k

views

How to use rounded corner label in iphone, UILabel Round Corners

I am using some labels in a view. I want to make rounded corner label in my iphone application. I use following code to do this but it's not work. I got have some errors to use that properties. label.layer.borderColor = [UIColor blueColor].CGColor; label.layer.borderWidth = 4.0; label.layer.cornerRa...
M.B
3

votes
1

answer
3.2k

views

Sencha touch app generate issue in Mac OS

I am working start on sencha touch.I have mac os.I have download sencha-touch-2.2.1-commercial.zip and SenchaCmd-3.1.2.342-osx. I have extract and download both of pkg.Now when I try to generate app using following command its gives errors.Please any body help me to resolve these issue. Thanks :) i...
M.B
6

votes
2

answer
1.4k

views

What is the official way to install Haskell Platform 2014, from source, on Red Hat?

I am trying to install Haskell Platform 2014.2.0.0 from source on Red Hat Enterprise Linux 6.5. I have a functional install of Haskell Platform 2012.4.0.0 and GHC 7.4.2 from two years ago, plus a recently-installed Haskell Platform 2013.2.0.0 and GHC 7.6.3 from JustHub. I've built GHC 7.8.3 from so...
M B
2

votes
3

answer
41

views

jquery - Changing styling of a class containing a particular child class

I want the height of .pst to be increased if it contains a child class .pa , the code below doesn't work, and if i use '.pst' instead of this keyword all the div elements with .pst changes. Help! window.onload = function() { if($('.pst').contents().find('.pa').length !=0){ $(this).css('height','+=2...
M B
3

votes
4

answer
286

views

Linq to Sql - Incorrect syntax by keyword 'IS'

I am trying to order my query by null values on one column and then by another column as seen in this post. _ctx.Leads.Include(a => a.LeadAttachments) .Where(s => s.Name.ToLower().StartsWith(filter)) .OrderBy(a=>a.AcceptedOn.HasValue) .ThenByDescending(a => a.AssignedOn) .Skip(offSet) .Take(12) .ToL...
M B
1

votes
2

answer
841

views

How can I use Google Search in my C# project?

i build mini Question Answering System in C#. I need retrieve document by google Search. What is google tools name, i can use it in my project? Thanks
M.B
2

votes
0

answer
519

views

XCode showing issues in wrong source code line

I am using XCode 6.1.1 and Swift. When I compile my source code and receive compilation errors the first source code line is associated with all errors and painted red, instead of the line on which the error has been detected. Has someone experienced something similar? Is there a solution to show th...
M.B.
7

votes
4

answer
712

views

Using an html “data-” attribute

Consider a line such as this: Now, suppose it's expanded to be something more like this: There's no functional difference here yet, but this is my question. I'm looking for a way to pass the value of 'data-something' to the DoSomething function instead of the id. I can't seem to find a method of...
m b
2

votes
1

answer
157

views

simplest mergesort implementation in Python, having type troubles

I wrote a simple mergesort implementation for learning purpose, but it doesen't work. Even if I go through the code step by step, I don't know why the type problem arises. Here is my code: def mergesort(seq): if len(seq)
m b
2

votes
1

answer
4k

views

Angular Bootstrap datepicker - date disabled

I have an AngularUI Bootstrap calendar with a disabledDates function This is the function: $scope.disabledDates = function (date, mode) { if ($scope.daysAvailable != null) { return mode === 'day' && $scope.daysAvailable.indexOf(date.getDay() + 1) == -1; } } $scope.daysAvailable is loaded from the se...
M B
1

votes
2

answer
321

views

POSIX thread, passing multiple arguments to function with a struct

So I've spent the last few hours trying to google and figure out what is wrong with my code but I couldn't figure out. I'm a student and I just started learning about threads etc so this is all brand new to me and I'm not very experienced. Answers on google (and on here) were usually answers to one...
M B
2

votes
1

answer
308

views

Symfony2 - UniqueEntity not working ignoreNull with two fields

Symfony2 - UniqueEntity not working ignoreNull with to fields // src/AppBundle/Entity/Service.php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Entity * @UniqueEntity( * fields={'host', 'port'}, * error...
M.B Kakadiya
4

votes
2

answer
14.9k

views

Streaming video over HTTP in IOS

I am am working on my app.which have requirement play video on iPhone by server. I have a video link http://www.cwtmedia.se/cwtvideo.mp4 . Can any body suggest me how i perform this on MPMoviePlayerController.I am using this code for that but its not working. enter code here NSURL *url = [NSURL fil...
M.B
7

votes
4

answer
6.8k

views

Convert UIWebview contents to a UIImage when the webview is larger than the screen

Very similar to this question (and also this answer), I'm trying to make an UIImage out from a webview. So far I'm using the code suggested in the answer, specifically: UIGraphicsBeginImageContext(webview.bounds.size); [webview.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image =...
m b
2

votes
1

answer
696

views

Reorder SVG elements created by RaphaelJS?

Lets assume I create two Raphael elements and attach to single div element in the DOM. eg: http://jsfiddle.net/sreedharmb/ApnwB/2/ append demo var paper = Raphael('sample-1', 200, 75); var paper1 = Raphael('sample-1', 200, 75); var rect = paper.rect(10, 10, 50, 50); var rect1 = paper1.rect(10, 10, 5...
Sreedhar M B
2

votes
0

answer
660

views

SSRS ramdomly stops working

Hopefully someone has seen this. When I google I see this error back in 2009/2010 with SQL Server 2008, but nothing recent. I also don't see any solutions that work. I'm using IIS8, SQL Server 2014, Reporting Services 2014. Reports will be working fine, then they just stop. I don't see any patter...
D-M-B
5

votes
1

answer
261

views

pass simple java array to primitive c-array swig

i want to pass a simple java array to c. At the moment i do it with the following .i File. %module example %include 'arrays_java.i' %include 'example.h' %{ #include 'example.h' %} with the arrays_java.i header java arrays was accepted. But it make a full copy of the array and this is to slow for me...
m.b.
2

votes
2

answer
57

views

Unable to create array of inner class [duplicate]

This question already has an answer here: Create array of inner class object in a different class 2 answers I am a beginner in java. I want to create array of inner class in class other than outer class. But I can't as compiler shows error '(' expected. Help. Tree test = new Tree(); Tree.Node[] A =...
K.M.B
2

votes
2

answer
963

views

phppgadmin 5.1 Misc has a deprecated constructor

10 minute ago I tried to connect with phppgadmin 5.1 but i found this error message on web server error log : ' Misc has a deprecated constructor in /usr/share/phppgadmin/classes/Misc.php on line 8' Phppgadmin is out of work. I use php 7.0. Someone knows how to fix it? Thanks so much.
M.B.
2

votes
2

answer
33

views

Convert input() to array in python

I have input() in which must be typed something like this: [[('Zamek', 2), ('Polonez', 7), ('Wojska Polskiego', 12), ('Słowiańska', 17), ('Solidarności', 21)], [('Zamek', 10), ('Polonez', 15), ('Wojska Polskiego', 21), ('Słowiańska', 24), ('Solidarności', 28)], [('Zamek', 17), ('Polonez', 22),...
M. B.
1

votes
3

answer
451

views

Python script works on linux but not on windows, I'm really desperate

Please help me, I'm really desperate and I don't know what to do. So we had that assignment in university to program dijkstra's algorithm in python. INVALID_NODE = -1 #Define the initial variables to -1 and a very high number. INFINITY = 1000000 #A = 0, B = 1, C = 2, D = 3, E = 4, F = 5, G...
M B

View additional