• Breaking News

    Thursday, January 11, 2018

    Is there an API for Google 'smart' search answers? Ask Programming

    Is there an API for Google 'smart' search answers? Ask Programming


    Is there an API for Google 'smart' search answers?

    Posted: 11 Jan 2018 07:02 PM PST

    I want to get these results shown here. Basically I want to get the genres of shows by name. Can I use the Google Custom Search API for this? Is there a known free SQL database?

    The main programming language I'm using is Java, but if there is another exclusive language for the API, I would like to know as well.

    Thanks!

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

    I need some help figuring out exactly what I need to create a map program in Python.

    Posted: 11 Jan 2018 09:46 PM PST

    So, I asked a few days ago about creating a tectonic plate simulation. I'm back with more details, and more questions.

    My biggest question is how would I go about making sure that things are mapping/acting properly in Python. I want the program to operate on a sphere/globe. Are there any good resources that anyone can recommend to learn about this specific area?

    Specifically, I want to be able to designate a certain resolution for the map. Then each point/pixel has certain attributes, namely density, age, height/thickness, and crust type. Then I want to make plates from certain criteria (underlying noise simulation mantle heat, similar motion for each point, etc.) and assign each point to a plate. As plates move they have rules governing interaction such as subduction, orogeny, and volcanoes.

    I would appreciate any resources on this type of project that I could get pointed to.

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

    Are there any certificate programs that are helpful in moving into the tech field?

    Posted: 11 Jan 2018 08:51 PM PST

    I graduated last year with a major in psychology and a minor in math, and I have little to no background in programming. I took a few courses at school and there was occasional scripting in psyhcology labs but that's about it for my programming background. Are there any certificates I can get that might make it possible for me to get into the software development field? If so, what are some you might suggest?

    Thanks in advance!

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

    Is it possible to adjust the acceptable input for a text box on a major corporate site

    Posted: 11 Jan 2018 04:59 PM PST

    Let me start by apologizing for my undoubtedly imprecise terminology. I'm a pharmacist with extremely limited programming knowledge.

    The problem is that there's no quick way to take a list of somebody's meds, sometimes as many as 30 drugs, and copy/paste it into an interaction checker on a subscription drug info service like micromedex.

    The site has a text box for entering drug names which narrows down drugs based on how much you type. Typing "Ben" drops down a list including Benadryl, benicar etc etc. you then click or arrow down to one and add it to the list of drugs, once the list is complete you run the drug interaction check.

    The med lists in our computer system at work are something like: 1. Atenolol 25mg take one tablet by mouth daily 2. Benadryl 25mg take one tablet by mouth every 6 hours etc etc.

    If the med list could simply be copy and pasted into micromedex, it would be a hell of a lot faster to run an interaction check.

    Is there some third party app I could make to pull the drug names out of our med list then Feed them into the interaction checker without manually reading and typing every damn drug into the website?

    Thanks for looking.

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

    Why or why not Kotlin?

    Posted: 11 Jan 2018 09:15 AM PST

    I'm an old school developer with a lot of languages under my belt (C, Pascal, BASIC, Assembler, Perl, Python, IBM RPG, and others I can't remember anymore) enjoying the modern conveniences of Java/Groovy, C# and Golang.

    I am also deeply invested and love Jetbrains products such as IDEA Ultimate and Resharper.

    I'm looking to dabble in Android development and see a lot of buzz about Kotlin but after a quick review of the language specs it seems to be a very 'ugly' and unintuitive language.

    Why or why not Kotlin?

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

    How have you made friends outside of tech?

    Posted: 11 Jan 2018 05:54 PM PST

    Hey /r/AskProgramming, first time poster here.

    I'm a 25 year old developer and really enjoying it. Lately however I've grown tired of the tech/startup scene and the people in it; it's starting to feel like a bit of a circlejerk. Social events are all about about networking. Meetups are rarely more than as a place for people / startups showing off how great they are. I'm having a hard time relating to all of this. These people have no chill and I'm starting to wonder if I should try make friends outside of tech.

    So, my question: How have you made friends outside of tech? I moved away from my hometown years ago and since then I've pretty much only hung out with people in the local tech scene.

    submitted by /u/merge-conflict
    [link] [comments]

    Reddit bot comes up with no errors but wont run, Help [URGENT]

    Posted: 11 Jan 2018 04:46 PM PST

    Code can be found here: https://pastebin.com/wwCXV83V

    I go into the directory that the .py file is in and type "python TTBot.py" it waits a few seconds and then nothing happens. It reprints the CD\ info on the CMD and the file doesnt run, any idea why?

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

    Does your company put restrictions all over your machine to prevent stealing sensitive information?

    Posted: 11 Jan 2018 04:34 PM PST

    I've been at a company for a while and they are a child company of a bigger non-software company. Recently, the parent company has been tightening it's grip. My company has always monitored traffic so that's no biggie, but now they are restricting a lot of things (Youtube is now heavily censored- no music with swear words appear in results, have to get certificate exceptions for things like maven and some npm repos). Also, they are now starting to block USB ports (so we'll have to have exceptions for our .apk files), and there's rumblings that they're gonna blacklist services like dropbox and google drive in the future.

    Is this normal? I feel like I'm starting to be hindered in my day-to-day because of it. I still like my job, it just feels like we're on a slippery slope.

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

    Python Prime Summations (PLEASE HELP!)

    Posted: 11 Jan 2018 03:35 PM PST

    prime = []

    def prim_gen(num): for i in range(2, num): for j in range(2, i): if (i % j == 0): break else: a = prime.append(i) print(prime)

    prim_gen(41)

    count = 0 while sum(count) != 41: for x in prime: count.append(x) print(count)

    Can someone tell me why the program shouldn't work. It's supposed to go through the prime list and add up values until it equals 41.

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

    Game developer mathematical skills

    Posted: 11 Jan 2018 10:12 AM PST

    Hello r/askprogramming I'm currently a full stack web developer using the .net framework. I have been looking into unity on the side to develop a game project in hopes of becoming a gaming developer. As I research positions in this field I frequently see strong mathematical skills as a requirement. As a web developer I don't feel like I use advanced math skills in my development cycle.

    I'm wondering if any game developers could share their work experience that requires a more mathematical approach.

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

    Using Python to 'forecast' a trend?

    Posted: 11 Jan 2018 09:59 AM PST

    So I don't know the exact verbiage on this so apologies in advance. But preferably in Python is there a pre-existing set of tools to take in a data set lets say for multiple sites that are at a certain percentage of utilization over the course of multiple days/weeks and find a trend on when those sites might hit a certain percentage? Basically, take in a large data set and predict in X days that Site C will be full?

    Any hints or pushes in the right direction would be greatly appreciated

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

    Is it possible to get relative position with just accelerometer data?

    Posted: 11 Jan 2018 07:11 AM PST

    Short version: Imagine a robot arm doing a repetitive work, like moving a lego block from 1 belt to another. If there is a accelerometer attach to the tip of the arm, is that data enough to plot the relative position of that arm? I would like to see something like a graph of the path of the whole session, so that if it drift overtime/some abnormal cycles appear, it will be easily visible.

    Long version: So I want to figure out how to detect a specific repetitive motion: rowing. On a rowing machine, your movement is mostly in 2 dimension (front<-> back & up<->down). You don't really move from left to right. And what I would like to do is to record(& plot) that 2d movement out (imagine looking from left hand side of the rower), so that user can see if their form changes over time, with something like a smartwatch (Android Wear watches to be specific). Here's my questions:

    1) Can I turn a bunch of accelerations -> a bunch of velocities -> a bunch of displacements? Is that how the physics works?

    2) To turn acceleration into velocity, should I do (accOld * deltaTime) or ((accOld + accNew / 2) * deltaTime)? Same question for velocity -> displacement.

    3) Is it going to be accurate with smartwatch sensors? Does anyone has anyone has any experience with accelerometer to relative motion?

    I haven't start working on smartwatch yet, right now I have successfully extract a constant stream of accelerometer data from Android phone (timestamp + xyz). I want to know if I am heading to the right direction first before I start working on it.

    Thanks!

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

    A Fire Alarm System Project Using Arduino and Visual Studio. PS: new to reddit

    Posted: 11 Jan 2018 06:47 AM PST

    So i'm working on a school project for a friend. As the title says, it's a fire alarm system. There are two parts of the system - Arduino hardware (controls the temp sensors), and the GUI (using Visual Studio, receives and shows data from arduino). I have already started and made it run so that i can read from 2 tmp35 sensors and display each in their own designated text boxes. How i did it was -

    Arduino side : float tempRoom1 = (5.0 * analogRead(A0) * 100.0) / 1024; float tempRoom2 = (5.0 * analogRead(A2) * 100.0) / 1024; delay(500); Serial.println(String(tempRoom1) + "/" + String(tempRoom2));

    GUI side : private string DataFromArduino; DataFromArduino = Serialport.Readline(); string[] DataArray = DataLine.Split('/'); textBox4.Text = DataArray[0]; textBox5.Text = DataArray[1];

    The Question : is there a more elegant/clean way to do this by not splitting the string and putting it in an array?

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

    How to group values into class intervals? And then form a grouped frequency distribution table of the data using? R-Studio

    Posted: 11 Jan 2018 10:17 AM PST

    The values are a table of random 100 numbers

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

    How can I find the "tags" for Microsoft redistributables?

    Posted: 11 Jan 2018 09:29 AM PST

    I'm not sure if "tags" is the right word for this, or if this is the right sub to post this on, but basically each microsoft redistributable has a value that you can use to check if a certain one is installed, here are some examples:

    Visual C++ 2015 Redistributable 14.0.23026 - (x86) {"tag"=A2563E55-3BEC-3828-8D67-E5E8B9E8B675}

    Visual C++ 2015 Redistributable 14.0.24210 - (x86) {"tag"=8FD71E98-EE44-3844-9DAD-9CB0BBBC603C}

    I specifically need to figure out what the "tag" is for Visual C++ 2017 Redistributable 14.12.25810. But if anybody could tell me how to figure out that information for other distributables as well it would be much appreciated.

    *Edit:

    In case anybody in the future see's this post and has the same question, I found the "tags" in "C:\ProgramData\Package Cache" for redistributables that were installed on my PC. The version number for the redistributables are listed at the end of the folder names in that directory. So if you are looking for the "tag" of a certain redistributable, search the end of the folder names for the version.

    For example, the folder for Microsoft Visual C++ 2017 Redistributable 14.12.25810 is:

    "{7FED75A1-600C-394B-8376-712E2A8861F2}v14.12.25810"

    which means that the "tag" is "7FED75A1-600C-394B-8376-712E2A8861F2"

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

    Trying to make sense of an Alt Code Output

    Posted: 11 Jan 2018 01:43 AM PST

    Hello dear fellows,

    I tried to find an Alt Code for the "ẽ" character. Nothing to fancy, the decimal code ist 7869, the hex one 1EBD (See here)

    Then i noticed something odd. While the Hex Code works everywhere, the 7869 decimal code just works in Office programs (2013 and 2016), in other programs (NP++, different browsers) the 7869 produces this character: ¢, which has the decimal code 0162 and hex code 00a2

    I have searched but nowhere I could find the 7869 code to be associated with the ¢ character.

    I can't make sense of it. What am I missing?

    *edit: formatting

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

    [Algo] Interpolation-Search ??

    Posted: 11 Jan 2018 08:30 AM PST

    Interpolation-Search Link

    The Interpolation Search is an improvement over Binary Search for instances, where the values in a sorted array are uniformly distributed.

    can you guys plz explain what It means by uniformly distributed, using any example (numbers) !!

    also if any body could explain me this formula, in easy way or a little explanation how it works, would be a great help

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

    Up/down vote for my page

    Posted: 11 Jan 2018 07:02 AM PST

    EDIT: I get the sense that I'm making things complicated with my many ajax-php requests.

    I'm trying to implement an Up/down vote for my page and I can't make it work. My strategy is to have a list (msql table) of items with id and another table for users where I store the items id (a second time) and what the user voted. Then I compare these in a very inefficient way. But I can't make the votes to stay within +-1 vote.

    What's a proper strategy? Are there ways to quickly accomplish this? I'm new with this so the level of guides I've found have only made me confused.

    I can upload my code if anyones interested

    I didn't know where to put this so here it goes:

    PHP vote------------------------ <?php $link = mysqli_connect("localhost", "usr", "usrpwd", "books");

    if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } $id = mysqli_real_escape_string($link, $_POST['itemid']); $vote = mysqli_real_escape_string($link, $_POST['vote']); if($vote == 'up'){ $sql = "UPDATE booktable SET rank = rank + 1 WHERE id = $id"; }else{ $sql = "UPDATE booktable SET rank = rank - 1 WHERE id = $id"; } if(mysqli_query($link, $sql)){ } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } mysqli_close($link); 

    ?>

    PHP checkvote <?php $link = mysqli_connect("localhost", "usr", "usrpwd", "books");

    if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } //$id = mysqli_real_escape_string($link, $_POST['itemid']); $vote = mysqli_real_escape_string($link, $_POST['vote']); $result = mysql_query( "SELECT * FROM client WHERE bookid='$vote' LIMIT 1"); if(mysql_fetch_array($result) !== false) return false; return true; 

    mysqli_close($link); ?>

    javascript------------------------my buttons and list $(document).ready(function () {

    var displayResources = $('#display-resources'); displayResources.text('Loading data from JSON source...'); var k = 0; $.ajax({ type: "GET", dataType: "json", url: "list.php", success: function(data) { console.log(data); var output="<table><thead><tr><th>Rank</th><th>Title</th><th>Author</th><th>Date added</th></thead><tbody>"; for (var i in data) { k = +i + +1; output+="<tr><td>" + k +'<div><input type="button" class="upper" data-itemid="up_' + data[i].id + '"value="&#9650;">' +'<input type="button" class="lower" data-itemid="down_' + data[i].id + '"value="&#9660;">' +'</td><td>' + data[i].name + "</td><td>" + data[i].author + "</td><td>" + data[i].bookread + "</td></tr>"; } output+="</tbody></table>"; displayResources.html(output); $("table").addClass("table"); } }); 

    }); javascript------------------------------made a mess of this $(function() {

    $(document).on('click', '.upper, .lower',function(e) { var bookid = $(this).data('itemid'); var index = bookid.indexOf("_"); var vote = bookid.substr(0, index); var bookidNbr = bookid.substr(index + 1); if(checkVote(bookidNbr)==true){ window.alert("true"); addThatVote(bookidNbr, vote); } if(vote == 'up'){ if($(this).value == '\u25fc'){ window.alert("voted"); }else{ window.alert("thx"); } $(this).prop('value', '\u25fc').change(); } 

    window.alert("vote :"+vote); window.alert(bookidNbr);

    }); });

    function addThatVote(bookidNbr, vote){ $.ajax({ url: 'upVote.php', type: 'POST', data: { 'vote':vote, 'itemid':bookidNbr },

     success: function(msg) { jQuery.getScript("resources.js"); } }); }; 

    function checkVote(vote){ $.ajax({ url: 'checkVote.php', type: 'POST', data: { 'vote':vote //'itemid':bookidNbr },

     success: function(msg) { window.alert("checkVote"); //jQuery.getScript("resources.js"); } }); }; 
    submitted by /u/AteSten
    [link] [comments]

    [Java][MacOS-X] ContentType not recognising. Help !!

    Posted: 11 Jan 2018 06:55 AM PST

    NOTE: plz copy this code into your favourite editor, as I have lots of comments : and it looks cumbersome.

    I am using Mac and trying to find the ContentType of these files.

    Note: the paths are correct, I have checked, and also the files exists !!

    Code :

     import java.nio.file.Files; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import java.io.IOException; public class ContentType_Demo{ public ContentType_Demo(String path){ System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n"); Path filePath = Paths.get(path); // relative address int nameCount = filePath.getNameCount(); Path Name = filePath.getName(nameCount - 1); String fileName = Name + ""; System.out.println("file name : " + fileName); try { String contentType = Files.probeContentType(filePath); if (contentType == null) { System.out.println("= = file not recognised = ="); }else{ System.out.println("File type of "+fileName+" : "+contentType); } }catch(IOException e){ System.out.println(" ||||| OOP's problem in finding the content type |||||"); System.out.println(e); e.printStackTrace(); } } public static void main(String[] args) { new ContentType_Demo("Faltu"); // relative address , folder(directory) new ContentType_Demo("Faltu/empty.java"); // relative address , file new ContentType_Demo("/Users/prashant/Documents/CODE/java_gfg"); // absolute path , directory new ContentType_Demo("/Users/prashant/Documents/CODE/test.java"); // absolute path , file new ContentType_Demo("/Users/prashant/Documents/CODE/web.html"); // absolute path , file } } 

    .

    output :

     >> ROOT: } java ContentType_Demo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * file name : Faltu = = file not recognised = = * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * file name : empty.java = = file not recognised = = * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * file name : java_gfg = = file not recognised = = * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * file name : test.java = = file not recognised = = * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * file name : web.html = = file not recognised = = 
    submitted by /u/prashantkr314
    [link] [comments]

    Building School Management System, need help..

    Posted: 11 Jan 2018 06:24 AM PST

    Hi guys, I am a high school senior and I got to make School Management System as my graduation work. I already have some experience with programming (was competing in C++ on state level twice). Where do I start this project? I never used HTML, CSS or PHP although I know basics.

    All the best.

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

    Can't find material for assignment

    Posted: 11 Jan 2018 05:20 AM PST

    I need to write an essay themed „Balancing of programming and maintenance tasks in a programmers "cart"". I can't find any material and don't even know where to start writing an essay on this topic.

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

    [C] I need help with a task i've been given from the professor

    Posted: 11 Jan 2018 03:22 AM PST

    So, I need to make a program in C, the user inputs x_start & y_start coordinates of upper left point of a rectangle and x_end & y_end coordinates of the bottom right point of a rectangle.

    These date is being saved in the array: {x_start, y_start, x_end, y_end}.

    On that basis the user is given 4 options:

    1. Enlarge the rectangle and calculate surface

    2. Reduce the rectangle and calculate surface

    3. Move the rectangle and print coordinates

    4. Exit the program

    During the selection of the option the user inputs value of enlargement, reducement and movement.

    The program should repeat until option #4 is selected.

    I'm really having a hard time trying to figure out how to even make an algorithm for this task, let alone the whole program. :(

    I need your help, reddit!

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

    Learning Java and VB at the same time? Is it a good idea?

    Posted: 11 Jan 2018 01:38 AM PST

    Background: I would say i have an advanced knowledge with Excel VBA. My full time job lets me create tools for different functions and businesses. I also freelance as an Excel VBA tool developer as a side job. I also studied basic SQL and Python in the past but never had the chance to use them professionally.

    I am currently learning Java through MOOC (currently at week 3) and Udemy's top Java course. So far, so good.

    Just now, the thought crossed my mind to learn VB too. I assume the syntax will be close to VBA so i might learn it faster than average.

    My problem is that, is it wise to learn 2 programming languages at the same time? Or should i focus on Java first, be at least at intermediate level before learning a new language?

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

    Export Youtube playlist metadata to text or csv

    Posted: 10 Jan 2018 11:35 PM PST

    Reason: youtube often deletes videos without a way to find out which video it was. I want to have a backup of my youtube playlists for future reference.

    Is there any way to download title and maybe URL of all videos in my playlists, including Watch Later and Liked?

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

    No comments:

    Post a Comment