• Breaking News

    Sunday, May 12, 2019

    What should I learn to create a simple encrypted chat program that works pc to pc connected to same network via lan in JAVA? Ask Programming

    What should I learn to create a simple encrypted chat program that works pc to pc connected to same network via lan in JAVA? Ask Programming


    What should I learn to create a simple encrypted chat program that works pc to pc connected to same network via lan in JAVA?

    Posted: 12 May 2019 06:38 PM PDT

    Hi,

    So I took this project in my OOP course to build a program which sends message from a pc to another pc which are connected to same network via lan. The message is encrypted from sender and decrypted at receiver. Sender will use a key to encrypt the message and receiver will have to know the key.

    I am a noob(like really really noob) at this. I am learning JAVA currently. I have no clue what to do.

    Can you please tell me what topics or things I should learn in order to make the whole program?

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

    How would I create a chrome extension that simply changes the colors of a website?

    Posted: 12 May 2019 11:45 AM PDT

    I want to make a chrome extension that simply changes the colors used in a website, how would I do that? I can do it temporarily by just going into inspect element and changing the colors through html but I want this effect to remain persistent and site wide. I have looked up how to make chrome extensions and am currently reading about it but can someone point me in the right direction?

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

    Working with a Circular Linked List recursively in C++, experiencing segmentation faults and memory leak issues.

    Posted: 12 May 2019 09:01 PM PDT

    Like the title says, I am experiencing segmentation faults/memory leaks in a circular linked list. The objective of this function that I'm trying to achieve is being able to determine whether the second last node in a circular linked list is a multiple of 5. For example:

    Here is an example generated linear linked list of numbers. 2 -> 10 -> 18 -> 20 -> 2

    In this list, the 4th node/the integer of 20 is divisible by 5, therefore I will report that it is a multiple of 5.

    Before looking at the function, here are things that should be assumed: - There is another function already generating a linear linked list of numbers for us - Pointer 'rear' is already set to be at the end - The data we are working with is all integers.

    Here is the link to the code: https://pastebin.com/DHTj6zF2 Thank you for helping! And in case anyone was curious, this is for a C++ data structures class. This is just a practice problem for a midterm I have soon.

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

    What's the state of Stack Overflow, in your opinion?

    Posted: 12 May 2019 11:31 AM PDT

    It's obviously a repository of solutions for programming problems. How do use it? What needs to change? Are you building a reputation by answering questions?

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

    Need Help With DB in C# VS (Forms Application)

    Posted: 12 May 2019 05:21 PM PDT

    so i'm doing a Project with Microsoft Access DB and VS C# widows forms Application and Had a problem with inserting Data into my table i checked it many times and couldn't the problem .

    this is the code : https://ibb.co/Vq8ymwb

    and this is the error : https://ibb.co/3Wy0Z7b

    any help would be gratefully appreciated :) .

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

    Java multi threading. need help

    Posted: 12 May 2019 02:17 PM PDT

    I have certain number of policies for each contact in a list of contacts. If the policies are over 100 then I need to use new thread to assign to another contact , what I have done is created a inner class storing array object which extends threads class, and wrote a method to assign policies to another contact but before sending the list of policies to new thread I am fetching policies in an array and sending that.

    What I want to achieve is when user assign policies greater than 100 he should be able to navigate through other page for other tasks. My question is

    1. Is it correct to achieve multi threading this way because when user again assign from same contact it will fetch less policies do same work with another thread? 2.what if he tries to create more threads at the same time and lastly how can i improve on this?

    //getting policies from database

    List < Map < String, String >> policies = new ArrayList < > (); try { //getting list of policies

    policies = JsonStrToMap(GetContactPoliciesClient.getContactPolicies(custNum, fromContactSeq)); policiesCount = policies.size();

    //policies greater than 50 assigning new thread

    if (!policies.isEmpty() && policiesCount >= 50) { new assignPoliciesNewThread(policies, nameWithSeq).start();

    //inner class for new thread class assignPoliciesNewThread extends Thread { private final List < Map < String, String >> policies; private final String toSequence; public assignPoliciesNewThread(List < Map < String, String >> policies, String toSequence) { this.policies = policies; this.toSequence = toSequence; } public void run() { Policy policy = new Policy(); try { for (Map pol: policies) { HashMap < String, Object > map = new HashMap < > (); policy.setLevel1Org(100); policy.setOutsideProd_contactSeq(toSequence); policy.setCustNum(pol.get(APIGEE_MODIFY_POLICY_APPLICATION_CUSTNUM).toString()); policy.setPolicyNum(pol.get(APIGEE_MODIFY_POLICY_APPLICATION_POLICYNUM).toString()); policy.setPolicySeq(Integer.valueOf(pol.get(APIGEE_MODIFY_POLICY_APPLICATION_POLICYSEQ).toString())); map.put("policy", policy); try { policy = (Policy) ApigeeCommonClientUtility.callApigee(map, "modifypolicy", HashMap.class, Policy.class); } catch (Exception e) { logger.error(e.toString()); } } } catch (Exception e) { logger.error(e.toString()); } } } 
    submitted by /u/chetanraj38
    [link] [comments]

    Why are the dynamic linker and the link editor both called `ld`?

    Posted: 11 May 2019 10:12 PM PDT

    On my system, the dynamic linker (used when loading the program) is named ld-2.29.so, and the linkage editor (the last step of compilation) is named ld. Is there a reason these two separate things are both named ld? It caused be a lot of confusion initially.

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

    [UK] Do I need a degree to have a successful career in programming?

    Posted: 12 May 2019 12:55 PM PDT

    So I'm an A-Level student, about to finish my A-Levels and get my results this summer and maybe go to uni starting this year too. My current predicted grades are A*AA, A* in computing and both A's in electronics and maths. I picked Southampton as my firm choice which is one of the best computing unis. The problem is I am not quite sure I will get the loan that I applied for over 2 months ago and still haven't got a reply where most my other friends already got accepted a long time ago even those who applied after me. I am mainly worried as due to my Polish nationality I might not be able to get the loan, despite living in the UK for over 4 years and speaking fluent English.

    From your experience, is a uni degree really required in the computing industry if I want to have a successful career?

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

    Logging and monitoring on a $5 digital ocean droplet??

    Posted: 12 May 2019 12:45 PM PDT

    So I want to run a long running process that's going to scrape lists of data. Are there any methods to logging and monitoring that I can use for this? I want to add metrics for the number of new data items I discover in the responses and also response times for requests.

    Primarily writing this little app in go, using sqllite as my db. Currently logging to stdout, and digital ocean gives you system monitoring, but no application monitoring. I have no idea of how to accomplish free logging and app monitoring at the moment.

    So is there anything I can use for my case?

    submitted by /u/zinger-meal
    [link] [comments]

    Make: trouble separating object files and source files.

    Posted: 12 May 2019 12:20 PM PDT

    Hello, I am very new to make. I am trying to get the compiler to move all the newly created object files to a particular directory and then link everything. I have posted in several forums, but no matter what course of action I take, I keep getting errors. As of now, I get the following error:

    *** No rule to make target 'obj/gen/display/RollRateWarning_RollRate_display_adaptor.o'

    My code is below. I've looked at a number of examples, but no matter what I do, it doesn't seem to work the way I want it to you. Any help or suggestions are very much appreciated!

    # specify compiler CC :=gcc # set compiler flags CFLAGS :=-Igen/display -Igen/logic -Iman -Ilib/include -pipe -march=native # set linker flags LDFLAGS :=-lglut32 -loglx -lopengl32 -Llib # specify separate directory for objects OBJDIR := obj # include all sources SOURCES :=$(wildcard gen/display/*.c gen/logic/*.c man/*.c) # create objects from the source files OBJECTS := $(SOURCES:%.c=$(OBJDIR)/%.o) # specify the name and the output directory of executable EXECUTABLE :=win32/demo .PHONY: build all all: $(EXECUTABLE) # all isn't a real file # $@ = placeholder for target name # compile $(OBJDIR)/%.o : gen/display/%.c $(CC) $(CFLAGS) -c $^ -o $@ $(OBJDIR)/%.o : gen/logic/%.c $(CC) $(CFLAGS) -c $^ -o $@ $(OBJDIR)/%.o : man/%.c $(CC) $(CFLAGS) -c $^ -o $@ # link $(EXECUTABLE): $(OBJECTS) $(CC) $^ $(LDFLAGS) -o $@ build: @mkdir obj 
    submitted by /u/under_byte
    [link] [comments]

    Need some new eyes on my code so far...

    Posted: 12 May 2019 12:03 PM PDT

    So yesterday I made a post regarding a coding exercise I was given (https://www.reddit.com/r/AskProgramming/comments/bnh2lx/regex_questions/)

    The TLDR is that I need to be able to have the program spit out replies based on what was entered. My first thought was regex done in a switch statement.

    However some strings would satisfy the tests that were given while others did not and it seemed when I got another working two more would fail...

    I have the code in a repository now and just wanted to see if anyone can see maybe if I have the right idea and offer even the smallest suggestion as I am incredibly frustrated and discouraged.

    Repo: https://github.com/Joe-Gigs/regex

    Its a simple Sinatra app and the Ruby Code in question is in a file called 'francis.rb' (their name not mine)

    Thanks, happy to answer any questions.

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

    ntifs.h is giving bunch of errors internally

    Posted: 12 May 2019 11:48 AM PDT

    i am new to driver development and this is my first simple project.

    i included ntifs.h in my source and its giving me lots of error from the ntifs.h source.
    Any idea whats the problem? thanks !

    https://i.imgur.com/F2JPjNW.png

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

    What is the best solution for working with 3D objects on the web?

    Posted: 12 May 2019 08:45 AM PDT

    That's what will have to do my website. The input is a few pictures from which you create the texture, then this texture is mapped on the finished 3D object is displayed on the website. What language\library\frameworks it is better to use? Thanks.

    submitted by /u/BaksteR-23
    [link] [comments]

    Thread Synchronisation Help

    Posted: 12 May 2019 01:06 AM PDT

    Hello, with the following stream of code, the output is of the threads are in a jumbled order and seems to be random. How can I get them to output in order using a synchronisation primitive? I've tried to use Mutex's with locks and am still unsuccessful. For clarification, the strings of text are all correct, but their ordering is not.

    #include <thread>

    #include <iostream>

    #include <mutex>

    #include <string>

    #include <chrono>

    void printer(std::string message) {

    for (char c: message) {

    std::cout << c;

    }

    std::cout << std::endl;

    }

    int main (void) {

    std::thread t1(printer, "The eagle has landed.");

    std::thread t2(printer, "The horse is in the barn.");

    std::thread t3(printer, "The chicken has flown the coop.");

    std::thread t4(printer, "The man in black fled across the desert.");

    t1.join();

    t2.join();

    t3.join();

    t4.join();

    return 0;

    }

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

    [java] print List to console if the List has been altered?

    Posted: 12 May 2019 07:32 AM PDT

    I am writing a path observer.

    It is a program which starts a FileObserverThread for every file in a directory.

    If a file has been changed the responsible FileObserverThread will add a new instance of FileChange to a list. I want to have all file changes stored in this list.

    If a value is addet to that list I want to print it to the console.

    I am looking for a way to trigger a method if the list has been altered.

    I thought of something similar to javafx properties since I don't know any other ways of setting a listener to a variable.

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

    No comments:

    Post a Comment