• Breaking News

    Thursday, January 17, 2019

    What exactly is a framework with the most simple explanation possible? Ask Programming

    What exactly is a framework with the most simple explanation possible? Ask Programming


    What exactly is a framework with the most simple explanation possible?

    Posted: 17 Jan 2019 10:10 AM PST

    What is a framework?? Why is everyone talking about that Node.js? What is it? What is the .NET framework?

    I read that .NET is just libraries to make applications. But as soon as I read about Node.js and everyone was talking about it like it was a language, I got confused.

    It's a very basic question, but could you explain?

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

    Does your employer monitor how much code you write?

    Posted: 17 Jan 2019 11:20 AM PST

    Does your manager/lead get a report of some sort every month with a score based on how many lines of code you wrote?

    I'm curious to see if this "scoring" is common place across the industry. To me it's pointless as you may have a sprint full of tasks dedicated to bug fixing when another dev might have ones to implement new features, so naturally you end up with a lower score. At which point you get questioned as to why it's lower compared to employee x, y or z

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

    What are some of the open source software code to read for beginner?

    Posted: 17 Jan 2019 08:24 PM PST

    Extended Programming Sessions and Losing Words?

    Posted: 17 Jan 2019 08:09 PM PST

    I've been coding professionally for a few months now, and recently I've started to encounter a really annoying problem. It seems that after several hours programming, the English language starts to escape my grasp. Trying to have a discussion with my coworkers after three or four hours of writing code is a waste, as my ability to properly convey my thoughts into sensible words seems to fail me. My general perception seems to be affected almost as though I've had a bit of whiskey.

    Has anybody else experienced something like this? Is this kind of thing documented somewhere? Incidentally, I have no idea how to phrase my question to find any articles on this.

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

    Can you use a special character/symbol (such as a +) for a variable? (C++)

    Posted: 17 Jan 2019 08:00 PM PST

    I'm fairly new to C++. So a little bit of context. I'm coding a program that calculates your GPA based on the user's inputs. Is there a line that will allow me to do something similar to "float A = 4.00;" but instead the variable has a special character attached to it, such as "B+", "A-", etc..

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

    Trigger Google Assistant from code?

    Posted: 17 Jan 2019 06:16 AM PST

    Hey everyone,

    I'm trying to set up a stat collection app in my lab, and to do this I'd love our Google Home to prompt whoever's in the lab to respond with the data (for instance, "Hey @employee, how many people are in the room right now")

    Right now it doesn't seem like there are any ways to do this, maybe routines, but I'd like to programatically determine when the prompt should happen (based on when the lab is open/other data I have online). Is there any way to call a Google Assistant to prompt from code?

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

    How do idle games not overflow once your score reaches a super high number?

    Posted: 17 Jan 2019 01:11 PM PST

    (UWP)[C#] Proper way to add Auto Suggest box to NavMenu?

    Posted: 17 Jan 2019 03:28 PM PST

    I'm just starting to learn UWP and xaml. What is the proper way to add a AutoSuggestBox to the Side Navigation panel? (Sorry for the bad code formatting in advance, copy and paste wasn't great)

    My Main.xaml has an AutoSuggestArea that I have set to Visible

    </VisualStateGroup> <VisualStateGroup x:Name="AutoSuggestGroup"> <VisualState x:Name="AutoSuggestBoxVisible"/> <VisualState x:Name="AutoSuggestBoxCollapsed"> <VisualState.Setters> <Setter Target="AutoSuggestArea.Visibility" Value="Visible"/> </VisualState.Setters> </VisualState> </VisualStateGroup>

    and in the Grid for the AutoSuggestArea I have defined an AutoSuggestBox

    What I want is basically Identical Behaviour as the Groove Music app on Windows, where the Search bar disappears as the Nav View is closed or Minimized.

    (https://i.imgur.com/SUapMYq.png)

    Instead I get this

    (https://imgur.com/5W3piPr.png)

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

    Interleaving with 8 bits?

    Posted: 17 Jan 2019 09:22 AM PST

    I'm learning how to use an image saving library in c, and a function to save an array of pixel data to a png specifies the parameter 'data' as a void pointer to the first pixel in the image. Easy enough, however it then specifies an int 'comp' parameter which defines the amount of components per pixel (1=Y, 2=YA, 3=RGB, 4=RGBA). It says in the docs that each pixel contains 'comp' number of channels of data stored interleaved with 8 bits. I am unsure what this means, how should I format 'data'? Should it be an array of floats with 4 floats per pixel (in the case of rgba)? What does interleaved mean in this context? I am a fairly novice c programmer, so I apologize if this question either doesnt make very much sense or is trivial

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

    A good book/article API?

    Posted: 17 Jan 2019 03:07 PM PST

    Hey there,

    I'm trying to search for a book/article API that gives me random sentences.

    Something like an excerpt from an Article or Book?

    I really can't seem to find anything worthwhile and the Google Book API doesn't seem to have what I want, or I can't find it, as it seems too focused on the book's information but not it's content.

    Also attempted the NYT API but for some reason the keys they keep giving me are invalid.

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

    Program not behaving correctly when launched from device, but behaving correctly when launched from SSH?

    Posted: 17 Jan 2019 02:45 PM PST

    Hello. This is weird. I'm embarking in a new C adventure with EV3 (lego mindstorms) and this happened to me.

    I don't know why, but the program is not updating correctly.

    I transfer the source file, compile it via makefile (via SSH), and then run it.

    When doing so via SSH the program works as intended (in my case there's a 5 second delay I removed), but when launching the same program from the device the delay still lingers.

    It did the same for a different thing, but then I rebooted, retransferred the program and it fixed itself.

    Any clue as to why and how I can fix this?

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

    can a go server and C client do a socket connection?

    Posted: 17 Jan 2019 01:35 PM PST

    I didn't write the server, just the client. When I have my go server running the C client connects but when the go server sends some data but the C client just receives "". Is there some way I should be encoding the data in the go server so that the client can receive it? I have the server source

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

    is it possible to build a heap from an array that has variables that repeat themselves ?

    Posted: 17 Jan 2019 12:13 PM PST

    i mean duplicated variables

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

    Ionic 4 with CRA

    Posted: 17 Jan 2019 11:24 AM PST

    is it possible to create a hybrid app using Ionic 4 with React.js create-reatct-app?

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

    [JavaScript] Tracking WhatsApp Online times

    Posted: 17 Jan 2019 04:23 AM PST

    Hey fellow programmers,

    I'm using the following JS Code to track if and when a contact has been online:

    var csvContent = "data:text/csv;charset=utf-8,Name,Status,Time,Date\n"; var globIntId = -1; var buttonAdded = false; function f() { try { b = document.querySelector('#main > header > div>div>span').textContent; name = document.querySelectorAll('#main > header > div>div>div>span')[1].textContent; } catch (TypeError) { return; } if (b === "typing…" && typing) { typing = false; if (checkPermission()) { var not = new Notification(name + " Typing"); tm = new Date(); csvContent += name + ",2," + tm.toLocaleTimeString() + "," + tm.toLocaleDateString() + "\n"; } } if (b === "online" || b === "typing…") { if (b === "online") { typing = true; } if (!online || name !== lastName || ft) { online = true; lastName = name; ft = false; onlineTimeObj = new Date(); onlineTimeMs = onlineTimeObj.getTime(); onlineTimeStr = onlineTimeObj.toLocaleString(); console.log(name + ",1," + onlineTimeObj.toLocaleTimeString() + "," + onlineTimeObj.toLocaleDateString() + "\n"); csvContent += name + ",1," + onlineTimeObj.toLocaleTimeString() + "," + onlineTimeObj.toLocaleDateString() + "\n"; if (checkPermission()) { var not = new Notification(name + " Online",{ body: onlineTimeStr }); } } } if (b.search("last seen") > -1) { if (online || ft || name !== lastName) { online = false; ft = false; lastName = name; typing = true; offlineTimeObj = new Date(); offlineTimeMs = offlineTimeObj.getTime(); offlineTimeStr = offlineTimeObj.toLocaleString(); console.log(name + ",0," + offlineTimeObj.toLocaleTimeString() + "," + offlineTimeObj.toLocaleDateString() + "\n"); csvContent += name + ",0," + offlineTimeObj.toLocaleTimeString() + "," + offlineTimeObj.toLocaleDateString() + "\n"; if (checkPermission()) { var not = new Notification(name + " Offline",{ body: b }); } } } } function stalk(intervalId) { intervalId = intervalId || false; ft = true; online = false; typing = true; csvContent = "data:text/csv;charset=utf-8,Name,Status,Time,Date\n"; if (!buttonAdded) { putCSVLink(); putStopStalkButton(); buttonAdded = true; } try { lastName = document.querySelector("#main > header > div.chat-body > div.chat-main > h2 > span"); } catch (TypeError) { //stalk(); return; } if (intervalId !== false) { clearInterval(intervalId); globIntId = -1; return true; } interval = setInterval(f, 1000); globIntId = interval; alert("Stalking"); //document.querySelector("#side > header > div.pane-list-user").textContent += "Stalking"; return interval; } //Modified Code from Notifiaction API example from MDN function checkPermission() { // Let's check if the browser supports notifications if (!("Notification"in window)) { return flase; }// Let's check whether notification permissions have already been granted else if (Notification.permission === "granted") { // If it's okay let's create a notification return true; }// Otherwise, we need to ask the user for permission else if (Notification.permission !== 'denied') { Notification.requestPermission(function(permission) { // If the user accepts, let's create a notification if (permission === "granted") { return true; } }); } // At last, if the user has denied notifications, and you // want to be respectful there is no need to bother them any more. } function getCSV(data) { data = encodeURI(data); var link = document.createElement("a"); link.setAttribute("href", data); link.setAttribute("download", "stalk_data.csv"); document.body.appendChild(link); link.click(); } function getStalkData() { getCSV(csvContent); } function putCSVLink() { var button = document.createElement("button"); button.textContent = "GetStalkCSV"; button.className = "stalker"; button.onclick = getStalkData; var sideBar = document.querySelector("#side > header"); sideBar.appendChild(button); } function toggleStalk() { if (globIntId === -1) { stalk(); this.textContent = "Stop"; } else { clearInterval(globIntId); globIntId = -1; alert("Stalking Stopped"); this.textContent = "Start"; console.log("Stopped Stalking"); } } function putStopStalkButton() { var button = document.createElement("button"); button.className = "stalker"; button.textContent = "ToggleStalk"; button.onclick = toggleStalk; var sideBar = document.querySelector("#side > header"); sideBar.appendChild(button); } 

    (I found the code here).

    The code is working and it actually tracks if and when a person has been online, the only problem I have, that it only checks it once. I'm normally not a JavaScript guy, but to me the code looks good. Can anyone pinpoint the problem?

    Thanks in advance

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

    Should I build in VBA or Python?

    Posted: 17 Jan 2019 09:59 AM PST

    Need to do some work with a few Excel docs. This is something that is currently done weekly.

    I can do either VBA or Python, but from first glance, VBA seems more difficult. Lots of manual getting data, saving it on temporary sheets, and feels quite manual.

    The alternative is Python and scraping existing Excel files to sqlite, and issuing commands. Issue being, only I have an anaconda install of Python.

    The input is 2 Excel files, lining up a name with true conditions, and using that name to search for data on Excel file 2.

    Output is a chart and some lines of data.

    Thoughts moving forward? Either are doable.

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

    Is it possible to port safari to android devices?

    Posted: 17 Jan 2019 09:31 AM PST

    What programming languages would i need to know? I know C#, javascript, java and xaml (if that counts as a programming language), what languages would i need to learn? Would it even be possible?

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

    Emacs 'no such file or directory' when I try to install an external package (org-bullets)

    Posted: 17 Jan 2019 09:05 AM PST

    I'm trying to install the org-bullets mode and after pasting the install code given in the GitHub's site in .emacs, and paste the .el file into the home directory, I get this result:

    Warning (initialization): An error occurred while loading 'c:/Users/nazao/AppData/Roaming/.emacs': File is missing: Cannot open load file, No such file or directory, org-bullets To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the '--debug-init' option to view a complete error backtrace. 

    Is this a problem with my load-path? What can I do? I'm maybe mislocating the file, where usually is?

    I started emacs with the Option --debug init with the bottom of this article in the wiki says and now I get this:

    Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "org-bullets") require(org-bullets) eval-buffer(#<buffer *load*> nil "c:/Users/nazao/AppData/Roaming/.emacs" nil t) ; Reading at buffer position 48 load-with-code-conversion("c:/Users/nazao/AppData/Roaming/.emacs" "c:/Users/nazao/AppData/Roaming/.emacs" t t) load("~/.emacs" t t) #f(compiled-function () #<bytecode 0x1000be22d>)() command-line() normal-top-level() 
    submitted by /u/nacamilo
    [link] [comments]

    Aren't HTML documents with JavaScript GUI apps in a way?

    Posted: 17 Jan 2019 12:36 PM PST

    You can insert buttons, functions, textboxes, message-boxes and basically what a GUI program has in an HTML document. Wouldn't that make it a GUI app?

    Unless interactive HTML documents really are GUIs accessible from the web.

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

    How does it feels like working/developing in Windows/Linux vs Mac ?

    Posted: 17 Jan 2019 07:12 AM PST

    I went into an interview where the guys of the company (the company uses Mac) asked me my OS, and i said that is Windows & Linux. They immediately said "Oh wait until you start using our's Mac to see an improvement on your efficency"... This got me curious because i shifted from android to IOS and i loved it so maybe the same could happen in Mac... Anyone that uses Mac and has experience in Windows or Linux? What are your thoughts?

    submitted by /u/Don-g9
    [link] [comments]

    [WPF/C#] Help with printing only working when dubugging with Breakpoints

    Posted: 17 Jan 2019 06:58 AM PST

    Hey, Im trying to Print a datagrid inside a stackpanel in my WPF application.

     private void OnDataGridPrinting(object sender, RoutedEventArgs e) { System.Windows.Controls.PrintDialog Printdlg = new System.Windows.Controls.PrintDialog(); if ((bool)Printdlg.ShowDialog().GetValueOrDefault()) { Size pageSize = new Size(Printdlg.PrintableAreaWidth, Printdlg.PrintableAreaHeight); // sizing of the element. grdUser.Measure(pageSize); grdUser.Arrange(new Rect(5, 5, pageSize.Width, pageSize.Height)); Printdlg.PrintVisual(grdUser, Title); } } 

    if I try executing this code normally it only prints the column headers for my datagrid, but none of the actual data.

    If I add a breakpoint it works perfectly...

    Any suggestions would be appreciated

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

    Help With Scraping (Python)

    Posted: 16 Jan 2019 11:44 PM PST

    I'm just getting started with python and I thought it'd be cool to start making scrape scripts. Long story short, I'm currently having trouble. I want to download images from a page, then follow only specific links and then download the images on that page.

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

    How do I practice programming?

    Posted: 17 Jan 2019 02:59 AM PST

    I have no inspiration so is there a site that has projects or ideas so I can make my own program with whatever language and approach I want to use?

    Ps I know programming but I'm asking for ideas/projects to do apply my knowledge

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

    No comments:

    Post a Comment