rproffitt 2,701 https://5calls.org Moderator

Still unclear. You state "i have a hidden text box that get filled with the id of the selected element. say txtsup_id." So you have that and you have the name of the source object so the question to me is not any clearer.

rproffitt 2,701 https://5calls.org Moderator

@Agilemind. Let's focus on electric power generation. You're right that for the grid here, it's mostly fossil fuel. Here's the stats:
http://www.energy.ca.gov/almanac/electricity_data/total_system_power.html for California.
https://www.eia.gov/tools/faqs/faq.php?id=427&t=3 for all of USA.

For those lucky enough to have solar panels, this changes the results for that person.
Takeaway? If you stick with the grid, how clean your EVcar is tied to the grid cleanliness.
However an ICEcar can't be cleaned up by improvements in grid power generation or adding a solar roof.

@ JamesCherrill, the electicity rate really throws the calculations around. In Nebraska, US and in Vancouver, BC, Canada the KWh rate is under 10 cents (both USD and CAD) so there you instantly have the results you are seeing. Also, petrol cost is higher in Canada and most parts of the world so to compare you get to do the math for each city you are in.

Just for fun, let's look at Berlin, Germany.
Spot price for petrol is 1.27 a litre. Or 5.64 USD a gallon. That really moves the energy cost advantage to our EVcars. Even with 30 cents per KWH there. Again, these numbers do bounce around as you travel so you get to do the math over and over and each time you end up from 1/2 to same energy cost from EVcar to ICEcar.

Back to world electricity generation. https://www.c2es.org/technology/overview/electricity has the breakdown and for now fossil fuel is two thirds of the mix. So if you …

rproffitt 2,701 https://5calls.org Moderator

To AssertNull, I'll try to answer since I've been driving my 2014 Leaf since November, 2016.

  1. I use the 110V charger the car came with since I'm cheap and it works for me. To get a discount on the SDG&E rate you have to install a second meter and charge off peak hours. The cost to install that meter when I asked was over 1K. So that would blow my savings from ICE to EV. Even with my increase in electrical consumption it works out to 20 to 22 cents (USD) per KWH.
  2. Here's my current math. The car is averaging 4.0 to 4.1 miles per KWH so we can use that to calcucate our per mile or KM cost. Our Prius gets 54 MPG so current per gallon cost is about 3USD. 3USD divided by .22 gets us how many KWH we can buy or 13.64KWG or 54.54 MPGe. So the cost is nearly identical to the Prius today. When November 1, 2017 arrives, the EV will win this round. (2a) Maintenance is every 15,000 miles which is just a battery, brake fluid check and maybe a cabin air filter so maintenance is less. Also no smog test for the EV. Here that runs 50ish every 2 or so years.
  3. The battery pack is pretty large, there is someone that has a booster pack that doubles the range but the economics have me say you should shop the new 200+ mile per charge models.
  4. This is …
AssertNull commented: Good feedback from an actual owner +0
rproffitt 2,701 https://5calls.org Moderator

I worry your question was not worded well. Your topic question is "Get id of autocomplete textbox in c# windows form" so in the code provided the id or name of the control appears to be txtsupplier. If that's incorrect, just click once on the object you have on screen in the designer view and get its name/id there.

rproffitt 2,701 https://5calls.org Moderator

Can't see why I would use such a thing. To get up to speed read http://preshing.com/20110811/xkcd-password-generator/

Of course Correct Horse Battery Staple is no longer safe.

Given you can do this on your own, why would you or I bother with such a site?
That is, unless you are just spamming this, ringtone sites and not here to discuss it.

rproffitt 2,701 https://5calls.org Moderator

To all that replied, thanks for the insights. As this is my getaround town car I get to hear and chat with others that are ICE people, EV shoppers, owners and more.

Very few brought up the change in government revenue angle. So I'll write that here, California, USA has tacked a flat 100USD fee in 2020.
http://insideevs.com/california-adds-52-billion-gas-tax-100-annual-fee-for-ev-owners/ for details.
ICE owners will start to yelp soon as the first increase takes effect November 1, 2017. It's billions at stake there.
Using round numbers here, California drivers use 1.5 Billion gallons of gas yearly at a current 38 cents a gallon. Source
The 12 cent increase should land this at about 50 cents a gallon but won't be the highest in the USA.

It took about 50 years to transition from horse powered transportation to what we have today. We get to see the next transition unfold over the years.

-> I was asked about Hydrogen powered cars but here, there is one filling station in town some 15 miles from home. And there is no alternative to filling up. With EVcars you can charge at home or elsewhere. All the EVcar owners charge at home with one or two being absolute cheapskates that have charging at work available (for free!) They drive to work, plug in and drive home and use that as they only means to charge. The businesses get a credit for this setup.

