demo demo

0

votes
0

answer
3

views

How to manually lock redis cache by key?

I have multiple workers. Each of them can process some command. This command takes data from db and update it. Commands workers take from the queue. In queue can appear same commands for same object. If this happens and 2 workers take same commands at same time, some of them can work with not latest...
demo
1

votes
2

answer
2.8k

views

Check if time is the same with Moment.js

How to check if time is the same for Moment objects with different dates? For example I have object like const endDate = moment().add(30, 'days').endOf('day'); and I want to check if some moment object is endOf day. private isEndOfDay(dateTime: string) { const m = moment().endOf('day'); return m.is...
demo
1

votes
1

answer
30

views

What is difference between “duration” and “offset” in MIDI files?

I'm using 'music21' library to process MIDI files. Unfortunately, the provided documentation is not so clear for ones who don't understand much about how music is composed. What is the difference between 'duration' and 'offset'? For what I understand, the first note/chord have offset 0.0, and let's...
demo
0

votes
0

answer
3

views

Analysing the residual normal probability plot

It's very basic question. I want to analyze the standardized residuals of the Linear Regression model. So I did the residual normal probability plot as following: model = LinearRegression(fit_intercept=True) x = df.temp x = np.asarray(x).reshape(-1, 1) model.fit(x, df.RH) y_predicted = model.predict...
demo
1

votes
1

answer
32

views

Why does this model have two activations?

I do not understand why code below has both activation layer and activation parameter? What is the point of having linear activation and then LeakyReLU? And finally, does the loss function act on the last layer or after the last layer is activated? fashion_model = Sequential() fashion_model.add(Conv...
demo
1

votes
1

answer
50

views

How to make x += (1 - x) correctly works based on delta time?

Let's say that Time.deltatime can be used to get the real time between the code's update. So, if I have a sum and I want to make it works based on real-time I would make this: x += 1; Into this: x += 1 * Time.deltatime; My question is: how could I do the same thing with this piece of code: x += (1 -...
Lucas Demo
1

votes
0

answer
265

views

PUT request method not working retrofit 2 android

All request method is working fine, but PUT request method is never successful. Its working perfectly in 'Postman' with same parameters. My request calling interface @Multipart @PUT('api/v1/user/{id}/') Call updateUserProfile( @Header('Authorization') String token, @Path('id') int user_id, @Part('n...
demo_Ashif
1

votes
1

answer
135

views

Save RichTextBox content containing both images and custom token elements

Struggling with how to successfully save and load my System.Windows.Controls.RichTextBox content containing all of the following: formatted text, images, custom type-defined token elements, custom dynamic token elements. By token elements I mean my custom classes inheriting from System.Windows.Docum...
Demo
1

votes
0

answer
96

views

Always getting failed to resolve support-v4

I work in both machine (mac and windows). and android studio in both machine is configured similarly. In mac same code is working perfectly but in windows am getting always build error 'Failed to resolve support-v4'. Am stuck here and need solution. I have removed support repository using sdk manage...
demo_Ashif
1

votes
0

answer
20

views

say “Is setOnInsert functions helps to insert a new field to existing document?”

I have tried to insert a new field to existing document in my collection.I have used 'setOnInsert' method and 'upsert:'true'.Even though it's not working.Can anyone solve this problem? Thanks in advance... async function doupdate(name){ const result=await CoursesList.findOneAndUpdate({name:name},{...
demo developers
1

votes
1

answer
198

views

npm test command is not running?

Hi everyone I'm beginner in nodejs .I want to test some basic functionality in my code.I m using JEST testing framework.In the command prompt I used npm test I could not test my code it shows npm ERR! Test failed. Can anyone solve this issue? Thanks in advance... lib.test.js: const lib=require('.....
demo developers
1

votes
0

answer
24

views

Handle data from POST requests in NodeJS

Let's say I have in my code: $.post('addUser.js', { 'name': 'John' }) What should I put in this addUser.js file to handle the post request? whenIReceivePOSTRequest((data) => console.log(data))
demo
1

votes
1

answer
104

views

Trigger after insert not working correctly after multiple inserts

I have a trigger that is fired after insert. It triggers a stored procedure that updates column IsLast in table CompanyStatus Id | CompanyId | Status | DateCreated | IsLast This stored procedure should set 1 in IsLast column for record with largest Id. CREATE PROCEDURE [dbo].[spCompanyStatusAfterIn...
demo
1

votes
1

answer
681

views

How to access a property of a custom class using Linq to Object?

I have a custom class as follows public class LogFiles { private string _fileName; private string _path; private string _logStatus; public LogFiles(string FName, string Path) { this._path = Path; this._fileName = FName; } // the below two properties are mapped from DB entities public str...
demo_user
1

votes
1

answer
37

views

in htaccess first folder is not working with dashes

I have URL like this: http://example.com/apple_a/ I am using this rule: RewriteEngine On RewriteRule ^([^_]*)-+(.*)$ $1_$2 [L,NC] this is replacing other URL's like http://example.com/apple/a_a/a_b to 'http://example.com/apple/a-a/a-b' (underscore with dashes) but when I write '_' in first directo...
NarolaInfotech Demo
1

votes
2

answer
120

views

Clone collection containing another collection

I have a class, which contains a collection field (pets). This field contains other collections, which again contain objects. I want to create a deepcopy of one of this class' object. I have read about using copy constructors, which seem to be way more comfortable than using the Cloneable interface...
DeMo
1

votes
1

answer
1.8k

views

Css Filter for Different Browsers

I have css which works for Web-Kit browsers (case when alt-text is displayed): .image { -webkit-filter: grayscale(100%) brightness(2) opacity(0.5);} But i need support of other browsers like FireFox, Opera, IE8+ So i try to get expected result using next css updates: .image { -webkit-filter:...
demo
1

votes
1

answer
94

views

Wrong output format with re.sub

I expect this code to print 'ez_setup.py' instead it printed 'ez_setup\x01'. Please can someone point me in the right direction. In [7]: url = 'http://sourceforge.net/p/mysql-python/mysqldb-2/ci/default/tree/ez_setup.py?format=raw' In [8]: url_split = url.split('/') In [9]: for item in url_split: .....
demo.b
1

votes
1

answer
49

views

Grid system using Bootstrap 3

I have next html: Date: Parent or Guardian Name: Email: Address: It's render some form for contact (part of form). And result looks like I want to skip somehow space that still exists in row ( i use col-md-3 for label and col-md-4 for input. As result just 7 of 12.) I try with offset and push bu...
demo
1

votes
5

answer
4.7k

views

How to Convert HTML String to the Formatted String in Objective C

I am using the following code it just eliminating the HTML tags but does not format string. How to format as it is shown in Html. -(NSString *)convertHTML:(NSString *)html { NSScanner *myScanner; NSString *text = nil; myScanner = [NSScanner scannerWithString:html]; while ([myScanner isAtEnd] == NO)...
Demo Ashish
1

votes
1

answer
168

views

Check if field contains any item from collection in LinqToSql

I have next query var query = (from titles in db.Titles join ratings in db.Ratings on titles.Rating equals ratings.Rating1 join synopsis in db.Synopsis on titles.Certificate equals synopsis.Certificate into items from item in items.DefaultIfEmpty() where titles.Rating_Release_Date >= DateTime.Parse(...
demo
1

votes
2

answer
323

views

Avoiding double instance of activity in android

I've done a simple content based application. App always launch with splash screen. After 3 sec it goes to MainActivity from SpalshActivity. But am facing a problem. If i press back button when app showing splash screen and again launch the app from device app list then app start normally but then I...
demo_Ashif
1

votes
1

answer
125

views

InnerHtml of div is always empty

I have next html : If you operate a service that connects to the internet and intend to collect any... On Server side i try to get InnerHTML of div with id divInternet: var q1Text = divInternet.InnerHtml; but always q1Text is empty. I try to add attribute runat='server' to inner p but it throws exce...
demo
1

votes
1

answer
349

views

Fonts and images are not found in release mode

I have web application with some content (images, fonts etc.). I tried to see how it works in Release mode and all layout crash cause fonts and images are 'Not Found'. What can be cause of this behaviour and how to fix it? What i found - My images are in folder Content/images/. In debug mode applic...
demo
1

votes
1

answer
818

views

Draw images on evey touch co-ordinats Of Imageview

I want to draw small circular images at every point where user touches existing Image-view in android.And want to handle the click of every small ploted image.Right now I am trying to draw circluar image on ImageView but its not working for me. Here is my code : dimension of sj image is 900 X 600 p...
demo demo
1

votes
1

answer
930

views

add multiple buttons dynamically inside Grid-view

Can any one tell me the approach to set number of buttons dynamically in Grid-View items.I mean,Suppose i am having the grid-view(consist of categories of different products) of 3X3 and when i click on its first item i get the list of buttons of its sub-product inside grid-view first time and number...
demo demo
1

votes
1

answer
86

views

Toggle opacity of control

I have button, which should toggle Opacity of element. Currently it works only at half - on click make control visible( set opacity to 1). I've tried use ToogleButton instead of simple Button to use properties IsChechecked (I think it is the same as IsClicked) but what I found wasn't good for me, ca...
demo
1

votes
2

answer
154

views

Add BackDrop in WPF

I need to add backdrop on some element when dropdown is open. What I mean - in Bootstrap when you open modal window - backround become dark and not clickable (for default settings) (Live example) Should I add trigger on dropDown open event which will add some background (backdrop) on some element a...
demo
1

votes
1

answer
637

views

Use one DataContext.ExecuteCommand to execute query for multiple tables

I need to delete all data from my tables in database. So I use DataContext.ExecuteCommand. db.ExecuteCommand('DELETE From Products'); This method causes a new request to the database for each table. I want to clear data from my tables in one query. But all my attempts so far were unsuccessful. Is i...
demo
1

votes
1

answer
25

views

Scroll never appears in ListView

... I have this code in WPF App. Problem - scroll never appears. Instead of adding scroll ListView make Height bigger. The same with ListBox. When I don't need scroll it looks like and When I need scroll it looks like In what wrapped ListBox : Page > Grid ( ) > Grid (Grid.RowSpan='3')> Border >...
demo
1

votes
2

answer
69

views

indexOf for array with different objects

I have an array of users. When I click on button 'Add New', I want to add new object to this array only if it doen't exist there: var newUser = { 'creating': true, 'editMode': true }; if ($scope.users.indexOf(newUser) < 0) { $scope.users.push(newUser); } but indexOf always return -1. Is this because...
demo
1

votes
2

answer
173

views

Rollback Transaction giving error

I have a stored procedure as Begin Begin Transaction [Tran] Begin Try counter=0 --demo condition while(counter
devam demo
1

votes
1

answer
456

views

Save data before leave the page in ASP.NET

I have asp.net page. I don't have button 'Save' on it (not my requirement). I need to save page data before I leave this page. I've tried to do it with events like Page_Unload but it doen't work... Cause Save method uses data from elements on page like txtBox1.Text I can't use .ashx handler to make...
demo
1

votes
1

answer
66

views

How to detect whether circle is translated in clockwise or not in d3

I am using globe functionality using d3 and d3 geo zoom library. Almost all things are done, but having one issue. I have draw circle with element g, it is rotating along with path when we rotate globe, but main problem is that element g should be hide when path goes behind, right now points are sho...
1

votes
2

answer
499

views

How to style a group of (nested) elements using one style reference

I'd like to know whether there's a simple (I believe there's a complex workaround for everything) way to style a group of potentially nested elements while referencing just one style on the parent element level in XAML/WPF. In HTML/CSS it is possible to do: and then style it by: .levels { width: 400...
Demo
1

votes
2

answer
951

views

Get field type in Typescript

I have class in Typescript. It has some fields field1 : ko.observable(); field2 : ko.observable(''); ... In some function in another class I've tried to loop through every object field and for fields of type number I need to perform some modifications. How can I detect this? I've tried next, but a...
demo
1

votes
1

answer
53

views

Param in constructor of custom component is always undefined

I have 3 observableArrays in ViewModel; groupedCustomFields: ko.ObservableArray = ko.observableArray([]); customFieldsForAdvSearch: ko.ObservableArray = ko.observableArray([]); countries: ko.ObservableArray = ko.observableArray([]); In constructor of ViewModel I initialized them with data from some...
demo
1

votes
1

answer
1.4k

views

@PUT request not working in retrofit 2

I tried my request in both way. which is @PUT('api/check-ticket/{reg_id}/{gate}/') Observable checkRealTimeTicketStatus( @Path('reg_id') String ticket_id, @Path('gate') int gate_id ); And .. @FormUrlEncoded @PUT('api/check-ticket/{reg_id}/{gate}/') Observable checkRealTimeTicketStatus( @Field('reg_...
demo_Ashif
1

votes
1

answer
49

views

Select column based on input enum parameter

I have table with columns Id | UserId | GoogleEnabled | FacebookEnabled | TwitterEnabled In code I want to select value of {provider}Enabled value - true/false base on input enum enum Provider { Google, Facebook, Twitter } private async Task CheckSettingsAsync(ISeedSession seedSession, IUserInfo u...
demo
1

votes
1

answer
384

views

Identify Principal component from Biplot in R

I'm doing a principal component analysis, after I got the analysis result, how to identify the first couple of principal predictors? As it is messy from the plot. It's hard to see the predictors names: Which part of the PCA results should I look into? This is more like how to determine the most impo...
Demo

View additional