• Breaking News

    Friday, June 15, 2018

    Paul Manafort was found to be using draft emails in a shared email account (a tactic known as "foldering") to hide communications. How is it possible for the FBI retrieve those communications? Ask Programming

    Paul Manafort was found to be using draft emails in a shared email account (a tactic known as "foldering") to hide communications. How is it possible for the FBI retrieve those communications? Ask Programming


    Paul Manafort was found to be using draft emails in a shared email account (a tactic known as "foldering") to hide communications. How is it possible for the FBI retrieve those communications?

    Posted: 15 Jun 2018 07:42 PM PDT

    Programming documentaries

    Posted: 15 Jun 2018 08:05 PM PDT

    Are there any good programming documentaries on netflix?

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

    Auto fill username and password?

    Posted: 15 Jun 2018 09:43 PM PDT

    So i was wanting to make a program but not sure what to Google for some help so if somebody can point me in a direction that would be great.

    On screen there are two text boxs

    I am trying to figure out how to load a USB to auto run and fill in those text boxs from text files.

    Basically loading user name and password auto filling in the text boxs. The password changing depending on the day.

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

    Ran into a problem while following memory-game tutorial

    Posted: 15 Jun 2018 08:32 PM PDT

    Hi! I'm currently working on a Memory Game, and I'm following this tutorial: https://scotch.io/tutorials/how-to-build-a-memory-matching-game-in-javascript

    The error occurs in the startGame() function, in this code block:

    for (var i = 0; i < cards.length; i++){ deck.innerHTML = "" [].forEach.call(cards, function(item) { deck.appendChild(item) }) cards[i].classList.remove("show", "open", "match", "disabled") } 

    This code is supposed to remove all classes from the cards at the start of the game. The error I get is: "Uncaught SyntaxError: Unexpected token ]"

    I'm still pretty new to JavaScript, I've finished about 35% of " The Modern JavaScript Bootcamp" by Andrew Mead, so I'm having trouble actually reading this code and thinking of an alternative. I did Google the issue and ran across an article on why .forEach.call shouldn't be used, but without understanding exactly how this code block works I'm having trouble implementing any sort of alternative.

    The "cards" that the code references is an array declared early on that is supposed to hold all of the cards. deck is a UL.

    Help would be greatly appreciated

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

    [Java] Sending code to execute on another machine

    Posted: 15 Jun 2018 06:15 PM PDT

    I want to write a Java program that sends code over a network to execute on a client machine. Does anyone have any experience with this? It seems it might involve sending bytecode to the client machine. I've looked into the Java RMI API (remote method invocation), but it seems that it only lets you invoke methods remotely. It seems that the code is still executed on the server. It doesn't let you "send" methods to be executed on a different machine. Does anyone have any clever ideas for this?

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

    Is it a good idea to dedicate a VM for each computer usage scenario?

    Posted: 15 Jun 2018 05:15 PM PDT

    I'm tired of getting an overbloated OS, with lots of programs installed on it.

    I have to use Windows for Visual Studio for work; but I also enjoy Linux to test different technologies.

    Instead of having a single machine with lots of different programs on it, is it a good idea to have CentOS installed on the machine, and dedicate a VM to each usage scenario?

    e.g. a Windows VM for work, 2 other Windows and Linux machines used as software test machines, a Fedora install to test out new/different technologies, an Ubuntu machine for personal use, etc.

    This way, one could even snapshot the machines to restore them if something bad happens, and the base/host machine (running CentOS) has almost nothing installed (except Vmware, which I find to be faster than Boxes (KVM) for Windows VMs)

    Another advantage would be the ability to backup VMs, and simply restore them very easily on a new computer.

    Anyone here using such a setup? Any tips or recommendations?

    Sorry if this is not the right sub to ask, just tell me where you think I should ask.

    PS: The VMs would not be used remotely but on the same machine on which they are running.

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

    What is the simplest way to build a Citation Generator?

    Posted: 15 Jun 2018 04:21 PM PDT

    What is the simplest way to build a Citation Generator?

    It seems to need access to a large database. How to get such a database? There are many citation generators and none of them have posted what database they use.

    Could I just use an existing free citation generator as a backend?

    Here is what I have found so far: https://github.com/phpforfree/citationbuilder

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

    Angular JS, using JavaScript scripts.

    Posted: 15 Jun 2018 09:58 AM PDT

    so i have a script called slide.js that moves a div from one side of the screen to the other and in html it works.

    <script src="slide.js"><script>
    <div onclick="sidebarslide">hello</div>
    here is the code for the .js
    function slide() {
    var elem = document.getElementById("sidebar");
    var pos=0;
    if(open){
    var id=setInterval(frame,2);
    function frame(){
    if(pos == -220){
    clearInterval(id);
    }
    pos-=5;
    elem.style.left = pos + 'px';
    }
    open=false;
    }//end of if open
    else{
    var id=setInterval(frame,2);
    function frame(){
    if(pos > -5){
    elem.style.left= 0+'px';
    clearInterval(id);
    return;
    }
    pos+=5;
    elem.style.left = pos + 'px';
    }
    open=true;
    }
    }
    but in angular it does nothing. i know angular has something called a controller maybe thats what i need to use?.any idea what i can do?

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

    Programming tools that we need but don't exist

    Posted: 15 Jun 2018 08:17 AM PDT

    Hi folks,

    I'm looking for input on some of the tools that developers could use but don't exist. Could be anything to help the workflow.

    I'll be honest, I'm looking for interesting project ideas and thought I should do something for the community.

    Note: I'm sorry if this violates any guidelines, feel free to remove the post if it does.

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

    Is this a script? How to know what language?

    Posted: 15 Jun 2018 12:32 PM PDT

    Hi, I just got a new job and they gave me some "shortcuts" to use that are very helpful. These are "exe" files that run in the background (and have a system tray icon) and basically what they do is the following:
    If I press windows + D it copies the selected text (or highlighted cell in excel) and opens a company website search engine and pastes the text into the search query box and presses the search button.
    I asked around for the source files however no one had them and apparently were made years ago by some other guy.
    I'd like to make some similar shortcuts but i was wondering if these are windows scripts (AFAIK scripts are .bat or other non-exe extensions)

    submitted by /u/Nghtmare-Moon
    [link] [comments]

    Using other people's assets for practice projects

    Posted: 15 Jun 2018 12:22 PM PDT

    So if I was making a website for practice / portfolio work (not paid just my own project), can I use assets from someone else? Like someone's logo or something for example. I know I obviously can't use that for a real project that would actually be used, but this is just for projects for me to practice with and share on github.

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

    HealthKit API Pricing

    Posted: 15 Jun 2018 12:10 PM PDT

    My company plans on using he HealthKit API for commercial use.

    Does anyone know the pricing of the API or do they offer it for free? Same goes for Android's version like samsung health?

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

    Indexing - memory

    Posted: 15 Jun 2018 09:18 AM PDT

    Hello,

    could you explain me... how indexing works with memory? Where is index stored?

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

    Best way to take many headless screenshots rapidly?

    Posted: 15 Jun 2018 05:28 AM PDT

    Hi,

    I find myself needing to take a lot of screenshots from a list of URL's as quickly as possibly. Currently I use puppeteer to launch a process, load the page, take the screenshot and the start again with the next URL. I could have a few puppeteer processes running at the same time ofc but that still wouldn't scale very well to 1000+ screenshots.

    Does anyone have a clever idea to make this as fast as possible? Running this beyond my own machine, like on AWS or Heroku is totally an option, I'm just not sure how to leverage it.

    TIA!

    submitted by /u/l-arkham
    [link] [comments]

    Does the implementation of hadoop reducer relies on a big hash map to dedup all same keys ?

    Posted: 15 Jun 2018 09:09 AM PDT

    How does the implementation of hadoop map reduce reducer looks like?

    For example give the following file

    k1 -> v1 k1 -> v2 k1 -> v3 

    A naive way of implementing reducer is the following

    0. init an empty map 1. receive k1 -> v1 2. since k1 does not exist in map put k1->v1 into map with key k1 3. receive k1 -> v2 4. k1 is already in map, fetch k1 -> v1 in map and dedup it with k1 -> v2 and store it 4. k1 is already in map, fetch k1 -> v3 in map and dedup it with k1 in the amp and store the result 

    back into map

    This requires O(cardinality(k)) memory for map.

    This seems super inefficient.

    Is this how reducer is implemented?

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

    Make backup of specific files in python

    Posted: 15 Jun 2018 08:41 AM PDT

    Hello,

    the script below applies the function autoflake to a directory and any subdirectories after making a backup of the folder.

    I want to modify this for the program to iterate through the folder and only make backup of python files inside the directory and subdirectories.

    How would I do this?

     import subprocess import os import shutil from distutils.dir_util import copy_tree file_directory = input('Enter directory name to run autoflake: ') file_directory2 = file_directory+'backup' copy_tree(file_directory, file_directory2) print("Backup file created", file_directory2) def autoflake_run(): try: subprocess.run('autoflake -i -r --remove-all-unused-imports {}'.format(file_directory)) print("Autoflake process was complete") except: print('Path file error. Please make sure directory exists.') autoflake_run() 
    submitted by /u/metalloidica
    [link] [comments]

    Scapy sniff not sniffing packets

    Posted: 15 Jun 2018 08:07 AM PDT

    I am sending out packets on an interface ('enp0s9') and can verify that indeed packets are being sent on that interface with tcpdump.

    I am trying to sniff those packets with scapy by doing the following:

     packets = sniff(iface='enp0s9', store=0) print str(packets) 

    yet nothing seems to happen. I am following the scapy cheat sheet but i don't know if i have wrong syntax. any help?

    cheat sheet: https://blogs.sans.org/pen-testing/files/2016/04/ScapyCheatSheet_v0.2.pdf

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

    Looking for a course to learn everything I need to build a dynamic website with the right technology to scale.

    Posted: 15 Jun 2018 02:08 AM PDT

    Hi programmers,

    title says what I am looking for. I worked as a sysadmin so I already know how to host the website and how to build pipelines to deploy it.

    I am looking for a course which explains everythings whats needed. (HTML / CSS / Frameworks / Backend and so on.) I checked codeacademy/ Coursera / DataCamp and so on but not sure which one to pick.

    I don't really care if it is free or not (should not be too expansive) or if I do a cetificate or not. Please help to find the right one.

    I have time right now and want to work on my own little project wanted to do that since I got in touch with the internet years ago...

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

    ActionController::ParameterMissing in PostsController#create param is missing or the value is empty: post

    Posted: 15 Jun 2018 06:36 AM PDT

    this is infuriating me and stack overflow have disabled my account for 6 months for asking too many questions

    so im building a blog in rails and im getting this error from controller ruby file, its telling me this is the code thats causing the problem:

    private

    def post_params

    params.require(:post).permit(:title, :body)

    end

    end

    from what i can gather when my create method (which i dont even know how thats relevant since i get this error while trying to delete a post) references my post_params method it doesnt find any code to run, i dont know why this is happening (if that even is whats happening), the only thing i can think of is that the method is private but its normal to have a parameter method as private

    this is my create method if its of any use:

    def create

    @post=Post.new(post_params)

    if @post.save

    redirect_to @post

    else

    render "new"

    end

    end

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

    Alright boys. Is it 'curly brace' or 'curly bracket'?

    Posted: 15 Jun 2018 05:01 AM PDT

    The Clean Architecture doesn't seem to care about transactions

    Posted: 15 Jun 2018 12:32 AM PDT

    No implementations of it that I can find online actually give you a framework agnostic and practical way of implementing it. Which is pretty hilarious, considering how often people need to be able to rollback/commit several data updates atomically.

    I've seen several subpar suggestions towards solving it:

    1. make Repository methods atomic

    2. make Use Cases atomic

    Neither of them are ideal.

    Case #1: most Use Cases depend on more than a single Repository method to get their job done. When you're "placing an order", you may have to call the "Insert" methods of the "Order Repository" and the "Update" method of the "User Repository" (e.g: to deduct store credit). If "Insert" and "Update" were atomic, this would be disastrous - you could place an Order, but fail to actually make the User pay for it. Or make the User pay for it, but fail the Order. Neither are ideal.


    Case #2: is no better. It works if each Use Case lives in a silo, but unless you want to duplicate code, you'll often find yourself having Use Cases that depend on the operation of other Use Cases.

    Imagine you have a "Place Order" use case and a "Give Reward Points" use case. Both use cases can be used independently. For instance, the boss might want to "Give Reward Points" to every user in the system when they login during your system's anniversary of its launch day. And you'd of course use the "Place Order" use case whenever the user makes a purchase.

    Now the 10th anniversary of your system's launch rolls by. Your boss decides - "Alright Jimbo - for the month of July 2018, whenever someone Places an Order, I want to Give Reward Points".

    To avoid having to directly mutate the "Place Order" use case for this one-off idea that will probably be abandoned by next year, you decide that you'll create another use case ("Place Order During Promotion") that just calls "Place Order" and "Give Reward Points". Wonderful.

    Only ... you can't. I mean, you can. But you're back to square one. You can guarantee if "Place Order" succeeded since it was atomic. And you can guarantee if "Give Reward Points" succeeded for the same reason. But if either one fails, you cannot role back the other. They don't share the same transaction context (since they internally "begin" and "commit"/"rollback" transactions).


    There are a few possible solutions to the scenarios above, but none of them are very "clean" (Unit of Work comes to mind - sharing a Unit of Work between Use Cases would solve this, but UoW is an ugly pattern, and there's still the question of knowing which Use Case is responsible for opening/committing/rolling back transactions).

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

    I hired a company to design a website/android and ios apps but I have little to no knowledge in programing

    Posted: 14 Jun 2018 11:22 PM PDT

    I know very little when it comes to programming, so I wouldn't really know if they're doing a decent job or not. I'm supposed to have a meeting with them in just under a week. What exactly should I be worrying about? What are the "main" things I should be asking them? The website/apps will be for cloth selling, and I'm expecting to have a fair amount of visitors

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

    A unit test framework that infers default implementation. Would it work?

    Posted: 15 Jun 2018 02:22 AM PDT

    I don't think it is something that programming should be like. It might be too rigid all the time. Perhaps even mess the testing itself with other issues.

    I just got to thinking the other day whether it could be in any way reasonable. Where it might make sense is in honing mind to think programming more from the point of view of testability.

    Or, is there some curious piece of experimental code somewhere on this?

    What do you think?

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

    No comments:

    Post a Comment