What I was surprised to not read …

rproffitt 2,701 https://5calls.org Moderator

While your code formatting leaves much to be desired, to check/uncheck has a lot of priors at https://www.google.com/search?q=uncheck+radio+button+in+c%23

All those blank lines are distracting and have me scroll up and down so I'll ask you try harder on the formatting.

rproffitt 2,701 https://5calls.org Moderator

Just a few issues here with your post. Formatting is non-existant (read https://www.daniweb.com/welcome/rules ) and is there a language called "programming"? You need to tag with the language or tell us in your post so folk will know instead of guess.

Also, I can't guess why hours is multiplied by 180. I've used 60 minutes per hour, but 180 needs some explaining.
Finally https://www.google.com/search?q=c%23+time+calculation if I guessed the language right has a lot of prior material.

rproffitt 2,701 https://5calls.org Moderator

@R, that usually points to assembly errors. Most common find is an extra mounting post in the case randomly touching the back side of the motherboard. Drives the owner nuts as it works then not and takes it in and it works.

I've lost count how many times we see that issue.

rproffitt 2,701 https://5calls.org Moderator

In light of the self driving car discussion I thought I'd start revving folk up about the electric cars we have today.

For me it was almost by accident I moved into my current EV which is a 2014 Nissan Leaf SV. I have a nice enough van but I wanted something for short trips about town. So I had a thought to "Google it." I googled "Worst resale value cars." At number 2 was the Leaf. I know this car but not very well and decided to take a deeper look. The reasons for its poor resale value are many but the short list is the new models showing up with 200+ mile range and the rebates here. Example. If your state/country hands the buyers back 7,500USD then the resale price is instantly that much less. There are other reasons such as new models get free charging for 2 years and some fear the battery life issue.

Just these two factors alone were slamming down the prices. So off I went shopping (this was November 2016.) I found a spotless 2014 Leaf SV for 11K USD, 30K miles and drove home. Prices have eroded since then. I didn't bother installing a quick charge system since I'm fine with overnight charging. That's more savings.

Range is at most 80 miles due to some battery wear and that's well inside where I need to go 98% of the time so since November 2016 I have spent 55USD in gas. That's for …

rproffitt 2,701 https://5calls.org Moderator

I can share what we do in the shop with such a PC. Ready? We downsize it. Any component that isn't required to get a BIOS screen is removed. If that doesn't bring it back we remove the case because a lot of homebuilt PCs have extra mounting posts and create issues.

So if you downsize it to just motherboard, CPU+HSF, one stick of RAM and PSU without a case and it still doesn't stay up, it's one of those 4 parts.

Ritesh_4 commented: worked with bare minimums +7
rproffitt 2,701 https://5calls.org Moderator

@cainam29. Since the top post issues appear to be solved, you should start a new thread for your new issue or problem. I don't see a mention of send email in your top post.

rproffitt 2,701 https://5calls.org Moderator

Just an observation. You have 240 lines here and if you could be nice you would highlight or point out which lines you are having trouble with rather than have everyone find where the relevant lines are.

To troubleshoot this you could print values where you suspect an issue. I don't see any lines that are there to debug the code.

Let me pick on say Line 68. No comment? Just let those that are to debug your code try to figure out why 1 here? Think about the future and code it with meaningful variables and comments. As it stands I have to remember why trip is 1 or 0.

rproffitt 2,701 https://5calls.org Moderator

After your last post about this I decided to check out the Instagram API. But disaster there as I read this:

You cannot use the API Platform to crawl or store users' media without their express consent.

So that could be why it's borked. Instagram likely breaks what folk have created which means you have to fall back to web scraping methods.
https://www.quora.com/How-can-I-crawl-Instagram-without-using-API kicks around the 3 methods but one of them is dead before you started.

rproffitt 2,701 https://5calls.org Moderator

There's simple and then there are "I must protect this to the maximum including man in the middle and more" discussions.

Are you sharing via a network share or just a web portal?
Are you concerned about man in the middle attacks to only allow HTTPS?
Is your programmer aware about your security concerns and codes accordingly to not allow a database dump to any user?
Did you at least install a hardware firewall and poke only the holes needed for the system to do what you want?

Added with edit: PS. What I wrote is just the tip of the iceburg in answer to your posting. That is, you have to figure out how many circles of hell you will descend to as there are concerns all across the board from data theft to fraud and abuse. You have to think about how far you want to go here.

-> If this web interface deals with money, that immediately takes us to the fourth circle.

rproffitt 2,701 https://5calls.org Moderator

Toss away.... Anyhow, one of the reasons for Linux is open source. There are new to Linux folk that think that all bugs shall be fixed by the company or group. This is not how it works. You either report the bug and hope someone nails it or dig in yourself to fix it and if you fix it contribute to the effort.

I've never had the time to dig in and fix more than say a configuration file to get something to work or contribute hardware to a developer but my point here is that Linux is different from Windows when it comes to bugs like this.

rproffitt 2,701 https://5calls.org Moderator

Here's my exit. Not that I'm abandoning you but want to share how I fixed a machine with WiFi support issues when I couldn't change to another distro. FIX! I plugged in another WiFi USB stick and that worked. I disabled the onboard and moved to the next problem.

Now I understand some may gripe about such a fix but here these sticks are from 8 to 20ish bucks and plentiful. Here is the USA and Amazon is quick to deliver so I have that going for me.

rproffitt 2,701 https://5calls.org Moderator

I read your code and line 7 looks suspect. Very few apps would have a window title of "ProgramName". So my bet is that's why it doesn't work.

rproffitt 2,701 https://5calls.org Moderator

While having a broken machine is a pain, kiosks can be custom things and you have to get with its maker to see what spares and manuals they have.

But you tested some of the parts. What parts didn't you test? It's likely one of those parts.

rproffitt 2,701 https://5calls.org Moderator

Here's something I learned long ago. Back when I first started doing a bit of 3D programming I tried without a GPU but just onboard graphics. It showed the usual onboard graphics were pretty pathetic.

OpenGL from what I see will leverage the GPU if it's supported.

While I didn't want to point out the topic you lead with, English again mislead me as to what you were asking. Your topic ends with modern gl ui. So I read it in English as adjective, adjective and the last word being the thing we were going to discuss (the ui.)
Again I apologize I took that as an English reading rather than French where you lead with what you want to talk about. "Cow brown" vs. brown cow.

So again I apologize for thinking all about the UI and hope you can get others to pile in here.

As to FFP I re-read where it's deprecated but still in the latest OpenGL as they don't want to break everything at once.

Maybe you'll get more responders over at that gamedev forum.

rproffitt 2,701 https://5calls.org Moderator

PS. I went to http://nehe.gamedev.net/tutorial/creating_an_opengl_window_(win32)/13001/ and the code examples there end with server not found.

Given this looks to be at most 2 decades ago it may be time to find newer examples or ask in their forums.
I poked at their forums and folk are reporting these MIA. https://www.gamedev.net/forums/forum/33-nehe-productions/

rproffitt 2,701 https://5calls.org Moderator

English can be a bear. I read it as a question about about modern UI using GL. My mistake. Since the UI can be modern, and no one has chatted about modern GL, I read it differently and apologize for that.

To me there is OpenGL 2.x and 3.x. So if you want to start again, try keeping your code strictly to the latest OpenGL. Would that be modern GL?

rproffitt 2,701 https://5calls.org Moderator

The reason modern UI is in the discussion is it's in your topic title. Since GL is almost always OpenGL I have to think you are not going to re-write GL so out of your topic title I read the question is about a modern UI that you wrote calling GL.

That said, your question "I want to know what to do to move that away from the FFP onto modern gl??" is something I can't comment on except you begin the research and work.

That is, while I have worked on UI's over the years on very small systems (SoC's today are more common) we rarely re-write the libraries.
As such I don't think I can help you here but will share what we do today.

