|
I have a php project that is based both online and offline.. How can i update my offline database automatically when it connects to the internet. Someone should please help me out. Thank you
|
|
|
|
|
Member 11786522 wrote: How can i update my offline database automatically when it connects to the internet. Since we don't know how you did your offline database or if you used an existing product there is no way we can answer this.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello I'm really new with React and webpack and after a few days already manage to set up a functional working environment. Now I'm stuck in design issues since I would like to create a 960 wide grid separated into 12 columns with 15 gutters. Then start by creating a 100% high section where you center an image on an 80% white background versus a red main color. In advance grateful for any help or tip that is offered
|
|
|
|
|
That should have nothing to do with either React or Webpack, and more to do with your styling or responsive display framework, whichever is appropriate.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Do you have a specific question?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have no experience at all with JavaScript. Please help me understand some things....
I'm looking at this small SignalR example.
About halfway down is the HTML, including some JavaScript.
1) First, there seems to be 4 or 5 completely different & unrelated things in this 'function', like a proxy reference, references to the Name dialog that pops up, and variables to store the DisplayName and Message, and the connection stuff??? How can this all be in the same block of code??
2) What does the dollar sign mean/do?
3) There are numerous 'function' words that are nested?? Please explain this. Seems bizarre.
<script type="text/javascript">
$(function () {
<pre>
var proxy = $.connection.chatHub;
<== Client side call back function. The server calls this
proxy.client.broadcastMessage = function (name, message) {
var encodedName = $('<div />').text(name).html();
var encodedMsg = $('<div />').text(message).html();
$('#discussion').append('<li><strong>' + encodedName
+ '</strong>: ' + encodedMsg + '</li>');
};
$('#displayname').val(prompt('Enter your name:', ''));
$('#message').focus();
$.connection.hub.start().done(function () {
$('#sendmessage').click(function () {
proxy.server.send($('#displayname').val(), $('#message').val());
$('#message').val('').focus();
});
});
});
4) In this, " var chat = $.connection.chatHub;", how does the client know about the chatHub??? There are no other references to 'chatHub' outside this, except for the hub itself. How does this work? How does this code know about the hub?
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Okay.
- The mix of concerns is largely based on the fact that this block of code is bootstrapping an event handler (proxy.client.broadcastMessage()) and a callback ($.connection.hub.start().done()) that bootstraps another event handler.
- The dollar sign, when used as it is in this example, is often a reference to jQuery. The key indicator is the selector syntax: $('#thing'), $('.stuff'), etc. Where you see it used as an object that's because it is one. Welcome to the joy of frameworks.
- Here's the fun part: in JavaScript everything is an object, to include functions. The nested functions simply represent that a return value or process is required at a certain point. All functions in JS can be trivially assigned a function pointer; in fact that's the way that most functions are handled automatically when they are assigned as arguments.
At any rate, that's a perfectly normal construct, and is appropriate in any place where you want to pass a value that may not be resolved when you call the outer function.
- As noted earlier, the "$" object is jQuery and any extension loaded for it. Think of it like a class library; somewhere before this code execution there was a <script src=".../.../jQuery.js"></script> and a <script src=".../.../signalr.js"></script>. You can safely think of that as a class library import.
So what does this snippet do?
Creates a closure that will be executed when jQuery is loaded, snagging the value of chatHub which is likely loaded as part of a jQuery plugin.
Adds an event handler that informs the hub of what to do when an incoming message is received. You'll notice some GUI logic there.
Bootstraps the local input items.
Once the hub has loaded, define an event handler that will allow the user to send a message.
That's it.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
modified 1-Mar-17 8:37am.
|
|
|
|
|
Thanks for the great explanation!
Nathan Minier wrote: <script src=".../.../signalr.js>
It's up above as
"
I saw this and It's supposed to be an auto-generated proxy. I looked for the SignalR script but couldn't find it.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
modified 28-Feb-17 16:53pm.
|
|
|
|
|
I've never played with the SignalR templates so I'm not sure why it wouldn't be building that portion.
Drop the HTML, let's take a look.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
How do I incorporate Review Markup Schemas in a WordPress website? Thank you.
|
|
|
|
|
There are a lot of plugins with related titles, but I recommend to do it manually
|
|
|
|
|
up what i need is a lots of plugins, for it.
|
|
|
|
|
I'm very new to web development, so forgive my ignorance...
I've got a grid on a page, and it loads fine on startup. I then receive an event from a SignalR service. I want to reload the grid at this point. Here's my controller:
public class HomeController : Controller
{
private IDataAccess _dal;
private DashboardClientProxy _dashboardProxy;
private bool _isConnected = false;
public HomeController()
{
_dal = new DataAccess();
_dashboardProxy = new DashboardClientProxy();
_dashboardProxy.ResultsAdded += _dashboardProxy_ResultsAdded;
try
{
_dashboardProxy.Connect();
}
catch (Exception e)
{
throw e;
}
}
public ActionResult Index()
{
var data = _dal.GetDashboardInfos(new DashboardInfoQueryArgs());
return View(data);
}
private void _dashboardProxy_ResultsAdded(object sender, EventArgs data)
{
RedirectToAction("Index", "HomeController");
}
}
I thought that by calling "RedirectToAction("Index", "HomeController") that the Index method would be run again, yet it doesn't work.
What am I doing wrong here?
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
RedirectToAction returns a result to the client telling it to make a new request to the specified action. But it only works in response to a request from the client.
If it fires at all, your event is being fired on a background thread, long after the index view has been rendered. The client is no longer connected to your server, and is not waiting for a response.
But I suspect it will never fire. I believe the default is for MVC to create a new instance of your controller class for each request, and dispose of it once the request has completed. Since the controller owns the object which raises the event, there will be no reachable references to the instance, so both the controller and the proxy will be deleted.
Instead, you'll need to have the client connect directly to your SignalR hub in Javascript. It will need to listen for the event, and when it receives the event, either reload the page, or make an AJAX request to reload just the grid.
ASP.NET SignalR Hubs API Guide - JavaScript Client | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am using MVCGrid.Net.
From what I can see from their documentation the GridColum doesn't have a width property.
Anyone used this grid before? Any way to set a column's width?
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
What about:
CellCssClassExpression Func<T1, GridContext, string> Use this to specify a custom css class based on data for the current cell
I thought CSS allowed you to specify width of a field.
|
|
|
|
|
Hello.,
Here's my thing, I have a website that was created with MS Publisher and I used to modify and upload the information through core ftp lite. This website gets the job done with the pictures and information but now I need something more up to date and dynamic. I bought a hosting plan to Hostgator and was trying to use the wordpress and joomla thing but it seems a bit complicated and it's not as easy as I thought it would be when I created a free website in WIX. So I'd like to know what options do I have to build the website and what software is recommended to edit and upload all the stuff. My budget is limited now and my business is not that big so I don't think I could hire a Pro in the matter.
Thanks.
|
|
|
|
|
Did you know WordPress and Joomla etc come shipped with some good looking themes by default? Just go the Appearance or Theme tabs and you can find thousands of themes that can be applied to your website in seconds. Secondly, you can get access to the content of the template as well, if you want to update or modify the templates.
So, even if you are not a pro, or can't afford one you can still get the website's theme up to date by selecting from a lot of the available ones on the gallery.
As for the deployment options, WordPress and Joomla do provide an online editor for you to edit your content from the control panel. Otherwise, there is a tool by Microsoft WebMatrix, that is provided free of cost and is fully capable of editing PHP websites. Visual Studio Code is also available, if you are somewhat happy with editing of the application yourself. Otherwise, they got your back — and their hands in your pocket.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
|
Could you please suggest me how i can make this concept ,if time1<time2, so="" it="" will="" add="" +1="" in="" time1,="" i="" explain="" this="" example="" suppose="" the="" time2="" is="" 07:40="" am="" and="" time1="" 1:00="" now="" become="" 25="" or="" 2:00="" 26="" but="" if="" value="" 07:41="" work="" as="" a="" normal="" .
<pre="" lang="Javascript">
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div ng-app="myapp">
Time1 :<br><input type="time" id="time1" name="time1" ng-model="time1" placeholder="HH:mm" required /><br>
<br>
Time2 :<br><input type="time" id="time2" name="time2" ng-model="time2" placeholder="HH:mm" required />
<p> Your Time is ans is {{(time1-time2)| correcttime | date: 'HH:mm': 'UTC'}} </p>
</div>
<script>
var app = angular.module('myApp', []);
app.filter('correcttime', function() {
if {
time1>24;
time1=+1;
}
else if {
time1=time2;
time1-time2==0;
}
else{
time1-time2;
}
return function(num) { return Math.abs(num); }
});
</script>
</body>
</html>
modified 16-Feb-17 20:32pm.
|
|
|
|
|
I am not an expert in AngularJS, but looking at the following code:
if {
time1>24;
time1=+1;
}
else if {
time2=time2;
time1==0;
}
else{
time1-time2;
}
I would be happy to read an explanation of why my assumptions are wrong.
|
|
|
|
|
I was going to comment on the lack of a controller, the capitalization issue, and the malformed conditional statements, but no real point until the core logic is sorted.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
|
does any body know any opensource mvc discussion forum/board to include in existing mvc project?
|
|
|
|
|