• Breaking News

    Tuesday, August 4, 2020

    When do you use an ORM instead of raw SQL? Ask Programming

    When do you use an ORM instead of raw SQL? Ask Programming


    When do you use an ORM instead of raw SQL?

    Posted: 04 Aug 2020 09:34 PM PDT

    I've been working as a software engineer at a few companies for a bit over 5 years now. The stacks that I've been working (for at least the stuff that communicates with a database) have been .net classic/mysql, .net classic/postgres, python/postgres (and redshift... ick) and some .net core/postgres. At all of these roles, we've elected to write the SQL ourselves and not use an ORM.

    I spent some time investigating Entity Framework when I was in the dot net roles, and ended up concluding that - given I'm a reasonable engineer in SQL - there wasn't enough benefit, given the complexity of the framework⭐ - at least for the work we were doing. I've used SQLAlchemy a little via tutorials, but again - concluded that the SQL that it was replacing wasn't really that much work.

    On one hand, I can see the potential benefits - particularly in Dapper or SQLAlchemy - of reducing complexity of deployment and code, particularly in early prototyping. In bigger applications - at least in my experience - the model overhead is only a small part of the code-base. Further, I'd think that as an application gets more heavily used, you'd want to be writing the SQL yourself, as that way you can more precisely analyse the queries that you're writing.

    So - I love the idea of ORMs, but I really struggle to see when I should and shouldn't professionally use them. What factors do you take into account when choosing whether or not to use an ORM? Is my tendency to use raw SQL short-sighted?

    ⭐ Seriously... over 800 pages in books about the library? That's one heavy-weight piece of machinery, for something that theoretically should make my life easier. And K&R's book on C that was the de facto definition of the language was less than 300 pages!

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

    Programmers that work remotely for foreign companies, how did the pandemic affected your work?

    Posted: 04 Aug 2020 05:56 AM PDT

    Looking for resources for a project

    Posted: 04 Aug 2020 08:18 PM PDT

    I am a learning developer. I have been constantly learning web dev for about a little over a year fulltime and am looking to create a website for my spouse. It is to include a homepage/ blog/ store with the ability to create an account for yourself as a user (since there is a store feature. Mainly focused on those 3 things. The home page.... not to concerned with but making a blog feature and a store.... Im not too sure where to find resources to help with it.

    I have been googling everything but I am only directed towards wix/wordpress style sites. I'd like to build as much from scratch as possible so I can use it as a portfolio piece. Where could I find resources to build a secure store site as well as a blog that she can update without having to go into a code editor like I would?

    thanks everyone!

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

    coding

    Posted: 04 Aug 2020 10:35 PM PDT

    Year is 3030, water is a scare resource. Civilizations live around glaciers in clusters, with a federal body (identified as F) in center melting glaciers and controlling the water distribution. Each cluster has need for water for a day and a water storage capacity. Cluster are connected to each other with a pipe identified by _. Linked clusters are connected with overflow pipes. Every time water starts flowing through pipe, the clusters drain their tanks in an instant, as they can use the water flowing to fill the tanks, and federal body sends water till the capacity is full. Federal body releases water at start of day, cluster uses water at end of day. In a pipe link like F-C1-C2-C3-C4, when federal water body targets C3, only C3 and nodes before it (here C1,C2,C3) can fill the tank, C4 can fill it only when it's targeted. Pipes are flow controlled and water flows in forward direction only.

    Calculate the minimum water needed to help the civilizations survive for n days.

    Input is multiline first line is the number of days to survive. Second line the number of clusters followed by their definitions. Next is the number of links in the system, followed by the link definition.

    Read the test cases to understand the scenarios better.

    Cluster defintion C1 100 300 here

    C1 - cluster name 100 - daily water need 300 - storage capacity Link definition F_C1 here

    F - is the federal source of pipe C - is the sink/destination of pipe (cluster tank) Input 2 3 C1 100 300 C2 150 300 C3 100 100 3 F_C1 F_C2 C2_C3 Output 1100

    submitted by /u/Critical-Food-3090
    [link] [comments]

    How to go about creating a 3d party integration platform within an CRM like application?

    Posted: 04 Aug 2020 09:27 PM PDT

    As the title suggests: I would appreciate any resources or anything that can point me at a resource to figure out how to create a 3d party application/integrations marketplace.

    Background: The software we're working on has a rough CRM, but the reality is it's not the best CRM as that isn't the software's core competency. However, all of our clients have existing CRMs and the issue thus far has been that in order for the client to use our software to it's fullest (get the most out of the reporting and such) it required the customer to push their sales data into the system via importers and the like. The CRM was for a minority of clients that didn't want the hassle. We realize now that was a bad move... CRMs are certainly not a one size fits all kind of thing and the amount of work that we'd have to continue to put into it to make it a viable extension of our application isn't worth it.

    So we're pivoting. We're going to create an inbound webhook system that allows our software to consume data coming from existing CRMs that support outbound webhooks.

    But I feel that's a short term solution. I would like to go full on into creating the ability for our clients to simply choose their CRM from a list of integrations and cross validate and that's it. Ideally we wouldn't have to do each CRM integration, and would allow third parties to create the integration middle-men apps. The integrations marketplace model.

    The question, as stated above: how does a software team go about structuring this? Are there any pre-existing guides? Blogs? Books? Obviously it's not a new idea, plenty of software applications have this capacity... I just don't know where to start.

    Any advice is much appreciated.

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

    How to compare integer to Char equivalent

    Posted: 04 Aug 2020 07:04 PM PDT

    I'm doing a compare of an integer with a specific character in a serial number but I'm missing something

    https://i.imgur.com/qVGV8rV.png

    In this case, the integer (byte) is a 7, and the specific number of the serial is a ASCII 7 (byte). Why isn't this code working? Will I have to convert ahead of time and not use the Chr() and compare to a 55 integer instead?

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

    Auto refresh a webpage if elements don't load?

    Posted: 04 Aug 2020 06:25 PM PDT

    I'm just wondering if this is possible.. Could js be written to auto refresh a webpage if say.. less than 75% of the scripts/css files aren't loaded within 3 seconds? If so, how would that look?

    My use case is I have a page that for some reason gets hung up every once in awhile and won't load all the way. But if you give it a refresh, it loads instantly. I wonder if a js script like this would be a temporary fix?

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

    Writing to TWI registers

    Posted: 04 Aug 2020 05:19 PM PDT

    Hi everyone,

    I'm currently working on a project that involves programming an accelerometer using a TWI, which I am new to using.

    I am trying to write to the control register to wake the device and I have defined the register and have the address as follows:

    #define CTRL_REG1 = 0x2A

    How do I write to this register and wake the device?

    I have been looking at guides online, but I still don't understand how to write the code.

    Thanks.

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

    Need some Advice.

    Posted: 04 Aug 2020 03:54 PM PDT

    Hey guys! I am a 27yo programmer, been programming on and off for a while and now im on uni, studying software development. Recently I have made an app with my group, and Im also working on some Game for my C# unity course, and my Android app for android course.

    I was wondering, some pro tips to be a better programmer, since Im already 27 and kind of afraid of being too old. Also I would like to earn money doing stupid things that will give me experience with coding. any tips to be better programmer and to find a job or project to work on to get something for my portfolio.

    thanks in advance.

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

    I want an app that beeps whenever i lose 1% of my battery

    Posted: 04 Aug 2020 11:15 AM PDT

    i own a macbook pro (mac os catalina 10.15.3), is this possible?

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

    i need some help with android studios

    Posted: 04 Aug 2020 02:28 PM PDT

    Me and my friends are developing an app, we are new to programmig so this could be supiddly simple. we want to make the screen where u can add players and their names, but in an efficiant way.

    i think it must be simple but i cant find tutoriasl about that anywhere.

    sry for my inglish by the way

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

    Java + Angular or web-shop targeted frameworks?

    Posted: 04 Aug 2020 08:28 AM PDT

    Hi everyone. My question is basically the title. I have moderate knowledge of Java, Java Spring and Angular, however I worked mostly small app-parts for big company and created several simple sites with basic CRUD operations. My good friend wanted a website, where he want to sell perfume. I can make that website (excl. design), but I see and hear of many frameworks, that are designed specifically for web-shops, though I have not deep knowledge of them. I know that there are not wide-spread many sites that are built in Java Spring and Angular, because those technologies (at least Java) are mostly used in big companies and not in small businesses. My question is as follows:

    Should I create a website with the technologies I am familiar with or would it be an overkill? Or should I try to use some of generic frameworks, that are designed for webshops (Joomla, Shopify etc.)? What are downsides and upsides of using named technologies?

    I apologize if the question seems too basic, it is because I am just out of college and not very experienced yet. Thank you in advance.

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

    How to hover over one element to make another image change using CSS/Javascript?

    Posted: 04 Aug 2020 02:03 PM PDT

    Hello! I have googled this question extensively, have tried many things, and have come up more confused than when I went into it. Maybe I've just been trying for too long, because this seems like it should be easy. Story of my life. Ahem. Anyway, here is what I'm working with:

    aishawithaneye.com

    Ooooooooo, yeah, I know. SPARKLE SPARKLE. It's so close to completion I can almost TASTE it. It's that or my morning's coffee microwaved... Either way, it's not finished until I can get Spider-sha's facial expressions to change when you hover over the bubble buttons. I've tried doing this via javascript hover to no avail... I might just be doing it wrong. My fallback would be to do this the way I did a website back when I was in high school (circa 2004):

    catching-dreams.net (click the first image and hover over the dream catcher's beads to see what I mean)

    I can't believe the code has held up so well all this time... but certainly there must be a better, cleaner way now to do this kind of a hover effect to change out images that aren't the element you're hovering on?

    You can see in my code for aishawithaneye.com that it is the src="expressions/transparent.png" that I'd like to switch out for, oh, say, "expressions/scarystory-lowres.png" when I hover over the owls in the top bubble.

    Any help or redirection to where I can get help is greatly appreciated!

    PS. Also, does anyone know why my site up straight up doesn't work in Firefox? It works just fine on Chrome (Mac and PC) and Safari. (")o_O(")

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

    Table Design for Task Scheduler app with Recurrence

    Posted: 04 Aug 2020 01:34 PM PDT

    Hi All,

    Just trying to think through this before I get to building it. I need to create a task scheduler that can accomplish your basic outlook-type tasks - don't need start/end times, just due date and when to start.

    Examples like:

    Monthly - Last Day of Month; First Day of Month, 2nd Tuesday, Specific Day, etc
    Weekly - Day of Week
    Daily
    Yearly - due Last day of June, Last day of December, 15th of the month (but go back or forward if needed to land on a business day)

    This is such a common thing - we do it on any scheduling app - but I haven't had any luck with my GoogleFu trying to find some examples. Can anyone suggest a good table layout that'll accomplish this?

    When you have exceptions, do you essentially make a copy of the item and join it into the query results in place of an instance of the recurring one? I'm just trying to think through how to query this.

    This does need to be standalone in the app - can't just use SQL scheduler as I see posted all the time, although I do have it available in case I need to do regular maintenance.

    The purpose is a compliance calendar - it'll have ~75 compliance checklist items that are scheduled throughout the year - some daily, weekly, quarterly and yearly - and spread pretty well throughout to balance out the load.

    Any help is greatly appreciated. Thx!

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

    Character will not move

    Posted: 04 Aug 2020 01:10 PM PDT

    I am working on this coding but my character movement is not working. I have tried fixing it for hours now and I think I am just missing something. Does anyone have any idea on how to help?

    Main:

    package org.game; import org.graphics.Renderer; import org.object.Platform; import org.object.Player; import org.world.World; public class Game { public static void main(String[] args) { Renderer.init(); World.currentWorld = new World(); World.currentWorld.sprites.add(new Player(100, 100)); World.currentWorld.sprites.add(new Platform(200, 200)); } public static void quit() { System.exit(0); } } 

    Input:

    package org.input; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; public class Input implements KeyListener { private static boolean[] currentKeys = new boolean[196]; public static boolean getKey (int keyCode) { return currentKeys[keyCode]; } public void keyPressed(KeyEvent e) { currentKeys[e.getKeyCode()] = true; } public void keyReleased(KeyEvent e) { currentKeys[e.getKeyCode()] = false; } public void keyTyped(KeyEvent e) { } } 

    Player:

    package org.object; import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.event.KeyEvent; import org.input.Input; import org.world.World; public class Player extends Mob { private float velocityY = 0; private float gravity = 300.0f; private float jumpHeight = 50; public Player(float posX, float posY) { super(posX, posY); width = 16; height = 16; runSpeed = 100; } public void update (float deltaTime) { float moveX = 0; if (Input.getKey(KeyEvent.VK_LEFT)) { moveX -= runSpeed; } if (Input.getKey(KeyEvent.VK_RIGHT)) { moveX += runSpeed; } velocityY += gravity * deltaTime; if (Input.getKey(KeyEvent.VK_SPACE)) { velocityY = (float) -Math.sqrt(2 * jumpHeight * gravity); } //Collisions for (Sprite sprite : World.currentWorld.sprites) { if (sprite == this) { continue; } Rectangle myRect = new Rectangle((int) (posX + moveX * deltaTime - width / 2), (int) (posY - height /2), (int) width, (int) height); Rectangle otherRect = new Rectangle((int) (sprite.posX - sprite.width / 2), (int) (sprite.posY - sprite.height /2), (int) sprite.width, (int) sprite.height); if (myRect.intersects(otherRect)) { moveX -= moveX; } myRect = new Rectangle((int) (posX - width / 2), (int) (posY + velocityY * deltaTime - height /2), (int) width, (int) height); if (myRect.intersects(otherRect)) { velocityY -= velocityY; } } //End Collisions posX += moveX * deltaTime; posY += velocityY * deltaTime; } public void render (Graphics g) { g.setColor(Color.blue); g.drawRect((int) (posX - width / 2),(int) (posY - height /2), (int) width, (int) height); } } 

    Mob:

    package org.object; public class Mob extends Sprite { protected float runSpeed = 50.0f; public Mob(float posX, float posY) { super(posX, posY); } } 

    Platform Package:

    package org.object; import java.awt.Color; import java.awt.Graphics; public class Platform extends Sprite { public Platform(float posX, float posY) { super(posX, posY); width = 300; height = 20; } public void render (Graphics g) { g.setColor(Color.green); g.drawRect((int)(posX - width / 2),(int) (posY - height / 2),(int) width,(int) height); } } 

    World:

    package org.world; import java.awt.Graphics; import java.util.ArrayList; import org.object.Sprite; public class World { public static World currentWorld = null; private static long lastTime = System.nanoTime(); public ArrayList<Sprite> sprites = new ArrayList<Sprite>(); public static void update () { float deltaTime = (System.nanoTime() - lastTime) / 1000000000.0f; lastTime = System.nanoTime(); for (Sprite sprite : currentWorld.sprites) { sprite.update(deltaTime); } // } public static void render (Graphics g) { for (Sprite sprite : currentWorld.sprites) { sprite.render(g); } // } } 

    Renderer:

    package org.graphics; import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.Frame; import java.awt.Graphics; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Toolkit; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import java.awt.image.VolatileImage; import java.io.IOException; import javax.imageio.ImageIO; import org.game.Game; import org.input.Input; import org.world.World; public class Renderer { private static Frame frame; private static Canvas canvas; private static int canvasWidth=0; private static int canvasHeight= 0; private static final int GAME_WIDTH=400; private static final int GAME_HEIGHT=250; private static int gameWidth=0; private static int gameHeight=0; private static long lastFpsCheck = 0; private static long currentFPS = 0; private static int totalFrames = 0; private static void getBestSize(){ Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension screenSize = toolkit.getScreenSize(); boolean done = false; while (!done) { canvasWidth += GAME_WIDTH; canvasHeight += GAME_HEIGHT; if (canvasWidth > screenSize.width || canvasHeight > screenSize.height) { canvasWidth -= GAME_WIDTH; canvasHeight -= GAME_HEIGHT; done = true; } } int xDiff = screenSize.width = canvasWidth; int yDiff = screenSize.height = canvasHeight; int factor = canvasWidth / GAME_WIDTH; gameWidth = canvasWidth / factor + xDiff / factor; gameHeight = canvasHeight / factor + yDiff / factor; canvasWidth = gameWidth * factor; canvasHeight = gameHeight * factor; System.out.println(gameWidth + "x" + gameHeight); } private static void makeFullscreen () { GraphicsEnvironment emv = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = emv.getDefaultScreenDevice(); if (gd.isFullScreenSupported()) { frame.setUndecorated(true); gd.setFullScreenWindow(frame); } } public static void init() { getBestSize(); frame = new Frame(); canvas = new Canvas(); canvas.setPreferredSize(new Dimension(canvasWidth, canvasHeight)); frame.add(canvas); makeFullscreen(); frame.pack(); frame.setResizable(false); frame.setLocationRelativeTo(null); frame.addWindowListener(new WindowAdapter() { public void windowClosing (WindowEvent e) { Game.quit(); } }); frame.setVisible(true); canvas.addKeyListener(new Input()); startRendering(); } private static void startRendering() { Thread thread = new Thread () { public void run () { GraphicsConfiguration gc = canvas.getGraphicsConfiguration(); VolatileImage vImage = gc.createCompatibleVolatileImage(gameWidth, gameHeight); while (true) { totalFrames ++; if (System.nanoTime() > lastFpsCheck + 100000000) { lastFpsCheck = System.nanoTime(); currentFPS = totalFrames; totalFrames = 0; } if (vImage.validate(gc)== VolatileImage.IMAGE_INCOMPATIBLE) { vImage = gc.createCompatibleVolatileImage(gameWidth, gameHeight); } Graphics g = vImage.getGraphics(); //clear screen g.setColor(Color.black); g.fillRect(0,0, gameWidth, gameHeight); //RENDER World.update(); World.render(g); //FPS counter g.setColor(Color.LIGHT_GRAY); g.drawString(String.valueOf(currentFPS),2, gameHeight - 4); g.dispose(); g = canvas.getGraphics(); g.drawImage(vImage, 0,0, canvasWidth,canvasHeight, null); g.dispose(); } } }; thread.setName("Rendering Thread"); thread.start(); } public static BufferedImage loadImage (String path) throws IOException { BufferedImage rawImage = ImageIO.read(Renderer.class.getResource(path)); BufferedImage finalImage = canvas.getGraphicsConfiguration() .createCompatibleImage(rawImage.getWidth(),rawImage.getHeight(),rawImage.getTransparency()); finalImage.getGraphics().drawImage(rawImage, 0, 0, rawImage.getWidth(),rawImage.getHeight(),null); return finalImage; } } 

    Sprite:

    package org.object; import java.awt.Graphics; import java.awt.image.BufferedImage; public class Sprite{ public float posX = 0; public float posY = 0; public BufferedImage image = null; public float width = 0; public float height = 0; public boolean isSolid = false; public Sprite (float posX, float posY) { this.posX = posX; this.posY = posY; } public void update (float deltaTime) { } public void render (Graphics g) { if (image == null ) { return; } int realX = (int) posX - image.getWidth()/ 2; int realY = (int) posY - image.getHeight() / 2; g.drawImage(image, realX, realY, image.getWidth(), image.getHeight(), null); } } 
    submitted by /u/alex_6555
    [link] [comments]

    How from two deviceorientation events can I find relative roll and pitch for controlling a 2D game

    Posted: 04 Aug 2020 12:19 PM PDT

    I'm trying to make a mobile maze game in Javascript that uses the device orientation as controls. To do this I am trying to sample an initial and current orientation and find the relative roll and pitch and then map this to an up/down/left/right direction.

    I've found an example on Github that is really close to what I'm after: https://github.com/njoubert/DeviceOrientationQuaternions

    In the example the two raw samples are taken in thier Euler rotation format. These are then converted to quaternion rotations and then the relative quaternion is calculated and converted back to a Euler rotation. In the example they check that if any of the absolute values exceed 20 degrees on any axis. This works and tells you if from any given starting location if a rotation has occurred, but not in which direction. From my testing it seems which part of the final Euler and in which direction requires mapping to the up/down/left/right depends in some way on the initial orientation. However, my math isn't strong enough to get it over the line. Hopefully someone can help!

    I've asked the same question on StackOverflow if you would like some further information.

    https://stackoverflow.com/questions/63220087/how-from-two-deviceorientation-events-can-i-find-relative-roll-and-pitch-for-con

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

    Construction plan updating

    Posted: 04 Aug 2020 12:00 PM PDT

    Hi guys

    Looking for some brainstorming.

    Trying to think of a way to make it easier for site foreman's to update plans to show which part of the plan was finished that day, which in turn would make it easier for project managers to follow the job and what's going on.

    Basically I'm thinking of having the plans open up, them being able to select a part of the plan, or maybe even just draw an outline around it or a highlighter function, and once the objects are selected, be able to enter a comment, then that info is saved for that day.

    The drawings in question are just 2D PDF drawings.

    The end goal would be to have it so they can update it on their on-site iPads, but for now a simpler setup would work for me as I will be the only one testing it.

    Any ideas of languages or software to use to do it? I have some programming experience but it all depends which language.

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

    Want to share Grokking the System Design Interview, AlgoExpert & SystemsExpert

    Posted: 04 Aug 2020 09:34 AM PDT

    I have Grokking the System Design Interview and AlgoExpert (with SystemsExpert) subscription. These are very popular premium resources for system design interview. Wanna share these premium subscriptions at a very cheap cost (10 USD). DM me if you are interested.

    https://www.educative.io/courses/grokking-the-system-design-interview

    https://www.algoexpert.io

    Proof: (Grokking the System Design Interview)

    https://ibb.co/5jWKdZM

    https://ibb.co/xGL9YPb

    Proof: (SystemsExpert)

    https://ibb.co/t8SQPJf

    https://ibb.co/6n0GYPJ

    https://ibb.co/184svWQ

    https://ibb.co/Tq9JSkn

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

    Help a C# noob?

    Posted: 04 Aug 2020 09:27 AM PDT

    Im learning c# (alredy have some experience with other languages) and trying to build a simple function that read variables and sum them.

    Basically my problem lives in converting to float.
    Im reading the variable input with Console.ReadLine, but i want it to be a float number, so im using

    float.Parse(Console.ReadLine())>

    BUT if i have, for example, 2 inputs, such as 1.5 and 10, when I add them together i get 25, not 11.5

    For some reason it converts string 1.5 to float 15 and I cant figuere out why, any help?

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

    I'm looking for an open-source headless CMS to plug onto a MySQL DB that doesn't alter tables (insert, update, delete only)

    Posted: 04 Aug 2020 09:07 AM PDT

    I'm looking for a Web CMS that will help support people to edit some content on DB using basic forms, instead of dealing with SQL tools.

    Already tried Directus (https://directus.io/) but It doesn't fit our needs because It tries to alter tables even if we don't explicitly ask so (and that's scary).

    Thanks in advance for your insights

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

    Looking to create a navigation app but don’t know where to start

    Posted: 04 Aug 2020 08:43 AM PDT

    Hi all,I'm looking to create a navigation app that takes in several locations and creates the fastest route to reach all those locations, similar to something that UPS or FedEx would use. I imagine I would use something like the Google Maps api to do this. Are there any good resources out there to show me how to do something like this? I am pretty new to programming and this would be my first out-of-class project.

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

    using namespace a bad practice for c++?

    Posted: 04 Aug 2020 08:06 AM PDT

    Our school teaches us to use using namespace cause of cout<< and cin>>, but some say it's not a good practice and just use the prefix std::

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

    Easiest way to wrap a Vue application into an app for iOS/Android?

    Posted: 04 Aug 2020 07:31 AM PDT

    I don't want to use Vue Native or any other such tools because I really just want a straight forward Vue project, and there are some Vue UI libraries I really want to use.

    But I'm having a hard time using Cordova, it's issue after issue with it.

    What is another way I can wrap my Vue application into an app?

    submitted by /u/lolis-are-so-cute
    [link] [comments]

    Can someone guid me a bit through a part of my project

    Posted: 04 Aug 2020 06:45 AM PDT

    I want to build a shopping app using android studio (java), but I am confused how can I calculate the overall total price. I have the price per one quantity specific to every product and a quantity value. However, the quantity value is global and I don't know how can I make a quantity variable for each product. In other words, if the user changed the quantity for (let's say bread) to 2, then my global variable will be changed to 2 and if I then chose 3 apples, the same quantity variable will be changed to 3 and so on. I want to specify a quantity variable for every product so I can then multiply each product price with its specific quantity to calculate the total price. For more context, I am displaying the products using a viewpager

    I would appreciate any help!

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

    No comments:

    Post a Comment