rproffitt 2,701 https://5calls.org Moderator

A few problems with your new post. The title doesn't work as you already tagged the post as being about python. Next there is no question here. It looks like a copy and paste of your homework or assignment without showing what you wrote so far.

Before you reply read this -> https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

Share your code so far and ask about where it fails. Members usually answer questions but here, no question.

rproffitt 2,701 https://5calls.org Moderator

That modern looking is up to you to define. To me BEOS was great stuff and is open source.
If I wanted to run something light on old gear it would be a LOAF distro or another OS that could use OpenBox.

While you may be kicking around writing all this from scratch, that's a lot of years till you get something complete.

rproffitt 2,701 https://5calls.org Moderator

I see where there are a few paths to make a GUI but before we get to the nuts and bolts which I can't due to the sheer magnitude of code in even a stripped won lightwieght manager like OpenBox, we always have to pick our goals on a project.

My take on your question was the target is some small resource limited single board or chip system. SOC systems (system on a chip) are now plentiful and I use the Raspberry as a starting point about how the world has changed so much from just a decade ago.

So here we are. You have some ideas to kick around and there is no one true path when it comes to what you are doing. Here the TTM (time to market) is always short so we have to push a little more into the hardware so the software can be delivered in time.

I wonder if you were around in the 90's with say Borland's VGA graphics were used to make primitive GUIs? https://www.thefreecountry.com/sourcecode/gui.shtml is just a start on that history.

