pty 882 Posting Pro

my project is about the cleaning service app

"Cleaner than your mom"

pty 882 Posting Pro

Just to add, my last comment was made in reference to a spam post advertising holidays that briefly appeared in this thread. On its own it sounds rather prickly!

pty 882 Posting Pro

And here lies the problem. Not to mention the 11 year old green underlining thread that was just resurrected. The reason people like and keep going back to SO is because you just don't see spam and shitposting like this.

pty 882 Posting Pro

I'd do this in stages. Create a view where for each table you summarise totals by the month, you'll need to use extract or date_part to split the date into yearand month integer fields, which you'll group by, and sum to get the monthly totals. Then your joining of the two views becomes trivially easy.

Two simple steps are better than one complicated one.

pty 882 Posting Pro

Posts like this. They should be deleted instantly. To be honest, for new members, the post shouldn't even become visible until an admin has verified it. It's pollution and it damages the site.

pty 882 Posting Pro

If you're a developer and list your skills and past places of work there you simply become a magnet for recruiters and are inundated with requests. Some recruiters are ok, most aren't, and a large proportion of the offers I get are extremely low quality or not even remotely suitable.

Additionally, LinkedIn employs plenty of dark UI patterns which I really don't enjoy. "27 people have viewed your profile, click here to find out who! Not really"

pty 882 Posting Pro

Microsoft has a mixed record. LinkedIn was barely touched (and remains a cesspit of the highest order), Skype was mangled and is a shadow of its former self, as was Nokia. Others, like Yammer and aQuantive were just absorbed.

If Microsoft change too much too soon, GitHub users may leave for new pastures. However, if they stay hands off, it's not necessarily an awful move. Microsoft aren't the toxic open source hating company that Balmer ran, even if that memory is still fresh in our minds.

pty 882 Posting Pro

I'm a frequent eBayer and in all the years of buying I've only been stung once, a long time ago, and stupidly I used nochex instead of PayPal and couldn't even trace the scammer.

Now I only buy expensive things (more than say £20) from UK based sellers with excellent feedback. Yes there's still some risk, but there's also reward and you can pick up some amazing deals.

pty 882 Posting Pro

If you're using a capable database you can create a JSON field, but as with every choice there are pros and cons.

The pros are, of course, flexibility. Providing your JSON is valid, it can be stored, no matter how complex or nested.

The cons, funnily enough, are also related to flexibility. All of the tools your database provides you with to ensure data is valid and correct are gone, many of the options that your database gives you when it comes to quick and easy querying are now more complex or slower.

My advice would be to use it sparingly. If your data is relational, and in almost all cases it will be, use a relational database. If some parts are not, then model those bits using a more-apt technology (array or JSON data types in the DB or another technology entirely). Don't think about scale, especially webscale until you need to.

pty 882 Posting Pro

If you want a cross-platform UI that doesn't suck golf balls through a hosepipe I'd recommend Qt and Qt-Creator.

It's extensive, well-tested, been around since the mid nineties and has bindings for plenty of languages, but works best with C++.

Lots of high-profile commercial software and big open source projects use it and it's licenced under the LGPL.

pty 882 Posting Pro

LinkedIn has an extensive API. Of course they restrict aspects of it because they don't want people competing against them, and Salesforce is Siloed so wouldn't really be suitable for the "professional dating" thing. Xing is the LinkedIn of the German speaking world.

Any of the people I typically encounter attending and hosting tech meetups and business networking events

Many of them on Daniweb? Any?

People who are looking to find mentors

Please don't pair me with Davy

People who work from home, who are missing out on the social aspects of working in an office environment, looking to meet other locals who work in their industry

Ok, this is a potential niche, I guess

People who work in sales or business development positions who are looking to meet potential clients one-on-one

I don't get this. Without pairing at the company level how could you know if someone is a potential client? Or are you talking about b2c pairings?

pty 882 Posting Pro

to provide matchmaking between users

Is there value in that?

I know there is value in informed matchmaking but you need a high quality pool of users and companies. Can DW's userbase (which if I'm not mistaken is Dazah's too) support this kind of use in the real world?

I know DW has a lot of members but seemingly only a tiny handful of them are active, many are novices and I don't see any companies being represented.

In this arena you'll be up against LinkedIn, Xing, Salesforce; plus the countless companies that build on their APIs. They all have massive databases full of high quality customer and client record and sell b2b services on top.

Tldr; you might have the expertise but you need the data to back it up.

pty 882 Posting Pro

Sounds like a bug in the API to me. Did you write the backend too?

I'd use a tool like HTTPie/cURL so you can accurately and repeatably test requests

pty 882 Posting Pro

SSH with keys is the way to go. Written and vetted by cryptography experts, battle tested, hugely widespread and supported by all modern deployment mechanisms.

