• Breaking News

    Friday, June 7, 2019

    I am an user level person, about to have meeting with my family buissnes Web devs. They charge about 2k$/month for running the homepage and my programmer friend told me it is a word press template. What is more there are still Easter wishes on it. And navigating it is a pain. Ask Programming

    I am an user level person, about to have meeting with my family buissnes Web devs. They charge about 2k$/month for running the homepage and my programmer friend told me it is a word press template. What is more there are still Easter wishes on it. And navigating it is a pain. Ask Programming


    I am an user level person, about to have meeting with my family buissnes Web devs. They charge about 2k$/month for running the homepage and my programmer friend told me it is a word press template. What is more there are still Easter wishes on it. And navigating it is a pain.

    Posted: 07 Jun 2019 08:16 AM PDT

    So my father runs a business (education) and I have just start working there. I don't want to post URL of the Web page for obvious reasons but it looks ugly, it takes more than five clicks to get to the vital info ( which is not updated) and it is a WordPress template.

    The company running it charges about 2k$ per month for " Internet marketing and positioning".

    It is not a big buissnes ( the Web page gets around 25k hits/month but I have no idea if those numbers are true) that we run, and it feels like those guys are taking advantage of my elderly father and his colleagues who just don't understand Internet.

    Also I am not sure if this is the right place to post this, I am just so pissed off, sorry for that. Are they scamming us? Is my gut telling me the truth?

    I am going to invite my tech savvy friend to the meeting just in case.

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

    how can I use a regular expression in JavaScript to get a value from page source code from a function tag?

    Posted: 07 Jun 2019 09:02 PM PDT

    here is the function from the source code

    Code:

    `function dosubmit() { if (getObj("Frm_Username").value == "") { getObj("errmsg").innerHTML = "Username cannot be empty."; getObj("myLayer").style.visibility = "visible" ; return; } else { getObj("LoginId").disabled = true; getObj("Frm_Logintoken").value = "3"; document.fLogin.submit(); } }` 

    i want to get the value of getObj("Frm_Logintoken") as i can't pull the value from #Frm_Logintoken

    using Code:

    document.getElementById("#Frm_Logintoken") 

    this gives me null

    because Frm_Logintoken only gets it's value when i click submit .Code:

    <input type="hidden" name="Frm_Logintoken" id="Frm_Logintoken" value=""> 

    full page code

    i found this online
    Code:

    /getObj("Frm_Logintoken").value = "(.*)";/g 

    but when i run it ... it gives me the same line again ! it's full code

    another regular expression i found but don't even know how to use it

    Quote:Example of a regular expression to search: before_egrep='N1:getObj("Frm_Logintoken").value = "(\w+)"'Here, N1 is assigned the value of the back reference - the expression in parentheses. \w + denotes the main compound characters, this is a synonym for "[_[:alnum:]]". Once again - pay attention to the brackets - this is the back link. At the same time, there are also parentheses in the source code fragment - they need to be escaped

    i am trying to make an auto login script that works in the background like it

    doesn't show the user the login form page but the only the page after it

    and i have found this code online too but don't know what's about it contains xhr .

    the line that Attracted my attention is
    Code:

    /getObj\("Frm_Logintoken"\).value = "(.*)";/g 

    when i run it ... it gives me the line again !

    some notes :

    i have tried
    Code:

    document.getElementById("Frm_Logintoken").value 

    but it gives me empty "" because

    Quote:
    Frm_Logintoken only gets it's value when i click submit .

    the page will not even accept the correct password if the Frm_Logintoken token value isn't the same as one in the page.

    the Frm_Logintoken is a token generated by the page and it basically increment by one on each successful login.

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

    Visual Studio and c/cpp

    Posted: 07 Jun 2019 08:12 PM PDT

    So I have Visual Studio Community 2019 installed 19.1.2 (I think that's the newest version as of today) And I don't have a option for C or C++, anybody know why or how to fix it?

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

    Library to add linear systems indexes to arrays.

    Posted: 07 Jun 2019 07:20 PM PDT

    I'm not sure if this is the correct sub for the question, if not-please advise the correct one.

    Is there a library that can convert a system of linear equations to an array of indexes? The software or programming language doesn't matter.

    Example: I have such a system of inequalities, where i,j and k go from 0 to 10. https://i.imgur.com/DCOQr1j.png

    I'd like to get an array of indexes in front of "y"s. (y(0,0,0)-y(10,10,10)).

    What I'd like to know if there's something that can help me without having to do it for every equation by hand.

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

    Any help?

    Posted: 07 Jun 2019 07:00 PM PDT

    Doing a problem: Modify the function to invoke the given callback and return its result.

    function invokeCallback(cb){ }

    /* do not modify below*/

    const exampleCallback = function() { return 'hello' }; const invokedResult = invokeCallback(exampleCallback);

    console.log(invokedResult, <—- should be "hello"

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

    Help with string?

    Posted: 07 Jun 2019 06:24 PM PDT

    I have an infix to postfix c program I am working on but am having problems with the output. I have no errors and the output I work out by hand makes sense. Would anyone mind taking a look?

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

    C# Pass objects property as parameter

    Posted: 07 Jun 2019 05:51 PM PDT

    C# Is it possible to pass an objects property as a parameter so that the method could get the properties name and value?

    I know how to do the latter with reflection, but i cant find how to pass an object to a method and point to one of its properties.

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

    Question regarding \n in C++

    Posted: 07 Jun 2019 05:39 PM PDT

    Noob question, how come even though a string is ended with ";" I still need to put "\n" before it? isn't that redundant if I'm already ending the string with a ";"?

    for example:

    std::cout << "Hello\n";

    std::cout << "Goodbye\n";

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

    Anyone?

    Posted: 07 Jun 2019 04:10 PM PDT

    Does anyone else write 1 line of code, get overwhelmed by the thought of having to maintain it for the rest of your life, proceed to delete it, throw your computer into the trash and then jump into a large body of water

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

    I want to create a program that detects the latest technology news from a website (let's say theverge.com) and publish it's link on facebook..how to do that?

    Posted: 07 Jun 2019 02:46 PM PDT

    I can use Java, JavaScript, Python.

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

    Intro to programming

    Posted: 07 Jun 2019 02:23 PM PDT

    Has anyone read the book learning to program by Stephen Foote? I'm pretty stuck on a section concerning Json and chrome extensions. I keep running my code through the validator the book recommends and it says it's valid but this isn't the case when I actually try to unpack the extension in chrome. If anyone has read the book before and could answer a couple more questions that would be great

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

    Question for experts on gaming hardware + software regarding programming of input delay

    Posted: 07 Jun 2019 01:46 PM PDT

    Hi,

    This question is for experts/people with actual experience or knowledge about the existence of programming tendencies re: inserting input delay (in relation to hardware + software of gaming consoles, in particular the Nintendo Switch in this case).

    Preamble:

    Some games on the Nintendo Switch have varying levels of input delay. For example, Splatoon 2 has an average of 6 frames, while Mario Kart 8 has 5 (source: https://www.youtube.com/watch?v=ezcqu4f1JAI).

    In my eyes, this cannot be merely a hardware performance issue as there is an unusual consistency to the input delay (e.g. by 1 or 3 frames, not like 2.42 or something) difference between games, and to my knowledge if hardware is overstressed due to high demands, the input delay would not remain at such a consistent number and range, and would fluctuate a lot more, unless a preset input delay was programmed in.

    I personally know the obvious fact that input delay is commonly increased to compensate for the geographical distance in online fighting games. However, in this situation I am more interested in why Nintendo may have intentionally programmed increased input delay into some games on the Nintendo Switch rather than others, as seems to me to be the case.

    Question:

    To sum, why might a programmer program a consistent frame or frames of input delay in a game (offline)? Would it really enhance graphical performance somehow to compensate for poor hardware/allow a game to achieve more smooth gameplay? If so, why and how?

    Second, is this actually being done on the Nintendo Switch, or is there another explanation for this unusually consistent (e.g. it's commonly +1, or +3 consistent additional input delay between games, as opposed to like a range of +2.63 to +4.4 or something, which would seem more like a hardware issue) additional input delay?

    Please do not reply if you only have conjecture to share. I am looking for answers by programmers who have actual knowledge about the Nintendo Switch hardware/software or have directly related knowledge due to having worked with something similar.

    Thank you for your help ahead of time.

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

    Get most 'distant' RGB point given a set of points in RGB space?

    Posted: 07 Jun 2019 01:01 PM PDT

    This is half math-problem, half algorithm design; unless someone knows where this algorithm already exists. I want to design a method that, given a list of colors in RGB form (so a list of tuples of 3 integers from 0 to 255), calculates the tuple of 3 integers in that domain that is furthest from all the others using the euclidean distance. I want to be able to generate an arbitrary number of distinct colors for labels in graphs.

    Can anyone guide me in the right direction for how to design such an algorithm, or even how to set up the system of equations I would need to calculate these values?

    I'll be adding to this as I think of solutions, but in the meantime any tips would be greatly appreciated!

    EDIT: So far, it seems like voronoi diagrams might be useful.

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

    i got like a chart that i need to fit into the dataset so something like [jan,feb,mar...] so on so so forth. In this case do i have to query my sqlite database 12 times to pull the data?

    Posted: 07 Jun 2019 10:40 AM PDT

    I got like a SQLite table for expenses that i need to fit into the chart.js dataset so it is something like [jan,feb,mar, ...] I am working in PHP. In this case do i have to query my table 12 times to pull the expenses and add the month's total?

    submitted by /u/leo-g
    [link] [comments]

    How do you deal with stale data in a multi-user web application? Displayed data can be changed in the underlying database by any user. How do you show the change to all the other users?

    Posted: 07 Jun 2019 07:40 AM PDT

    For instance, I have database tables for building and associated rooms. Any user can bring up the lists in their browser and edit. So if user A changes the capacity of room 123 in building X from 30 to 40, but user B has building and room previously loaded into their browser.

    How do I... 1) even know that the change has occurred in user B's browser. 2) push the change at the user B.

    Via... 1) locking? In other words, prevent concurrent editing. 2) polling? Periodically asking the database if a change has occurred?

    Or do I just pretend it doesn't matter and expect the odds of it being an issue are so low that I ignore it?

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

    How does Spotify match a local file with a song in their catalogue?

    Posted: 07 Jun 2019 02:46 AM PDT

    When I add a song to my local Spotify library Spotify sometimes matches it to a song in their own catalogue. This also happens when things like title and artist don't match up. Do they compare the actual audio file contents with all of their own songs or a hash of it?

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

    Reading data from a csv file

    Posted: 07 Jun 2019 06:30 AM PDT

    Hi all I am trying to implement an algorithm that takes data from each column of a 2 column table and stick them in individual arrays. i am doing this because i want to implement a simple numerical integration algorithm with an x column and an f(x) column which i created in excel.

    can anyone help me.

    fyi i realise that there are probably already functions or libraries which do this already its just i want to practise bringing an idea from my head into code

    thank you in advance

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

    How can I get a value from inside a function using Java script?

    Posted: 07 Jun 2019 04:55 AM PDT

    here is the function from inside a script

    https://hastebin.com/gobarofeta.cs ( a better organized text with code )

    i want to get the value of getObj("Frm_Logintoken")
    as i can't pull the value from
    #Frm_Logintoken
    using document.getElementById("#Frm_Logintoken")
    this gives me nullbecause Frm_Logintoken only gets it's value when i click submit
    <input type="hidden" name="Frm\\\\\\\_Logintoken" id="Frm\\\\\\\_Logintoken" value="">
    full page code https://hastebin.com/tuhazuhipe.xml tried document.getElementById("Frm_Logintoken")
    too butit gives me <input type="hidden" name="Frm\\\\\\\_Logintoken" id="Frm\\\\\\\_Logintoken" value="">
    i found this online /getObj\("Frm_Logintoken"\).value = "(.*)";/g but when i run it ... it gives me the same line again !
    it's full code

    https://paste.ofcode.org/QLyguebhdPfRNeWUMjy273

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

    If you were a hiring manager would a dev recreating your work impress you?

    Posted: 07 Jun 2019 02:04 AM PDT

    I have a job interview in a few days and I'm pretty scared of it. It's been years since I was in college and I'm afraid instead of asking me relevant questions to my stack the manager is going to put me through a whiteboard kind of challenge to see if I'm good at algorithms (I'm not). I'm also concerned I'll freeze up as I don't code well under pressure.

    I've watched a few hours of webinars they have up and gotten a good feel for the product itself. Based on my initial interview with the recruiter I also have a suitable understanding of the stack they're using and the tech they're hosting things on.

    So my plan to maybe counter a not great interview was to basically preempt it and record myself building a specific widget they use over the weekend. The product itself is too big to build in a few days but I could definitely build a smaller part of the product.

    If you were a hiring manager or CTO and a potential employee DM'd you on twitter with an unlisted youtube playlist of them recreating a portion of your product along with a private URL they could visit it at would that be seen as positive or "heck no, this kid is way over stepping"?

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

    How does an API get populated with data?

    Posted: 07 Jun 2019 01:18 AM PDT

    I'm curious to find out how API developers populate their APIs with resources. Take the example of The Movie Database API. It has thousands of movies. Did the developers programmatically generate the resources (together with metadata) based on database tables?

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

    Getting error when trying to consume api -> http: server gave HTTP response to HTTPS client

    Posted: 07 Jun 2019 01:10 AM PDT

    No comments:

    Post a Comment