rproffitt 2,701 https://5calls.org Moderator

Topic asks how to free up space and then you ask what is wrong with your PC.

Anyhow, you free up space by uninstalling apps and finding where the space is being used.

All skill levels arrive here so when I go hunting for quick space reclamation I like CCLEANER. If I want to snoop around for space I rarely use TREESIZE and what it shows might lead me to Waldo (or a whale.)

The tool Disk Cleanup in Windows is well documented so did you use that to remove say remove old Windows components?
Tutorial on the web. Example at https://www.cnet.com/how-to/how-to-delete-the-windows-old-folder-from-windows-10/

rproffitt 2,701 https://5calls.org Moderator

Thanks for that last post at about 4am PST Aug 12, 2017. That cleared up a lot.

Let's say I wanted to create a beautiful control panel today. I would want to try out the product at https://www.disti.com/products/gl-studio/

It sure looks like it would do the trick.

rproffitt 2,701 https://5calls.org Moderator

@d, it appears you are working the issues slowly as well as posting the same question many times.

As to your answers, you did not answer question 1. The photo link requires me to sign up at that site so no I can't do that. You could have answered my question. I worry there is a language barrier here.

On question 2 I worry you are hung up on a specific image. You might figure that out soon.

As to other information, I don't want to upset you but these first questions and ideas should have taken a few minutes of your time. I know we are all busy and hope you can get these done.

rproffitt 2,701 https://5calls.org Moderator

I'm sure all that is on the web. Here's a start. https://en.wikipedia.org/wiki/List_of_DOS_commands

rproffitt 2,701 https://5calls.org Moderator

I recall there are rule and security changes from one to the other. We don't use IIS so I'm far from expert but it appears that message means you have work to do. I'll share the search I used to find priors but want to write no, I don't expect you to be able to sling a site from one IIS to another without some work.

Read a few from this search.

rproffitt 2,701 https://5calls.org Moderator

My interface with OpenGL is mostly at a high level. For the Rasberry once we determine to code and use OpenGL we rarely have to go very deep.

I get the feeling you are working on some stripped single board computer or chip and working at the barest of bare metal systems.

At the office we've done such before but the cost is usually too high on the software team so we pay a little more for hardware (already noted Rasberry) and this cuts the cost of the software. Some call this heresy and some maintain we should all write in assembly so we don't waste CPU cycles or RAM.

Yes, the years have marched on and we rarely see a sparse target system anymore. I do want to note that I know sparse as my smallest solution was an Atmel which had no RAM. Just a few registers and a few kilobytes of flash memory. Few on the team write assembler so I took that job and loved it.

Back to topic. I see you understand that "modern" is up for grabs as to definition and it's deeply personal.

rproffitt 2,701 https://5calls.org Moderator

FFP? https://en.wikipedia.org/wiki/Fresh_frozen_plasma was the first hit and while I've worked on embedded systems for decades our systems still are a mix of plain old character interfaces (show a list, ask for a number from the list) to really nice polished graphics.

Fast forward to today and we haven't built a GUI from scratch now that we have so many ready to use systems (small? look at Rasberry Pi's).

The style is one I know to throw handcuffs on the dev team fast as they can go out of control on time as they try interface after interface and drain both time and budget.

By now you get the idea I mostly manage these projects and the proper way is set by the project owner. Said project owner must get the screens and how they expect it to work into the requirements document first. If they don't, projects rarely go well.

rproffitt 2,701 https://5calls.org Moderator

You may have to write more about your target system and most of all, the end goal.

I've seen folk spend far too much time worrying about CPU cycles when the product delivery date had already passed. At that point it's time to stop counting and start delivering a working system and work the CPU/GPU load later. Some engineers melt down and you may have to tell them the doors will close if we don't ship. They may be fine with that so your next stop is HR.

So what is the proper approach? I think "make it work" is the first goal as well as what else you can do to meet your Product Requirements.

About half the time I'm in on a project, the requirements were either not done, or were too short or too long.

For example, the debate over the UI can be the UI must have 3D or a skeuomorph design. "Apple officially shifted from skeuomorphism to a more simplified design" and Microsoft went all 3D and now has moved to a flat style.

What you call modern has to be well defined. Today the designs I see are mostly simple and flat.

rproffitt 2,701 https://5calls.org Moderator