Rolling your own encryption routine can be fun, but it probably won't be that secure.

pty 882 Posting Pro

Ah, one of my posts is editable and one isn't.

Screen_Shot_2018-04-26_at_09_43_11.png

The difference is that the first was made on my phone and the second on a computer.

If there was a bug tracker I'd raise one.

pty 882 Posting Pro

Has the edit button disappeared? My last post doesn't make sense, it should say 'your failing css'.

pty 882 Posting Pro

Learn how to combine CSS selectors. Clue, your failing for is looking for a table within #profitlosstbl.

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors

pty 882 Posting Pro

The cellpadding attribute has been dropped, the suggested method these days is to use padding: val in css.

pty 882 Posting Pro

He's clearly not tried anything Shark_1, it's just a homework question he's pasted.

Giving him the answer will encourage this kind of behaviour in the future and further pollute our industry with qualified idiots. Not giving him the answer pollutes the forum with shitposts.

The only sensible thing to do is just delete these posts, but for some reason that doesn't happen. That's why StackOverflow has taken over.

pty 882 Posting Pro

You want your table and every cell within it to be 5px wide and have 5px padding?

I think you should start by learning how CSS selectors work.

pty 882 Posting Pro

The fact this post hasn't just been deleted is a bad sign. Burn it with fire.

Reverend Jim commented: Kind of leaves a bad taste in your eyes, doesn't it? +15
pty 882 Posting Pro

Use the standard method. It's much cleaner, nicer, simpler and more robust.

<input type="email" ... />
pty 882 Posting Pro

It should run natively on Windows although I haven't tested it.

Of course, the easiest method of running it is to use the Docker image which will work just fine on Windows.

pty 882 Posting Pro

It is none of those things. Amazon have lots of servers, in some cases it's easier/cheaper/more-reliable to use theirs than have your own.

If you don't know the difference between Hadoop and Apache HTTPD, you don't need Hadoop.

pty 882 Posting Pro

Yep. This isn't a SAAS, it's self-hosted; either on your own cloud platform (AWS, GCP, Azure, whatever) or on your own hardware.

pty 882 Posting Pro

Oh, and in case anyone hasn't guessed, the website is still in progress. A logo is in the works and the text needs some refinement.

pty 882 Posting Pro

Inbetween contracts over the last year or so I have been beavering away building a CMS with a difference. https://www.graphia.co.uk/

