• Breaking News

    Monday, February 5, 2018

    Struggling to convince my boss about working from home. Ask Programming

    Struggling to convince my boss about working from home. Ask Programming


    Struggling to convince my boss about working from home.

    Posted: 05 Feb 2018 09:54 PM PST

    Hey, guys, I'm just wondering, do you have an issue to convince your boss to let you do something? Like working from home or being on "do not disturb" mode? How do you approach this? Do you have any bad experiences?

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

    One Man GitHub Project

    Posted: 05 Feb 2018 09:19 PM PST

    I realized I need to start learning the basics of git, so I uploaded one of my local projects to GitHub and I want to make sure I keep it updated on there. My question though is as I continue working on this project, how should I go about working on it? Should I create a branch of that project and work on the branch? Do I just work on my local copy that's on my computer and just push any changes up to GitHub? Hopefully that makes sense. Also keep in mind I'm probably going to be the only one working on it.

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

    How do you all deal with information overload?

    Posted: 05 Feb 2018 09:14 PM PST

    (~10 years of programming under my belt so far, if that helps where I'm coming from)

    I feel like programming is this mountain that you eat with a spoon. Whether you spend some time getting better with algorithms or learning a new language, or learning security stuff, or NoSQL/document/graph databases, etc, you're never going to master everything and you're never even going to be okay at most things.

    Personally I tend to avoid frontend stuff and pop my head out once or twice a year to catch up on that.

    But I still find it easy to get buried on backend stuff. Writing solid code, there's 12 new hot languages out, programming news, new versions of things you love, new libraries, new projects that keep pestering your brain.

    I've started downsizing what I worry about and I'm not sure how to approach programming. That random article may be enough to pique my interest in something that leads to me learning a cool technology, but browsing tech blogs for 2 hours a day is something I'm going to try to cut out.

    Any tips? How do you avoid getting overloaded?

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

    Github projects for beginners?

    Posted: 05 Feb 2018 10:06 AM PST

    Was wondering if I could join a github open source project with little programming experience. I'm sure the projects would add a lot more experience, but just starting out where can I look?

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

    Sorting a list of lists in Scheme

    Posted: 05 Feb 2018 09:06 PM PST

    I have a function that takes a list and outputs the powerset of that list. So given, (1 2 3) it should output (() (1) (2) (3) (1 2) (1 3) (2 3) (1 2 3)).

    I am currently getting the correct values, just not in a nice order. The current output is (() (3) (2) (2 3) (1) (1 3) (1 2) (1 2 3)).

    I wrote two functions that will be passed to the standard sort function to check the length of each element and if it is in order and sort accordingly. The output of that gives me ((1 2 3) (1 2) (1 3) (1) (2 3) (2) (3) ()).

    What am I doing wrong in these two functions given the final-list is (() (3) (2) (2 3) (1) (1 3) (1 2) (1 2 3))?

    ;define element-ordered

    (define (element-ordered? ls0 ls1) (cond [(equal? ls0 ls1) #t] [(< (car ls0) (car ls1)) #t] [else #f])) 

    ;define length-ordered

    (define (length-ordered? ls0 ls1) (cond [< (length ls0) (length ls1) #t] [> (length ls0) (length ls1) #f] [eq? (length ls0) (length ls1) (element-ordered? ls0 ls1)])) 

    ;sort using provided sort

    (sort final-list length-ordered?)) 

    Edit: I should add I cannot use the map procedure

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

    Simple C program not functioning as desired-obviously.

    Posted: 05 Feb 2018 08:26 PM PST

    I need the program to reverse the contents of a string 'input', and store it as another string, 'output'. Both string must be taken into the function such that its declared as so:

    flipDatString(char input[], char output[])

    The following code is my attempt:

    #include <stdio.h> #include <string.h> #define MAX 100 void flipDatString(char input[], char output[]){ int x = strlen(input), k; for(k=0; k<x; k++){ output[k] = input[x-k-1]; } } int main(){ char input[MAX], output[MAX]; fgets(input, MAX, stdin); flipDatString(input, output); printf("%s\n", output); return 0; } 

    The problem, however, is these results:

    h745@cs2:~/assignments$ ./a.out

    ExampleA

    AelpmaxE▒▒O

    h745@cs2:~/assignments$ ./a.out

    ExampleB

    BelpmaxEҁ▒

    h745@cs2:~/assignments$ ./a.out

    ExampleC

    CelpmaxEKu

    h745@cs2:~/assignments$ ./a.out

    why

    yhw

    The last example, the word 'why', worked. The others, not so much. It looks like I'm pulling undefined values from somewhere, but I don't understand where from. Thanks in advance for any enlightenment!

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

    I hired a programmer to write a twitter script, and I'm not sure if I should give him certain account details

    Posted: 05 Feb 2018 04:30 PM PST

    Someone is writing a twitter script for me. He's asking me for the consumer key/secret and access token/secret. I'm not sure what those do but I have a fairly sensitive twitter account that I don't want anyone to have access to. Is it safe to give him that info?

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

    whats wrong trying to input a string to a function then reverse it there but not print it them print the reversed version in the int main.

    Posted: 05 Feb 2018 08:14 PM PST

    include <stdio.h>

    include <string.h>

    void reverse( char arr[100],char rev[100] );

    int main(void) {

    char arr[100]; char rev[100]; int len,k; printf("Enter a string \n"); fgets(arr,100,stdin); reverse(arr,rev); printf("%s\n",rev); 

    return 0;

    }

    void reverse( char arr[100],char rev[100] ) { int len,k;

    len= strlen(arr); for(k=len;k>=len;k--) { 

    // printf("%c",*(arr + k));

     rev[k] = arr[k-len]; } 

    printf("\n");

    }

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

    Database Helper on SQLite, can't getReadableDatabase

    Posted: 05 Feb 2018 01:59 PM PST

    Clicking a button makes the app stop and the LOGCAT says the issue is on (Login.java:32) and (DatabaseHelper.java:63)

    on (Login.java:32) is this line

     String password = helper.searchPass(str); 

    inside an onButtonClick method. here is the full method

    public void onLoginClick(View v) { if (v.getId() == R.id.button_login) { Toast.makeText(Login.this, "okay", Toast.LENGTH_SHORT).show(); EditText a = (EditText) findViewById(R.id.editText_user); String str = a.getText().toString(); EditText b = (EditText) findViewById(R.id.editText_password); String pass = b.getText().toString(); String password = helper.searchPass(str); if (password.equals(password)) { Toast.makeText(Login.this, "okay", Toast.LENGTH_SHORT).show(); Intent intent = new Intent("com.example.alber.piwas.User"); intent.putExtra("Username", str); startActivity(intent); } } else { Toast.makeText(Login.this, "Username or Password are not correct", Toast.LENGTH_SHORT).show(); } } 

    And here is the searchPass method on the DatabaseHelper class

    public String searchPass(String username){ db = this.getReadableDatabase(); String query = "select * from "+TABLE_NAME; Cursor cursor = db.rawQuery(query, null); String a, b; b="not found"; if(cursor.moveToFirst()){ do{ a=cursor.getString(COL_USERNAME2_INDEX); //username column b=cursor.getString(COL_PASSWORD2_INDEX); //username column if (a.equals(username)) { b=cursor.getString(COL_PASSWORD2_INDEX); //password column break; } } while(cursor.moveToNext()); } return b; } 

    Any idea what I'm doing wrong?

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

    Read PDF data into excel?

    Posted: 05 Feb 2018 12:38 PM PST

    Hi everyone, first post here. My company often has to transcribe billing data from pdfs into excel, which is very time consuming. Is there a way I could write a program that could take the relevant data from the pdf and insert it into the spreadsheet automatically? The catch is it would only be a few numbers from each pdf.

    I am a second year engineering student with some basic experience in C++, but I don't know where to start with something like this. Anything that could point me in the right direction as to what I need to learn to do this would be very much appreciated. Thanks!

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

    Where do you work and do you enjoy it?

    Posted: 05 Feb 2018 12:45 PM PST

    I'm interested to know where the people in this sub (currently employed in the field) work and how you'd rate your job and salary. Pros and cons? I work at a small consulting firm and I while I do enjoy the work I'd probably give it a 6/10 because of lack of advancement opportunities. What about you guys?

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

    What does "expose the pipeline" mean in this context? (Assembly)

    Posted: 05 Feb 2018 12:31 PM PST

    Read PDF files and save bookmarks

    Posted: 05 Feb 2018 12:08 PM PST

    I am trying to implement a way in my application to save a specific location in a pdf file(like an anchor in html), and sets focus to that area(or highlights it).

    The reason I need this is to add a feature to a ERP application I am creating. Customers send emails with pdf attachments. We quote them according to what they say in that pdf file. As a user, I want to be able to select a location in a pdf file, save it, and continue. That way when a product is shipped, for example, with the color purple, and the customer is upset because he didn't want purple, we could easily show the customer where exactly he/she said that in the pdf file. We wouldn't have to waist time looking through all the pdf files the user sent to find it.

    Any help to lead me into the right direction would be very appreciated.

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

    How to create flowing water effect in unity

    Posted: 05 Feb 2018 11:43 AM PST

    Hello there, Im trying to make a model of an area with rivers and a sea that shows the effects of a rise in the water level of the sea. Im willing to put quite a bit of time in this project but my current understanding of both unity and programming is quite limited. All i need for the water is to flow on quite a large scale, it does not need to look good at all (i'd prefer it to not look good for the sake of fps and such). Any tips would be appreciated!

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

    [My-SQL] ER-Model, not able to synchronize properly, error in code plz help!!

    Posted: 05 Feb 2018 11:42 AM PST

    MY SCHEMA IMAGE LINK <=====

    ERROR

     Executing SQL script in server ERROR: Error 1022: Can't write; duplicate key in table 'reads_blog_reln' SQL Code: CREATE TABLE IF NOT EXISTS `blogger`.`reads_blog_RELN` ( `user_id` INT(11) NOT NULL, `user_contact_info_id` INT(11) NOT NULL, `user_profile_id` INT(11) NOT NULL, `user_address_id` INT(11) NOT NULL, `blog_id` INT(11) NOT NULL, PRIMARY KEY (`user_id`, `user_contact_info_id`, `user_profile_id`, `user_address_id`, `blog_id`), INDEX `fk_user_id_idx` (`blog_id` ASC), INDEX `fk_blog_id_idx` (`user_id` ASC, `user_contact_info_id` ASC, `user_profile_id` ASC, `user_address_id` ASC), CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id` , `user_contact_info_id` , `user_profile_id` , `user_address_id`) REFERENCES `blogger`.`user` (`id` , `contact_info_id` , `profile_id` , `address_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_blog_id` FOREIGN KEY (`blog_id`) REFERENCES `blogger`.`blog` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 SQL script execution finished: statements: 9 succeeded, 1 failed Fetching back view definitions in final form. Nothing to fetch 
    submitted by /u/prashantkr314
    [link] [comments]

    Language for industrial scanning project.

    Posted: 05 Feb 2018 11:38 AM PST

    I am working on a project that ideally would work on a r-pi. Right now the flow looks like this:

    1. Manager Signs in with a barcode and sets an Accepted number.
    2. Employees Sign in by scanning their ID badges (have QR codes).
    3. Once both of these conditions have been met items flow down the line and trip a ultrasonic sensor that starts a timer.
    4. If the program has not received a successful scan in this timeout period, it triggers a relay that stops the conveyer until a successful scan has happend.

    Right now I have this running from a WinForms app and an Arduino, which works fine. However I would LOVE For this to run on a RPI.

    Aside from Windows 10 IOT, what would be the language to do this? I have played with some Python GUI tutorials and I am having some trouble. What would be your first choice?

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

    Best language for coding an overlay?

    Posted: 05 Feb 2018 07:46 AM PST

    I basically want a program where I can toggle an image on my screen that goes over everything else, thanks in advanced.

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

    I'm doing questionnaire. If you would like to. Please answer some questions

    Posted: 05 Feb 2018 11:03 AM PST

    What's it like in the day in the life of a computer programmer?

    What are your personal experiences from working in the field?

    What are some tips for someone new working in the field of computer programming?

    What are some things to avoid for someone new entering the field?

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

    Need advice for a laptop

    Posted: 05 Feb 2018 10:53 AM PST

    So my old laptop is getting horrible and is very old(7 years) I'm currently wondering what to get now I will mostly program using python/c#/c++/java and use it for college(i'm new to coding) My budget is 1300€ i really like the macbook system but don't really know if it's worth it

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

    Creating an 'autodialer' for Skype to get in touch with customers?

    Posted: 05 Feb 2018 10:45 AM PST

    I work for a small Amsterdam company, answering calls from customers with questions about their order through Skype, but starting this week I'll also have to make a few hundred calls to customers whose bank declined the overseas charge. As much as I love talking to people (I don't) and saying the same thing over and over again (I don't), I figured I could make the process a lot more straightforward.

    Basically each call will boil down to: This is x calling from y letting you know that the bank declined payment. We have cancelled your order. If you would like to place another order, please contact your bank and tell them to accept overseas charges for a 24 hour period and your order should go through.

    Or something along those lines, I haven't really thought it through yet, I just got the memo that my workload will be tripling earlier this morning. Is this project feasible for someone who is just starting out learning programming? This seems right up the alley for the "automate the boring stuff with python" book that I've been thinking about getting

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

    Is there a platform where I can develop forms that result in a .json archive?

    Posted: 05 Feb 2018 10:39 AM PST

    My main goal is to have forms that collect information like this:

    Question 1 - Answer X. and Question 2 - Answer Y

    And at the end, I can collect these data and use in a predefined template.

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

    Should I choose a specific career specilization and work to it or code until my fingers break?

    Posted: 05 Feb 2018 03:59 AM PST

    I've decided over the last year I want to study programming so I picked a language.

    I tested a ruby and python to see which I liked most and I've decided on java. I'm assuming it's best to stick with one language until you can start analyzing code and debug/correct errors well.

    Should I find a career position and work to it or keep coding with classes? Id like to join a bootcamp and I started a course on udemy, which is great but I'm feeling like there are so many resources out there and I dont know what I'm trying to obtain. What did you do?

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

    [Mobile / web dev] Sending push notifications without an app

    Posted: 05 Feb 2018 09:01 AM PST

    Hi,

    Is is possible to send push notifications without the users having to install an app ? I don't want to pay 100$ for a developer account on the App Store, and my web app will only be available for one week. I've taken a look at pushed.co, which seems cool but the users have to install their app. If there is a way around that it would be awesome.

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

    javascript variables

    Posted: 05 Feb 2018 07:25 AM PST

    Hey guys,

    So I am trying to do the following: assign a "default" value to a javascript variable, then change that value, and to then again be able to change the variable,

    the code to which this applies:

    <script> function functie1(x) { var z = "jasonr"; var x = prompt("Which chat do you want to see?", "Shroud"); if (x == "") { window.alert("You canceled."); location.reload(); } else { window.alert("You chose " + x ); document.getElementById( z ).src = "https://www.twitch.tv/" + x + "/chat?popout="; document.getElementById( z ).id = x; }} document.getElementById("clickMe").onclick = functie1; function functie2(y) { var k = "lirik"; var y = prompt("Which chat do you want to see?", "lirik"); if (y == "") { window.alert("You canceled."); location.reload(); } else { window.alert("You chose " + y) document.getElementById( k ).src = "https://www.twitch.tv/" + y + "/chat?popout="; document.getElementById( k ).id = y; }} document.getElementById("clickMe2").onclick = functie2; var y = k; var x = z; </script> <div id="chatlinks"> <iframe frameborder="0px" scrolling="yes" id="jasonr" src="https://www.twitch.tv/jasonr/chat?popout=" height="100%" width="100%"> </iframe> </div> <div id="chatrechts"> <iframe frameborder="0px" scrolling="yes" id="lirik" src="https://www.twitch.tv/lirik/chat?popout=" height="100%" width="100%"> </iframe> </div> 

    this is my script, I am altering Iframe elements with it, what I want to achieveis that I can alter the elements multiple times where I can only do that once at this moment.

    I think it has something to do with that there is no element left that goes byid = z after it has been altered once, so now I thought I had to change the value of z into x after the function ran, but I cant get it to work.

    Can someone tell me what's what with the variable scopes or how I can assign the new values to it, I've looked all over but I am not getting wiser at all.

    Thanks in advance!

    Bob

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

    Powerschool Swift 4 Xcode9 Help Please! School Project has me stressing out

    Posted: 05 Feb 2018 07:09 AM PST

    Powerschool is a site that keeps track of letter days to indicate lab days for my high school. It also keeps track of people's grades, but I just want to scrape the letter day.

    So I am trying to access info contained on html off the site https://pschool.princetonk12.org/guardian/home

    To do that I must login through this portal https://pschool.princetonk12.org/public/ which uses oauth.

    I know I have to use an authentication token and I see it printed in the output. How do I make a session on https://pschool.princetonk12.org/guardian/home to ultimately parse through it? How do I get the token and use it? Thanks so much!

    Here is what I have so far:

    import Foundation import PlaygroundSupport

    PlaygroundPage.current.needsIndefiniteExecution = true

    let credential = URLCredential(user: "username", password: "password", persistence: URLCredential.Persistence.forSession) let protectionSpace = URLProtectionSpace(host: "pschool.princetonk12.org", port: 443, protocol: "https", realm: "Restricted", authenticationMethod: NSURLAuthenticationMethodHTTPBasic) URLCredentialStorage.shared.setDefaultCredential(credential, for: protectionSpace)

    let config = URLSessionConfiguration.default let session = URLSession(configuration: config)

    let url = URL(string: "https://pschool.princetonk12.org/public/.json")!

    let task = session.dataTask(with: url) { (data, response, error) in guard error == nil else { print(error?.localizedDescription ?? "") return }

    print(String(data: data!, encoding: .utf8)) 

    }

    task.resume()

    Here is a link to my stack overflow page to make life easier. Sorry for the indexing!

    https://stackoverflow.com/questions/48625215/powerschool-swift-4-xcode9-oauth-issues

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

    No comments:

    Post a Comment