• Breaking News

    Monday, May 10, 2021

    How to make and host a simple webpage for free? Ask Programming

    How to make and host a simple webpage for free? Ask Programming


    How to make and host a simple webpage for free?

    Posted: 10 May 2021 03:28 PM PDT

    I want to host a single webpage that does the following: Everytime you refresh it, it shows you a random quote from a set of pre-defined quotes.

    I am assuming I can do something with Javascript here. But where do I host such a webpage? I don't want to pay for hosting, and I guess I would need the javascript to be executed.

    I am more of an electrical engineer than a web based programmer so forgive me if this is really basic.

    submitted by /u/FullOnYogi
    [link] [comments]

    Best data structure for a spare array

    Posted: 10 May 2021 10:10 AM PDT

    I'm working on a font library. The format I'm using provides a list of UTF-16 codes and their offsets in a spritesheet, so each entry might look like:

    0089 X=100 Y = 200

    1500 X=32 Y=10

    etc.

    There are 2^16 possible values in this format, but in practice there will never actually be that many, as users tend to only export the character they need (English characters, spanish characters, Korean characters, etc.) and the vast majority of the available character codes go undefined.

    What is the best data structure to represent a 1 dimensional array that's easily indexible by these character codes, but where the majority of them at any time will be empty? The idea is fast lookup (array access) but without having a huge empty array

    submitted by /u/proboardslolv5
    [link] [comments]

    What's your 'money best spent' on tech?

    Posted: 10 May 2021 01:33 PM PDT

    What's your most valuable tech purchase, considering durability, longevity, quality and price?

    For me it would be Logitech Wireless Mouse M195. I bought it like a decade ago, never failed me, been dropped multiple times, quality and sturdy. Got it for like 10$. As far as I know it's discontinued (since no link).

    submitted by /u/madza911
    [link] [comments]

    Should I use the Google Places API client side or server side?

    Posted: 10 May 2021 08:11 PM PDT

    Hello everyone,

    I'm creating an app that uses the Google Maps Android SDK to display a map and certain location information to the user. I want to implement a feature where the names of certain businesses and information linked to them from my server are displayed. I need data from the Google Maps API and my application's backend server. I thought of 2 approaches to implement this.

    The first being the server sends a list of Google Maps Place IDs to the client, then the client requests data about these places from the Google API.

    The second is to have the server gather all of this information from the Google API and then send it to the client.

    What are the pros and cons of each method? Is there a superior choice here?

    Thank you!

    submitted by /u/yeastyboi
    [link] [comments]

    Which technologies to choose for mobile app development with database integration

    Posted: 10 May 2021 05:14 PM PDT

    I am interested in building a mobile app that functions as a scoreboard and stat tracker for a game my friends and I play.

    I already have a web app version written in R/RShiny but would love to build it as an app that can be downloaded on iOS at least, although if a lack of a macbook (that is under 10 years old) makes that significantly more difficult, then cross-platform may be the best call.

    I am a pretty competent R programmer, have some experience with python, and minimally functional JS/web development knowledge, but I am more than happy to learn.

    The requirements for the app are few at the moment:

    • Track scores in an ongoing game
    • Aggregate player stats and display a "dashboard" of information (tables/graphs) about player performance

    What I would like to know is are there particular database systems, front/back end technologies that would be best suited to build such an app?

    From a cursory search, React Native appears to be popular, but parsing through all the various tech blogs and medium posts that are trying to sell me on some technology has made it hard to get a good idea for which tools would be best for this relatively simple project?

    Or else I'll just end up programming it in Ethereum.

    submitted by /u/Freewheelin_
    [link] [comments]

    C# - Trying to consume a WCF web service without using app.config

    Posted: 10 May 2021 07:12 PM PDT

    Hello, the client sent me the specs for their web service along with the settings from its app.config for the binding and endpoint. Problem is, the dev environment I am using does not have or support the use of an app.config so I have to code the settings in the client I am writing.

    They also sent me a console app to test the web service (which of course uses its own app.config that matches the server's) which I have built and tested successfully. I have also created a separate Visual Studio console app project with no settings in app.config and after lots of Googling and guessing, got it to successfully call the web service. I then took that exact source code and copied into the dev environment and it builds successfully but when I try to call the script that consumes the web service I get an error:

    The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:10:00'.

    These are the settings that finally got it working in VS and were copied into the other dev environment.

    NetTcpBinding myBinding = new NetTcpBinding(SecurityMode.Transport) { CloseTimeout = new TimeSpan(0, 30, 0), OpenTimeout = new TimeSpan(0, 30, 0), SendTimeout = new TimeSpan(0, 30, 0), ReceiveTimeout = new TimeSpan(0, 30, 0), MaxBufferPoolSize = 524288, MaxBufferSize = 65536, MaxReceivedMessageSize = 65536, MaxConnections = 24 }; myBinding.Security.Mode = System.ServiceModel.SecurityMode.Transport; myBinding.Security.Transport.SslProtocols = System.Security.Authentication.SslProtocols.None; Uri serviceUri = new Uri(@"net.tcp://endpointaddress"); EndpointAddress myEndpoint = new EndpointAddress(serviceUri, EndpointIdentity.CreateUpnIdentity("principal identity")); 
    submitted by /u/pigskins65
    [link] [comments]

    Extracting data/ reading data from .DAT file

    Posted: 10 May 2021 09:17 PM PDT

    Hi, I am new to programming. I would like some help with extracting data from a .DAT file. I am using Jupyter notebook. This data is a satellite image and I would like to read this image. I am getting the error: " ValueError: conflicting sizes for dimension 'y': length 44000 on <this-array> and length 11000 on 'y' " Do help out, thanks in advance! This is my code so far:

    import logging

    from datetime import datetime, timedelta

    import numpy as np

    import dask.array as da

    import xarray as xr

    import warnings

    import os

    from satpy import CHUNK_SIZE

    from satpy.readers.file_handlers import BaseFileHandler

    from satpy.readers.utils import unzip_file, get_geostationary_mask, \

    np2str, get_earth_radius, \

    get_user_calibration_factors, \

    apply_rad_correction

    from satpy.readers._geos_area import get_area_extent, get_area_definition

    from satpy._compat import cached_property

    from satpy import Scene, DatasetID

    from glob import glob

    # Get the list of GOES-16 ABI files to open

    filenames = glob('*path_name*/*.dat')

    len(filenames)

    scn = Scene(reader='ahi_hsd', filenames=filenames)

    scn.keys()

    scn.available_dataset_names()

    my_channel = 'B01'

    scn.load([my_channel])

    # use brackets to access products like a normal dict

    scn[my_channel]

    submitted by /u/_Willow2017
    [link] [comments]

    How can someone make a web conferencing/webinar application?

    Posted: 10 May 2021 09:38 AM PDT

    It's almost 2 years we're dealing with the pandemic and in this era, I personally participated in a lot of events which were all online. I saw a variety of software or services for these events. The very first one was Tehran's Linux User Group and it was on Jitsi. The next LUG's of my region were on BigBlueButton.

    I also worked for a webinar company, which had Adobe Connect as a Service and Skyroom\ as a Service* as the options for webinars but they didn't have any exclusive or proprietary software on their own. They only sell tickets for events and sell marketing packages and also they help you sell recordings of your webinars (affiliation system, what they'd like to call their services).

    Also, my cousins all used Zoom to connect to their schools. Zoom is also a very cool piece of software and I personally look at it as an option if I want to host an online event.

    I wrote all of those for some reason. all this time, I was wondering how these programs/services work. Today, I thought about it a bit and did a search. First result, was video of a guy who wrote a video chat app in Ruby on Rails. The next one was video of a guy who created a python library called vidstream. I personally liked the ideas. I also had a background in WebRTC, so I decided to do a hack for fun project (sorry for Silicon Valley reference here, I know I am the dog face 😂) but I have so much question marks in my head.

    First, let me explain what I want:

    • Audio stream
    • Screen Share
    • Recording the shared screen and audio in a video file

    What I know I (might) need:

    • WebRTC signaling server
    • S3 storage for videos
    • A system for users to register and participate.
    • An API for users who will use clients

    Okay, I am a little confused right now. Let's look at BBB as an example, is it just a signaling server? I don't think it's only a signaling server (and I'm sure it's not, and signaling might be a part of it), and how we can have one participant as a presenter/moderator and others as viewers, etc.

    I am currently searching for documents and advice, so your kind opinions are more than welcome to me.

    *: Skyroom is an equivalent of Adobe Connect, created by an Iranian group.

    submitted by /u/Haghiri75
    [link] [comments]

    What does "don't code for the sake of coding" means?

    Posted: 10 May 2021 12:20 AM PDT

    Hi everyone, I want to know what do people mean when saying "don't code for the sake of coding"?

    Do they mean just creating variables and functions, and anything else with no purpose is bad? Do they mean not to make loops for fun without any logic? Do they mean working the entire time on just one project? Do they mean focusing on one programming language? Do they mean that making small projects is bad? Should I focus on contributing to open source? Should I just focus on one open-source project?

    I have been messing around with programming for some time now in my spare time and want to know what does everyone means by it, I thought I knew it but I'm not that sure now...

    I guess it depends on your experience and level of programming, can anyone share what does it mean for a noob, intermediate, pro, or whatever the best way to explain it is.

    Thanks for your help :D

    submitted by /u/AlejandroOs
    [link] [comments]

    What keyboard do you use?

    Posted: 10 May 2021 01:33 PM PDT

    Laptop user here, looking for solid keyboard options to upgrade. What keyboard do you use and why did you choose the particular model?

    submitted by /u/madza911
    [link] [comments]

    From 0 knowledge to blockchain programmer

    Posted: 10 May 2021 07:06 PM PDT

    For a complete newb in finance looking towards the future (smart contracts, etc), what would be the ideal path towards coding in something like Solidity with no previous coding experience?

    submitted by /u/jfew44
    [link] [comments]

    Help/advice for project libraries

    Posted: 10 May 2021 03:53 PM PDT

    Hi! I am a current student of computer science (I'm in first semester of second year). I am mostly interested in math and theoretical topics of computer science, but i also want to improve my programming skills, so i decided to do a project, and a very common project recommendation is the algorithm visualizer, imo this is a really good intersection of the topics that i like and programming, so i decided to go ahead with it, the problem is that i don't know with libraries can i use for make this project (referring with the part of animation) and I do not want to search on youtube so as not to spoil myself. The programming languages which i am more conformable are haskell,python,c++ and c, any library for this languages are welcome, and if you have another tip or comment so do is :)

    submitted by /u/leo10t
    [link] [comments]

    Where to host a node.js Discord bot using Selenium Webdriver?

    Posted: 10 May 2021 03:46 PM PDT

    I have written an application for a client which takes in commands using Discord.js and runs a Selenium browser to query a website and download images which it then attaches to embeds.

    It is working fine at home but I can't seem to get the thing to run on any cloud hosting providers.

    I could try using Heroku but it would need to be headless and I am having trouble getting it to run as headless and be able to find the search bar etc...

    I tried using aws Windows instance and had semi-okay results but it isn't finding the .env file so it needs to have environment variables pasted directly into the code. It is also really slow and returns with incorrect image files.

    Not sure if there is a provider that is specifically designed to run a bot such as this? Maybe free tier aws just isn't powerful enough to do it and we need to upgrade to a paid tier? Any suggestions would be great at this point I'm not sure what to do.

    I have been freelancing foe about a year now and haven't had to tell someone I can't finish their project yet and not about to start now!

    submitted by /u/bwz3r
    [link] [comments]

    Trying to create a GUI with Java for a summer project

    Posted: 10 May 2021 03:24 PM PDT

    I'm trying to create a shopping page GUI.

    a. Once signed in as a customer, the user will have the option to search for items,select an item, enter a quantity, and add this to their cart. ​The cart should besaved to your database (postgres), so that the next time the user signs in, theircart is still available.

    b. The items your application uses should be saved in a data structure of yourchoice, not the database. You can use linked lists, etc for this purpose.

    Can you guys help me determine what the program should look like?

    submitted by /u/TrashClear483
    [link] [comments]

    Converting text file into JSON structure with python

    Posted: 10 May 2021 11:27 AM PDT

    Hi all,

    I'm new to python and would like to convert a text file into a JSON structured file within a linux environment. Then also be able to execute the python3 script again to which it will delete a section of the json file and recreate that particular section from a new input txt file - essentially "updating" a section of the existing json file.

    This is a sample input.txt file:

    LAYER_GAMMA,SUB_LAYER_ONE,Middleware,Middleware_alpha,Arte-alpha:104,rcc,1.05,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Middleware,Middleware_alpha,Arte-delta:107,rcc,1.08,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Middleware,Middleware_beta,Arte-epsilon:101,rcc,1.0567,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,Application_alpha:1042,rva,1,1.06 LAYER_GAMMA,SUB_LAYER_ONE,Application,Application_alpha,Catridges,User:upp,5,1,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,Application_alpha,Catridges,User:baf,6,1,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,Application_alpha,Catridges,Product:bafqqw,3,1,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,Application_alpha,Catridges,Configuration:ba1da,7.08,2,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,Application_alpha,Arte-kappa:2304,rc,1.01,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,instance1:10434,radsf,2,1.065 LAYER_GAMMA,SUB_LAYER_ONE,Application,instance1,Arte-mu:23234,rc,1.01,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Application,instance5:982314,ra,2,1.7 LAYER_GAMMA,SUB_LAYER_ONE,Application,instance5,Arte-pi:23234,rc,1.01,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Utils,Utils_alpha,Arte-rho:0834,ab,1.04,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Utils,Utils_beta,instance1,Arte-beta:234,erot,4,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Utils,Utils_gamma,Arte-gamma:2340,abcd,34,05 06 2021 LAYER_GAMMA,SUB_LAYER_ONE,Utils,Utils_pi,Arte-alpha:234,abc,3,05 06 2021 

    Each line has 2 delimiters, a comma and a colon. Content before the colon are the "keys" to get to a nested JSON object, then the values after the colon are values that are to be added to the object.

    The general json structure is as follows:

    { "LAYER_ALPHA": {}, "LAYER_BETA": {}, "LAYER_GAMMA": { "SUB_LAYER_ONE": { "Middleware": { "Middleware_alpha": { "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" }, "Artefact_2": { "hostname": "", "domain": "", "version": "", "date_time": "" } }, "Middleware_beta": { "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } } }, "System": { "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } }, "Application": { "Application_alpha": { "hostname": "", "domain": "", "app_id": "", "version": "", "Catridges": { "User": [ { "name": "", "version": "", "app_id": "", "date_time": "" } ], "Product": [ { "name": "", "version": "", "app_id": "", "date_time": "" } ], "Configuration": [ {} ] }, "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } }, "Application_gamma": { "instance1": { "hostname": "", "domain": "", "app_id": "", "version": "", "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } }, "instance5": { "hostname": "", "domain": "", "app_id": "", "version": "", "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } } } }, "Utils": { "Utils_alpha": { "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } }, "Utils_beta": { "instance1": { "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } } }, "Utils_gamma": { "Artefact_1": { "hostname": "", "domain": "", "version": "", "date_time": "" } } } }, "SUB_LAYER_TWO": { "Middleware": {}, "System": {}, "Application": {}, "Utils": {} } } } 

    The "artefact*" values are placeholder values.

    The actual expected json structure based on the input.txt file above:

    { "LAYER_ALPHA": {}, "LAYER_BETA": {}, "LAYER_GAMMA": { "SUB_LAYER_ONE": { "Middleware": { "Middleware_alpha": { "Arte-alpha": { "hostname": "104", "domain": "rcc", "version": "1.05", "date_time": "05 06 2021" }, "Arte-delta": { "hostname": "107", "domain": "rcc", "version": "1.08", "date_time": "05 06 2021" } }, "Middleware_beta": { "Arte-epsilon": { "hostname": "101", "domain": "rcc", "version": "1.0567", "date_time": "05 06 2021" } } }, "System": { "Arte-theta": { "hostname": "109345", "domain": "rccd", "version": "1.0123", "date_time": "05 06 2021" } }, "Application": { "Application_alpha": { "hostname": "1042", "domain": "rva", "app_id": "1", "version": "1.06", "Catridges": { "User": [ { "name": "upp", "version": "5", "app_id": "1", "date_time": "05 06 2021" }, { "name": "baf", "version": "6", "app_id": "1", "date_time": "05 06 2021" } ], "Product": [ { "name": "bafqqw", "version": "3", "app_id": "1", "date_time": "05 06 2021" } ], "Configuration": [ { "name": "ba1da", "version": "7.08", "app_id": "2", "date_time": "05 06 2021" } ] }, "Arte-kappa": { "hostname": "2304", "domain": "rc", "version": "1.01", "date_time": "05 06 2021" } }, "Application_gamma": { "instance1": { "hostname": "10434", "domain": "radsf", "app_id": "2", "version": "1.065", "Arte-mu": { "hostname": "23234", "domain": "rc", "version": "1.01", "date_time": "05 06 2021" } }, "instance5": { "hostname": "982314", "domain": "ra", "app_id": "2", "version": "1.7", "Arte-pi": { "hostname": "23234", "domain": "rc", "version": "1.01", "date_time": "05 06 2021" } } } }, "Utils": { "Utils_alpha": { "Arte-rho": { "hostname": "0834", "domain": "ab", "version": "1.04", "date_time": "05 06 2021" } }, "Utils_beta": { "instance1": { "Arte-beta": { "hostname": "234", "domain": "erot", "version": "4", "date_time": "05 06 2021" } } }, "Utils_gamma": { "Arte-gamma": { "hostname": "2340", "domain": "abcd", "version": "34", "date_time": "05 06 2021" } } } }, "SUB_LAYER_TWO": { "Utils": { "Utils_pi": { "Arte-alpha": { "hostname": "234", "domain": "abc", "version": "3", "date_time": "05 06 2021" } } } } } } 

    Key things to note:

    - Layer_Alpha,Beta,... are created by default, and its contents are generated based on the input file.

    - Applications under the "Application" key have two different structures (1 is Application_alpha and 2 is Application_gamma)

    - Object keys are not all structured the same, e.g. 'artefacts' have different object attributes in comparison to 'cartridges'.

    - 'Application' objects have both value attributes (don't know if this is correct term) and nested objects.

    - Keys prior to the ":" delimiter in each line can be varying in quantity.

    - Also to "update" the json file. I was planning to delete a high-level key (i.e. delete Layer_Alpha) and hopefully recreate that from scratch within the existing json file from a new input.txt. Is this the correct approach?

    Things I know/I've tried:

    I know that this goal will likely be achieved through the use of dictionaries within python. Having three major stages of 1) Setting up dict structure 2) Reading and processing File 3) Checking if json file exists, if exists --> create json file else --> delete high-level key and append to existing file.

    I've made a bit of progress with stage 2, coming up with the following code:

    with open("input.txt") as f: lines = [l.strip() for l in f.readlines()] for line in lines: var1, var2 = line.split(":") field_values = var2.split(",") #Not sure how to handle var 1 as there a varying length key chains. Maybe with a tuple? key_chain = (var1.split(",")) 

    Overall really confused as to what to do here.

    Any help at all would be appreciated.

    submitted by /u/Chubbntuck
    [link] [comments]

    How to scale a 1080 x 35944 jpg to many A4 pages pdf?

    Posted: 10 May 2021 05:15 AM PDT

    portrait

    same resolution

    this didn't work(it didn't scale)

    magick convert 2021-5-10_18-57-7.JPEG -background white -page a4 myoutput.pdf 
    submitted by /u/hwpcspr
    [link] [comments]

    Migrate or not to migrate?

    Posted: 10 May 2021 05:24 AM PDT

    What factors should be considered when deciding if to move over to a new language or tech stack?

    submitted by /u/iamaatoh
    [link] [comments]

    What is this server design pattern called?

    Posted: 10 May 2021 04:19 AM PDT

    As per my understanding servers can or can not be bound by machines. As in, certain categories of servers don't care which host they are running on. For example, web servers; the client doesn't care which specific server does its request travel to. In the second category, servers are tightly bound to the host they are running on. For example, servers exposing APIs to execute shell scripts on a machine, get all the processes running on that machine, start another process on that machine; etc. Here, the client has to carefully specify both the API and the machine on which it wants to execute the request.

    Can anyone here help in understanding the design model for the second category? What are they called or can you share any articles or resources around the same

    submitted by /u/PhilosophyCreative66
    [link] [comments]

    What headphones do you use?

    Posted: 10 May 2021 01:33 PM PDT

    Whether it's coding, commute, leisure time or workout, most of us love music around us. I was wondering, what headphones or earphones do you use and could you expand a bit why you like them?

    I use Sennheiser HD-201 headphones. Great price/quality ratio. I also use Plantronics BackBeat FIT Bluetooth headphones for training. Super durable and comfortable for their purpose.

    submitted by /u/madza911
    [link] [comments]

    I want feedback on the customer billing system project that I made

    Posted: 10 May 2021 02:53 AM PDT

    After spending two weeks, I completed a project called the Customer Billing system in which a buyer can buy different things and see the shopping record also.
    The code is written in #Golang. I want you to look at the code and give me your honest feedback. Thank you!

    https://github.com/ibilalkayy/Customer-Billing-System

    submitted by /u/ibilalkayy
    [link] [comments]

    How to start code again?

    Posted: 10 May 2021 06:59 AM PDT

    It's been more than a year since the last time I write a code, by the way, it is a website, an incomplete website. I don't know if this is the right subreddit to post. But I felt pressured because I think I've been left behind by my fellow ComSci friends. It's like when the pandemic hits; It also affects me by causing too much stress and anxiety that it took me more than a year to start again. Now I just wanted to be consistent by learning how to become a web developer. It's just like that I don't know where to begin? Looking back at my source code last year gives me a headache and is not a fully responsive website. So where should start again?

    submitted by /u/JJ_Balms
    [link] [comments]

    No comments:

    Post a Comment