|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hello Community,
Would you be kind enough to answer this question?
On some sites (usually blogs). We find this kind of configuration:
a column on the left that takes up the theme and as soon as you click on it you instantly have the text content displayed on the right.
We move to another element of the column and by clicking on it we have the corresponding text that is displayed on the right and this instantly without changing pages.
Can someone tell me what kind of function we are talking about? Does it require advanced programming knowledge? how can I put this on a blog that I develop on Wordpress.
Thank you very much for your feedback.
|
|
|
|
|
The type of site you're looking for is called a Single Page Application (SPA). There are variations of this that do and don't change the address, etc, but the idea is the same for all... they don't reload the entire page when you navigate.
Compte Personnel wrote: Does it require advanced programming knowledge? Yes. What's more is that there is one major drawback to SPAs, SEO and indexing by search engines. You can work around this in several ways, but that does add on to the complexity of the page.
Compte Personnel wrote: how can I put this on a blog that I develop on Wordpress. Unless you're willing to spend the next couple of years really learning this stuff, your best bet is to just buy a WordPress theme that's an SPA already for like $50-$75. A SPA is not something you want to start with for your first site.
Jeremy Falcon
|
|
|
|
|
Optimizing the performance of large-scale web applications involves strategies at both the front-end and back-end:
Front-end Best Practices:
Minimize HTTP requests: Combine files like CSS and JavaScript to reduce requests. Use lazy loading for images and assets.
Use a Content Delivery Network (CDN): A CDN helps distribute your static assets across multiple servers for faster delivery.
Minification and Compression: Minify CSS, JavaScript, and HTML. Also, enable gzip compression for files sent over HTTP.
Browser Caching: Leverage browser caching to store static assets locally and reduce load times on repeat visits.
Back-end Best Practices:
Database Optimization: Index your database properly, avoid unnecessary queries, and cache frequently accessed data.
Load Balancing: Implement load balancing to distribute the workload across multiple servers to prevent any single server from overloading.
Asynchronous Processing: Offload tasks like sending emails, notifications, or heavy computations using background jobs and queues.
Optimize API Calls: Reduce the number of API calls and make batch requests where possible.
Combining these techniques ensures that your web application remains fast, scalable, and efficient as it grows.
|
|
|
|
|
I have what I thought was a fairly simple requirement, web site (blazor) that delivers a minimal membership service. No registration (this is done by a WPF app with 1-2 users).
Set up a web api to service the data and authentication requirements (done using JWT tokens)
And this is where the rabbit hole opens up!
Create a web app that gets its authentication from the web api and then service the data requirements. Every example i have found wants to use Entity this and Entity that with 7 different tables, registration, 2 factor security and password recovery, NONE of which I need.
All I need is to get an authenticated (email and password) token from the API and include that in each subsequent request header.
This already works perfectly for the WPF client but I cannot understand how it should be done for a blazor site. Any suggestions or examples would be appreciated.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I'm trying to make an API of my application using CodeIgniter 4 (PHP, Javascript), but when I clicked Send(in postman) with URL: http://localhost:8080/lampiran, it always showing '404 Not Found'(The requested resource /lampiran was not found). This is my controller :
class Lampiran extends ResourceController
{
protected $model = 'App\Models\lampiranModel';
protected $format = 'json';
public function index()
{
$data = [
'message' => 'success',
'data_lampiran' => $this->model->findAll()
];
return $this->respond($data, 200);
}
.....
and this is my route
$routes->get('lampiran', 'Lampiran::index');
|
|
|
|
|
It sounds like you have a web server running by the nature of your error message, so it's probably a routing issue. Some MVC frameworks will do this automatically, but gonna assume that CodeIgniter doesn't. Both have their pros and cons...
Anyway, here ya go...
URI Routing — CodeIgniter 4.5.5 documentation
Jeremy Falcon
|
|
|
|
|
Thanks for the answer. You are right, it is routing problem. My first applicatoin can run with "localhost:8080/index.php/lampiran", and then I built another application from scratch, and it run with "localhost:8080/lampiran".
|
|
|
|
|
Hi
I was wondering if I created a site while I am in France but my target are people in Canada. Hosting company in France gave me IP address for server in France but I want the site to be visible mainly for people in Canada . How I can do that ?
|
|
|
|
|
Geo-targeting: With geo-targeting methods, you can make your site visible to particular countries/regions. When it comes to the former, you can do this by setting location-based preferences in tools -- Google Search Console (also known as Webmaster Tools), using local domains (e.g., co. jp), and getting listed in local directories. uk,. fr), using (hreflang) tags, or appropriate meta descriptions for each language and region. You can also set up server settings for content delivery networks (CDNs) so that load times are optimized in a particular region. Local SEO strategies such as local keywords, and backlinks all further improve visibility in requested areas.
|
|
|
|
|
Thanks
What is local directories ?
what is hreflanfg tags ?
|
|
|
|
|
Martin Adams 2023 wrote: I want the site to be visible mainly for people in Canada . How I can do that ? Mainly or only? I ask because there's a huge difference in how you go about it.
Jeremy Falcon
|
|
|
|
|
|
Region specific servers.
Jeremy Falcon
|
|
|
|
|
I'm currently implementing a web-based code editor into my web project (Project Chromosphere.com). I think some of you might be interested. It's a work in progress, but you can see it here: https://chromosphere.com/chromosphere/scripts/js/ui/sandbox/vsCode/[^]
I considered creating a web-based code editor from scratch. Then, I realized the amount of time and effort to embark on such a thing would be ridiculous. I don't want to spend 1000 hours developing a web-based code editor. So, I'm going with a third-party solution.
Microsoft VS Code[^] offers a good solution. The VS Code code editors are powered by the Monaco Editor[^]. That's the code editor that you are actually embedding into your web page.
To implement this web-based code editor in its most basic form is easy.
See the HTML document source code below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Simple Example Code Editor</title>
</head>
<body>
<div id="container" style="width: 100%; height: 95.5vh; border: 1px solid grey;"></div>
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs/loader.js"></script>
<script type="text/javascript">
require.config({
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs" }
});
require(["vs/editor/editor.main"], function () {
var editor = monaco.editor.create(document.getElementById("container"), {
value: 'function hello() {\n alert(\'Hello World!\');\n}',
language: 'javascript'
});
monaco.editor.defineTheme("jScriptTheme", {
base: 'vs-dark',
inherit: true,
rules: [
{ token: '', foreground: 'aaaaaa' },
{ token: 'invalid', foreground: 'ff3333' },
{ token: 'emphasis', fontStyle: 'italic' },
{ token: 'strong', fontStyle: 'bold' },
{ token: 'variable', foreground: 'bbbbbb' },
{ token: 'variable.predefined', foreground: 'eeeeee' },
{ token: 'constant', foreground: 'f08c36' },
{ token: 'comment', foreground: '00bb00', fontStyle: 'italic' },
{ token: 'number', foreground: 'f08c36' },
{ token: 'number.hex', foreground: 'f08c36' },
{ token: 'regexp', foreground: '4dbf99' },
{ token: 'annotation', foreground: '41a6d9' },
{ token: 'type', foreground: '41a6d9' },
{ token: 'delimiter', foreground: 'cceeff' },
{ token: 'delimiter.html', foreground: '5c6773' },
{ token: 'delimiter.xml', foreground: '5c6773' },
{ token: 'tag', foreground: 'e7c547' },
{ token: 'tag.id.jade', foreground: 'e7c547' },
{ token: 'tag.class.jade', foreground: 'e7c547' },
{ token: 'meta.scss', foreground: 'e7c547' },
{ token: 'metatag', foreground: 'e7c547' },
{ token: 'metatag.content.html', foreground: '86b300' },
{ token: 'metatag.html', foreground: 'e7c547' },
{ token: 'metatag.xml', foreground: 'e7c547' },
{ token: 'metatag.php', fontStyle: 'bold' },
{ token: 'key', foreground: '41a6d9' },
{ token: 'string.key.json', foreground: '41a6d9' },
{ token: 'string.value.json', foreground: '86b300' },
{ token: 'attribute.name', foreground: 'f08c36' },
{ token: 'attribute.value', foreground: '0451A5' },
{ token: 'attribute.value.number', foreground: 'abb0b6' },
{ token: 'attribute.value.unit', foreground: '86b300' },
{ token: 'attribute.value.html', foreground: '86b300' },
{ token: 'attribute.value.xml', foreground: '86b300' },
{ token: 'string', foreground: 'd88bfc' },
{ token: 'string.html', foreground: 'd88bfc' },
{ token: 'string.sql', foreground: 'd88bfc' },
{ token: 'string.yaml', foreground: 'd88bfc' }
],
colors: {
'editor.background': '#000025'
}
});
monaco.editor.setTheme("jScriptTheme");
});
</script>
</body>
</html>
Below is the HTML document source for my Configured JavaScript code editor[^].
See the HTML document source code below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Configured Example Code Editor</title>
</head>
<body>
<div id="container" style="width: 100%; height: 95.5vh; border: 1px solid grey;"></div>
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs/loader.js"></script>
<script type="text/javascript">
require.config({
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs" }
});
require(["vs/editor/editor.main"], function () {
var container = document.getElementById("container");
if (container !== null) {
container.style.width = "calc(100% - 2px)";
container.style.height = ((window.innerHeight) - 4) + "px";
container.style.overflowY = "hidden";
container.style.margin = "0";
container.style.padding = "0";
document.body.style.margin = "0";
document.body.style.padding = "0";
}
var editor = monaco.editor.create(document.getElementById("container"), {
value: "function hello(){\nalert('Hello world!');}",
language: "javascript",
theme: "vs-dark",
"autoIndent": true,
"formatOnPaste": true,
"formatOnType": true,
keywords: [
"break", "case", "catch", "class", "continue", "const",
"constructor", "debugger", "default", "delete", "do", "else",
"export", "extends", "false", "finally", "for", "from", "function",
"get", "if", "import", "in", "instanceof", "let", "new", "null",
"return", "set", "super", "switch", "symbol", "this", "throw", "true",
"try", "typeof", "undefined", "var", "void", "while", "with", "yield",
"async", "await", "of"
],
typeKeywords: [
"any", "boolean", "number", "object", "string", "undefined"
],
operators: [
"<=", ">=", "==", "!=", "===", "!==", "=>", "+", "-", "**",
"*", "/", "%", "++", "--", "<<", "</", ">>", ">>>", "&",
"|", "^", "!", "~", "&&", "||", "?", ":", "=", "+=", "-=",
"*=", "**=", "/=", "%=", "<<=", ">>=", ">>>=", "&=", "|=",
"^=", "@",
]
});
setTimeout(function () {
editor.getAction('editor.action.formatDocument').run();
}, 200);
monaco.editor.defineTheme('jScriptTheme', {
base: 'vs-dark',
inherit: true,
rules: [
{ token: '', foreground: 'aaaaaa' },
{ token: 'invalid', foreground: 'ff3333' },
{ token: 'emphasis', fontStyle: 'italic' },
{ token: 'strong', fontStyle: 'bold' },
{ token: 'variable', foreground: 'bbbbbb' },
{ token: 'variable.predefined', foreground: 'eeeeee' },
{ token: 'constant', foreground: 'f08c36' },
{ token: 'comment', foreground: '00bb00', fontStyle: 'italic' },
{ token: 'number', foreground: 'f08c36' },
{ token: 'number.hex', foreground: 'f08c36' },
{ token: 'regexp', foreground: '4dbf99' },
{ token: 'annotation', foreground: '41a6d9' },
{ token: 'type', foreground: '41a6d9' },
{ token: 'delimiter', foreground: 'cceeff' },
{ token: 'delimiter.html', foreground: '5c6773' },
{ token: 'delimiter.xml', foreground: '5c6773' },
{ token: 'tag', foreground: 'e7c547' },
{ token: 'tag.id.jade', foreground: 'e7c547' },
{ token: 'tag.class.jade', foreground: 'e7c547' },
{ token: 'meta.scss', foreground: 'e7c547' },
{ token: 'metatag', foreground: 'e7c547' },
{ token: 'metatag.content.html', foreground: '86b300' },
{ token: 'metatag.html', foreground: 'e7c547' },
{ token: 'metatag.xml', foreground: 'e7c547' },
{ token: 'metatag.php', fontStyle: 'bold' },
{ token: 'key', foreground: '41a6d9' },
{ token: 'string.key.json', foreground: '41a6d9' },
{ token: 'string.value.json', foreground: '86b300' },
{ token: 'attribute.name', foreground: 'f08c36' },
{ token: 'attribute.value', foreground: '0451A5' },
{ token: 'attribute.value.number', foreground: 'abb0b6' },
{ token: 'attribute.value.unit', foreground: '86b300' },
{ token: 'attribute.value.html', foreground: '86b300' },
{ token: 'attribute.value.xml', foreground: '86b300' },
{ token: 'string', foreground: 'd88bfc' },
{ token: 'string.html', foreground: 'd88bfc' },
{ token: 'string.sql', foreground: 'd88bfc' },
{ token: 'string.yaml', foreground: 'd88bfc' }
],
colors: {
'editor.background': '#000025',
}
});
monaco.editor.setTheme('jScriptTheme');
});
</script>
</body>
</html>
|
|
|
|
|
You should probably post this as a tip rather than a message in a forum that will soon be buried on page 42.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I wrote a function in JavaScript that creates synthetic events to simulate a full mouse event. What I mean by "full" is that I'm creating and dispatching the "mouseenter", "mouseover", "mousemove", "mousedown", "mouseup", "click", and "mouseout" events.
In what order do the "mouseenter", "mouseover", and "mousemove" events occur? I've tried looking this up, but I'm not getting anything.
|
|
|
|
|
Why not try it yourself and see?
Edit fiddle - JSFiddle - Code Playground[^]
In Firefox, I get over , then enter , then move . But if the precise order isn't documented anywhere, then it's probably not defined, and any code that relies on a specific sequence is most likely broken and wrong.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Just to add to what Richard said, you should read up on what these events actually do. Then your code will be less order dependent and more so intent dependent - even if they are synthetic. JavaScript really isn't a sequential kinda language anyway, despite its single execution thread.
The mouseover event triggers when the mouse pointer enters the div element and its child elements.
The mouseenter event is only triggered when the mouse pointer enters the div element.
The mousemove event triggers every time the mouse pointer is moved over the div element.
If you're writing code that performs entry logic on both enter and over, for instance, your code is probably running too slow.
W3C Schools sucks, but this demo should convey some concepts ok-ish.
Mouse Enter vs Over vs Move
Jeremy Falcon
|
|
|
|
|
how do you use Draggable events with read start and end dates from the event and fix them but choose resource?
<pre lang="text"><pre lang="Javascript">
<pre><script id="rendered-js">
document.addEventListener('DOMContentLoaded', function () {
var date = new Date()
var d = date.getDate(),
m = date.getMonth(),
y = date.getFullYear()
var Calendar = FullCalendar.Calendar;
var containerEl = document.getElementById('external-events');
var checkbox = document.getElementById('drop-remove');
var Draggable = FullCalendarInteraction.Draggable;
new Draggable(containerEl, {
itemSelector: '.external-event',
eventData: function (eventEl) {
return {
id: eventEl.getAttribute('data-id'),
title: eventEl.getAttribute('data-title'),
start: eventEl.getAttribute('data-start'),
end: eventEl.getAttribute('data-end'),
resourceId: eventEl.getAttribute('data-resource-id'),
description: eventEl.getAttribute('data-description'),
backgroundColor: window.getComputedStyle(eventEl, null).getPropertyValue('background-color'),
borderColor: window.getComputedStyle(eventEl, null).getPropertyValue('background-color'),
textColor: window.getComputedStyle(eventEl, null).getPropertyValue('color')
};
}
});
let calendarEl = document.getElementById('calendar');
let calendar;
let start = '2024-05-01';
let end = '2024-06-31';
let resourcesurl = '/resources';
let zone = '{{$zone}}';
let available = '{{$available}}';
let resourcesIndex = 0;
if (zone === '1') {
resourcesIndex += 1;
if (resourcesIndex === 1) {
resourcesurl += '?zone=on';
} else {
resourcesurl += '&zone=on';
}
}
if (available === '1') {
resourcesIndex += 1;
if (resourcesIndex === 1) {
resourcesurl += '?available=on';
} else {
resourcesurl += '&available=on';
}
}
u/foreach ($Branches as $key => $branch)
@isset($data['BranchChoose'.$key])
resourcesIndex += 1;
if (resourcesIndex === 1) {
resourcesurl += '?BranchID' + {{$key}} + '=' + {{$data['BranchID'.$key]}} + '';
} else {
resourcesurl += '&BranchID' + {{$key}} + '=' + {{$data['BranchID'.$key]}} + '';
}
@endisset
@endforeach
calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['interaction', 'resourceTimeline'],
timeZone: 'UTC',
defaultView: 'resourceTimelineDay',
aspectRatio: 1.5,
header: {
left: 'prev,next',
center: 'title',
right: 'resourceTimelineDay'
},
views: {
resourceTimelineDay: {
duration: {days: 10},
slotDuration: '{{$plus}}'
}
},
now: '{{$start_str_now}}',
editable: true,
droppable: true,
resourceLabelText: '@lang("Car Plate Number")',
resources: resourcesurl,
events: '/events?days=10&date={{$start_str_now}}',
eventRender: function (info) {
var eventObj = info.event;
var start = eventObj.start;
var end = eventObj.end;
var title = eventObj.title;
console.log('Event: ' + title + '\nStart: ' + start + '\nEnd: ' + end);
info.el.querySelectorAll('.custom-icon').forEach(function (icon) {
icon.remove();
});
let titleEl = '';
if (info.event.extendedProps.icons) {
titleEl = info.el.querySelector('.fc-title');
info.event.extendedProps.icons.forEach(function (iconData) {
var icon = document.createElement('span');
icon.classList.add('custom-icon');
icon.innerHTML = iconData.html;
icon.setAttribute('title', iconData.tooltip);
titleEl.parentNode.insertBefore(icon, titleEl);
});
}
if (info.event.extendedProps.tooltip) {
info.el.querySelector('.fc-title').setAttribute('title', info.event.extendedProps.tooltip);
}
{{--console.log('Event id:',info.event.id);--}}
{{--$.ajax({--}}
{{-- url: '/calendar/ID',--}}
{{-- method: 'POST',--}}
{{-- data: {--}}
{{-- id: info.event.id,--}}
{{-- resourceId: info.event.id,--}}
{{--
{{--
{{-- _token: '{{ csrf_token() }}'--}}
{{-- },--}}
{{-- success: function(response) {--}}
{{--
{{-- var newStart = response.start;--}}
{{-- var newEnd = response.end;--}}
{{-- info.event.setStart(newStart);--}}
{{-- info.event.setEnd(newEnd);--}}
{{-- console.log('Event newstart:',newStart);--}}
{{-- console.log('Event newend:',newEnd);--}}
{{-- },--}}
{{-- error: function (xhr) {--}}
{{-- info.revert();--}}
{{-- }--}}
{{--});--}}
if (info.event.start && info.event.end) {
console.log('Event start:',info.event.start);
console.log('Event end:',info.event.end);
var duration = moment(info.event.end).diff(moment(info.event.start), 'hours');
var durationEl = document.createElement('span');
durationEl.classList.add('event-duration');
durationEl.innerText = `(${duration} hrs)`;
titleEl = info.el.querySelector('.fc-title');
if (titleEl) {
titleEl.appendChild(durationEl);
} else {
var timeEl = document.createElement('div');
timeEl.classList.add('fc-title');
timeEl.appendChild(durationEl);
info.el.appendChild(timeEl);
}
}
console.log('Event ID:', info.event.id);
console.log('Event ID:', 222222);
},
dateClick: function (info) {
var selectedDate = info.dateStr;
var elements = document.querySelectorAll('.fc-daygrid-day[data-date="' + selectedDate + '"]');
elements.forEach(function (element) {
element.style.backgroundColor = 'lightgreen';
});
console.log('Event ID:', 111111);
},
eventDidMount: function (info) {
let element = info.el;
let originalBackground = element.style.backgroundColor;
element.addEventListener('mouseover', function () {
element.style.backgroundColor = 'lightgreen';
});
element.addEventListener('mouseout', function () {
element.style.backgroundColor = originalBackground;
});
},
drop: function (info) {
if ($('#drop-remove').is(':checked')) {
info.draggedEl.parentNode.removeChild(info.draggedEl);
}
},
eventReceive: function(info) {
var event = info.event;
console.log('Event ID:', event.id);
$.ajax({
url: '/calendar/update',
method: 'POST',
data: {
id: event.id,
resourceId: event.getResources()[0].id,
_token: '{{ csrf_token() }}'
},
success: function (response) {
alert(response.success);
calendar.refetchEvents();
},
error: function (xhr) {
info.revert();
}
});
},
eventDrop: function (event, delta, revertFunc) {
$.ajax({
url: '/calendar/update',
method: 'POST',
data: {
id: event.event.id,
resourceId: event.event._def.resourceIds[0],
_token: '{{ csrf_token() }}'
},
success: function (response) {
alert(response.success);
},
error: function (xhr) {
revertFunc();
}
});
},
});
calendar.render();
$('.fc-event').mouseenter(function () {
$(this).addClass('fc-event-hover');
});
$('.fc-event').mouseleave(function () {
$(this).removeClass('fc-event-hover');
});
$('#external-events .external-event').each(function () {
$(this).draggable({
zIndex: 999,
revert: true,
revertDuration: 0,
helper: function () {
var title = $(this).text().trim();
return $('<div class="fc-event">').text(title);
},
start: function (event, ui) {
var eventData = {
id: $(this).attr('data-id'),
title: $(this).text().trim(),
start: $(this).attr('data-start'),
end: $(this).attr('data-end'),
resourceId: $(this).attr('data-resource-id'),
description: $(this).attr('data-description'),
backgroundColor: window.getComputedStyle(this, null).getPropertyValue('background-color'),
borderColor: window.getComputedStyle(this, null).getPropertyValue('background-color'),
textColor: window.getComputedStyle(this, null).getPropertyValue('color')
};
$(this).data('eventData', eventData);
}
});
});
});
</script>
<pre lang="HTML">
<pre><script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<div class="card">
<div class="card-header">
<h4 class="card-title">Draggable Events</h4>
</div>
<div class="card-body">
<div id="external-events">
<!-- PHP loop to generate draggable events -->
@foreach ($events as $event)
<div class="external-event"
id="event_{{ $event->id }}"
data-id="{{ $event->id }}"
data-title="{{ $event->title }}"
data-start="{{ $event->start }}"
data-end="{{ $event->end }}"
data-resource-id="{{ $event->resourceId }}"
data-description="{{ $event->description }}"
style="background-color: {{ $event->color }}; color: white;">
{{ $event->title }}
</div>
@endforeach
<div class="checkbox">
<label for="drop-remove">
<input type="checkbox" checked="checked" readonly id="drop-remove">
remove after drop
</label>
</div>
</div>
</div>
</div>
|
|
|
|
|
I have a web api that services both wpf and browser clients. WPF only requires and ApiKey built into the application while the web will require authentication and authorisation (using JWT bearer tokens).
If so does anyone have an example.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have a really simple API and see no need to implement open API except I want to host it on Azure (where my 2 table database is hosted). The overhead and learning curve for swagger is greater than the API learning curve.
So is it possible to host a non Open API on azure.
[edit]Search co pilot for "do I need open api to publish to azure" - the answer is no you do not need it. [/edit]
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
modified 14-Jun-24 18:20pm.
|
|
|
|
|
I'm a long-term web developer, used to building web-based applications in ASP.Net and using CSS, semantic markup, Javascript, AJAX and dynamically-generated content at the server. I'm happy hand-coding CSS and crafting HTML using classes, defining grids, floats etc. etc..
I've recently been "commandeered" by a charity I volunteer with to assist their overworked webmaster. Their website is primarily static pages, and end-users can add blog entries for specific categories. There's no server-side form processing involved. BUT the site is running on the WIX platform. It is possible to write page-specific CSS, but it won't do you much good as WIX generates its own HTML from your definitions of strips, sections, text etc - and doesn't let you add classnames or element IDs.
The webmaster reckons WIX is the bees-knees and claims that "Wix is probably the leading web platform around today. ... Wix is truly state of the art and the market leader." He also claims that it generates "responsive pages" - but the "responsiveness", such as it is, is done at the server. This means if you open a page on a mobile phone, then turn it into landscape, the page doesn't re-flow or re-structure; it just makes everything bigger to fill the width. This is NOT my understanding of "responsive design"...
I'm curious as to others' opinion of Wix, and whether I'm missing something obvious, or am way behind the web design trend.
|
|
|
|
|
DerekT-P wrote: probably the leading web platform around today. ... truly state of the art and the market leader.
Never heard of it, but based on that quote, it sounds like the webmaster has swallowed their marketing department's entire supply of BS.
According to Wikipedia[^], they have previously been caught stealing code from WordPress without complying with the license. They've also deleted websites at the request of the Chinese government, and fired an employee for being critical of Israel. So probably not the most trustworthy of companies then.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|