• Breaking News

    Friday, February 11, 2022

    How difficult is it to create cross-platform GTK4 application? Ask Programming

    How difficult is it to create cross-platform GTK4 application? Ask Programming


    How difficult is it to create cross-platform GTK4 application?

    Posted: 11 Feb 2022 04:43 AM PST

    Creating a WinForms is easy, at least at the start. Only a few lines to show a window. I had created a dummy Windows application in C, and it took tens of lines of cryptic code just to show an empty window. So, if I create a GTK4 app, using C++ (because it does not seem to support Java/C#, etc), how is the experience like? I am only talking about the code to create/interact with the GUI, not the business logic part. Is it more like the aforementioned C experience?

    If you wonder what kind of app it will be, think of common simple utility with one main window, a few dialogue boxes, and a settings window.

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

    How can I make Mac OSX 11.00 to remember SSH keys and be used by git, ssh, IntelliJ once added?

    Posted: 11 Feb 2022 05:01 AM PST

    Hello!

    I have been using Mac OSX for a while now (I'm new to do this OS) and I want OSX to remember each SSH key I use for any source to be used by other sources as well, such as Terminal, IntelliJ Git, etc.

    Right now I'm using the following method

    ~/.ssh/config

    Host * UseKeyChain yes AddKeysToAgent yes IdentifyFile ~/.ssh/ssh_key 

    The problem with the above method is the "remembered" ssh key is only used in zsh & terminal.

    And in order to use I have added the following line:

    eval "$(ssh-agent -s)" 

    in my .zshrc (ZSH Profile)

    If I try to git pull through IntelliJ it asks for my git credentials and as I understand IntelliJ doesn't try to use my certificate

    Is there any workaround?

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

    I HATE WINDOWS DEFENDER

    Posted: 11 Feb 2022 12:31 AM PST

    So i have this app for my friends that don't know how to install mods. It basically installs mods so they can play on our minecraft server.

    I made this app in c# .NET.

    What does it do?

    It downloads forge-installer.jar and executes it - I think this is the part that defender thinks is a trojan.

    The user installs forge and than the app downloads mods from our cdn and it puts these mods to the minecraft mods folder (c:\Users\USER\AppData\Roaming\.minecraft\mods)

    The funny part is i tried it on:

    Windows 10 in a vm - Windows defender said it is a trojan.

    Windows 7 in a vm - Does windows 7 have an antivirus?

    Windows 10 on hardware - Smart screen kicked in.

    Virustotal - 3/67 flagged it as Malicious. Full scan: Here

    Code The main code file is Form1.cs, Exe file

    Update i added a .bat file that downloads and installs forge and now it works like it should

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

    BS4 Downloading webscraped images in Python

    Posted: 11 Feb 2022 08:08 AM PST

    Im using a bs4 library to scrape specific images for a website. So i created a for loop as follows

    soup = BeautifulSoup(r.text, 'html.parser') articles=soup.find_all('div',{"class":"archive-post"}) for article in articles: article.find('img').attrs['src'] print("Image Source:", article.find('img').attrs['src'])#image src print() 

    How would I be able to implement the f.write command to download these images ? is there an easier way?

    I used this block of code before

     for article in soup.select("img[src^=http]"): lnk = link["src"] with open(basename(lnk)," wb") as f: f.write(requests.get(lnk).content) 

    But it downloads literally every image on the site, unlike the first block of code that only retrieves the ones i want

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

    2 Generals' problem question

    Posted: 11 Feb 2022 03:40 AM PST

    Let's say the 2 generals agree in advance that after you get 10 confirmation letters - you attack.

    After the 20th letter (exaggerating on purpose) - both can know for sure the other guy got at least 10, so both can be certain the other one will attack, according to protocol.

    What is wrong with this solution? Why would uncertainty still creep in under that protocol?

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

    Should you be worried by your computer making beeping sounds during expensive tasks?

    Posted: 11 Feb 2022 09:28 AM PST

    A few months ago, I dropped my computer from my table. (a height of about 2 feet). Lately, when I run python functions that are somewhat expensive (ie searching through thousands of files), I hear a'uiet, but audible beeping sound. Is this a sign that my computer (its a laptop) is on its last legs and I should be backing everything up like every 15 minutes?

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

    Best Background for Cloud Dev

    Posted: 11 Feb 2022 07:28 AM PST

    Hello, I'm a uni student with limited time and have spent the majority of my undergrad years studying web and full stack development with minor cloud application. On the other hand, I've read books and written few projects in the realm of systems programming in rust and cpp because any upcoming potential internships I have lined up are in something related to systems programming.

    My overall question is this: My real interest and the interest of my mentor are in cloud architecture and cloud design. I thought initially full stack would be a good way to get in but I know also that working with vms in the cloud is something that can go hand in hand with systems development. Which of my two paths do you think would be best to invest in to take the next step towards cloud?

    submitted by /u/Poonkappa-daddy
    [link] [comments]

    Domain without extension?

    Posted: 11 Feb 2022 07:12 AM PST

    Hello I have started an IT coop at this company which has 2 domains. For simplicity lets just call the company Dave. So the 2 domains they have are Davedomain and Dave.ca. I was told they first had DaveDomain and then decided to start migrating everything over to Dave.ca because they thought it would be more proper. I am wondering how in the F*** you can have a domain name without an extension?? How did they used to even send emails before they changed it to a .ca domain? The whole thing mind fucked me and I cant find a resource online that says this is possible. Can someone explain this?

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

    Is my project feasible or not?

    Posted: 11 Feb 2022 05:53 AM PST

    I have no prior experience in programming, and my partner (who does) and I are looking to develop a simplistic radio-like website as community service. The aim is to make a streamlined Spotify for free and easily navigable for elderly users.

    Optimally, it should have a playlist of audio files playing on loop, like a radio station, but it should give the user the option to skip songs, or like songs. After liking the songs, they should go into a playlist which can be played in the future. However, I want to achieve this without asking our users to create an account. I am aware that we probably need to pay to host a website. Is this project feasible or possible at all? Help much appreciated!

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

    Why is it giving instance of StreamController instead of int value?

    Posted: 10 Feb 2022 11:17 PM PST

    import 'dart:async'; void main() async { Stream<int> timedCounter(Duration interval, [int maxCount]) async* { var i = 0; while (true) { await Future.delayed(interval); yield i++; if (i == maxCount) break; } } print(timedCounter(Duration(seconds: 1), 10)); } 
    submitted by /u/jakezg1
    [link] [comments]

    First order predicate logic I have messed up while removing implications, where is the mistake in result?

    Posted: 11 Feb 2022 03:56 AM PST

    settings.json file

    Posted: 10 Feb 2022 09:48 PM PST

    Is this file a malware? it suddenly appeard in my dekstop

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

    Python Convert List of strings to variables

    Posted: 10 Feb 2022 05:54 PM PST

    Basically I've got a bunch of dataframes that I want to perform changes on.

    df1 df2 df3

    and so on. I've got a list of the names of each of these dataframes dflist = ['df1', 'df2', 'df3']. I want to do something like this:

    for i in in dflist: i.iloc[3] = i.iloc[1] + i.iloc[2]

    But this isn't working because it's treating each item in the list as a string rather than a variable. Any help? Thanks in advance!

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

    Child Process as Command Line Interface

    Posted: 10 Feb 2022 10:23 PM PST

    I need to run multiple consecutive commands on the command line from within a Windows .exe, written in C++. Essentially communicating with IO in my executable file which can only be done through a series of commands on the command line.

    It was pretty easy for me to run a single script using a child process, and I was wondering if there is something similar to run multiple consecutive commands while keeping the process alive.

    I found this article somewhat interesting: https://docs.microsoft.com/en-us/windows/win32/procthread/creating-a-child-process-with-redirected-input-and-output

    But the child process there looks like its just piping its input back to its output. I would like like to be able to use the child's input to execute commands and then pipe the result to the parent to decide what to do with it.

    I think the obvious answer to my question is to just start a separate script to handle the communication, but I doubt this would work in my case because of the timing of the commands, keeping the process open, and because I also need to start a python interpreter on the command line.

    TLDR: I need to run cmd commands in a separate process within my C code. The child process needs to stay alive with the parent process and I need to be able to pipe the commands to the child and output back to the parent.

    I know I'm probably getting stuff wrong, thats why I'm asking for help.

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

    How to add "dynamic" selections for HTML/JavaScript?

    Posted: 10 Feb 2022 06:19 PM PST

    Im trying to create something that can add an extra selection (the dropdown thing) every time a user makes an input into the last selection above. And then in the new selection if they put something else in it then there would be a new one underneath, and so on. I'd also want it to have the same selection information along to avoid unnecessary programming, but if that is not possible that is fine. Thanks in advance!

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

    Fastest/Easiest way to build a random popup web application

    Posted: 10 Feb 2022 10:21 AM PST

    Hi guys!

    So my boss has been pushing me to get this data collection tool built for the past couple of weeks and I am struggling.. So here are the requirements

    1. Webpage must randomly present popups to users with questions such as "Does this website have access to your cookies?" With yes or no option buttons.
    2. The application will not have functionality to access the cookies, it's just a survey app really
    3. The pops ups/questions will be presented randomly for each user
    4. The user will enter a unique ID into the first pop up..
    5. All responses to pop-ups will be recorded in a DB

    I've been trying to make this happen with the MERN stack as I have built static react websites before, but I'm struggling with learning the concepts of state and the react syntax..

    Was hoping someone here could point me in another direction.. I'm not sure if Wordpress has this sort of plugin or something.. but I have to show my boss something soon...

    Best,

    Will

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

    program that downloads social media data and automatically puts it in a spreadsheet

    Posted: 10 Feb 2022 11:23 PM PST

    Let's say I wanna download every tweet on #iphone and have them placed in a spreadsheet.

    Ideally I wouldn't ever have to go on Twitter since the data would be downloaded and listed into my excel spreadsheet.

    Any recommendations ?

    Sorry if this isn't the right place.

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

    How to scroll in Instagram following window using selenium and python?

    Posted: 10 Feb 2022 09:23 PM PST

    How to scroll in Instagram following window using selenium and python?

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

    Comment Reply Bot

    Posted: 10 Feb 2022 05:37 PM PST

    My friend wants my help to create a bot that can read comments on their onlyfans account and automatically reply to posts that have certain keywords. It sounds like a great project that would really teach me a lot / improve my skills as a programmer.

    The trouble is is that I've never programmed anything on this scale and am not really sure where to start; though I do feel like I have an idea for a basic algorithmic approach one might use to generate this sort of thing. Which in mind would look something like this:

    - Read in most recent comment

    - Parse comment for particular keywords

    - Check to see if a reply has already been posted

    - Post reply

    But Im not really sure how exactly I could interface with the website in such a way or in which language with which I should do so. So basically Im looking to see if anyone can point me in the direction of some good resources on this particular subject as well as exactly what language/format this sort of thing would conventionally be done in (as in how it might be approached by a professional in the industry).

    FWIW I have decent knowledge about C/C++, and pretty cursory knowledge about HTML/CSS. Though Im eager to learn more about anything really.

    Thanks! =)

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

    How to start without Internet?

    Posted: 10 Feb 2022 11:43 AM PST

    Spare-time developer here. I've set my on writing an app (c#) that read the ocr data from a pdf that was added from the scanner (i.e. the pdf is already searchable).

    However, I had a hard time finding some good pointers on the internet. And this got me wondering:

    How would you start to tackle this problem, if there was no internet? What would you do, if you were the first one to write a programm like this?

    I think that today's programming entails a lot of searching and copying from the internet. So I find it very interesting how things would be tackled if this wasn't an option.

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

    I don't know how to code but I need to run this piece of code for work. Can someone please help me?

    Posted: 10 Feb 2022 07:12 PM PST

    code

    I need to run this program to determine some outputs from it and I don't have a Java software to run it, nor do I understand anything about coding. What the quickest easiest way to get this code to work?

    Thank you!

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

    NYT Reporter - Have you worked for a company that uses coding metrics (or other productivity monitoring tech)?

    Posted: 10 Feb 2022 01:52 PM PST

    My name's Arya, and I'm a reporter at the New York Times. I'm digging into productivity tracking in the workplace, and I'd love to hear about your experiences with this technology, especially those that generate coding metrics.

    We're specifically interested in technology that goes beyond just manual time logs or task managers. For example, software that gathers information on employee computers, like typing and mouse-click frequency, or webcam photos and desktop screenshots. Or tech that automatically generates metrics and scores, like how many lines of code you write or code quality information. Or even tech that monitors employee biometric or location data.

    Are you familiar with any companies that use technology to track employee productivity? Maybe you were tracked in this way, managed employees using this software, or helped install or build it. Or perhaps your friend or family member told you about a similar system in their workplace. If so, I'd love to hear from you. Please DM me here or fill out the form below to help us learn more.

    https://www.nytimes.com/2022/02/01/business/worker-productivity-monitoring.html

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

    I don't understand the point of C#'s getter and setters...

    Posted: 10 Feb 2022 03:35 PM PST

    My understanding of getters and setters is that they are supposed to make it harder for the developer to accidently assign/read a class' attribute. They accomplish this by making the syntax more deliberate. In Java or C++, we'd write

    C++

    Punk.setName("Steve");

    instead of

    Punk.name = "Steve";

    Now consider this example:

    C#

    public class Punk

    {

    private string name;

    public string Name {get; set;}

    }

    Punk DummyPunk = new Punk();

    DummyPunk.Name = "Steve";

    System.Console.WriteLine($"The punk's name is {DummyPunk.Name});

    I don't understand what we've achieved by making name private, and then creating the Name property to act as a getter and setter for name . You can still access and modify the name attribute, and unlike the C++ example I posted above, the syntax for using the getter and setters in C# is extremely similar to direct attribute modification (the only difference being that you have to write name with a uppercase N so Name, which is hardly much of a difference).

    It feels like must be missing something.

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

    Help for use WinStationShadow Win32 function

    Posted: 10 Feb 2022 11:31 AM PST

    Hi,

    I would like to use the WinStationShadow function in my small project. I would like to write a console RDP shadow switch utility. I found the Process Hacker use this function. See:
    https://github.com/processhacker/processhacker/blob/master/ProcessHacker/sessshad.c
    (at line 215)

    My POC code:

    using System; using System.Runtime.InteropServices; namespace ShadowSwitch { class Program { public const short KBDSHIFT = 0x1; public const short KBDCTRL = 0x2; public const short KBDALT = 0x4; [DllImport(@"winsta.dll")] internal static extern Boolean WinStationShadow(IntPtr hServer, String TargetServerName, ulong TargetSessionId, byte HotKeyVk, ushort HotkeyModifiers); static void Main(string[] args) { Console.WriteLine(WinStationShadow(IntPtr.Zero, Environment.MachineName, uint.Parse(args[0]), (byte)'*', KBDCTRL | KBDALT)); Console.WriteLine(Marshal.GetLastWin32Error()); } } } 

    But I get True as WinStationShadow result, and Win32 last error: 120 (This function is not supported on this system.)

    I tested on same machine and with same (source/target) session and with same user right as like tested with Process Hacker. My shadow switching drop the error above, until Process Explorer shadow switch working as expected.

    What I wrong? Thank you for suggestion...

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

    Help finding projects to learn data viz, data analytics and web

    Posted: 10 Feb 2022 02:46 PM PST

    Hi! I'm posting this after a surge of desperation.

    I feel like I cannot learn to code, I took some courses in college, I learned some python, some SQL, but I still can't remember anything. I paid for a year of DataCamp, completed several courses and still froze whenever I need to build something, I feel like I'm wasting my time.

    I understand really basic stuff, but I feel I make no progress just doing quick quizzes and clicking the right option on DataCamp.

    Will developing project help me? Where can I find some project to beggin with? I want to focus on Data Viz, Data Analysis and some Web Development.

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

    No comments:

    Post a Comment