• Breaking News

    Sunday, May 26, 2019

    uninstall codeblocks and sfml and now I can't even do a simple hello world. Ask Programming

    uninstall codeblocks and sfml and now I can't even do a simple hello world. Ask Programming


    uninstall codeblocks and sfml and now I can't even do a simple hello world.

    Posted: 26 May 2019 08:58 PM PDT

    any idea why I can't do anything now?

    build message

    ||=== Build file: "no target" in "no project" (compiler: unknown) ===|

    ld.exe||cannot find -lsfml-graphics-s-d|

    ld.exe||cannot find -lsfml-window-s-d|

    ld.exe||cannot find -lsfml-audio-s-d|

    ld.exe||cannot find -lsfml-network-s-d|

    ld.exe||cannot find -lsfml-system-s-d|

    ||error: ld returned 1 exit status|

    ||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

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

    Why do REST APIs use HTTP instead of plain TCP?

    Posted: 26 May 2019 01:27 PM PDT

    Greetings,

    Just for clarification, I'm new to the modern programming trends and I've been always writing in C using old-school methods. I have recently learned Go, and I'm getting more comfortable with the language, and soon I'll get myself comfortable with web dev.

    So, my questions is: why do REST APIs use HTTP instead of plain TCP when it's just JSON objects being tossed back a forth?

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

    Where to find new open source projects?

    Posted: 26 May 2019 11:08 AM PDT

    Hello, II want to contribute and learn more about coding with real projects

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

    Need help finding a mac text editing program that can encode a UTF-8 file with BOM

    Posted: 26 May 2019 05:06 PM PDT

    I have to use mac for a project I am doing, so I need a text editing software that can encode UTF-8 with BOM. Base textEdit can't do it, and neither can Brackets to my knowledge. I know BOM is often not recommended, but for this project I have to use BOM, no exception.

    Thanks for any help!

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

    Cleartext Credentials

    Posted: 26 May 2019 12:57 PM PDT

    Hi All,

    We are having some challenges with our developer so I'm reaching out to the programming community (those who may know better) about program development.

    We have an application that is branded as "Enterprise" level which has a .NET Desktop Application front end with a SQL Database back end.

    The Desktop Application has a text file in its installation folder which contains the path to the SQL environment along with credentials for it. Typically our Developer populates this with "SA" credentials for SQL but sometimes it is set to a SQL Account with "db_owner" permissions. How commonly are business applications setup this way?

    There is also a Users table in the SQL Database which contains each users login credentials in clear text along with their individual SMTP information + credentials. How big of a concern should this be treated as?

    TLDR: Rate Our Developer

    Thanks

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

    How a user preferred content generated?

    Posted: 26 May 2019 06:24 PM PDT

    Sites like Facebook and YouTube provide a feed with considering our past behaviours. How they calculate our preferences? What data they use?

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

    What is your opinion on the programming language developed by Google, Flutter?

    Posted: 26 May 2019 12:45 PM PDT

    How to count product codes from textarea [JavaScript, jQuery]

    Posted: 26 May 2019 07:39 AM PDT

    I want count in my textarea product codes.

    I have whitelist for product codes so I cant type or write anything else into textarea.

    Found bad issue, I can write only static product codes like (first 16 is product code other 6 is how many products it is in list...):

    0FAR12345H00123C + 00001P

    0FAR54321H00321C + 00001P

    0FAR54321H00321C + 00002P

    So now I have two problems..

    First problem, whitelist universal product codes like this:

    0FAR12345H00123C + 00001P

    0FAR543H00321C + 00001P

    0F321H321C + 00001P

    0R31H1C + 001P

    Second problem is how to count these product codes under textarea + overall count.

    Example under textarea counts:

    0FAR12345H00123C: 5

    0FAR543H00321C: 2

    0F321H321C: 6

    0R31H1C: 4

    Overall: 17

    Javascript:

    "use strict";

    `toFile.focus();` 

    `var timeoutId;` `$('#toFile').on('keypress', function() {` 

    console.log('Textarea Change');

    clearTimeout(timeoutId);

    timeoutId = setTimeout(function() {

    // Runs 3 second (3000 ms) after the last change

    saveToFile();

    }, 3000);

    `});` 

    `toFile.addEventListener("keyup", event => {` 

    const data = toFile.value.split("\n");

    const result = data.unique();

    info.textContent = result.length !== data.length ? "Duplicate removed" : "";

    toFile.value = result.join('\n');

    `});` 

    `if (!Array.prototype.unique) {` 

    Object.defineProperty(Array.prototype, "unique", {

    configurable: false, // these 3 properties default to false so not needed

    enumerable: false, // But have added them just to show their availability.

    writable: false,

    value: function() {

    const existing = {};

    return this.filter(a => existing[a] = !existing[a] ? true : false);

    }

    });

    `} else {` 

    throw new Error("Array.prototype.unique already defined.");

    `}` 

    `const CODE = ['Product', 'Codes', 'Here'];` `const reg = /^([a-zA-Z0-9]{1,6})$/;` 

    `// Ensure values been inserted are in correct format` `function onInput() {` `let values = event.target.value` 

    .split('\n')

    .map(v => {

    v = v.trim().toUpperCase();

    if (v.length <= 16) {

    if (CODE[0].substr(0, v.length) != v &&

    CODE[1].substr(0, v.length) != v) {

    v = v.substr(0, v.length - 1);

    }

    } else if (!v.substr(16, 22).match(reg)) { // at the moment static 16 product code lenght + 6 is count of products.

    v = v.substr(0, v.length - 1);

    }

    return v;

    }).join('\n');

     `event.target.value = values;` `}` `function saveToFile() {` 

    console.log('Saving to the db');

    toFile = $('#toFile').val().replace(/\n\r?/g, '<br />');

     `$.ajax({` `url: "test2.php",` `type: "POST",` `data: {toFile:toFile}, // serializes the form's elements.` `beforeSend: function(xhr) {` 

    // Let them know we are saving

    $('#status').html('Saving...');

     `},` `success: function(toFile) {` 

    // You can get data returned from your ajax call here. ex. jqObj.find('.returned-data').html()

    // Now show them we saved and when we did

    var d = new Date();

    $('#status').html('Saved! Last: ' + d.toLocaleTimeString());

     `},` `});` `}` 

    `$('.form').submit(function(e) {` `saveToFile();` `e.preventDefault();` `});` 

    HTML:

    <form class="contact-form" method="post">

    <textarea id="toFile" name="toFile" oninput="onInput()"></textarea><br>

    <input type="submit" value="Submit">

    </form>

    <!-- under here I want show count of product codes + overall count -->

    <div id="status"></div>

    <div id="info"></div>

    This is how I want count product codes and overall:

    img: https://pasteboard.co/IguIQqP.png

    This shows what you can only insert in textarea (Whitelist for product codes):

    img:https://pasteboard.co/IguJ4B6.png

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

    Starting an OpenSource Project

    Posted: 26 May 2019 06:42 AM PDT

    What's a good process to follow, to start an open source project if I want to get advice, feedback, and criticism without allowing just anyone to contribute at first. Later on, once the project is a little further along and I feel like I've actually accomplished an interesting project on my own, then I plan to expand it to a proper open source project.

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

    Why automation programs usually uses a host:port server to run on the machine?

    Posted: 26 May 2019 07:49 AM PDT

    When one uses appium or other automation programs often a host cmd server is running in the background to achieve the automation needs, why is it requires a host:port in the background to use it?

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

    help with a list

    Posted: 26 May 2019 01:40 PM PDT

    Hello, I am coding a video game, there is a class called ''dog'' and this dog must move when the users uses the joystick (it must go upword, down in the game)

    I have a class Dog

    def __init __ (self, name, sex, age, pic)

    Let's say that I would like to implement 2 things to this class:

    1) A dog pic: I was thinking to add the pic in the

    def __init __ (self, name, sex, age, pic)

    then :

    self.pic = pic

    ---> Now when I create an istance of Dog (let's call it ''Carl'') .

    I need that when I call that istance (self.pic = pic) it uploaded the image of a dog that I have on my pc (which it would be the carachter shape of the istance ''Carl'' in the game)

    Also I need to define a function that when called it let the Carl istance to move and to bark

    Do I need to specify ''bark'' and ''move'' function in the class dog, or can I add those functions just to the character ''Carl'' without first putting them into the def __init __ class dog example: def __init __ (self, name, sex, age, pic, move, bark ) ?

    Also

    def function bark ()

    how can I do this kind of function? Uploading a flash piece of code of a baring dog when the 'X' on the
    tastauture is pressed, but how?

    thank you for help

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

    Reliable in Azure

    Posted: 26 May 2019 08:39 AM PDT

    In azure reliable actors/service/collection what does reliable refer too?

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

    Windows 10 - How to find the name and size of a permanently deleted folder?

    Posted: 26 May 2019 08:31 AM PDT

    Hey everyone, I deleted a folder from say "D" drive. It was a big file so windows did not move it trash and instead permanently deleted it. I just would like to find out how big the folder was. is there a power command or any other to find this out. I did look at windows logs in event viewer but I did not find it. When I right click on D drive and click on restore previous version, there are non so I think shadow copy is out of picture. Any solutions you guys are aware of?

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

    Need some help with finding a program

    Posted: 26 May 2019 01:12 AM PDT

    I'm not sure if this is right subreddit or not, but I'm not sure where to start. I'm a patrol security officer who every night has to check multiple properties multiple times. I have to record my times that I arrive and leave property. Recently we were issued Samsung Galaxy tablets to help record this. So I'm looking for a program that I can hit one button to record the times when I arrive and leave the properties. Hopefully someone can help point me in the right direction.

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

    New to Scala, can anyone help me understand this function?

    Posted: 26 May 2019 12:37 AM PDT

    mapPartitions[S: ClassTag]( f: Iterator[T] => Iterator[S], preservesPartitioning: Boolean = false): RDD[S]

    I would like to know a broad understanding of what the function accepts, what it's doing and what it's returning so that I can use that logic to understand the other functions.. Thanks!

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

    A better overview of net class library

    Posted: 25 May 2019 11:19 PM PDT

    Is there a good overview of all different . Net components and techniques? I know there are the documentations but I think there must be a better way for Someone to learn how to use different names paces and what net library has to offer.

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

    No comments:

    Post a Comment