|
I have a application in node.js and i want to notify my customer on each transaction.
Any help is appreciated.
|
|
|
|
|
Hey Guys, I how can I detect if an element is dragged over another one in Javascript. The next step would be to exchange to position of these two elements. Can anybody help me?
Thank!
|
|
|
|
|
|
Hi Everyone, I am new to this discussion board and would like to clarify a doubt that I presently have whilst building my first Web Application. In Express JS, the web app that I built uses a couple of ejs pages to run the login and registration system through Node Passport. My question is, can I use concurrently use both HTML and ejs together to develop the web app.
Any enlightenment from you guys would be greatly appreciated
|
|
|
|
|
I am trying to implement Dependency Injection using Unity.Asp.Net.WebApi v5.0.11 in my Web API 2 project. When I run my code I get the following exception:
An unhandled exception of type 'System.StackOverflowException' occurred in Unity.Container.dll Below is my Application_Start() in Globalasax:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Routing;
namespace PaymentSummary
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
}
}
} I have looked at tutorials online on setting up Unity for Dependency Injection purposes and tried to add the following code but they are not recognized by Visual Studio.
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
BundleTable.Bundles.RegisterTemplateBundles();
Bootstrapper.Initialise();
Please point out what I might be missing in Application_Start(), thanks.
modified 12-Jan-18 21:44pm.
|
|
|
|
|
Please help, I am working on MVC5 platform, during development everything works fine, after the webpage has been deployed on server jquery and datatable plugins are not working.
Thanks in advance!
|
|
|
|
|
Oh there must be something wrong in your project.
Tip: To get answer to your question, please be more specific. What's not working? Have you tried looking into the project references if the plugin was there and installed?
|
|
|
|
|
Use the developer tools in your browser to see what the problem is with jquery. Maybe your bundle is messed up, or for whatever reason, the jquery script files weren't copied to the site.
I don't know what "datatable plugins" are.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hi guys! I'm a first year uni student working on a html project and I need some help.
I have been trying to create my about us page and would like to have a background image that fills the top half of the page, whilst leaving the bottom half available for content such as text.
this is the code I have used to try and achieve my goal:
body.about{
background-image: url("../Images/about.jpg");
background-size:50% 100%;
background-repeat: no-repeat;
}
however all this serves to do is make the image looked squashed.
any help will be greatly appreciated and I apologise for asking such a basic question but hey we all start somewhere right
cheers
frankie
|
|
|
|
|
add this to your css:
background-size:cover;
If that doesn't do what you want, go here to investigate your other options:
CSS background-size property[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hey John,
I have tried the method you suggested and followed the link however I am still unable to produce the desired effect.
It seems to push the photo to the top of the page and squash so it is almost unviewable
Any suggestions?
|
|
|
|
|
Are you sure that a parent element isn't having some affect on this element? I notice there's no sizing of the element itself, and without seeing your actual markup, I can only take a wild guess. Also, a div with no actual content will be very small as you describe.
Start over with this:
.about
{
min-width:nnpx; (the width of your background image)
min-height:nnpx; (the height of your background image)
background-image: url("../Images/about.jpg");
backgroud-repeat:no-repeat;
}
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 3-Jan-18 13:35pm.
|
|
|
|
|
You set the element "background-size: 50% 100%" and so that's exactly what it's going to do.
You are forcing the to fill a space and so it is distorted. That shouldn't surprise you.
background-size: auto 100%; might give you something closer to what you want, BUT, if you wish an undistorted picture to fill a space then it must be of the same proportions as the space.
You should be able to figure it out from this[^]
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: if you wish an undistorted picture to fill a space then it must be of the same proportions as the space.
Not if you use background-size:cover .
However, it's not simple to make that only cover half of the height. You'd probably need to use a second element, or a pseudo-element.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
At least according to W3Schools:
cover Resize the background image to cover the entire container, even if it has to stretch the image or cut a little bit off one of the edges
And the testing page: Playit[^]
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Letter-spacing css in chrome is broken if you use absolute pixel count (Npx ), but it works fine if you use em .
Just a heads up...
BTW, absolute pixels work fine in IE11, and the latest versions of FireFox, and Opera.
EDIT =============
The CSs only breaks in chrome if you define a class with pixel-based letter-spacing in it. If you just add it to the element as a style attribute, it appears to work fine.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 1-Jan-18 12:12pm.
|
|
|
|
|
Hi all,
I have a small program that makes a call to a REST API and retrieves a block of JSON. I am parsing this in Ruby which then creates a hash. Because of the way the JSON is structured I am putting the hash into an array and then extracting the second element. I am then doing some string manipulation on this element to produce another array with each element containing a string that looks like the following:-
{:from=>"2018-01-01T00:00Z", :to=>"2018-01-01T00:30Z", :intensity=>{:forecast=>154, :actual=>157, :index=>"low"}}
I am then trying to put each of these elements back into a hash and back into an array (so I end up with an array of hashes) so I can get access to each element of the hash through their corresponding keys.
However when I try to do this within the 'each do end' loop I get an error:-
odd number of arguments for Hash
When I take the same string and just directly add it to the hash (like indicated below) it works fine:-
hash["Mystring"]
Any idea what else I can try?
I can post more code if that would help.
Thanks
D
|
|
|
|
|
I have a partial view in which I am passing a model (the model object is not null). This is the method in the controller:
[ChildActionOnly]
public ActionResult LargeHeader()
{
PWQuote quote = db.GetRandomQuote(-1);
return PartialView("_LargeHeader", quote);
}
When I try to use the Html helper property, intellisense doesn't show it, and when the page is rendered, the partial view is not rendered (and doesn't show up in the page source or browser debugger).
This (simplified code in the partial view .cshtml file) allows the partial view to render:
<span style="font-style:italic;">
Test Quote
</span>
But this does not:
<span style="font-style:italic;">
@Html.DisplayFor(model=>model.Quote)
</span>
In both cases, the model is defined in the partial view with this:
@model Models.PWQuote
Help, please.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 29-Dec-17 8:18am.
|
|
|
|
|
Just a guess, but since you're loading it via jQuery, I'd try removing the [ChildActionOnly] attribute. Child action methods aren't supposed to respond to URL requests, so jQuery shouldn't be able to call it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I'm trying to make _Layout.cshtml load different partial views based on browser window width, but the jquery.load() method can't find the cshtml files (getting a 404 error). The files are in the shared folder, and my javascript looks like this:
<script type='text/javascript'>
$(function ()
{
if (getWidth() > 640) { $("#fluidHeader").load('_LargeHeader.cshtml'); }
else { $("#fluidHeader").load('_MobileHeader.cshtml'); }
});
function getWidth()
{
if (self.innerWidth) { return self.innerWidth; }
if (document.documentElement && document.documentElement.clientWidth) { return document.documentElement.clientWidth; }
if (document.body) { return document.body.clientWidth; }
};
</script>
What am I doing wrong?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I figured it out. I ended up doing this in _Layout.cshtml:
$('#fluidHeader').load('@Url.Action("LargeHeader","Home")');
and this in the Home controller:
public ActionResult LargeHeader()
{
return PartialView("_LargeHeader");
}
Which displays the appropriate markup.
However, I want to use data from a model in the _LargeHeader partial view, and ran into my next roadblock. I started a new question for that.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hi, everyone!
I scrolled internet and find some interesting article about blockchain. I see that this trend is getting more popular with everyday. But the main question, how to start development in that industry? I am a backend specialist. What info or sites you can recommend to learn this technology and what I'll need to know to work with it? Just for a start and so on.
Thank you!
|
|
|
|
|
You can get started with the Wikipedia article as a free resource, Blockchain - Wikipedia.
For any trusted resource, you can find a good resource (book, video course etc.) from a publisher. Since this is an emerging technology, many publishers are investing in the technology and providing an expert-led tutorial that you can look for. Then, there are these libraries (frameworks/platforms) that you can study and learn how they work.
Other resources include, Tutorials & Guides Archives - Blockchain Blog
What is blockchain? - IBM Blockchain
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
What do you guys use?
A lot of people use reCaptcha (millions of sites according to their propaganda). My only concern there is that if someone succeeds in hacking their stuff, MILLIONS of sites become vulnerable at the same time. Is that a pointless concern?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Certificate-based auth so CAPTCHA isn't needed?
But seriously, it's just a key code generated off of a selection grid. As long as you limit attempts from a single source (which I'm positive reCAPTCHA does) and seed the interaction (also something it does) it should be as secure as you're going to get in an ostensibly untrusted interaction.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|