Just to recap. You need to be sure of the following. You have yet to tell me about.

  1. Is VS2005 all patched up with service packs?
  2. You need to try an image that is plain as can be. BMP to boot.

We've gone back and forth a few times without you addressing my concerns and for now I'm calling your VS2005 faulty as details are only what you supply. Sounds faulty to me.

rproffitt 2,701 https://5calls.org Moderator

I'm begining to worry that your VS2005 is either not all patched up or was installed in some none standard manner. Tell all to save a lot of time.

Also, you write about "the image" and my advice was to not use the image that caused you problems.

I'm not there to see what you are doing but is there any chance you can try it my way?

rproffitt 2,701 https://5calls.org Moderator

Be aware you might be spamming this question and when folk see that, they usually don't answer.

My thought is that there are a few scenarios this will happen. I saw it with a 20 megapixel 4K UHD image, a corrupt image, an image that VS can't handle and maybe a few more things.

To sniff this out, start over and get the project to build without this image. Now try a simple, small BMP image. What happens?

rproffitt 2,701 https://5calls.org Moderator

@Stefan, the newness wears off with time and practice. However for some reason I'm reading a lot of posts where folk are importing from the future because code they wrote or downloaded was for a prior or current Python version.

As you trace what this code does and where then why it crashes your newness will be washed away. Usually these projects run as-is if the right Python and pre-requisites are met. Change Python, OS and what else and you are in debugging mode.

rproffitt 2,701 https://5calls.org Moderator

Hi Stefan, maybe you need to pose this question another way. Maybe you need to add that you want an app, ready to use that does this, that and all the other things.

As this is a Computer Science forum, it's usually not for asking for a completed app.

Think of this like you want something custom in your car. You can find the custom part but you have to modify and install it then get it working.

rproffitt 2,701 https://5calls.org Moderator

It appears folk have worked on such a thing. https://www.google.com/search?q=python+code+or+program+to+crawl+instagram

But you may have to tailor such to fit your needs. That is, crawler seems to be there but to collect, file the findings would be up to you to add the functionality.

rproffitt 2,701 https://5calls.org Moderator

@dongtrien. I don't see an answer to my question but a leap in some new direction. I know that it's upsetting to have troubles like this but maybe it's time to get more folk on your team or a call to Microsoft?

rproffitt 2,701 https://5calls.org Moderator

I have to ask for you to clarify your question as phpmyadmin is not a database.
Read https://social.msdn.microsoft.com/Forums/en-US/7d302e40-3cab-4df4-ad5c-344bca3e2d61/how-to-connect-visual-studio-to-phpmyadmin?forum=vbgeneral as it's a similar first question and the OP has to clarify.

rproffitt 2,701 https://5calls.org Moderator

@d, the oldest VS I have is at the office and it's VS2008. I recall that VS2005 needed service packs or bizarre problems happened. I would be guessing your new dev machines are just that.

So, all patched up?

rproffitt 2,701 https://5calls.org Moderator

You need to think about your question a bit more and don't count on others guessing this is the old homework about printing star patterns.

It's a long shot but read http://smallbusiness.chron.com/spacing-output-java-32722.html about spacing, etc.

rproffitt 2,701 https://5calls.org Moderator

There are tutorials about that error such as https://dzone.com/articles/how-resolve-2

Sorry if I can't solve this for you as I don't have your server to replicate the issue. It does sound as if it's well discussed over the years.

rproffitt 2,701 https://5calls.org Moderator

@R I hear you clearly but to work this you either use priors or if you want to start from scratch, break the goal into manageable chunks.

In the 62 lines above, install what some call debug statements so you can see where your code breaks down.

Added with edit.

Just a thought, did not test it out. I worry about reading files in Java. I've lost count of how many times the file path is incorrect or permissions didn't allow the file to be read.

rproffitt 2,701 https://5calls.org Moderator

Your link 404'd for me. I wonder if this is just spam.

rproffitt 2,701 https://5calls.org Moderator

Just so others know, there are replies at https://www.daniweb.com/community-center/threads/509357/how-to-read-from-a-text-file-into-an-html-page-using-java-servlet

So this must be so the post is in the right forum but I fear you are ignoring prior discussions on the subject.

rproffitt 2,701 https://5calls.org Moderator

While you didn't put this into a programming forum I did find this question has been kicked around for over a decade.

https://www.google.com/search?q=How+to+read+from+a+text+file+into+an+html+page+using+Java+Servlet%3F

So given folk have been working it for so long, it's a sure bet something good has been created you can use.

rproffitt 2,701 https://5calls.org Moderator