• Breaking News

    Saturday, March 9, 2019

    What is the legal status of OSS licenses outside the US? Ask Programming

    What is the legal status of OSS licenses outside the US? Ask Programming


    What is the legal status of OSS licenses outside the US?

    Posted: 09 Mar 2019 06:34 PM PST

    Basically the title, are they legally binding in other countries? Most licenses read like they are made for US laws and not for European laws. In Germany there is a lawsuit about the GPL. So how is the legal state in other countries than the US?

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

    [JavaScript] Singling Specific Object Out

    Posted: 09 Mar 2019 09:55 PM PST

    I'm trying to make an icon bounce in Google Maps.

    Google Map Bounce API: https://developers.google.com/maps/documentation/javascript/examples/marker-animations

    Followed Tutorial: https://youtu.be/Zxf1mnP5zcw?t=1149

     var markers = [ { coords:{lat:42.4668,lng:-70.9495}, iconImage:'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png', content:'<h1>Lynn MA</h1>' }, { coords:{lat:42.8584,lng:-70.9300}, content:'<h1>Amesbury MA</h1>' }, { coords:{lat:42.7762,lng:-71.0773} } ]; // Loop through markers for(var i = 0;i < markers.length;i++){ // Add marker addMarker(markers[i]); } // Add Marker Function function addMarker(props){ var marker = new google.maps.Marker({ position:props.coords, map:map, //icon:props.iconImage }); 

    Setting the line below in addMarker:

    animation:google.maps.Animation.BOUNCE 

    makes every icon bounce while when trying to reference the array down below

    marker[2].setAnimation(google.maps.Animation.BOUNCE); 

    Breaks the map (does not start). I believe that it's because it's not a list that I cannot do this.

    While I am only testing it on one icon, I will be adding more coordinates that needs to be bounced (not all, just specific ones). What are some possible solutions?

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

    Java, adding multiple user input?

    Posted: 09 Mar 2019 08:53 PM PST

    Hi there

    I was asked to create a calculator for class.

    I'm stuck on the fact that I'm suppose to ask the user to give me the amount of numbers he will input and then subtract , add , w/e with those numbers.

    I'm stuck . Can anyone offer some advice to get me moving again?

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

    Arrays of structures, but without a structure and instead a class?

    Posted: 09 Mar 2019 08:40 PM PST

    Sorry for confusing title, not sure how to word it. Basically, I'm supposed to write a small program that allows the user to input an item name, add a description and some more other stuff regarding it. Once that's all finished, I'm supposed to store that item name and everything along with that in a list, and let the cycle be repeated again.

    So the problem here is I'm not sure how to make an array of structures to contain all those inputs without using a struct itself and instead only use a class.

    Any help is appreciated. I can share my code upon request if some context is needed. Thank you!

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

    If the build (master ) is passing I see a green light, else red light.

    Posted: 09 Mar 2019 07:26 AM PST

    I went to hang out with an engineering team and I saw a traffic light system for their build which is on Circle CI.

    How did they do it? Is it something a mid level JavaScript engineer can build for my own project.

    Where should I get started. What hardware do I need to buy? How does it connect to the build api.

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

    Is there any way of changing the low battery sound for my Arctis 7 headset?

    Posted: 09 Mar 2019 06:46 PM PST

    Windows 10 Steelseries Arctis 7

    Is there a file location for the low battery sound? I want to change the beeping into something else

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

    How to automate an email with data from a CSV file?

    Posted: 09 Mar 2019 04:20 PM PST

    I have a CSV file on my computer that is in the format 'detail','number';. I would like to make it so that the sum of the number values gets sent as an email to my friend on the 15th of every month, along with the data in the CSV file in the form of a table. How would I automate this (preferably using Python)?

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

    [C++] I have a program with a large compile-time collision-less hash table, how do I store instructions in the empty buckets?

    Posted: 09 Mar 2019 01:53 PM PST

    Storing data in empty buckets is easy. I just initialise a variable by referencing a bucket location. But how do I put instructions in these buckets? Alternatively, why might this not be a good idea?

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

    C# - Is this how properties are supposed to be used?

    Posted: 09 Mar 2019 03:40 AM PST

    https://github.com/krgamestudios/Last-Ember/blob/master/Scripts/Managers/PauseManager.cs

    //paused controller
    bool paused = false;
    public bool Paused {
    get {
    return paused;
    }
    set {
    paused = value;
    TriggerLists();
    }
    }

    I know you can do this: Paused { get; set; } ( for what purpose I don't know). What i want to know is weather the above code is the best practice for Properties with extra code in them.

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

    Getting an error when trying to start webpack dev server. Any idea where this is coming from?

    Posted: 09 Mar 2019 12:49 PM PST

    I'm getting a compilation error when trunning npm start on my app. Here is the source code. It's a very simple app, just trying to get a bare-bones React app up and running without using create-react-app.

    When I run npm start I get a huge error print out, can't even see the whole thing in my terminal, but it ends with the following:

     @ ./client/App.js 20:0-23 @ ./client/index.js @ multi (webpack)-dev-server/client?http://localhost:8080 ./client/index.js i 「wdm」: Failed to compile. 

    Any ideas what could be wrong here?

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

    Hey programmers here and there, is linux a better OS to code than Windows?

    Posted: 09 Mar 2019 04:05 AM PST

    Where can I get custom QR code?

    Posted: 09 Mar 2019 11:10 AM PST

    I want to scan qr codes I distribute to other people and when scanned it will take it to my webpage and display based on the one it scanned.

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

    PS4 program to PC

    Posted: 09 Mar 2019 07:48 AM PST

    Hi, I'm new to this subreddit so I'm hoping I'm posting to the right one and will get help or at least redirected.

    I'll make this short.

    I would like a program of this (Not clean language) that could run on Windows 10. It is a program that skeletons dance to in different dance moves at similar BPM's as the same song playing on a PS4.

    Problem

    • I do not own a PS4 (which the program runs on) so that is a barrier
    • I could not find a download online for PC

    Maybe one of you kind strangers own a PS4 and would be willing to chip in and possibly figure out how to get it from PS4 to PC.

    If you actually got this to work and you gave me a download file and you had to download of the store, I would refund you of your costs and work

    The theme is called "Tropical Skeleton Dance".

    Thank you so much!

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

    How can I view my Instagram backup data in a friendly way?

    Posted: 09 Mar 2019 03:17 AM PST

    recently i have downloaded a backup of my instagram account ...
    and the zip file contained a lot of .json files and i have no idea how to view it like... the way that Instagram did !!

    https://i.redd.it/1ni0t1lhjxk21.png
    and i have found that json to csv does it .... but still not that friendly
    https://i.ibb.co/QbYBf0B/Captuxre.png
    ....
    if it was only possible to be shown just like this
    https://i.ibb.co/pd4XV4G/cccccccc.png

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

    [Any language] Dictionary (associative array) addition operator?

    Posted: 09 Mar 2019 03:12 AM PST

    The Python developers are considering giving dictionaries (associative arrays or hash tables) a merge or union operator (probably + or |).

    Are there languages which have given dicts operators such as + or similar for union or update operations? Or similar?

    I've found that YAML includes a << merge operator but I'm not finding anything else.

    Thanks in advance.

    Edit: For the avoidance of doubt, I'm referring to standard or built-in language features. I know languages like C++ and Python have operator overloading.

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

    Need help with a front-end scroll effect!

    Posted: 09 Mar 2019 01:57 AM PST

    I want to create a scroll effect like this:

    http://robinmastromarino.com/

    So that the pages "loops" around to the beginning again. Any tips or even what it's called? My attempts to google "infinite scrolling" yields nothing of use :=)

    Thanks in advance h4ck3er5.

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

    Printing number patter in c

    Posted: 09 Mar 2019 04:03 AM PST

    I want to print following patter in c. Please help me with it. Thanks.

    1 2 3 4 5 6 7 8 9 10

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

    Need help with DirectWrite rendering issue - description in comments

    Posted: 08 Mar 2019 11:41 PM PST

    Screenshot of the issue.

    Here's the relevant bits of code - error handling etc. is omitted for clarity.

    D2D1_BITMAP_PROPERTIES1 bp; bp.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM; bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE; bp.dpiX = 96.0f; bp.dpiY = 96.0f; bp.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW; bp.colorContext = nullptr; ... d2dDeviceContext->SetTarget(targetBitmap); .... writeFactory->CreateTextFormat(L"Arial", nullptr, DWRITE_FONT_WEIGHT_LIGHT, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 32.0f, L"en-US", &textFormatAccountCreds); textFormatAccountCreds->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING); textFormatAccountCreds->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_NEAR); std::wostringstream outAccountName; outAccountName << "Account Name:"; writeFactory->CreateTextLayout(outAccountName.str().c_str(), (UINT32)outAccountName.str().size(), textFormatAccountCreds, (float)800, (float)600, &textLayoutAccountName); const float color[4] = { 1.0f, 0.5f, 0.3f, 1.0f }; immediateContext->ClearRenderTargetView(renderTargetView, color); d2dDeviceContext->BeginDraw(); d2dDeviceContext->DrawTextLayout(D2D1::Point2F(2.0f, 5.0f), textLayoutAccountName, blackBrush); d2dDeviceContext->EndDraw(); swapChain->Present(0, 0); 

    As you can see in the screenshot, the text is rendering very poorly - letters are cut off, etc. I can change the size / position and the rendering issues manifest differently, but they still persist.

    What am I missing here? I've been through most of the DirectWrite docs on MSDN and it's not clear what my problem is. I do see some mention that I should specify the starting position of my text relative to the dpi scale, but the example is very vague.

    It's also worth mentioning that I'm using Direct3D and DirectWrite with Direct2D all together, in a similar fashion as seen in this tutorial. Not sure if that's causing my problem.

    I would be very grateful for any assistance. Thanks much.

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

    What did i do wrong?

    Posted: 08 Mar 2019 10:18 PM PST

    #include <iostream> using namespace std; class RatNum { public: RatNum(): RatNum(0,0) {} RatNum(int a, int b): num(a), den(b) {} void setNum(int a) {num = a;} void setDen(int a) {den = a;} int getNum() {return num;} int getDen() {return den;} friend istream& operator >>(istream &in, RatNum &r); friend ostream& operator <<(ostream &out, RatNum &r); friend RatNum operator -(RatNum r); private: int num; int den; }; ostream& operator <<(ostream &out, RatNum &r) { out << r.num << "/" << r.den << endl; RatNum operator -(RatNum r); return out; } RatNum operator -(RatNum r) { return RatNum(-r.num,r.den); } int main() { RatNum r1(1,2); cout << r1 << endl; cout << -r1 << endl; } 

    edit: I cant produce the cout << -r1 << endl; line

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

    No comments:

    Post a Comment