It's aimed at companies that have huge libraries of documents that every employee needs (operating procedures, handbooks, guides, etc) locked away in inflexible propriatory formats (aka Sharepoint/Confluence).

  • documents are stored in plain text (Markdown) files
  • the 'database' is a Git repository (but end-users needn't know!)
  • authors can work online using the web editor (but power users can clone the repo and work in whichever editor they like)
  • the documentation is 'published' to a static site, the theme can be customised (using CSS and HTML templates) by the company to match their styleguide

So, why am I posting here? Well, I can no longer see the wood for the trees. To the uninitiated, am I making sense? Is the website nonsense?

Please let me know, any feedback is welcome.

pty 882 Posting Pro

So you want a number in the web page to increment when a backend operation takes place? To do this 'on the fly' would require you to implement server-sent events or write something custom with websockets, which might be a little advanced for you at the moment.

I'd suggest creating a new endpoint in your backend that returns the correct number that you can poll for. So your web page, every few seconds, would ask the backend for the new number and display it. The response should look something like this {"operation_count": 34}.

Then you have two independent bits of functionality that you can test in isolation.

With regards to your progress bar, just use the standard element.

pty 882 Posting Pro

Change the id of one of the inputs, perhaps?

pty 882 Posting Pro
pty 882 Posting Pro

I'm not quite sure what the problem you're having is.

I have put your code in a codepen and it looks ok (selecting a region updates the postcode prefix dropdown).

What isn't happening that should be?

pty 882 Posting Pro

Like my post perhaps?

pty 882 Posting Pro

How are your networks connected together? Are you using a site-to-site VPN?

rproffitt commented: VPN and such has you change LAN IPs when this happens. Done all the time. Except for very new networkers. +15
pty 882 Posting Pro

And the reason your code wasn't working is that you were calling include?on a string and passing an array. Both string and array have an include? method, string's only accepts strings but array's accepts any object.

I'd add an example but I'm typing on my phone

rproffitt commented: +1 for effort. On a phone too. +15
pty 882 Posting Pro

As John suggests, array intersection will work. If you don't need to know what clashes, this might be faster due to any? stopping as soon as it's fulfilled.

colours = %w{red green blue orange}
targets = %w{yellow black pink red blue}
colours.any? {|colour| targets.include? colour}
pty 882 Posting Pro

There's a progress HTML element, you shouldn't need to use any additional libraries or plugins and you can style it with CSS. It's as simple as:

<progress value="75" max="100"></progress>
pty 882 Posting Pro

No, the foreign key is working .

Have you read the documentation? If you do and still don't understand I'll tell you how to fix it, but you clearly haven't put in any effort.

pty 882 Posting Pro

Yes. Run the website on your local machine and then take a screenshot, and upload that to your host. Then, people can see your AMAZING CONTENT but won't be able to get at your precious, hand-crafted, artisanal, rolled-on-a-virgin's thigh HTML.

An alternative would be to write your website using Adobe Flash. It's capable of making not only beautiful, easily-navigable sites that are accesisible to people with all kinds of disabilities, but you can embed games and funny noises RIGHT IN THE PAGE. I mean, who doesn't want a trumpet sound when they're clicking links?

rproffitt commented: Seriously funny. Toot toot. +15
pty 882 Posting Pro

The week selector is based on ISO8601, and Monday was decided as the first day of the week.

You would need to use a custom widget to customise that. Alternatively, use two inputs, one with the year and one with numbers 1-52. But where possible, I try to stick to standards.

Templating is definitely the way to go for dynamic sections, don't try to build HTML manually with jury or similar. Simplicity is key.

Jon_7 commented: OK, I'm gonna figure this out and post back here when I have it officially solved. Thx a ton! +0
pty 882 Posting Pro

but how can I add HTML instead of the 1-word you used for each day?

Yes, you can add whatever you like. If you structure your data something like this, you can easily use a simple templating library to insert any HTML you like

    let data = {
        "2018-W12": {
            "Monday": {
                exercise: "Squats",
                reps: 50,
                intensity: "medium",
            },
            "Tuesday": {
                exercise: "Pressups",
                reps: 30,
                intensity: "hard",
            }

        }      
    };

Also noticed the 2018 references in the javascript

I did this for speed. You could write it by hand, or easily programatically generate a schedule for the next several years, or you could write some code that generates them on the fly. Without knowing your plans for creating the exercise schedule it's difficult to say, but providing your data is well-structured it's not that difficult.

Jon_7 commented: Wow, I've never even seen that templating thing before. I'm gonna play with that a ton. Thx! +0
pty 882 Posting Pro

Perhaps I didn't fully understand what you're after, but I'd steer clear of using plugins when you can use standard inputs.

Here's a five minute stab at what I think you're asking for. If it's not it should be easy to customise. Where I've defined let data = {...} you should be reading that from your data (or API) and not hardcoding it in the function!

Oh, and I've only added data for W12 2018 and W13 2018 so it'll throw errors for other weeks. You'd have to revert to a default schedule or handle the error sensibly.

ryantroop commented: pretty nifty +9
Jon_7 commented: That's very close, but how can I add HTML instead of the 1-word you used for each day? Also wondering how I can get the week to start on Sunday . Thx +1
pty 882 Posting Pro

https://www.ampproject.org/

Based on your prior record Davy, I think it will take you 98 forum questions and 14 pastings of random code you find on the internet to solve it.

rproffitt commented: (☞゚∀゚)☞ +15
pty 882 Posting Pro

Writing code like this is nuts.

Why is everything (logic, presentation) jumbled up in one file? Why is your //insert the user into the database. comment immediately followed by an update statement?

I'm not going to solve your problem (or maybe homework question) for you. But the actual actions should be in a controller and your template should be in a, well, template.

class Blah::Create

  before_filter :check_officer

  def new
    # insert a Blah, I have no idea what a permohonan is
  end

  private

  def check_officer
    # is the current user an officer?
  end

end

class Blah::Modify

  before_filter :check_admin

  def update(id)
    # update Blah with value id
  end

  private

  def check_admin
    # is the current user an admin?
  end

end
pty 882 Posting Pro

Correlation != Causation

Why is the parsing failing? Clue, it's almost certainly not your connection speed.

pty 882 Posting Pro
pty 882 Posting Pro

Have you changed the character set and collations (from utf8 to utf8mb4) of the database and tables you're dealing with? As far as I remember in MySQL you need to do them individually, the changes don't cascade.

pty 882 Posting Pro

Create a JS fiddle demonstrating your problem. Nobody wants to clone and set up a entire project.

pty 882 Posting Pro

+1 for Flexbox, it makes dolving these problems much simpler

Another useful link https://philipwalton.github.io/solved-by-flexbox/

Soon with CSS grid landing too, the whole process will be fun again.

pty 882 Posting Pro

Nice try @dida_1 but this thread nine years old. Maybe you should just do your own homework?

pty 882 Posting Pro

What's missing?

The 'read more...' links on your blog index don't go anywhere, the pagination list contains no links, the portfolio is just images.

I think that the generated sitemap looks ok.

I think you might have accidentally uploaded some stuff that shouldn't be there to your portfolio.