• Breaking News

    Thursday, June 14, 2018

    So this whole switching to GitLab from GitHub thing.... Ask Programming

    So this whole switching to GitLab from GitHub thing.... Ask Programming


    So this whole switching to GitLab from GitHub thing....

    Posted: 14 Jun 2018 08:42 PM PDT

    So now that Microsoft acquired GitHub a lot of people have been saying to switch to GitLab and GitLab has an easy way to export your GitHub repos. So is there actually a considerable amount of people exporting their repos over to GitLab? If so, why and should I consider switching myself because I see no reason to? I don't understand the big deal about this. Is this just a big meme/joke and people aren't actually switching or is this legit? Also have any of you switched? Thanks for all responses in advance.

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

    I'm applying for housing, and they often want most of my credentials for background checks etc. Is there a way to provide them a cryptographically signed result of a background check that is unquestionably tied to my identity, rather than giving out all my information to all of these housing owners?

    Posted: 14 Jun 2018 03:00 PM PDT

    It's really ridiculous to be handing out my previous addresses, social security number, previous employers, etc, to everyone. Why isn't there a norm of just using public/private keys tied to my identity and cryptography to do this instead? And if there are such services, what are they?

    Thanks!

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

    What are some of the best audiobooks for learn advanced programming concepts?

    Posted: 14 Jun 2018 03:19 PM PDT

    I spent a lot of time driving, and I'd like for that time to be productive. I've tried pulling up some complicated coding tutorials, but I'm getting fed up with how many say things like "as you can see here" and "if you look at how I change this code" and "you can see the result." No I can't.

    I want to learn some advanced programming topics, like blockchian or encryption or algorithms or micro-optimization, but without needing my eyes. Concepts would be cool, but I can never find audio-focused tutorials.

    I don't have a degree in computer science and am self-taught, so there's a lot I don't know (namely vocabulary) despite being a senior developer.

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

    Need help choosing a new keyboard that is good for long programming sessions.

    Posted: 14 Jun 2018 09:25 PM PDT

    I currently have a Logitech k750 which is a chiclet keyboard. I love the keypress feel and short travel distance, but I dislike how short the battery life is.

    I need some suggestions for a new keyboard that is geared towards typing accuracy and I'm hoping you guys here will have some suggestions.

    I like short key travel, quiet, distinct feel when the key actuates.

    What keyboard do you currently use? Do you like it?

    Thanks!

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

    Help with GitHub

    Posted: 14 Jun 2018 05:05 PM PDT

    So I don't know much about github, and I don't think I need to because everything I do is individual, but I use github pages to host my website because it's nice and simplistic how I can just add the folders and index.html, etc.

    Anyways though, I edit this entirely on my desktop because it is just easier that way, however I am struggling finding an efficient way to then add these changes to the github repo. Currently, it's fastest to completely delete the repo and re-make it, then upload all the files. There has to be a better way to do this, so any help is appreciated.

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

    Advection-Diffusion Equation Boundary Conditions Question

    Posted: 14 Jun 2018 08:43 PM PDT

    Hello, I'm working on a program where I need to solve a 2D advection-diffusion equation using an explicit upwind approximation for the upwind part and implicit approximation for the diffusion part. My code is finished, but my results are not as expected. I think it has something to do with my treatment of the boundary conditions.

    The problem asks me to use these boundary conditions. For the first case, it is simple is a simple matter. But for the second part, where y=yb, I am struggling to figure out what to do. Here's the relevant section of my code:

    for q = 1:Nx for s = 1:Ny p = (s-1)*Nx+q; g = exact(q,s,t); if s == 1 && q ~= 1 && q ~= Nx A(p,p) = (1/dt)+(2*D/dx^2)+(2*D/dy^2)+ (2*vy/dy); A(p,p+1) = -D/dx^2; A(p,p-1) = -D/dx^2; A(p,p+Nx) = -2*D/dy^2; A(p,p-Ny) = -D/dy^2; RHS(p) = ((1/dt)+(vx/dx)+(vy/dy))*cn(q,s)- (vx/dx)*cn(q+1,s)-(vy/dy)*cn(q,s+1)+S(x(q),y(s),t)- ((2/dy)*g); 

    I'm trying to set the code up so that the boundary condition is applied to the bottom row of a Nx x Ny grid. The main problem with this is that I am getting index out of bounds errors. I think my equations are wrong here, but I'm not really sure how. Even if I make adjustments to my boundary equations so that they won't call on anything out of bounds, the shape of my resulting graph is still wrong.

    If anyone could help me with this it would be very appreciated. I can also add more details to the problem if needed.

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

    Font embedding into an Android keyboard?

    Posted: 14 Jun 2018 07:38 PM PDT

    Hello all! Recently I've been getting into an idea for an app. I want to make a keyboard app for my language however the font that exists by default is quite outdated and I want to update it. So, I found a newer font and found that I could run the script on my website so that each user would see the new font when using the language, great! I then found out I could embed fonts into PDF files so that once the PDFs were downloaded, the font would render, also great! However, my challenge now is figuring out if it is possible to embedded a custom font in a mobile keyboard application such that when typing with the keyboard, say, on a messaging app, the receiver would see the new font without doing anything. Is this possible?

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

    Is this an efficient way to write a ascii text parser?

    Posted: 14 Jun 2018 08:19 AM PDT

    So I need to write a simple text parser in C (on top of linux) that parses a log file for error messages.

    My initial idea is to simply iterate through each byte and check its ascii value. If i see a character that's the beginning of one of the messages im interested in, I'll then check to see if the next character matches, and continue iterating until I find a match.

    I know this is a simple program, but I feel like there might be a better way of handling this. Would it make a difference if I handled this recursively instead of using nested if-statements?

    Any input would be appreciated!

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

    Event-stream or AJAX

    Posted: 14 Jun 2018 03:14 PM PDT

    I'm wondering what the best tech would be for this project I'm working on. The usecase goes like this:

    1. user submits request
    2. Job runs on another instance and can take 1-5 minutes to complete
    3. User is notified once the job is complete

    I've already created an event stream, but it's pretty complicated, since I have to push all data relating to the job to the server and then find it via the users session id.

    Using AJAX i feel would be the easiest, since I could just store the transaction id in local storage and have the user request it, but I know this isn't the most efficient way and has a number of complications.

    A websocket would work well, since I could send data from the client, but I feel like this is overkill for my usecase.

    Just looking for advice! Thanks!

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

    Graphics and animation programming

    Posted: 14 Jun 2018 12:40 PM PDT

    I'm down to my last year before I get my bachelors degree. I want to start learning how to do animation and graphics programming. Are there any great tutorials or books i can pick up to start learning on my own time?

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

    does return 0 similar to $? in bash scripting?

    Posted: 14 Jun 2018 05:49 PM PDT

    does return 0 in c returns 0 if code succsed similar to $? in bash scripting?

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

    What does loop invariant mean?

    Posted: 14 Jun 2018 05:48 PM PDT

    Is there a simple way to use GMP multiple precision numbers with MPI?

    Posted: 14 Jun 2018 05:02 PM PDT

    I would simply like to be able to give MPI_Reduce GMP type numbers and have it sum them. Is there a simple way to create a MPI derived class from GMP? Currently I am converting these numbers to long doubles first, but I am losing precision when doing this.

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

    Beginner google maps project ideas to show off backend skills?

    Posted: 14 Jun 2018 12:55 PM PDT

    I'm interested in working with the google maps API.

    At most I have implemented it into a project before that just allowed the user to enter a location on object create and then the map image itself appeared on the object show page.

    What can I do with the google maps API to show more backend skills?

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

    Advice for creating database driven website

    Posted: 14 Jun 2018 10:22 AM PDT

    Hi.

    I'm looking for some advice. I currently have a little project on my hands. I'm looking to build a website, which has to have an updatable database. A small outline of the project:

    My company deals with technology. The company has an in-store repair service, but doesn't have a system in house to keep track of the status of the repairs. This is where my project comes into play.

    Each product has a model number, and a serial number. I want to be able to have a database, which stores the model number, serial number, the date in which the product last changed status (at servicecenter, in store, etc.), and the seller's personal ID. I want to be able to use this database on a HTML website, where you can search for the model number, serial number, and change the status, or create a new entry for a new service.

    My question is this; How would you go on doing that? I have searched a little on Google, and found out that I could make the database in MySQL, and use PHP to access, and modify the database, but for a database that simple, is there a simpler way of doing it?

    I have experience in MySQL, Java, and a little python, but not much web-development.

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

    "Plug and play" Login manager

    Posted: 14 Jun 2018 01:53 PM PDT

    I'm an ME who's been making a steady transition from "high level" programs like SolidWorks and LabVIEW, to writing C++ for Arduino , state machines, and short scripts.

    Right now, I'm creating a program that allows users to run different scripts based on a login with a username password combination I have stored in a database.

    I've set up an access database with the information I need and I'm in the middle of writing a UI that handles logins, displays a user's allowed scripts, and allows admins to reset passwords. However, I'm curious if there is something that already exists that I could leverage instead of writing code myself. (similar to how online websites are using the "login with Google" option)

    My restrictions are:

    • Must be entirely on my company's internal network
    • Must work with my current .mdb file
    • open source would be preferred
    submitted by /u/GentlemanSch
    [link] [comments]

    What does this mean? [Notch Tweet]

    Posted: 14 Jun 2018 09:41 AM PDT

    "I've kind of meandered off into working on data serialisation to use as a foundation for a general purpose version of the hot swapping asset delivery framework based on the code I had for an earlier project, so I can use that to work on this."

    https://twitter.com/notch/status/1007300182722015232

    Help

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

    return 0 and return 1

    Posted: 14 Jun 2018 04:52 PM PDT

    what return 0 does in c don't tell me read previous answers i did they just told it just indicates tha tprogram succefully worked

    ok my question is

    why it doesn't return something when something works successfully

    and if doesn't when i use return 1 it would don't compile or output error naturally then why use return 1

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

    How much would hiring a programmer cost to do this?

    Posted: 14 Jun 2018 09:12 AM PDT

    I want to create an interactive map on a website: I am hoping to allow for various countries' to alternate between shades of red and green based on currency information. Specifically, I want to allow a user to click one country (their home country) and have the rest of the countries around the world change color in response, to highlight the strength/weakness of their currency relative to the 'home country' (shades of red and green).

    Then, the user can choose a second country to compare with, which would cause a box to appear comparing the two currencies on a few metrics. For example, the famous topic you see economists talk about are Big Macs (the big mac index). It would be great if I could compare the price of a big mac in the U.S. and Finland, after the user clicks their home country (U.S.) and then Finland, and up pops a box that shows the cost of a big mac in both countries in U.S. dollars.

    Fortunately, day-to-day currency information is easy to come by. I am hoping to automate it (draw the data from another website that aggregates the information on a daily basis), but am willing to do it manually on a weekly basis.

    • How do I go about hiring a programmer?

    • How much do you think this will cost?

    • What language should I use, HTML5?

    • Any advice on how to choose a website to pull data from, or can programmers figure out how to draw specific bits of data from a website, once they understand how that site is constructed?

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

    strange behavior from my computer when running execute_js from Naked.toolshed.shell in python

    Posted: 14 Jun 2018 10:06 AM PDT

    Hi everyone. My computer begins to act strangely when a particular python code is running. Programs will crash unexpectedly, desktop icons will have these weird green checkmarks, and the code fails on something it shouldn't. After restarting my computer, the code runs successfully. Sometimes those checkmarks change rapidly to other little indicators.... Very odd indeed.

    The program is a simple python wrapper for a node.js code. Simply it would be something like:

    from Naked.toolshed.shell import execute_js, muterun_js for file in filelist: move file to correct location success = execute_js('my_node_code.js') move output files 

    I am suspecting a memory leak somehow but I'm not even sure. It doesn't eat up memory linearly with time or something. I can check my memory in task manager and while running it uses 256MB which is even less than chrome.

    The node code is using this library if that helps.

    Any clue as to what is going on and how to fix it?

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

    [Discussion] How would you write a code that would create a model number nomenclature that could extend infinitely?

    Posted: 14 Jun 2018 10:05 AM PDT

    I'm working as an intern for a company and they dropped a project they have been working on for several years on me. They are looking for a way to display all possible model number nomenclatures based on something like xxx-yy-zz were x is a digit 0-9, y is a letter lowercase and uppercase, and z is an alphanumeric input that could go up infinitely. I have had roughly 1 year of coding and can't think of any way to do this in detail. What I'm hoping to do is just be a big picture type of guy and throw out ideas of how this could be done. I don't expect anyone here to solve this for me but I would like to talk and have discussions to further my thoughts and ideas.

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

    Telegram Bot

    Posted: 14 Jun 2018 09:54 AM PDT

    Hello,

    I'm trying to create a Telegram Bot. I know there is a good .net library for it but what I do not understand is how is it integrated in Telegram. Should I create a console app with the logic or should it have an interface ? I know that once finished you have to add the bot in the chat, but how does it work behind, how do I integrate it ?

    Cheers

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

    How do I make transparent statusbar with Toolbar below w/ gradient.

    Posted: 14 Jun 2018 09:08 AM PDT

    Things I´ve done so far:

    1. Create Basic Activity project in AS3.1.3
    2. Import gradient that I´ve made prevoiusly
    3. Change Toolbar background to the gradient.

    What I did that worked (kinda):

    • Toolbar IS below the statusbar
    • Taskbar was translucent
    • Toolbar was like "shrunk" in the statusbar, few px missing below the AppTitle.

    What I want to do:

    • Read the post title.

    What I tried already:

    Thanks for any suggestions.

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

    Global variables in python

    Posted: 14 Jun 2018 08:40 AM PDT

    Losing my mind a bit with python global variables. I have two functions that need to share a variable somewhat. Here is a simple version:

    def funcA(): timeSent = time.time() def funcB(): timeRecv = time.time() timepkt = timeRecv - timeSent 

    These two functions are both running in separate multiprocesses and function A needs to keep updating timeSent so I can use it in function B. I have ZERO idea why I can't just define timeSent outside of the functions but it does not work.

    Is it because I am using threads? (multiprocessing). I tried using the global keyword but maybe I am using it in the wrong place. Any help?

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

    Using dotnetbrowser to call JavaScript function to c#

    Posted: 14 Jun 2018 04:51 AM PDT

    Hello everyone, first of all I'm sorry for any grammar errors. I have this JS code which I use to display both street view and google maps in my form:

     /* * Click the map to set a new location for the Street View camera. */ var icon; var markers = []; var currentmarker; var geocoder, infowindow; var map; var panorama; var sv; function initMap() { var berkeley = { lat: 39.277782, lng: -7.428514 }; sv = new google.maps.StreetViewService(); panorama = new google.maps.StreetViewPanorama(document.getElementById('pano')); // Set up the map. map = new google.maps.Map(document.getElementById('map'), { center: berkeley, zoom: 17, streetViewControl: false }); sv.getPanorama({ location: berkeley, radius: 70 }, processSVData); geocoder = new google.maps.Geocoder; infowindow = new google.maps.InfoWindow; map.addListener('click', function (event) { sv.getPanorama({ location: event.latLng, radius: 70 }, processSVData); }); document.getElementById('submit').addEventListener('click', function () { var input = document.getElementById("resulttest"); /*latlng*/ var latlngStr = input.value.split(',', 2); geocodeLatLng(latlngStr); }); // Set the initial Street View camera to the center of the map // Look for a nearby Street View panorama when the map is clicked. // getPanoramaByLocation will return the nearest pano when the // given radius is 50 meters or less. } function geocodeLatLng(latlngStr) { // var input = document.getElementById("resulttest"); /*latlng*/ latlngStr = latlngStr.split(',', 2); var latlng = { lat: parseFloat(latlngStr[0]), lng: parseFloat(latlngStr[1]) }; geocoder.geocode({ 'location': latlng }, function (results, status) { if (status === 'OK') { if (results[1]) { center: latlng, map.setZoom(20); var marker = new google.maps.Marker({ position: latlng, map: map }); markers.push(marker); infowindow.setContent(results[1].formatted_address); infowindow.open(map, marker); sv.getPanorama({ location: latlng, radius: 70 }, processSVData); } else { window.alert('No results found'); } } else { window.alert('Geocoder failed due to: ' + status); } }); } function processSVData(data, status) { if (status === 'OK') { var marker = new google.maps.Marker({ position: data.location.latLng, map: map, title: data.location.description }); markers.push(marker); panorama.setPano(data.location.pano); panorama.setPov({ heading: 270, pitch: 0 }); panorama.setVisible(true); marker.addListener('click', function () { var markerPanoID = data.location.pano; // Set the Pano to use the passed panoID. panorama.setPano(markerPanoID); panorama.setPov({ heading: 270, pitch: 0 }); panorama.setVisible(true); }); } else { console.error('Street View data not found for this location.'); } } function OnclickMarker(data, status) { if (status === 'OK') { panorama.setPano(data.location.pano); panorama.setPov({ heading: 270, pitch: 0 }); panorama.setVisible(true); } else { console.error('Street View data not found for this location.'); } } function setMapOnAll(map) { for (var i = 0; i < markers.length; i++) { markers[i].setMap(map); } } function clearOverlays() { setMapOnAll(null); } function showMarkers() { setMapOnAll(map); } function criarMarker(id, lat, lon) { alert(id + ' ' + lat + ' ' + lon); var LatLng = { lat: lat, lng: lon }; var marker = new google.maps.Marker({ id: id, position: LatLng, map: map }); google.maps.event.addListener(marker, 'click', function () { this.setIcon('https://www.google.com/mapfiles/marker_green.png'); sv.getPanorama({ location: LatLng, radius: 70 }, OnclickMarker); if (currentmarker != null) { currentmarker.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png'); panorama.setPov({ heading: 165, pitch: 0 }); } currentmarker = this; //alert(lat); //var evente = document.createEvent('MessageEvent'); // var origina = window.location.protocol + '//' + window.location.host; //evente = new MessageEvent('jsCall', { 'view': window, 'bubbles': false, 'cancelable': false, 'data': 'criarMarker' }); //document.dispatchEvent(evente); var evente = document.createEvent('MessageEvent'); var origina = window.location.protocol + '//' + window.location.host; evente = new MessageEvent('jsCall', { 'view': window, 'bubbles': false, 'cancelable': false, 'data': id }); document.dispatchEvent(evente); }); } 

    I used this line of code to call "criarMarker":

     browser.FinishLoadingFrameEvent += (s, e) => { if (e.IsMainFrame) { foreach (var item in edificios) { browser.ExecuteJavaScript("criarMarker('" + item.id + "'," + item.lat + "," + item.lon + ");"); } //browser.ExecuteJavaScript("jsCall"); } }; 

    But now I need to call "jsCall" and I'm not being able to do so. In my previous code where I used geckobrowser I was able to do it with: geckoWebBrowser1.AddMessageEventListener("jsCall", (id) =>

    But with dotnetbrowser seems to be different and I can't find anythig that hepls me. I would appreciate if anyone could help me go through this one!

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

    No comments:

    Post a Comment