• Breaking News

    Thursday, March 28, 2019

    C Programming question Ask Programming

    C Programming question Ask Programming


    C Programming question

    Posted: 28 Mar 2019 05:05 PM PDT

    struct T_Name
    { char *First; char *Middle; char *Last;
    };

    struct T_FullName
    { char *Title;
    struct T_Name *Name;
    char *Suffix;
    };

    struct T_Person
    { struct T_FullName FullName;
    int Age;
    char Sex;
    struct T_Person *BestFriend;
    };

    typedef struct T_Person *ptrPerson;

    ptrPerson pFriend[10];

    struct T_Person Person[10];

    /**************************************/

    Write the memory allocation instructions necessary to be able to store a value in

    Person[2].FullName.Name->Last

    How would you do this? I have a idea of how but its a HW question with no answer so i want to know for sure if im getting the correct answer.

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

    Localisation of a large application

    Posted: 28 Mar 2019 10:43 PM PDT

    Hello AskProgramming,

    At the moment, I have been tasked, to localise a large application wrote in PHP with Laravel, I wanted to know if its possible to get PHPStorm, or another IDE to help with this, for example in Android Studio, it will warn you if you are using hard coded strings, It will also warn your if your language annotation is incorrect e.g @string/lang doesn't match anything. I cannot seem to find this functionality for PHPStorm, which is making this incredibly slow.

    How would you approach this problem? Are there utilities that could help?

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

    Why are people usually told not to use jQuery with React?

    Posted: 28 Mar 2019 05:59 PM PDT

    They both manipulate the DOM - I get that. But wouldn't jQuery be possible / okay to use so long as you use it in a lifecycle hook, like in componentDidMount?

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

    If we use a virtual DOM because it's faster, why don't we just fix the DOM? Isn't a virtual DOM just a workaround for an underlying issue: the DOM is slow and inefficient?

    Posted: 28 Mar 2019 09:36 PM PDT

    I thought of this after reading How React Virtual DOM Works: Why Is It (So Much) Faster than the "Real" DOM?

    I guess the question is: Why haven't browser developers just fixed the fundamental problems with the DOM?

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

    How can I improve my RPS

    Posted: 28 Mar 2019 08:34 PM PDT

    Hey everyone,

    I've developed an app using a popular Node framework and I'm getting ready to launch it. I've been running tests on it and one that is really worrying me is the siege tests where I'm getting roughly 350 rps on a 4 core mulitcluster.

    I've removed a lot of packages that we're no longer using and it's barely made a dent. Can anyone give me any pointers on what I can do to improve this or at least figure out where the culprit is?

    Many thanks

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

    I am unfamiliar with assembly and came across this problem on an exam. ( I was way off )

    Posted: 28 Mar 2019 10:17 AM PDT

    What is the purpose of the following code and what value is stored in register r0?

     EXPORT __main ALIGN ENTRY __main PROC MOVS r0,#0 MOVS r1,#15 MOVS r2,#0 loop CMP r2,r1 BGT stop MLA r0,r2,r2,r0 ADDS r2,r2,#1 B loop % The final resul is saved in register r0 stop B stop ENDP END 

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

    Why isn't there a robust community of Google Docs/Drive programmers?

    Posted: 28 Mar 2019 06:41 PM PDT

    My company uses Google Docs for most projects. We think with some tweaks Docs/Drive can become a decent knowledge base system. For example, ability to add tags, better search functions, more meta data, etc.

    When I looked at Docs Add Ons, the list is pretty small. May I ask:

    • Do you recommend any good firms that specializes in doing programming for Docs?
    • If it is easy to get a regular programmer to do this (without special Docs knowledge), what kind of experience or language do I need from this person?

    Thanks!

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

    How specifically good is C# to x-platform?

    Posted: 28 Mar 2019 05:48 PM PDT

    This has been changing with the years and now I did a lot of reading and ended up more confused.

    So:

    1. There's a native VS for macOS "now". Coding C# in there, what platforms can I reach?
    2. Relating to 1, in what x-platforming is Xamarin needed?
    3. If I were to code with VS from Windows (probably through a VM), what platforms could I reach? And also when would I need Xamarin?
    submitted by /u/nmaxcom
    [link] [comments]

    How to check website owner?

    Posted: 28 Mar 2019 03:16 AM PDT

    Parsing csv file into a 2D array

    Posted: 28 Mar 2019 05:24 PM PDT

    I am using java. I am having trouble storing a csv file from excel into a 2D array. My end goal is to be able to call upon the array and have my data show up. I have tried youtube and stackoverflow. But I cannot find anything.

    The data i want to put into a 2D array: Data It is table 1

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

    I'm looking to get a C++ tattoo, can someone help me with the code?

    Posted: 28 Mar 2019 04:49 PM PDT

    It's in reference to a song by one of my favorite bands. It's called, C++ (Love Will Get You Killed).

    I thought a clever little tattoo would be a few lines of code that defines that it's a tattoo, the location of the tattoo and the words, Love Will Get You Killed.

    Can someone help me write this out? I know nothing about C++.

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

    How to correctly pass existing file object into scanner?

    Posted: 28 Mar 2019 04:23 PM PDT

    I'm having some trouble, basically my method gets passed a directory, and in an array of the listed files i take each file and pass it into scanner to read its contents but am getting an exception thats says file not found (is a directory).

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

    How should I structure my TODO program

    Posted: 28 Mar 2019 11:49 AM PDT

    I'm currently working on my first non-school related project and wondering how I should structure my program.

    Currently i have the following

    • Interface Task representing each individual task
    • Class Todo which has methods that write to a JSON file to save data, and read the same file to create a list of the tasks.

    While I don't think theres anything inheritely wrong with this design, I'm left wondering whether methods that work on the list of tasks should be in a seperate class or not. Also if you know any good sources on software architechture and design please link them below.

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

    What are the best ways to format a Word document in C# with Visual Basic?

    Posted: 28 Mar 2019 03:26 PM PDT

    Essentially, my team and I are tasked with creating Word documents with tables containing questions formatted a certain way, creating a new table for every new type of question there is. We only know C# and only have access to Visual Studio. What would the best ways to go about this?

    We've already looked into Spire.Doc and ZetWord, and I'm researching alternatives.

    submitted by /u/Vulpes-Vulpes-Fox
    [link] [comments]

    Order of application with multiple Content-Encoding values

    Posted: 28 Mar 2019 01:26 PM PDT

    According to MDN the Content-Encoding header can be multivalued and in that case it appears "in the order in which they were applied" so if I get Content-Encoding: deflate, gzip does it mean I need to decompress with gzip first and then deflate or the other way around?

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

    How would I iterate through these JSON objects to display the first 20? (AJAX and JQuery)

    Posted: 28 Mar 2019 12:30 PM PDT

    Hello

    I'm working on an assignment for university where i'm using AJAX and jQuery to display stock prices using the Alpha Vantage API, but I'm struggling to display more than the first days results.

    Heres a link to show the JSON i'm talking about https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo

    I've tried iterating on the date, (2019-03-28) but it just keeps telling me whatever i'm doing is undefined, anybody have any help or experience doing something like this?

    I can get it to display the first date no problem, but the other ones are where its causing me trouble

    Thanks!

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

    Looking for help writing a Batch for ADB

    Posted: 28 Mar 2019 12:30 PM PDT

    I have a Note 8 and have become fond of my black navigation bar that I acquired using ADB Shell.

    But ever since I factory reset my phone, painting it black is only temporary and must be reapplied after each boot.

    My ADB window looks something like:

    C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
    greatqlte:/ $ settings put global navigationbar_color -16777216
    greatqlte:/ $ settings put global navigationbar_current_color -16777216

    I've tried to create a Bat file to automate the process. But having trouble wrapping my head around what commands I need to use. Any help scripting this or pointing me in the right direction would be most appreciated. (Bonus if you happen to know how I can make the navbar changes permanent)

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

    General XSLT question, does XSLT force you to do recusion when implementing logic unrelated to XML structure?

    Posted: 28 Mar 2019 11:34 AM PDT

    Seems like for-each loops are strictly for looping nodes. Some XSLT processors allow for custom code like C#, but if some doesn't, does the XSLT language itself basically force you to do recursion? Or am I missing something here?

    If so, they need to update the language to make for loops possible without looping nodes.

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

    How to force Arabic characters to be separate?

    Posted: 28 Mar 2019 12:14 AM PDT

    Hello.

    I have a hard time making images of Arabic characters while they are not joined together. Are there any options to trigger while using an Arabic font to make them not join each other? Here is my code in Python.

    #font is an arabic font, and font_path is pointing to that location. font = ImageFont.truetype( font=font_path, size=size, layout_engine=ImageFont.LAYOUT_RAQM) h, w = font.getsize(text, direction='rtl') offset = font.getoffset(text) H, W = int(1.5 * h), int(1.5 * w) imgSize = H, W img = Image.new(mode='1', size=imgSize, color=0) draw = ImageDraw.Draw(img) pos = ((H-h)/2, (W-w)/2) draw.text(pos, text, fill=255, font=font, direction='rtl', align='center') 

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

    Java how to split word to arraylist?

    Posted: 28 Mar 2019 10:13 AM PDT

    Hello, my program each line of a file and store it in a arraylist. Example: (first line)Hello my name is\n(Second line)Bob leponge\n(Third line) and i like to eat potatoes. So there is 3 lines. And my arraylist will be { Hello my name is, Bob lepone, and i like to eat potatoes} Now i want to store everything in a array?/arraylist/list? idk which is better. So i have {Hello, my, name, is, Bob, leponge, and, etc....} the problem is if i split when there is a space " " it doesnt split when its the last word of the line " is" from the first line doesnt add to my arraylist... thanks

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

    Java how to read each line in file and store it into arraylist then output in html each line by columns instead?

    Posted: 28 Mar 2019 05:50 AM PDT

    Hello can anyone explain me the possibilities to read a file and print out on html in columns? ty

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

    How to implement anti-aliasing for ASCII art generator.

    Posted: 28 Mar 2019 01:39 AM PDT

    Hi.

    So I have developed an ASCII art generator, and in the next step I want to implement anti-aliasing for my art. I have searched the net but I couldn't find any articles stating how to implement such thing for an ASCII art. Thank you!

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

    Execute jobs on entire work stealing worker pool

    Posted: 28 Mar 2019 07:15 AM PDT

    I have a number of workers taking jobs off a singular work queue in a traditional work stealing strategy. Each worker also tracks their "job performance" which is a number of trivial stats like number of executed jobs and total job execution time.

    I want to ask all workers for their stats and then combined them into one global stat object - essentially computing the average job performance across all workers. However, in the work stealing approach used, the only interface is to post a "collect stats" job on the job queue - I don't have the ability to target one or all of the workers.

    Is there a good approach to solve this problem?

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

    Having trouble installing cracked Mac program "Syntorial"

    Posted: 28 Mar 2019 02:37 PM PDT

    After I unzip and install the files I am brought to a login screen. I am given a serial number and email address to login or I can run a Windows Keygen to get another serial number. But whenever I do it says that I have exceeded the allowable authorizations. I have already uninstall the program and then reinstalled it later on. I had the same problem from my personal login but when I log in under root I did something to where I was able to make it work. But now I'm having the same problem again even when I am in the root log in. Any help would be greatly appreciated

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

    No comments:

    Post a Comment